View Single Post
Old 09-06-2014, 05:23 AM   #962
elchamaco
Zealot
elchamaco will become famous soon enoughelchamaco will become famous soon enoughelchamaco will become famous soon enoughelchamaco will become famous soon enoughelchamaco will become famous soon enoughelchamaco will become famous soon enough
 
Posts: 128
Karma: 500
Join Date: Aug 2011
Device: kindle, boox
I've been testing the code you post with some dictionaries.

I've one strange case, before the sourcecode changes the dictionary unpacks but orth values where like encrypted. Also the struct is rare, the definition goes after the </idx:entry>
With the new code dictionary fails to unpack.

Before it's for "love" word:

Code:
<idx:entry>
<idx:orth value="owh">
</idx:entry>
<h2><b>love </b>

It fails to unpack with new code

Code:
Parsing dictionary index data 26074
ocnt 0, oentries 0, op1 0, op2 0, otagx 0
parsed INDX header:
len C0 nul1 0 type 1 gen 0 start E35C count C4C code FFFFFFFF lng FFFFFFFF total 0 ordt 0 ligt 0 nligt 0 nctoc 0
{'count': 3148, 'nctoc': 0, 'code': 4294967295L, 'nul1': 0, 'len': 192, 'ligt': 0, 'start': 58204, 'nligt': 0, 'ordt': 0, 'lng': 4294967295L, 'total': 0, 'type': 1, 'gen': 0} None None
Error: unpack requires a string argument of length 0


Error: Unpacking Failed

Testing with a big dictionary it fails before and after, probably to much references or something similar.

With another one, it works before and after, but not inflected forms. It has multiple indx. And also strange structure like the first dictionary

Code:
<idx:entry>
<idx:orth value="love">
</idx:entry>
<div><a id="filepos62042024" />
The idx entry it's closed before the definition html code


Also tested with wordnet3 free dictionary english-spanish. Worked fine before and after. Also inflexions and structure ok, but i suppose this one was generated with mobipocket.
elchamaco is offline   Reply With Quote