Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: Re: Conversion script for German-English and Spanish-German dictionaries

Re: Conversion script for German-English and Spanish-German dictionaries

From: Zeno Gantner <zeno.gantner_at_web.de>
Date: 2006-06-07

Hello Manuel,

thanks for your answers.

Manuel Dejonghe wrote:
>> I ask myself, however, whether this is really necessary. Isn't it possible to display
>> the words as they should be displayed, and to have a case insensitive search?
>
>Case insensitive search is ususally MUCH more work. It may be related
>to your second question.

OK.
But then we could separate the list that is searched and the list that is displayed.
The first one would normalized (lower case), and the second one would be correct (mixed case).
It would cost twice as much of memory, but that should be OK.

>> 2. The same page says the file must be sorted alphabetically. What is the exact sort
>> ordering that is expected? There are several possibilities, e.g. proper alphanumerical
>> ordering vs. ordering by ASCII value of the characters.

>With not having looked at the code, I suppose it's the
>strcmp()-ordering, so ascii-value-based.
>That means ABC...abc where the request to have it in lowercase gets clear.

So that means that special characters like , , or will not be treated according to their
natural ordering? OK.

I had a look at apps/plugins/dict.c, and it seems to use binary search to find the word.
This would also that for bilingual dictionaries, we would have to prepare two indices,
one for each translation direction. Good to know ;-)
Apparently, only one entry is retrieved, which means I have to merge several entries...

I also saw that the search algorithm just does a full compare, which means that gender
or part-of-speech markers (like in "drink {verb} -- trinken)" must be removed, otherwise
a word is not found.

(hah, already three things to change in the script I wrote ...)

It would be also nice to return the closest match to the user, which still might be
useful.

One more thing: If the case normalization is needed, and if the ordering is needed in a special
way, and if it is always needed, it might be better to put the code assuring this in the rdf2bin code,
instead of requiring it of every xxx2rdf.pl script.

I'll change the script as soon I have the time to do it.

Kind regards,
  Zeno
_____________________________________________________________________
Der WEB.DE SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
http://smartsurfer.web.de/?mc=100071&distributionid=000000000071
Received on Wed Jun 7 04:10:56 2006


Page was last modified "Jan 10 2012" The Rockbox Crew
aaa