Overview
Comment: | [core][fr] suggestions: split verb for imperative forms |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | fr | core | rg |
Files: | files | file ages | folders |
SHA3-256: |
2031faacbd237612bee91096a323f18c |
User & Date: | olr on 2018-08-14 16:51:11 |
Other Links: | branch diff | manifest | tags |
Context
2018-08-15
| ||
09:22 | [core] debugging mode clarity check-in: 89a4f01579 user: olr tags: core, rg | |
2018-08-14
| ||
16:51 | [core][fr] suggestions: split verb for imperative forms check-in: 2031faacbd user: olr tags: fr, core, rg | |
16:24 | [fr] conversion: regex rules -> graph rules (formes impératives) check-in: 531af6d204 user: olr tags: fr, rg | |
Changes
Modified gc_lang/fr/modules/gce_suggestions.py from [98d695754d] to [00833488a6].
︙ | ︙ | |||
108 109 110 111 112 113 114 | if conj.hasConj(sStem, sTense, sWho): aSugg.add(conj.getConj(sStem, sTense, sWho)) if aSugg: return "|".join(aSugg) return "" | | > > > > | 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 | if conj.hasConj(sStem, sTense, sWho): aSugg.add(conj.getConj(sStem, sTense, sWho)) if aSugg: return "|".join(aSugg) return "" def suggVerbImpe (sFlex, bVC=False): "change <sFlex> to a verb at imperative form" if bVC: sFlex, sSfx = splitVerb(sFlex) aSugg = set() for sStem in _oSpellChecker.getLemma(sFlex): tTags = conj._getTags(sStem) if tTags: if conj._hasConjWithTags(tTags, ":E", ":2s"): aSugg.add(conj._getConjWithTags(sStem, tTags, ":E", ":2s")) if conj._hasConjWithTags(tTags, ":E", ":1p"): aSugg.add(conj._getConjWithTags(sStem, tTags, ":E", ":1p")) if conj._hasConjWithTags(tTags, ":E", ":2p"): aSugg.add(conj._getConjWithTags(sStem, tTags, ":E", ":2p")) if aSugg: if bVC: aSugg = list(map(lambda sSug: sSug + sSfx, aSugg)) return "|".join(aSugg) return "" def suggVerbInfi (sFlex): "returns infinitive forms of <sFlex>" return "|".join([ sStem for sStem in _oSpellChecker.getLemma(sFlex) if conj.isVerb(sStem) ]) |
︙ | ︙ |