Describe the current behavior
A clear and concise description of what happened.
Expected behavior
A clear and concise description of what you expected to happen.
System information
OS Platform and Distribution (e.g., Linux Ubuntu 16.04):
Python version:
HanLP version:
Other info / logs
Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached.
[x] I've completed this form and searched the web for solutions.
Describe the bug DynamicCustomDictionary
Code to reproduce the issue dictionary.load("/home/duanfa/trash/845.txt"); DynamicCustomDictionary load 词典时候不生效 845.txt 文件内容
爱慕官方花园速写内衣女无钢圈中厚杯小胸聚拢蕾丝文胸AM171791 nz 1 爱慕官方花 nz 1
用 insert 生效 dictionary.insert("爱慕官方花园速写内衣女无钢圈中厚杯小胸聚拢蕾丝文胸AM171791", "N 1");
或者在hanlp.properties里面配置 CustomDictionaryPath=data/dictionary/custom/duanfa/845.txt 生效后,把 data/dictionary/custom/duanfa/845.txt.bin 拷贝到 /home/duanfa/trash/ 目录下,dictionary.load("/home/duanfa/trash/845.txt");就可以生效了
版本
代码打印结果: 爱慕/vn 官方/n 花园/n 速写/n 内衣/n 女/b 无/v 钢圈/n 中/f 厚/a 杯/q 小/a 胸/ng 聚拢/v 蕾/ng 丝/q 文/ng 胸/ng AM/nx 171791/m
Describe the current behavior A clear and concise description of what happened.
Expected behavior A clear and concise description of what you expected to happen.
System information
Other info / logs Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached.