Overview
Comment: | [graphspell][core][build][lo] remove extended dictionary |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk | core | build | lo | graphspell |
Files: | files | file ages | folders |
SHA3-256: |
51a40c07e38502d8732c022b17231a85 |
User & Date: | olr on 2019-04-04 07:23:07 |
Other Links: | manifest | tags |
Context
2019-04-04
| ||
08:03 | [graphspell] suggestions with trailing numbers: avoid to repeat splitting for each dictionary check-in: e32c092585 user: olr tags: trunk, graphspell | |
07:23 | [graphspell][core][build][lo] remove extended dictionary check-in: 51a40c07e3 user: olr tags: trunk, core, build, lo, graphspell | |
2019-04-03
| ||
20:04 | [fr] phonet_simil: quota/cota check-in: 8fced24da3 user: olr tags: trunk, fr | |
Changes
Modified gc_core/js/lang_core/gc_engine.js from [65c6c687b8] to [827604c5fa].
︙ | |||
64 65 66 67 68 69 70 | 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 | - + - + - + | //// Initialization load: function (sContext="JavaScript", sColorType="aRGB", sPath="") { try { if(typeof(process) !== 'undefined') { var spellchecker = require("../graphspell/spellchecker.js"); |
︙ |
Modified gc_core/py/lang_core/gc_engine.py from [7f3fb3a1a4] to [731ea086d0].
︙ | |||
58 59 60 61 62 63 64 | 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 | - + | "initialization of the grammar checker" global _oSpellChecker global _sAppContext global _dOptions global _dOptionsColors global _oTokenizer try: |
︙ |
Modified gc_lang/fr/config.ini from [eb65238ea7] to [7cdb20c7c4].
︙ | |||
18 19 20 21 22 23 24 | 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | - - - - - | lexicon_src = lexicons/French.lex dic_filenames = fr-allvars,fr-classic,fr-reform dic_name = fr-allvars,fr-classic,fr-reform dic_description = Français (Toutes variantes),Français (Classique),Français (Réforme 1990) dic_filter = ,[*CMPX]$,[*RPX]$ dic_default_filename_py = fr-allvars dic_default_filename_js = fr-allvars |
︙ |
Modified gc_lang/fr/oxt/Graphspell.py from [d8a06b777e] to [b9945ec9c3].
︙ | |||
62 63 64 65 66 67 68 | 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 | - + - + | sPersonalDicJSON = self.xOptionNode.getPropertyValue("personal_dic") if sPersonalDicJSON: try: personal_dic = json.loads(sPersonalDicJSON) except: print("Graphspell: wrong personal_dic") traceback.print_exc() |
︙ | |||
104 105 106 107 108 109 110 | 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 | - + - + | def hasLocale (self, aLocale): if aLocale in self.locales: return True for e in self.locales: if aLocale.Language == e.Language and (e.Country == aLocale.Country or e.Country == ""): return True return False |
︙ | |||
153 154 155 156 157 158 159 | 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 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 | - + - + - + - + - + - + | #self.xFallbackSpellChecker = self.xSvMgr.createInstance(sSpellchecker) #if self.xFallbackSpellChecker: # print("Spell checker: %s" % xSpellChecker) # break class SpellAlternatives (unohelper.Base, XSpellAlternatives): |
Modified graphspell-js/spellchecker.js from [a3d5cf0515] to [2783c2d059].
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | - - + | // Spellchecker // Wrapper for the IBDAWG class. // Useful to check several dictionaries at once. // To avoid iterating over a pile of dictionaries, it is assumed that 3 are enough: // - the main dictionary, bundled with the package |
︙ | |||
29 30 31 32 33 34 35 | 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | - + - - | ["fr", "fr-allvars.json"], ["en", "en.json"] ]); class SpellChecker { |
︙ | |||
93 94 95 96 97 98 99 | 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 | - - - - - - - - - - - - - - - | setMainDictionary (dictionary, sPath="") { // returns true if the dictionary is loaded this.oMainDic = this._loadDictionary(dictionary, sPath, true); return Boolean(this.oMainDic); } |
︙ | |||
177 178 179 180 181 182 183 | 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 | - - - - - - - - - - - - | // IBDAWG functions isValidToken (sToken) { // checks if sToken is valid (if there is hyphens in sToken, sToken is split, each part is checked) if (this.oMainDic.isValidToken(sToken)) { return true; } |
︙ | |||
260 261 262 263 264 265 266 | 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 | - - - - - - - - - | } return Array.from(new Set(this.getMorph(sWord).map((sMorph) => { return sMorph.slice(1, sMorph.indexOf("/")); }))); } * suggest (sWord, nSuggLimit=10) { // generator: returns 1, 2 or 3 lists of suggestions yield this.oMainDic.suggest(sWord, nSuggLimit); |
Modified graphspell/spellchecker.py from [2e8bbcc172] to [fe2798d7b3].
︙ | |||
21 22 23 24 25 26 27 | 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | - + - - | "en": "en.bdic" } class SpellChecker (): "SpellChecker: wrapper for the IBDAWG class" |
︙ | |||
69 70 71 72 73 74 75 | 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 | - - - - - - - - - - - - - - | return self.oTokenizer def setMainDictionary (self, source): "returns True if the dictionary is loaded" self.oMainDic = self._loadDictionary(source, True) return bool(self.oMainDic) |
︙ | |||
180 181 182 183 184 185 186 | 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 | - - - - - - - - | # IBDAWG functions def isValidToken (self, sToken): "checks if sToken is valid (if there is hyphens in sToken, sToken is split, each part is checked)" if self.oMainDic.isValidToken(sToken): return True |
︙ | |||
248 249 250 251 252 253 254 | 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 | - - - - - - - - - | elif sWord.istitle() and sWord.lower() in self.dDefaultSugg: lRes = self.dDefaultSugg[sWord.lower()].split("|") yield list(map(lambda sSugg: sSugg[0:1].upper()+sSugg[1:], lRes)) else: yield self.oMainDic.suggest(sWord, nSuggLimit) else: yield self.oMainDic.suggest(sWord, nSuggLimit) |
Modified make.py from [c862a44ad1] to [5247125cb0].
︙ | |||
307 308 309 310 311 312 313 | 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 | - + - - - - | dVars[sf[:-3]] = open("js_extension/"+sf, "r", encoding="utf-8").read() for sf in os.listdir("graphspell-js"): if not os.path.isdir("graphspell-js/"+sf): file_util.copy_file("graphspell-js/"+sf, "grammalecte-js/graphspell") helpers.copyAndFileTemplate("graphspell-js/"+sf, "grammalecte-js/graphspell/"+sf, dVars) |
︙ | |||
351 352 353 354 355 356 357 | 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 | - - - - - - + | lSfDictDst = dVars['dic_filenames'].split(",") lDicName = dVars['dic_name'].split(",") lDescription = dVars['dic_description'].split(",") lFilter = dVars['dic_filter'].split(",") for sfDictDst, sDicName, sDescription, sFilter in zip(lSfDictDst, lDicName, lDescription, lFilter): lex_build.build(spfLexSrc, dVars['lang'], dVars['lang_name'], sfDictDst, bJavaScript, sDicName, sDescription, sFilter, dVars['stemming_method'], int(dVars['fsa_method'])) else: |
︙ | |||
383 384 385 386 387 388 389 | 374 375 376 377 378 379 380 381 382 383 384 385 386 387 | - | xParser.add_argument("-bb", "--build_data_before", help="launch build_data.py (only part 1: before dictionary building)", action="store_true") xParser.add_argument("-ba", "--build_data_after", help="launch build_data.py (only part 2: before dictionary building)", action="store_true") xParser.add_argument("-d", "--dict", help="generate FSA dictionary", action="store_true") xParser.add_argument("-t", "--tests", help="run unit tests", action="store_true") xParser.add_argument("-p", "--perf", help="run performance tests", action="store_true") xParser.add_argument("-pm", "--perf_memo", help="run performance tests and store results in perf_memo.txt", action="store_true") xParser.add_argument("-js", "--javascript", help="JavaScript build for Firefox", action="store_true") |
︙ | |||
410 411 412 413 414 415 416 | 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 | - - - - - + | copyGraphspellCore(xArgs.javascript) for sLang in xArgs.lang: if os.path.exists("gc_lang/"+sLang) and os.path.isdir("gc_lang/"+sLang): xConfig = getConfig(sLang) dVars = xConfig._sections['args'] |
︙ |