Grammalecte  Check-in [098d31c33b]

Overview
Comment:[core][bug] gc engine: fix tag reader
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | core | rg
Files: files | file ages | folders
SHA3-256: 098d31c33be6fdc026938dd707fb23ffcc145c0e199736d2e9bab9205f5f6549
User & Date: olr on 2018-06-22 17:23:15
Other Links: branch diff | manifest | tags
Context
2018-06-22
17:24
[fr] étiquetage des pronoms pour détection des verbes isolés mal conjugués check-in: 420a991f44 user: olr tags: fr, rg
17:23
[core][bug] gc engine: fix tag reader check-in: 098d31c33b user: olr tags: core, rg
17:09
[misc] SublimeText syntax and theme update check-in: f3474c9a8d user: olr tags: misc, rg
Changes

Modified gc_core/py/lang_core/gc_engine.py from [3b5bf65d7f] to [8a69397483].

963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
    zPattern = re.compile(sPattern)
    return any(zPattern.search(sMorph)  for sMorph in lMorph)


def g_tag_before (dToken, dTags, sTag):
    if sTag not in dTags:
        return False
    if dToken["nStart"] > dTags[sTag][0]:
        return True
    return False


def g_tag_after (dToken, dTags, sTag):
    if sTag not in dTags:
        return False
    if dToken["nStart"] < dTags[sTag][1]:
        return True
    return False


#### Disambiguator

def g_select (dToken, sPattern, lDefault=None):







|







|







963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
    zPattern = re.compile(sPattern)
    return any(zPattern.search(sMorph)  for sMorph in lMorph)


def g_tag_before (dToken, dTags, sTag):
    if sTag not in dTags:
        return False
    if dToken["i"] > dTags[sTag][0]:
        return True
    return False


def g_tag_after (dToken, dTags, sTag):
    if sTag not in dTags:
        return False
    if dToken["i"] < dTags[sTag][1]:
        return True
    return False


#### Disambiguator

def g_select (dToken, sPattern, lDefault=None):