Wangzhe

Results 6 comments of Wangzhe

这样组织头文件试试: include/cppjieba/*.hpp include/limonp/*.hpp

保存词向量文件时用得是什么编码?sgns.merge.word模型载入时同样报错UnicodeDecodeError: `UnicodeDecodeError: 'utf8' codec can't decode bytes in position 96-97: invalid continuation byte`

OK,谢谢。涉及到文本文件读写的一个好习惯是全部明确指定编码:`open(filename, encoding='utf-8')`,使用系统默认值不一定出什么幺蛾子。

还有一个问题,请问未登录词是被忽略了吗?在sgns.merge.word模型里没有看到类似等表示未登录词的Token。

同发现了。cut函数返回的字符串类型为str(Python 2),不是unicode,这样挺不好的。

我认为根本原因是 Dockerfile 中的这一行是有问题的: ``` python3 -m pip install --no-cache-dir -f dist 'chatglm-cpp[api]' && \ ``` 因为build的错误日志中提示了,这一行并没有从build镜像的 /chatglm.cpp/dist 目录新生成的 chatglm_cpp-*.whl 文件中安装 'chatglm-cpp[api]',而是从 pypi 中重新下载和编译的。 ``` #16 11.34 Downloading