Lingua::AR::Db - Perl extension for translating Arabic words into another language


Lingua-AR-Db documentation  | view source Contained in the Lingua-AR-Db distribution.

Index


NAME

Top

Lingua::AR::Db - Perl extension for translating Arabic words into another language

SYNOPSIS

Top

	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

Top

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

Top

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

Top

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

Top

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

Top

Andrea Benazzo, <andy@slacky.it>

COPYRIGHT AND LICENSE

Top


Lingua-AR-Db documentation  | view source Contained in the Lingua-AR-Db distribution.