[Techtalk] dict format WAS: thesaurus
Avery Ke
avery at u.washington.edu
Thu Mar 18 13:11:46 EST 2004
How do you create databases for dict? I have several
english-esperanto dictionaries I found online, but I cannot use
them with dict, so I have to resort to a script (at end of email),
but the script often pulls up a dozen or more possible words.
I got the text file esp-angla-vortoj.txt.Z from
ftp://ftp.stack.nl/pub/esperanto/word-lists.dir/index.html 0
The text file is in this form:
agrabl r a agreeable
ajx s o thing
where the first column is the smallest unit,
the second column describes type of unit (r=root, s=suffix, etc)
the third column gives part of speech (o=noun, a=adjective, etc)
and the fourth column is the english translation
Currently I just use this script:
#!/bin/sh
usage() {
cat<<EOF
usage: $programName vorto ...
EOF
}
programName=`basename $0`
if [ $# -eq 0 ]; then
usage
exit 1
fi
while [ $# -ne 0 ]
do
# grep $1 $HOME/local/usr/dict/EO/dictionary.txt
egrep -i "$1" $HOME/local/usr/dict/EO/esp-angla-vortoj.txt
shift
done
# -----------------------------end of vorto script
As I said above, I often pull up a dozen or so words that match my
text. It would be *much* easier to use this in dict, but I don't
see a simple way to convert it.
If anyone could give me tips on converting to dict form, I'd be thankful.
Thanks,
Avery
More information about the Techtalk
mailing list