204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
|
"returns singular forms assuming sFlex is plural"
aSugg = set()
if sFlex.endswith("ux"):
if _oSpellChecker.isValid(sFlex[:-2]+"l"):
aSugg.add(sFlex[:-2]+"l")
if _oSpellChecker.isValid(sFlex[:-2]+"il"):
aSugg.add(sFlex[:-2]+"il")
if _oSpellChecker.isValid(sFlex[:-1]):
aSugg.add(sFlex[:-1])
if aSugg:
return "|".join(aSugg)
return ""
def suggMasSing (sFlex, bSuggSimil=False):
"returns masculine singular forms"
aSugg = set()
for sMorph in _oSpellChecker.getMorph(sFlex):
if not ":V" in sMorph:
|
>
|
>
>
>
>
|
|
|
|
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
|
"returns singular forms assuming sFlex is plural"
aSugg = set()
if sFlex.endswith("ux"):
if _oSpellChecker.isValid(sFlex[:-2]+"l"):
aSugg.add(sFlex[:-2]+"l")
if _oSpellChecker.isValid(sFlex[:-2]+"il"):
aSugg.add(sFlex[:-2]+"il")
if sFlex.endswith("UX"):
if _oSpellChecker.isValid(sFlex[:-2]+"L"):
aSugg.add(sFlex[:-2]+"L")
if _oSpellChecker.isValid(sFlex[:-2]+"IL"):
aSugg.add(sFlex[:-2]+"IL")
if sFlex.endswith(("s", "x", "S", "X")) and _oSpellChecker.isValid(sFlex[:-1]):
aSugg.add(sFlex[:-1])
if not aSugg:
aSugg.add(sFlex)
return "|".join(aSugg)
def suggMasSing (sFlex, bSuggSimil=False):
"returns masculine singular forms"
aSugg = set()
for sMorph in _oSpellChecker.getMorph(sFlex):
if not ":V" in sMorph:
|