Grammalecte  Diff

Differences From Artifact [299826c38f]:

To Artifact [088e14f90c]:


329
330
331
332
333
334
335



336
337
338
339
340
341
342
        // generator: returns 1, 2 or 3 lists of suggestions
        if (this.lexicographer) {
            if (this.lexicographer.dSugg.has(sWord)) {
                yield this.lexicographer.dSugg.get(sWord).split("|");
            } else if (sWord.gl_isTitle() && this.lexicographer.dSugg.has(sWord.toLowerCase())) {
                let lSuggs = this.lexicographer.dSugg.get(sWord.toLowerCase()).split("|");
                yield lSuggs.map((sSugg) => { return sSugg.slice(0,1).toUpperCase() + sSugg.slice(1); });



            } else {
                let lSuggs = this.oMainDic.suggest(sWord, nSuggLimit, true);
                lSuggs = lSuggs.filter((sSugg) => this.lexicographer.isValidSugg(sSugg, this));
                yield lSuggs;
            }
        } else {
            yield this.oMainDic.suggest(sWord, nSuggLimit, true);







>
>
>







329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
        // generator: returns 1, 2 or 3 lists of suggestions
        if (this.lexicographer) {
            if (this.lexicographer.dSugg.has(sWord)) {
                yield this.lexicographer.dSugg.get(sWord).split("|");
            } else if (sWord.gl_isTitle() && this.lexicographer.dSugg.has(sWord.toLowerCase())) {
                let lSuggs = this.lexicographer.dSugg.get(sWord.toLowerCase()).split("|");
                yield lSuggs.map((sSugg) => { return sSugg.slice(0,1).toUpperCase() + sSugg.slice(1); });
            } else if (sWord.gl_isUpperCase() && this.lexicographer.dSugg.has(sWord.toLowerCase())) {
                let lSuggs = this.lexicographer.dSugg.get(sWord.toLowerCase()).split("|");
                yield lSuggs.map((sSugg) => { return sSugg.toUpperCase(); });
            } else {
                let lSuggs = this.oMainDic.suggest(sWord, nSuggLimit, true);
                lSuggs = lSuggs.filter((sSugg) => this.lexicographer.isValidSugg(sSugg, this));
                yield lSuggs;
            }
        } else {
            yield this.oMainDic.suggest(sWord, nSuggLimit, true);