/tmp,
cd /tmp; sudo rpm -hUv *.rpm cd /tmp; sudo rpm -hiv *.rpm yum update libUnihan UnihanDb yum install libUnihan UnihanDb Requires following package to be build: glib2-devel >= 2.4, cmake >= 2.4, sqlite-devel >= 3.0
doxygen is needed for API generation
libUnihan-<version number>-Source.tar.gz/tmpcd /tmp/libUnihan-<version number>cmake -DPREFIX=<directory prefix>cmake .makemake doxygen
make installmake install-dbTell us if it does not work.
Summary: Convert Unihan.txt to libUnihan SQLite db format.
Synopsis: unihan_convert <Unihan.txt> <SQL Unihan>
You don't really need to run it unless you prefer to rebuild the Unihan.db on your own.
Summary: query on the libUnihan database
Synopsis:
unihan_query [-V] [-L] [-U] <given_field> <given_value> <query_on_field>unihan_query [-V] -S <SQL clause>Options:
unihan_query has 2 modes, 1) simple query and 2) SQL query. SQL knowledge is not required for simple query, so if you don't want to mess with SQL, use simple query. On the other hand, SQL query sheds more light for advance users.
Summary: Verify the Unihan.db by comparing the database query against the original Unihan tag values.
Synopsis: unihan_convert <Unihan.txt> <SQL Unihan>
It might takes days to complete, so no need to run it unless you do need to verify whether the output of pseudo fields are correct.
Mandarin pinyin lookup:
unihan_query kMandarin <pinyin> utf8 |
Used as a Chinese -> English dictionary
unihan_query utf8 <chineseCharacter> kDefinition |
Used as an very crude English -> Chinese dictionary
unihan_query -L kDefinition "%<english word>%" utf8 |