Grammalecte  Check-in [c0162510e5]

Overview
Comment:[graphspell][bug] ibdawg: fix initialization with JSON object
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | graphspell | multid
Files: files | file ages | folders
SHA3-256: c0162510e57904171358c2af671b3be3455453d48d1ede93f352903811653290
User & Date: olr on 2018-03-27 16:12:02
Other Links: branch diff | manifest | tags
Context
2018-03-27
16:13
[lo] lexicon editor: search within personal dictionary check-in: 819d3a016f user: olr tags: lo, multid
16:12
[graphspell][bug] ibdawg: fix initialization with JSON object check-in: c0162510e5 user: olr tags: graphspell, multid
15:13
[fx][tb][lo] lexicon editor: participe passé invariable check-in: 86b963906e user: olr tags: fx, lo, multid, tb
Changes

Modified graphspell/ibdawg.py from [10a4e0fc85] to [b794aeec36].

   172    172           self.dCharVal = { v: k  for k, v in self.dChar.items() }
   173    173           self.nBytesOffset = 1 # version 3
   174    174   
   175    175       def _initJSON (self, oJSON):
   176    176           "initialize with a JSON text file"
   177    177           self.__dict__.update(oJSON)
   178    178           self.byDic = binascii.unhexlify(self.sByDic)
          179  +        self.dCharVal = { v: k  for k, v in self.dChar.items() }
   179    180   
   180    181       def getInfo (self):
   181    182           return  "  Language: {0.sLangName}   Lang code: {0.sLangCode}   Dictionary name: {0.sDicName}" \
   182    183                   "  Compression method: {0.nCompressionMethod:>2}   Date: {0.sDate}   Stemming: {0.cStemming}FX\n" \
   183    184                   "  Arcs values:  {0.nArcVal:>10,} = {0.nChar:>5,} characters,  {0.nAff:>6,} affixes,  {0.nTag:>6,} tags\n" \
   184    185                   "  Dictionary: {0.nEntry:>12,} entries,    {0.nNode:>11,} nodes,   {0.nArc:>11,} arcs\n" \
   185    186                   "  Address size: {0.nBytesNodeAddress:>1} bytes,  Arc size: {0.nBytesArc:>1} bytes\n".format(self)