Overview
Comment: | [graphspell][bug] create binary dictionary: count root arcs for dictionary size and node address size |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk | graphspell |
Files: | files | file ages | folders |
SHA3-256: |
c0d2ca10da73263e390a0633fa237eea |
User & Date: | olr on 2019-04-29 13:21:59 |
Other Links: | manifest | tags |
Context
2019-04-29
| ||
15:34 | [lo] Dictionary switcher: code cleaning, doesn’t work anymore for an obscure reason (though it works in another dialog) check-in: e60cef893b user: olr tags: trunk, lo | |
13:21 | [graphspell][bug] create binary dictionary: count root arcs for dictionary size and node address size check-in: c0d2ca10da user: olr tags: trunk, graphspell | |
13:19 | [fr] pt: ajustements check-in: 65c2f8fd3c user: olr tags: trunk, fr | |
Changes
Modified graphspell-js/dawg.js from [f4d9319997] to [239974bcc4].
︙ | |||
223 224 225 226 227 228 229 | 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 | - + | } countNodes () { this.nNode = this.dMinimizedNodes.size; } countArcs () { |
︙ |
Modified graphspell/dawg.py from [0043f035e5] to [bace844224].
︙ | |||
228 229 230 231 232 233 234 | 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 | - + | def countNodes (self): "count the number of nodes of the whole word graph" self.nNode = len(self.lMinimizedNodes) def countArcs (self): "count the number of arcs in the whole word graph" |
︙ | |||
605 606 607 608 609 610 611 612 613 614 | 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 | + + + + + + + + - - + + - + - + | def setPos (self): # version 2 "define a position for node (version 2)" self.pos = DawgNode.NextPos DawgNode.NextPos += 1 def __str__ (self): s = "Node " + str(self.i) + " @ " + str(self.addr) + (" [final]" if self.final else "") + "\n" for arc, node in self.arcs.items(): s += " " +str(arc) s += " > " + str(node.i) s += " @ " + str(node.addr) + "\n" return s def __repr__ (self): # Caution! this function is used for hashing and comparison! sFinalChar = "1" if self.final else "0" l = [sFinalChar] |
︙ |