Grammalecte  Check-in [0afadf325d]

Overview
Comment:[core] value function: CAPITAL words also tested as lowercase words
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | core
Files: files | file ages | folders
SHA3-256: 0afadf325d5f35e21a40f24d3e603d72893a6d663f05204f78b7f8a83ee97fa1
User & Date: olr on 2018-11-25 20:04:11
Other Links: manifest | tags
Context
2018-11-26
08:15
[fr] faux positifs check-in: f9a95f5a55 user: olr tags: trunk, fr
2018-11-25
20:04
[core] value function: CAPITAL words also tested as lowercase words check-in: 0afadf325d user: olr tags: trunk, core
20:03
[fr] faux positifs check-in: 1c2b72cb21 user: olr tags: trunk, fr
Changes

Modified gc_core/js/lang_core/gc_engine.js from [d6a8dae82e] to [10324df4f2].

1121
1122
1123
1124
1125
1126
1127




1128
1129
1130
1131
1132
1133
1134
    }
    else if (dToken["sValue"].gl_isUpperCase()) {
        //if sValue.lower() in sValues:
        //    return true;
        sValue = "|"+sValue.slice(1).gl_toCapitalize();
        if (sValues.includes(sValue)) {
            return true;




        }
    }
    return false;
}

function g_morph (dToken, sPattern, sNegPattern="", nLeft=null, nRight=null, bMemorizeMorph=true) {
    // analyse a token, return True if <sNegPattern> not in morphologies and <sPattern> in morphologies







>
>
>
>







1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
    }
    else if (dToken["sValue"].gl_isUpperCase()) {
        //if sValue.lower() in sValues:
        //    return true;
        sValue = "|"+sValue.slice(1).gl_toCapitalize();
        if (sValues.includes(sValue)) {
            return true;
        }
        sValue = sValue.toLowerCase();
        if (sValues.includes(sValue)) {
            return true;
        }
    }
    return false;
}

function g_morph (dToken, sPattern, sNegPattern="", nLeft=null, nRight=null, bMemorizeMorph=true) {
    // analyse a token, return True if <sNegPattern> not in morphologies and <sPattern> in morphologies

Modified gc_core/py/lang_core/gc_engine.py from [2de9c1ae19] to [20746fba5d].

936
937
938
939
940
941
942



943
944
945
946
947
948
949
        if sValue.lower() in sValues:
            return True
    elif dToken["sValue"].isupper():
        #if sValue.lower() in sValues:
        #    return True
        sValue = "|"+sValue[1:].capitalize()
        if sValue in sValues:



            return True
    return False


def g_morph (dToken, sPattern, sNegPattern="", nLeft=None, nRight=None, bMemorizeMorph=True):
    "analyse a token, return True if <sNegPattern> not in morphologies and <sPattern> in morphologies"
    if "lMorph" in dToken:







>
>
>







936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
        if sValue.lower() in sValues:
            return True
    elif dToken["sValue"].isupper():
        #if sValue.lower() in sValues:
        #    return True
        sValue = "|"+sValue[1:].capitalize()
        if sValue in sValues:
            return True
        sValue = sValue.lower()
        if sValue in sValues:
            return True
    return False


def g_morph (dToken, sPattern, sNegPattern="", nLeft=None, nRight=None, bMemorizeMorph=True):
    "analyse a token, return True if <sNegPattern> not in morphologies and <sPattern> in morphologies"
    if "lMorph" in dToken: