Grammalecte  Diff

Differences From Artifact [9fcf40c037]:

To Artifact [2374ca7de7]:


   236    236               lMorph.push(...this.oCommunityDic.getMorph(sWord));
   237    237           }
   238    238           if (this.bPersonalDic) {
   239    239               lMorph.push(...this.oPersonalDic.getMorph(sWord));
   240    240           }
   241    241           if (this.bStorage) {
   242    242               this._dMorphologies.set(sWord, lMorph);
   243         -            this._dLemmas.set(sWord, new Set(this.getMorph(sWord).map((sMorph) => { return sMorph.slice(0, sMorph.indexOf(" ")); })));
          243  +            this._dLemmas.set(sWord, Array.from(new Set(this.getMorph(sWord).map((sMorph) => { return sMorph.slice(0, sMorph.indexOf(" ")); }))));
   244    244           }
   245    245           return lMorph;
   246    246       }
   247    247   
   248    248       getLemma (sWord) {
   249    249           // retrieves lemmas
   250    250           if (this.bStorage) {
   251    251               if (!this._dLemmas.has(sWord)) {
   252    252                   this.getMorph(sWord);
   253    253               }
   254    254               return this._dLemmas.get(sWord);
   255    255           }
   256         -        return new Set(this.getMorph(sWord).map((sMorph) => { return sMorph.slice(0, sMorph.indexOf(" ")); }));
          256  +        return Array.from(new Set(this.getMorph(sWord).map((sMorph) => { return sMorph.slice(0, sMorph.indexOf(" ")); })));
   257    257       }
   258    258   
   259    259       * suggest (sWord, nSuggLimit=10) {
   260    260           // generator: returns 1, 2 or 3 lists of suggestions
   261    261           yield this.oMainDic.suggest(sWord, nSuggLimit);
   262    262           if (this.bExtendedDic) {
   263    263               yield this.oExtendedDic.suggest(sWord, nSuggLimit);