| 1 |
|
| 2 |
Regenerating the Russian Dictionaries |
| 3 |
------------------------------------- |
| 4 |
May 2014 |
| 5 |
|
| 6 |
|
| 7 |
The raw data is located in the file morphs20030410.mrd. This is the |
| 8 |
master morphology file from 2003. The corresponding grammatical |
| 9 |
markup is in rgramtab20030306.tab. The current Russian dicts are built |
| 10 |
from these two files. |
| 11 |
|
| 12 |
It is to be converted to Berkley DB files by running: |
| 13 |
``` |
| 14 |
time ./make-hash-db.pl |
| 15 |
``` |
| 16 |
This will create the files `para.db`, `root.db`, `rule.db` and |
| 17 |
`tail.db`, as well as several text files: `paradigm-not-used.txt`, |
| 18 |
`morph-examp.txt` and `ancode-not-defined.txt`. It should take |
| 19 |
about 45 seconds or less to run. These are then used to create |
| 20 |
the link-grammar dictionaries: |
| 21 |
``` |
| 22 |
time ./mkdict.pl |
| 23 |
``` |
| 24 |
This should take about 25 seconds or less. After this, the Russian |
| 25 |
dictionaries are ready to be used! |
| 26 |
|
| 27 |
The `query-morph.pl` tool will examine the morphology candidates for a |
| 28 |
given word. For example: |
| 29 |
``` |
| 30 |
./query-morph.pl ัะตัั |
| 31 |
``` |
| 32 |
|
| 33 |
Morphology sources |
| 34 |
------------------ |
| 35 |
The morphology is nominally a part of http://www.aot.ru It comes from |
| 36 |
the "seman" project: |
| 37 |
``` |
| 38 |
http://seman.sourceforge.net/ |
| 39 |
``` |
| 40 |
Source data for the morphology is available under the LGPL license at: |
| 41 |
``` |
| 42 |
http://sourceforge.net/p/seman/svn/HEAD/tree/trunk/ |
| 43 |
``` |
| 44 |
A read-only version can be obtained as: |
| 45 |
``` |
| 46 |
svn checkout svn://svn.code.sf.net/p/seman/svn/trunk seman-svn |
| 47 |
``` |
| 48 |
So, for example, `rgramtab.tab` is in `trunk/Dicts/Morph/` and the |
| 49 |
`morphs.mrd` is in `trunk/Dicts/SrcMorph/RusSrc/morphs.mrd`. These files |
| 50 |
are encoded in KOI8-R. The iconv command can be used to convert |
| 51 |
KOI8-R to UTF, as follows: |
| 52 |
``` |
| 53 |
iconv -f KOI8-R -t UTF-8 <infile> > <outfile> |
| 54 |
``` |
| 55 |
So: |
| 56 |
``` |
| 57 |
iconv -f KOI8-R -t UTF-8 morphs.mrd > morphs-utf8.mrd |
| 58 |
iconv -f KOI8-R -t UTF-8 rgramtab.tab > rgramtab-utf8.tab |
| 59 |
``` |
| 60 |
|
| 61 |
The End. |
| 62 |
-------- |