Overview
Comment: | [graphspell] bValidToken always true if token has a list of tokens |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk | graphspell |
Files: | files | file ages | folders |
SHA3-256: |
fccf7fa150c6681819794308ab24d1ee |
User & Date: | olr on 2020-10-28 15:37:57 |
Other Links: | manifest | tags |
Context
2020-10-31
| ||
17:43 | [fr] ajustements check-in: ea86352a28 user: olr tags: trunk, fr | |
2020-10-28
| ||
15:37 | [graphspell] bValidToken always true if token has a list of tokens check-in: fccf7fa150 user: olr tags: trunk, graphspell | |
14:43 | [fr] ajustements check-in: 7ca244e02e user: olr tags: trunk, fr | |
Changes
Modified graphspell-js/spellchecker.js from [a2bcf6d2aa] to [09462696fb].
︙ | ︙ | |||
177 178 179 180 181 182 183 | if (!this.lexicographer) { return; } if (!oToken.hasOwnProperty("lMorph")) { oToken["lMorph"] = this.getMorph(oToken["sValue"]); } if (oToken["sType"].startsWith("WORD")) { | | | 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 | if (!this.lexicographer) { return; } if (!oToken.hasOwnProperty("lMorph")) { oToken["lMorph"] = this.getMorph(oToken["sValue"]); } if (oToken["sType"].startsWith("WORD")) { oToken["bValidToken"] = (oToken.hasOwnProperty("lMorph")) ? true : this.isValidToken(oToken["sValue"]); let [sPrefix, sStem, sSuffix] = this.lexicographer.split(oToken["sValue"]); if (sStem != oToken["sValue"]) { oToken["lSubTokens"] = [ { "sType": "WORD", "sValue": sPrefix, "lMorph": this.getMorph(sPrefix) }, { "sType": "WORD", "sValue": sStem, "lMorph": this.getMorph(sStem) }, { "sType": "WORD", "sValue": sSuffix, "lMorph": this.getMorph(sSuffix) } ]; |
︙ | ︙ |
Modified graphspell/spellchecker.py from [6207eb55be] to [2bdbe76996].
︙ | ︙ | |||
143 144 145 146 147 148 149 | - lSubTokens for each parts of the split token """ if not self.lexicographer: return if "lMorph" not in dToken: dToken["lMorph"] = self.getMorph(dToken["sValue"]) if dToken["sType"].startswith("WORD"): | | | 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 | - lSubTokens for each parts of the split token """ if not self.lexicographer: return if "lMorph" not in dToken: dToken["lMorph"] = self.getMorph(dToken["sValue"]) if dToken["sType"].startswith("WORD"): dToken["bValidToken"] = True if "lMorph" in dToken else self.isValidToken(dToken["sValue"]) sPrefix, sStem, sSuffix = self.lexicographer.split(dToken["sValue"]) if sStem != dToken["sValue"]: dToken["lSubTokens"] = [ { "sType": "WORD", "sValue": sPrefix, "lMorph": self.getMorph(sPrefix) }, { "sType": "WORD", "sValue": sStem, "lMorph": self.getMorph(sStem) }, { "sType": "WORD", "sValue": sSuffix, "lMorph": self.getMorph(sSuffix) } ] |
︙ | ︙ |