Grammalecte  Check-in [0369072caa]

Overview
Comment:[graphspell][js] dawg: useless parameters
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | graphspell
Files: files | file ages | folders
SHA3-256: 0369072caa6172b5c0f7e78f968a6524b9a257d03cea4485df29d03f264554fd
User & Date: olr on 2020-11-16 10:33:54
Other Links: manifest | tags
Context
2020-11-16
17:45
[fr] ajustements check-in: c456372ec6 user: olr tags: fr, trunk
10:33
[graphspell][js] dawg: useless parameters check-in: 0369072caa user: olr tags: graphspell, trunk
2020-11-15
09:53
[graphspell][js] dawg: fix bug about node identification check-in: 15cc11e719 user: olr tags: graphspell, trunk
Changes

Modified graphspell-js/dawg.js from [35cc08667a] to [1c01c104ea].

   494    494           // Nodes are equivalent if they have identical arcs, and each identical arc leads to identical states.
   495    495           return this.__str__() == other.__str__();
   496    496       }
   497    497   
   498    498       sortArcs (dValOccur) {
   499    499           let lTemp = Array.from(this.arcs.entries());
   500    500           lTemp.sort(function (a, b) {
   501         -            if (dValOccur.get(a[0], 0) > dValOccur.get(b[0], 0))
          501  +            if (dValOccur.get(a[0]) > dValOccur.get(b[0]))
   502    502                   return -1;
   503         -            if (dValOccur.get(a[0], 0) < dValOccur.get(b[0], 0))
          503  +            if (dValOccur.get(a[0]) < dValOccur.get(b[0]))
   504    504                   return 1;
   505    505               return 0;
   506    506           });
   507    507           this.arcs = new Map(lTemp);
   508    508       }
   509    509   
   510    510       display (nTab, lArcVal, bRecur=false) {