Order it now! Amazon prioritizes orders on a first come, first served basis.


View Full Version : Dictionary support for cr3, did anybody get this to work?


daviddem
03-02-2009, 09:24 PM
Snapshot 20090222 has cr3 with dictionary support installed.

So I followed the instructions and downloaded the GCIDE dictionary in .dict.dz format and associated .index file from the dict.org ftp site. I then created a dict folder on the root of my SD card and copied both aforementioned files in it.

When I search for a word from a book open in cr3, I simply get thrown back out to the shelf. Nothing else happens.

The file I tried is the 0.48-4 version under the dict-pre-Debian folder. Maybe I should have taken the 0.44 version under the dict-pre folder. I'll give that a go later.

This seems to be a problem with this particular dictionary because I also tried the WordNet dictionary, and it works. Well, partly. Weirdly, I get pages of definitions and synonyms for some words (i.e. wrap, green, show, shoe) and nothing at all for others (i.e. jacket, open, close, cotton).

I also tried the Webster 1913 dictionary, and I get blank pages for all the words I have tried so far... not much help.

So what is the story here? Anybody had more success with this?

quickhand
03-02-2009, 10:22 PM
Don't worry. I'm waiting on dottedmag to do a quick rewrite of the libtinydict library, then I'm going to make a nice dictionary app with all the bells and whistles. :)

daviddem
03-02-2009, 10:36 PM
Don't worry. I'm waiting on dottedmag to do a quick rewrite of the libtinydict library, then I'm going to make a nice dictionary app with all the bells and whistles. :)

:2thumbsup

Good stuff, dude!

Will this be accessible directly from fbreader and coolreader, so we can lookup words as we read books?

Definitely, after trying OI, there is no going back!

loweb1
03-03-2009, 02:11 AM
Don't worry.

WooHoo!

You guys are amazing, OI is awesome!

:thanks:

gwitt
05-06-2009, 05:08 PM
I used the *dict.dz format dictionary (coming with many Linux distributions), which you also can get e.g. from http://sourceforge.net/project/showfiles.php?group_id=80679 or other sources on the web.

For the English-German translation I extracted the "stardict-freedict-eng-deu-2.4.2.tar.bz" file and moved the files

freedict-eng-deu.dict.dz
freedict-eng-deu.index

towards a "dict" directory on my SD card

After inserting the SD card and restarting my book in CR3 reader I was able to get translations with:
<Menu> - 4
and then letter input according to the T9 letter groups in the bottom line of the screen. Some words are missing as the dict is not very big, but it is a very nice feature and comfortable reading
After that I thought it might be even better to have the "dict" directory on the device itself instead on an SD card. So I did a somewhat "dirty" but working trick:

I connected from the Linux command line via

# ssh root@192.168.111.1
# (password: zxc)

and copied the SD card "dict" directory to the device itself

# cp /media/sd/dict /media/

After that I took out the SC-card and linked the "dict" directory to the sd-card mount point dcirectory

# ln -s /media/dict /media/sd/

with
# ls /media/sd/

I checked whether the link had been generated

A restart of a book on the reader itself showed that the CR3 dictionary worked fine.

If you instert the SD card again the /media/sd directory is mounted normally and the reader takes the dictionary in the SD card directory.
After taking out the SD card it switches back to the on-device directory.

Such you are independent of a SD card.

idle
05-12-2009, 04:47 AM
I also tried the WordNet dictionary, and it works. Well, partly. Weirdly, I get pages of definitions and synonyms for some words (i.e. wrap, green, show, shoe) and nothing at all for others (i.e. jacket, open, close, cotton).

This is exactly what WordNet dictionary does for me. I've noticed, that the missing words seem to be in blocks (considering alphabetical order).

For example, when I search for words starting with an "a", the first one it offers, is "annotate" - rather far down the alphabet. There are no words in between to be found - no "abbey", no "acid", etc.
Similarly, the "b" words start with "black sea bass". Also in other parts of the alphabet, random sections seem to be missing.

The thing is, the source files seem to contain the missing words, so they are just not found.

keng2000
05-12-2009, 10:44 PM
I got the problem
dictionary comes with .idx not .index
Anyone explains how to convert.... thanks

UPDATE: I solve my problem by getting raw dictionary data in XML and convert them to C5 and build .dict and .index. then use dictzip to make dict.dz and fially it works with CR3.
My dictionary is Lexitron ENG-THAI, THAI-ENG.

wallcraft
05-22-2009, 07:04 AM
So I followed the instructions and downloaded the GCIDE dictionary in .dict.dz format and associated .index file from the dict.org ftp site. The link on some of the dict.org web pages is broken, but the files are at ftp://ftp.dict.org/dict/pre/

These are apparently the right files, but still with the problems reported in this thread.

Kardell
05-22-2009, 05:06 PM
I got the problem
dictionary comes with .idx not .index
Anyone explains how to convert.... thanks

UPDATE: I solve my problem by getting raw dictionary data in XML and convert them to C5 and build .dict and .index. then use dictzip to make dict.dz and fially it works with CR3.
My dictionary is Lexitron ENG-THAI, THAI-ENG.

Can you describe the whole process in details? It'd be great.
Thank you in advance :)

IgnareAcademy
05-23-2009, 05:36 AM
In Linux install the dictconv package. Be aware that it is still buggy, and not all dictionaries will be perfectly converted.

Then download a dictionary, extract it to a new folder, and in this folder open a console.
In this console type for example (to transform a stardict dictionary which contains three files ending with .ifo .idx and .dz; the goal is to get a new file ending with .index):
dictconv -o dictd_www.freedict.de_eng-deu.index dictd_www.freedict.de_eng-deu.ifo

It might take an hour for a dictionary of a few megabytes!
In the end you get these messages:
Results
File: dictd_www.freedict.de_eng-deu.index
Title: English - German
Author:
Email:
Version:
License:
Description: Made by Hu Zheng
Original Language:
Destination Language:
Headwords: 93101
Words: 93101

Then you get two new files (.index and .dict). You must transform the .dict file into a .dz file. To do so you need to install the dictzip package. Then type something like this in a console:
dictzip dictd_www.freedict.de_eng-deu.dict

Copy the .index file and the new .dz file to the dict folder you have created on the SD card you use in your Hanlin/Hanlin clone.

Then when you open an .rtf file with cr3 (long press of the key corresponding to the number of the file, then choose 2), you need to press OK and then 4 to use the dictionary.
Then for example if you want the translation of a word beginning with the letter a, b, c, d or e, just press 1 and then press the < or > keys (those on the left of the screen) to reach the word you wish to translate, then press OK. The definition may be longer than one screen, so do not hesitate to use the > key. Press OK again to exit the translation.

It would be perfect if it were possible to use more than one dictionary, or to be able to choose which dictionary to use.

keng2000
05-23-2009, 10:42 AM
Can you describe the whole process in details? It'd be great.
Thank you in advance :)

What I found in the internet is only way to convert from one to another dictionary format (dictd stardict, babylon and others)
I have not founded any between .idx back to .index.
But finally I found the original single dictionary file in plain text (TIS-620) with 5 XML tags seperated by <DOC> for each word.
Then I did some research and got the solution luckily.
1. convert them to UTF8.
2. Fix all & to &amp;
3. Use perl program to convert them to C5 format
4. Use dictfmt to build .dict and .index
5. Use dictzip to make .dict.dz

the following is my sample script
SOURCE: eltex
PERL: parse_etlex.pl

=======================
iconv -f tis620 -c etlex > etlex.utf-8

# DO IT IN EDITOR
# Change & to &amp,
# Add <etlex> at TOP
# Add </etlex> at BUTTOM
#Save as UTF-8 with SIG

./parse_etlex.pl etlex.utf-8 > etlex.c5 > /dev/null

cat lexitron.info etlex.c5 | dictfmt \
-c5 -u ftp://ftp.opentle.org/pub/lexitron/source/lexitron-data.zip\
-s "LEXiTRON version 2, etlex" \
--without-info --allchars \
--utf8 etlex

dictzip etlex.dict

IgnareAcademy
05-24-2009, 07:34 AM
More simple method for some dictionaries: just get the debian package of the freedict dictionary you want, unpack it and go look inside data.tar.gz/usr/share/dictd. You can also install them in debian and then find them in /usr/share/dictd (the bigger the file the bigger the dictionary; so if you speak several languages, you can choose the best combination of languages).
You will find a .dz and a .index file!

For example here is the german-english dictionary:
http://packages.debian.org/sid/all/dict-freedict-deu-eng/download
Others:
http://packages.debian.org/source/sid/freedict

It works great with the new great LBook firmware from Ukrania:
http://lbook.com.ua/downloads/V3upda...20090409-2.rar
I just do a long press (2 seconds) of the key number 3 to use the dictionary.

wallcraft
05-24-2009, 10:58 AM
just get the debian package of the freedict dictionary you want See Virtual Package: dictd-dictionary (http://packages.debian.org/sid/all/dictd-dictionary) for all the dictionaries. On Windows, 7-zip (http://www.7-zip.org/) will extract from .deb files (although it takes a few mouse clicks to drill down to the actual files).

Kardell
05-25-2009, 07:47 PM
In Linux install the dictconv package. Be aware that it is still buggy, and not all dictionaries will be perfectly converted.


To all Linux users want to achieve the same: remember to downgrade gcc package from v.4.3 to 4.2, otherwise compilation is unsuccessfull.

IgnareAcademy
05-26-2009, 08:12 AM
To all Linux users want to achieve the same: remember to downgrade gcc package from v.4.3 to 4.2, otherwise compilation is unsuccessfull.

In debian it is available as a .deb package, so no need to compile it.