Grammalecte  Check-in [d32a1cd66e]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:[graphspell] remove split suggestions when start differs
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | graphspell
Files: files | file ages | folders
SHA3-256:d32a1cd66e5f28cc574e7e5846c76c0f451504778627bec9b7c17b42e89f7755
User & Date: olr 2019-02-05 18:17:57
Context
2019-02-07
11:48
[fr] faux positif check-in: d012b8a0d4 user: olr tags: fr, trunk
2019-02-05
18:40
merge trunk check-in: 521f9f5963 user: olr tags: comdic
18:17
[graphspell] remove split suggestions when start differs check-in: d32a1cd66e user: olr tags: graphspell, trunk
2019-01-31
12:02
[fr] faux positif: confusion des/dès check-in: 6745895369 user: olr tags: fr, trunk
Changes

Changes to graphspell-js/ibdawg.js.

   362    362               if (sRemain == "") {
   363    363                   oSuggResult.addSugg(sNewWord);
   364    364                   for (let sTail of this._getTails(iAddr)) {
   365    365                       oSuggResult.addSugg(sNewWord+sTail);
   366    366                   }
   367    367                   return;
   368    368               }
   369         -            else if (this.isValid(sRemain)) {
          369  +            else if (this.isValid(sRemain) && oSuggResult.sWord.startsWith(sNewWord)) {
   370    370                   oSuggResult.addSugg(sNewWord+" "+sRemain);
   371    371               }
   372    372           }
   373    373           if (nDist > oSuggResult.nDistLimit) {
   374    374               return;
   375    375           }
   376    376   

Changes to graphspell/ibdawg.py.

   325    325           #logging.info((nDeep * "  ") + sNewWord + ":" + sRemain)
   326    326           if int.from_bytes(self.byDic[iAddr:iAddr+self.nBytesArc], byteorder='big') & self._finalNodeMask:
   327    327               if not sRemain:
   328    328                   oSuggResult.addSugg(sNewWord, nDeep)
   329    329                   for sTail in self._getTails(iAddr):
   330    330                       oSuggResult.addSugg(sNewWord+sTail, nDeep)
   331    331                   return
   332         -            elif self.isValid(sRemain):
          332  +            elif self.isValid(sRemain) and oSuggResult.sWord.startswith(sNewWord):
   333    333                   oSuggResult.addSugg(sNewWord+" "+sRemain)
   334    334           if nDist > oSuggResult.nDistLimit:
   335    335               return
   336    336           cCurrent = sRemain[0:1]
   337    337           for cChar, jAddr in self._getCharArcs(iAddr):
   338    338               if cChar in cp.d1to1.get(cCurrent, cCurrent):
   339    339                   self._suggest(oSuggResult, sRemain[1:], nMaxSwitch, nMaxDel, nMaxHardRepl, nMaxJump, nDist, nDeep+1, jAddr, sNewWord+cChar)