Overview
Context
Changes
Modified gc_lang/fr/modules-js/gce_analyseur.js
from [1edcbef032]
to [13a42a7dc2] .
54
55
56
57
58
59
60
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
return true;
}
if (s.length > 1 && s.length < 16 && s.slice(0, 1).gl_isLowerCase() && (!s.slice(1).gl_isLowerCase() || /[0-9]/.test(s))) {
return true;
}
return false;
}
function queryNamesPOS (sWord1, sWord2) {
let lMorph1 = _oSpellChecker.getMorph(sWord1);
let lMorph2 = _oSpellChecker.getMorph(sWord2);
if (lMorph1.length == 0 || lMorph2.length == 0) {
return ":N:e:p";
}
let sGender1 = cregex.getGender(lMorph1);
let sGender2 = cregex.getGender(lMorph2);
if (sGender1 == ":m" || sGender2 == ":m") {
return ":N:m:p";
}
if (sGender1 == ":f" || sGender2 == ":f") {
return ":N:f:p";
}
return ":N:e:p";
}
Modified gc_lang/fr/modules/gce_analyseur.py
from [577ebd9866]
to [7f3b260c43] .
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"
Modified gc_lang/fr/modules/gce_suggestions.py
from [72c426fe26]
to [5701f141a0] .
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
535
536
537
538
539
540
541
-
-
-
-
-
-
-
-
-
-
-
-
-
-
'/': '_'
})
def normalizeInclusiveWriting (sToken):
"typography: replace word separators used in inclusive writing by underscore (_)"
return sToken.translate(_xNormalizedCharsForInclusiveWriting)
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"