Skip to content

Releases: palanceli/libgooglepinyin

添加音词转换模块及基础支持

18 Aug 12:58
bbe1f01
Compare
Choose a tag to compare
  • 引入glog、gflag
  • 调整默认参数,令dictbuilder调试时直接生成词库
  • 添加音词转换入口工程

在Mac OS下的build步骤:

  1. clone到本地目录libgooglepinyin
  2. 更新modules:
$ cd libgooglepinyin
$ sh setupevn.sh
  1. 执行cmake,领输出目录为libgooglepinyin/build
  2. 使用Xcode打开libgooglepinyin/build/googlepinyin.xcodeproj,Build
  3. 在Xcode中运行dictbuilder,将生成词库libgooglepinyin/build/data/dict_pinyin.dat
  4. 在Xcode中运行pinyin_conv或在命令行下运行libgooglepinyin/build/tools/Debug/pinyin_conv,即可音词转换。

可编译

15 Aug 17:08
1317f63
Compare
Choose a tag to compare

在mac OS 10.14
xCode 10.3
下可以成功build。
令cmake build目录为libgooglepinyin/build,则运行dictbuilder可完成词库build:

$ cd libgooglepinyin/build
$ tools/Debug/dictbuilder

read successfully, lemma num: 65101
spelling tree construct successfully.

------------STAT INFO-------------
[root is layer -1]
.. max_sonbuf_len per layer(from layer 0):
   413, 259, 55, 6, 0, 0, 0, 0, -,
.. max_homobuf_len per layer:
   -, 312, 19, 2, 2, 0, 0, 0, 0,
.. total_son_num per layer:
   413, 26183, 13370, 6619, 0, 0, 0, 0, -,
.. total_node_hasson per layer:
   1, 397, 6901, 6269, 0, 0, 0, 0, 0,
.. total_sonbuf_num per layer:
   1, 397, 6901, 6269, 0, 0, 0, 0, -,
.. total_sonbuf_allnoson per layer:
   0, 31, 3862, 6269, 0, 0, 0, 0, -,
.. total_node_in_sonbuf_allnoson per layer:
   0, 243, 4707, 6619, 0, 0, 0, 0, -,
.. total_homo_num per layer:
   0, 17033, 34070, 7372, 6626, 0, 0, 0, 0,
.. son buf allocation number with only 1 son: 10732
.. son buf allocation number with more than 1 son: 2836
.. total lemma node number: 46586
Build dictionary successfully.
Save dictionary successfully.

新词库创建在libgooglepinyin/build/dict_pinyin.dat

原始文件

15 Aug 16:20
Compare
Choose a tag to compare