NAME
Lingua::AR::Db - Perl extension for translating Arabic words into another language
SYNOPSIS
use utf8;
use Lingua::AR::Db;
# this will create a new DB or load an already existent DB
my $db=Lingua::AR::Db->new($db_name);
# this will append new translations to the word "مكتب"
my $arabic_word="مكتب";
$db->value($arabic_word,@translations);
# let's print out all the translations of the $arabic_word
my @array=@{$db->translate($arabic_word)};
foreach(@array){
print "$arabic_word means $_\n";
}
# this will return every entry of the Database,
# formatted as "STEM::WORD\tTRANSLATION"
my $dump=$db->export;
print $dump;
# this will export the Database in HTML form under the "./html/" directory
$db->export_html("./html");
DESCRIPTION
This module will take care of the translating an Arabic word into another language through a persistent hash located in a Database.
You may add new values (translations) to the DB, as well as getting the translation back and exporting into text format or HTML the whole DB.
The DB is structured as a double hash: primary key is the stem of the word, the second key is the word itself. The resulting value pointed by these two keys is the translations array.
If you're interested in a front-end to this module, I'm going to develop one based on Qt widgets. More info @ www.qitty.net
I'm going to publish my own Arabic->Italian dictionary on my site @ www.qitty.net
NOTE
Please note that every time you inquire the DB, your arabic word and/or the stem of it, is encoded into ArabTeX. This is because Unicode strings can't be keys of the hash at any level.
SEE ALSO
On my site, you may get additional info about this module. You may find more info about ArabTeX at ftp://ftp.informatik.uni-stuttgart.de/pub/arabtex/arabtex.htm
TODO
- correct use of delete and consequent export[_html]
- display Arabic characters (instead of|along with) the translitterated ones and sort them according to the Arabic alphabet
- add accessory methods and variables as needed (translation language,..)
- export to XML
AUTHOR
Andrea Benazzo, <andy@slacky.it>
COPYRIGHT AND LICENSE
Copyright (c) 2006 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.
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 213:
Non-ASCII character seen before =encoding in '"مكتب"'. Assuming CP1252