Differences From Artifact [577ebd9866]:
- File gc_lang/fr/modules/gce_analyseur.py — part of check-in [fe3d698598] at 2020-05-09 15:21:35 on branch trunk — [fr] remaniements des pronoms associés, +ajustements et faux positifs [core] remove legacy code (user: olr, size: 2068) [annotate] [blame] [check-ins using] [more...]
To Artifact [7f3b260c43]:
- File gc_lang/fr/modules/gce_analyseur.py — part of check-in [2cb9c394c3] at 2020-08-08 11:24:08 on branch trunk — [core] fix previous commit: forget the function for JavaScript, and and move it to the proper file (user: olr, size: 2487) [annotate] [blame] [check-ins using]
| ︙ | |||
49 50 51 52 53 54 55 | 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | + + + + + + + + + + + + + |
def mbUnit (s):
"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
def queryNamesPOS(sWord1, sWord2):
lMorph1 = _oSpellChecker.getMorph(sWord1)
lMorph2 = _oSpellChecker.getMorph(sWord2)
if not lMorph1 or not lMorph2:
return ":N:e:p"
sGender1 = cr.getGender(lMorph1)
sGender2 = cr.getGender(lMorph2)
if sGender1 == ":m" or sGender2 == ":m":
return ":N:m:p"
if sGender1 == ":f" or sGender2 == ":f":
return ":N:f:p"
return ":N:e:p"
|