Grammalecte  Check-in [bb3e601640]

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

Overview
Comment:[graphspell] suggestion mechanism: case recognition for split suggestions
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | graphspell
Files: files | file ages | folders
SHA3-256:bb3e601640403bcc3c75c4d5e255b02a15532f5ffb1ef3ab58e96555d6c3b1fa
User & Date: olr 2019-02-09 19:13:54
Context
2019-02-09
20:09
[graphspell][js] acronyms recognized by default check-in: 39acddf4cc user: olr tags: graphspell, trunk
19:13
[graphspell] suggestion mechanism: case recognition for split suggestions check-in: bb3e601640 user: olr tags: graphspell, trunk
18:00
[fr] nr: confusion nom/verbe check-in: b6eb18fc44 user: olr tags: fr, trunk
Changes

Changes to gc_lang/fr/rules.grx.

 18212  18212   
 18213  18213       [quel|quels|quelle|quelles]  >être  [les|ces|mes|tes|ses|nos|vos|leurs|plusieurs]  @:V¬:[NA]
 18214  18214       [quel|quels|quelle|quelles]  >pouvoir être  [les|ces|mes|tes|ses|nos|vos|leurs|plusieurs]  @:V¬:[NA]
 18215  18215           <<- /conf/ morph(\2, ":[123][sp]") --1>> =suggSimil(\-1, ":[NA].*:[pi]", True)          # Confusion probable : “\-1”  est un forme verbale conjuguée, alors qu’il faudrait probablement un substantif.
 18216  18216   
 18217  18217   TEST: Quel serait leur {{impacte}} sur la population.                               ->> impact
 18218  18218   TEST: Quels étaient les {{ennuient}} avec ces gens                                  ->> ennuis
        18219  +TEST: un homme humble et doux, quel être le deviendrait en de telles circonstances ?
 18219  18220   
 18220  18221   
 18221  18222   
 18222  18223   !!!
 18223  18224   !!!
 18224  18225   !!! Processeur: purge des préverbes                                                               !!
 18225  18226   !!!

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) && oSuggResult.sWord.startsWith(sNewWord)) {
          369  +            else if (this.isValid(sRemain) && oSuggResult.sWord.toLowerCase().startsWith(sNewWord.toLowerCase())) {
   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) and oSuggResult.sWord.startswith(sNewWord):
          332  +            elif self.isValid(sRemain) and oSuggResult.sWord.lower().startswith(sNewWord.lower()):
   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)