Overview
Comment: | [graphspell] function readableMorph() |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | graphspell | salxg |
Files: | files | file ages | folders |
SHA3-256: |
ebdbe426597f2d1349be216e0a30cb5a |
User & Date: | olr on 2020-08-23 05:28:57 |
Other Links: | branch diff | manifest | tags |
Context
2020-08-23
| ||
06:26 | merge trunk check-in: b4b3569231 user: olr tags: salxg | |
05:28 | [graphspell] function readableMorph() check-in: ebdbe42659 user: olr tags: graphspell, salxg | |
05:28 | [graphspell][js] update tags check-in: f6092331a8 user: olr tags: graphspell, salxg | |
Changes
Modified graphspell-js/spellchecker.js from [be4f6fe289] to [e42b82b880].
︙ | |||
130 131 132 133 134 135 136 | 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 | + + + + - - + + + + + + + + + + + + + + + + - - + + + + + + + + + + + + + + + + | // Lexicographer loadLexicographer (sLangCode) { // load default suggestion module for <sLangCode> if (typeof(process) !== 'undefined') { this.lexicographer = require(`./lexgraph_${sLangCode}.js`); } else if (self && self.hasOwnProperty("lexgraph_"+sLangCode)) { // self is the Worker this.lexicographer = self["lexgraph_"+sLangCode]; } } |
︙ |
Modified graphspell/spellchecker.py from [b9cca64fbd] to [ca24473f67].
︙ | |||
96 97 98 99 100 101 102 | 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 | - + | self.bCommunityDic = False def deactivatePersonalDictionary (self): "deactivate personal dictionary" self.bPersonalDic = False |
︙ | |||
123 124 125 126 127 128 129 130 131 132 133 134 135 136 | 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 | + + + + + | aRes = [ (" | ".join(lMorph), sLex) ] else: aRes = [ (sMorph, self.lexicographer.formatTags(sMorph)) for sMorph in lMorph ] if aRes: lWordAndMorph.append((sElem, aRes)) return lWordAndMorph def readableMorph (self, sMorph): if not self.lexicographer: return [] return self.lexicographer.formatTags(sMorph) # Storage def activateStorage (self): "store all lemmas and morphologies retrieved from the word graph" self.bStorage = True |
︙ | |||
231 232 233 234 235 236 237 | 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 | - + | if sWord not in self._dLemmas: self.getMorph(sWord) return self._dLemmas[sWord] return { s[1:s.find("/")] for s in self.getMorph(sWord) } def suggest (self, sWord, nSuggLimit=10): "generator: returns 1, 2 or 3 lists of suggestions" |
︙ |