NAME
Dict::Word - Perl extension for getting the radix and the translation of Arabic words
SYNOPSIS
use utf8;
my $word=Dict::Word->new(ARABIC_WORD_IN_UTF8);
open FOUTPUT, ">>TEST" or die "Cannot create TEST: $!\n"; binmode(FOUTPUT,":utf8");
print FOUTPUT $word->get_word(); print FOUTPUT $word->get_radix(); print FOUTPUT $word->get_arabtex();
my $db=Dict::Db->new("./dicts","en"); print FOUTPUT $word->get_translation($db);
close FOUTPUT;
DESCRIPTION
In order to work on an Arabic word, you need to create the object Dict::Word, passing the Arabic word encoded in utf8 to the constructor. You will then be able to get the radix through get_radix(). You will get the ArabTeX translittered form through get_arabtex(). If you also want the translation, you'll need to create the $db object (described in the Dict::Db module), so that it may look for its meaning in the correct Database.
Remember that input-output directly to shell will not be useful as long as your shell doesn't support utf8 encoded characters. That's because I piped the output to another file, forcing its writing in utf8.
SEE ALSO
You may find more info about ArabTeX encoding at ftp://ftp.informatik.uni-stuttgart.de/pub/arabtex/arabtex.htm
AUTHOR
Andrea Benazzo, <andy@slacky.it>
COPYRIGHT AND LICENSE
Copyright (c) 2005 Andrea Benazzo. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.