salutations,
jhourcle, we couldn't use the stemming technique because the language in question involves root changing and many irregular forms. BrowserUk, dividing the dictionary might be a good solution, but it would not be very convenient for the way we are planning to process the user input (since there would be many-word inputs).
we implemented a solution by using Berkeley DB:
#!c:/perl/bin/perl.exe
print "Content-type: text/html\n\n";
use BerkeleyDB;
my $filename = "dict";
my $db = new BerkeleyDB::Hash
-Filename => $filename,
-Flags => DB_CREATE
or die "Cannot open file $filename: $! $BerkeleyDB::Error\n";
getting the value by a given key is done by:
$db->db_get("word", $lang); #the word is stored in the $lang variable.
and works very fast.
so, that DICTE filehandle code, instead of throwing values to a %dict hash, it throws values to a database by $db->db_put($english,$lang). this database creation has to be done only when the dictionary changes, but it's very slow. so, now the question is: is there a command-line Windows program that can convert flat-file databases do Berkeley DB databases?
thank you in advance.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.