Skip to content

libpinyin playground

epico edited this page Oct 25, 2010 · 8 revisions

Note: this document is provided for interested users and developers to try libpinyin - library to deal with pinyin. This is just a preview, no official support yet.

1. How to prepare the data file for libpinyin.

  1. create data sub-directory in libpinyin;

  2. download pinyin-tables.tar.gz and interpolation.model.text.gz from github.com/epico;

  3. extracts all textual format model files from pinyin-tables.tar.gz and interpolation.model.text.gz into data sub-directory;

  4. enter "utils/storage/" sub-directory;

  5. run "gen_binary_files" to generate binary tables.

  6. run "./import_interpolation < ../../data/interpolation.model.text" to generate binary bi-gram model file.

2. Try the intelligent pinyin to characters conversion.

  1. enter "tests/lookup/" sub-directory, then try "test_simple_lookup";

  2. try other tools in tests sub-directory.

Clone this wiki locally