Grammalecte  Check-in [ad404457eb]

Overview
Comment:[graphspell] remove private useless vars from JSON dictionary files
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | graphspell
Files: files | file ages | folders
SHA3-256: ad404457eb7877c1b222cb112e6610fbcf91c5f880c93bb2e184c2b3470d37f9
User & Date: olr on 2018-02-07 16:53:43
Other Links: manifest | tags
Context
2018-02-07
22:53
[fr] faux positif: COD que <suj> avoir oublié de… check-in: f7cdd20fe9 user: olr tags: fr, trunk
16:53
[graphspell] remove private useless vars from JSON dictionary files check-in: ad404457eb user: olr tags: graphspell, trunk
16:39
[fx] update: lexicon editor check-in: 00eca59ea8 user: olr tags: fx, trunk
Changes

Modified graphspell-js/dawg.js from [a299d0be58] to [c471dee066].

   381    381               "nEntries": this.nEntry,
   382    382               "nNode": this.nNode,
   383    383               "nArc": this.nArc,
   384    384               "nAff": this.nAff,
   385    385               "cStemming": this.cStemming,
   386    386               "nTag": this.nTag,
   387    387               "dChar": helpers.mapToObject(this.dChar),
   388         -            "_arcMask": this._arcMask,
   389         -            "_finalNodeMask": this._finalNodeMask,
   390         -            "_lastArcMask": this._lastArcMask,
   391         -            "_addrBitMask": this._addrBitMask,
   392         -            "nBytesOffset": this.nBytesOffset
          388  +            "nBytesOffset": 1
   393    389           };
   394    390           return oJSON;
   395    391       }
   396    392   }
   397    393   
   398    394   
   399    395   const oNodeCounter = {

Modified graphspell-js/ibdawg.js from [c46a5bd198] to [b0a7255037].

   133    133           if (this.cStemming == "S") {
   134    134               this.funcStemming = str_transform.changeWordWithSuffixCode;
   135    135           } else if (this.cStemming == "A") {
   136    136               this.funcStemming = str_transform.changeWordWithAffixCode;
   137    137           } else {
   138    138               this.funcStemming = str_transform.noStemming;
   139    139           }
          140  +
          141  +        this._arcMask = (2 ** ((this.nBytesArc * 8) - 3)) - 1;
          142  +        this._finalNodeMask = 1 << ((this.nBytesArc * 8) - 1);
          143  +        this._lastArcMask = 1 << ((this.nBytesArc * 8) - 2);
          144  +
   140    145   
   141    146           // Configuring DAWG functions according to nVersion
   142    147           switch (this.nVersion) {
   143    148               case 1:
   144    149                   this.morph = this._morph1;
   145    150                   this.stem = this._stem1;
   146    151                   this._lookupArcNode = this._lookupArcNode1;

Modified graphspell/ibdawg.py from [047a0ad4e7] to [2a3e103bf0].

   182    182                               "nEntries": self.nEntries,
   183    183                               "nNode": self.nNode,
   184    184                               "nArc": self.nArc,
   185    185                               "nAff": self.nAff,
   186    186                               "cStemming": self.cStemming,
   187    187                               "nTag": self.nTag,
   188    188                               "dChar": self.dChar,
   189         -                            "_arcMask": self._arcMask,
   190         -                            "_finalNodeMask": self._finalNodeMask,
   191         -                            "_lastArcMask": self._lastArcMask,
   192         -                            "_addrBitMask": self._addrBitMask,
   193    189                               "nBytesOffset": self.nBytesOffset
   194    190                           }, ensure_ascii=False))
   195    191               if bInJSModule:
   196    192                   hDst.write(";\n\nexports.dictionary = dictionary;\n")
   197    193   
   198    194       def isValidToken (self, sToken):
   199    195           "checks if <sToken> is valid (if there is hyphens in <sToken>, <sToken> is split, each part is checked)"