Grammalecte  Check-in [e02a5c60ae]

Overview
Comment:[graphspell][js] spellchecker: getSimilarEntries with parameter nSuggLimit
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | graphspell | multid
Files: files | file ages | folders
SHA3-256: e02a5c60ae2f2a4493eb071495e270b88454146d3a8a2604ea41ebbb4d6a090f
User & Date: olr on 2018-03-27 08:54:13
Other Links: branch diff | manifest | tags
Context
2018-03-27
09:02
[lo] lexicon editor: search check-in: 73ecf7a6c0 user: olr tags: lo, multid
08:54
[graphspell][js] spellchecker: getSimilarEntries with parameter nSuggLimit check-in: e02a5c60ae user: olr tags: graphspell, multid
08:53
[graphspell][py] spellchecker: getSimilarEntries with parameter nSuggLimit check-in: d08f3c473e user: olr tags: graphspell, multid
Changes

Modified graphspell-js/spellchecker.js from [67633fda3c] to [ecdde041f7].

244
245
246
247
248
249
250
251

252
253

254
255
256

257
258
259

260
261
262
263
264
265
266
267
244
245
246
247
248
249
250

251
252

253
254
255

256
257
258

259
260
261
262
263
264
265
266
267







-
+

-
+


-
+


-
+








        if (this.bPersonalDic) {
            yield* this.oPersonalDic.select(sFlexPattern, sTagsPattern);
        }
    }

    getSimilarEntries (sWord, nSuggLimit=10) {
        // return a list of tuples (similar word, stem, morphology)
        let lResult = this.oMainDic.getSimilarEntries(sWord);
        let lResult = this.oMainDic.getSimilarEntries(sWord, nSuggLimit);
        if (this.bExtendedDic) {
            lResult.push(...this.oExtendedDic.getSimilarEntries(sWord));
            lResult.push(...this.oExtendedDic.getSimilarEntries(sWord, nSuggLimit));
        }
        if (this.bCommunityDic) {
            lResult.push(...this.oCommunityDic.getSimilarEntries(sWord));
            lResult.push(...this.oCommunityDic.getSimilarEntries(sWord, nSuggLimit));
        }
        if (this.bPersonalDic) {
            lResult.push(...this.oPersonalDic.getSimilarEntries(sWord));
            lResult.push(...this.oPersonalDic.getSimilarEntries(sWord, nSuggLimit));
        }
        return lResult;
    }
}

if (typeof(exports) !== 'undefined') {
    exports.SpellChecker = SpellChecker;
}