Grammalecte  Check-in [0534e554b4]

Overview
Comment:[core][fr][py] remove useless code
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | fr | core | rg
Files: files | file ages | folders
SHA3-256: 0534e554b481dcb52f719c40ce3640ab9b47448ec17d6ed4efb0fd47714a5ec5
User & Date: olr on 2018-09-11 12:58:27
Other Links: branch diff | manifest | tags
Context
2018-09-11
12:59
[core][fr][js] missing function, and useless code check-in: bc565ecc30 user: olr tags: fr, core, rg
12:58
[core][fr][py] remove useless code check-in: 0534e554b4 user: olr tags: fr, core, rg
12:45
[fx] worker: import rules graph check-in: b122bc9187 user: olr tags: fx, rg
Changes

Modified gc_lang/fr/modules/gce_analyseur.py from [780ea92640] to [252fe3713f].

103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
    "returns True it can be a measurement unit"
    if _zUnitSpecial.search(s):
        return True
    if 1 < len(s) < 16 and s[0:1].islower() and (not s[1:].islower() or _zUnitNumbers.search(s)):
        return True
    return False


#### Syntagmes

_zNextIsVerb1 = re.compile(" +[nmts](?:e |’)")
_zNextIsVerb2 = re.compile(r" +(\w[\w-]+)")

def isNextVerb (dDA, s, iOffset):
    "returns True if next word is a verb"
    if _zNextIsVerb1.match(s):
        return True
    m = _zNextIsVerb2.match(s)
    if m and morph(dDA, (iOffset+m.start(1), m.group(1)), ":[123][sp]", False):
        return True
    return False


#### Exceptions

aREGULARPLURAL = frozenset(["abricot", "amarante", "aubergine", "acajou", "anthracite", "brique", "caca", "café", \
                            "carotte", "cerise", "chataigne", "corail", "citron", "crème", "grave", "groseille", \
                            "jonquille", "marron", "olive", "pervenche", "prune", "sable"])
aSHOULDBEVERB = frozenset(["aller", "manger"])







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







103
104
105
106
107
108
109















110
111
112
113
114
115
116
    "returns True it can be a measurement unit"
    if _zUnitSpecial.search(s):
        return True
    if 1 < len(s) < 16 and s[0:1].islower() and (not s[1:].islower() or _zUnitNumbers.search(s)):
        return True
    return False

















#### Exceptions

aREGULARPLURAL = frozenset(["abricot", "amarante", "aubergine", "acajou", "anthracite", "brique", "caca", "café", \
                            "carotte", "cerise", "chataigne", "corail", "citron", "crème", "grave", "groseille", \
                            "jonquille", "marron", "olive", "pervenche", "prune", "sable"])
aSHOULDBEVERB = frozenset(["aller", "manger"])