addword - add a word translation to the translators dictionary.
This is a little sample program which will add a word to the translators dictionary between English and Polish. It demonstrates how to correctly update the database.
This uses a BiIndex consisting of two files in the current directory: english-polish and polish-english.
Concurrent updates will interfere and one of them is guaranteed to be lost (whichever one finishes first). Furthermore, if the two processes run at exactly the wrong times, the two directions could be inconsistent until the next time the program is run. Still, in the end the database should be consistent and safe.
The program is very inefficient as designed. Updates should be batched together which means we should be able to give more than one word at a time to the program. As it is, we have to read through the whole database for every single word we add...
To install CDB_File::BiIndex, copy and paste the appropriate command in to your terminal.
cpanm
cpanm CDB_File::BiIndex
CPAN shell
perl -MCPAN -e shell install CDB_File::BiIndex
For more information on module installation, please visit the detailed CPAN module installation guide.