Differences From Artifact [08553979b3]:
- File gc_core/py/lang_core/gc_engine.py — part of check-in [0b3f9d14dc] at 2018-07-17 11:38:39 on branch rg — [core] better capitalization function (user: olr, size: 47628) [annotate] [blame] [check-ins using]
To Artifact [3e0ddd4369]:
- File gc_core/py/lang_core/gc_engine.py — part of check-in [e1240a6d7e] at 2018-07-19 07:28:30 on branch rg — [core] gc engine: token tags (user: olr, size: 47922) [annotate] [blame] [check-ins using]
| ︙ | |||
678 679 680 681 682 683 684 685 686 687 688 689 690 691 | 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 | + + + + + + + |
else:
if sNegPattern and any(re.search(sNegPattern, sMorph) for sMorph in _oSpellChecker.getMorph(dToken["sValue"])):
continue
if not sPattern or any(re.search(sPattern, sMorph) for sMorph in _oSpellChecker.getMorph(dToken["sValue"])):
if bDebug:
print(" MATCH: @" + sRegex)
yield dGraph[dNode["<re_morph>"][sRegex]]
# token tags
if "tags" in dToken and "<tags>" in dNode:
for sTag in dNode["<tags>"]:
if sTag in dToken["tags"]:
if bDebug:
print(" MATCH: $" + sTag)
yield dGraph[dNode["<tags>"][sTag]]
# meta arc (for token type)
if "<meta>" in dNode:
for sMeta in dNode["<meta>"]:
# not regex here, we just search if <dNode["sType"]> exists within <sMeta>
if sMeta == "*":
if bDebug:
print(" MATCH: *" + sMeta)
|
| ︙ |