Closed ceefour closed 10 years ago
Done :)
I'm grateful for you tribute to my work. I wonder how you did the conversion and whether there would be other dicts converted :)
Thanks @soshial for noticing :)
The hardest part is building makedict ;)
After that the steps are simple:
/usr/share/dictd/*.{index|dict.dz}
dictunzip
the dict.dz
filemakedict -o xdxf *.dict.dz
However, makedict
seem to support only UTF-8
(which is fine BTW! I'm so glad for it. I'd be in trouble if you had only supported ASCII or no proper encoding support). But I've found one dictionary, gcide
, that is ISO-8859-1
encoded and therefore causes makedict
to throw error during conversion (due to invalid UTF-8 bytes). But after I convert the gcide.dict
file's encoding to UTF-8
via iconv
, then makedict
can process it successfully. :-) Do you want me to report this as bug?
@soshial As for other dicts...... yes, my plan is to convert most if not all dicts available in Ubuntu packages to XDXF and make it available here. But this will take time, hopefully I can finish them all. :)
@soshial I thank you very much for working on XDXF & makedict. It makes my life easier, because reading DICT format directly is hard.
After converting to XDXF via makedict, I use Python to process the resulting XDXF files and it's very easy... because Python has superb XML support and everything is UTF-8 encoded so I don't have to worry about strange characters, parsing, escaping, etc.
@soshial I just found out that all the dictionaries are already available since long time ago in http://sourceforge.net/projects/xdxf/files/dicts-XDXF/dictd04/ ;-)
Hehe... I didn't do my research well. Anyway, I learned something in this process :)
Unfortunately, makedict does not comply with the latest standard of XDXF anymore, that is why you XDXF dicts are unlikely to be opened by dicts :(
Say thank you to @soshial of https://github.com/soshial/xdxf_makedict fame for making this possible :)