Releases: palanceli/libgooglepinyin
Releases · palanceli/libgooglepinyin
添加音词转换模块及基础支持
- 引入glog、gflag
- 调整默认参数,令dictbuilder调试时直接生成词库
- 添加音词转换入口工程
在Mac OS下的build步骤:
- clone到本地目录
libgooglepinyin
- 更新modules:
$ cd libgooglepinyin
$ sh setupevn.sh
- 执行cmake,领输出目录为
libgooglepinyin/build
- 使用Xcode打开
libgooglepinyin/build/googlepinyin.xcodeproj
,Build - 在Xcode中运行
dictbuilder
,将生成词库libgooglepinyin/build/data/dict_pinyin.dat
- 在Xcode中运行
pinyin_conv
或在命令行下运行libgooglepinyin/build/tools/Debug/pinyin_conv
,即可音词转换。
可编译
在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