Are you sure you want to delete this task? Once this task is deleted, it cannot be recovered.
shibing624 da78d04651 | 6 months ago | |
---|---|---|
.. | ||
README.md | 6 months ago | |
demo.py | 6 months ago | |
predict.py | 6 months ago | |
train.py | 6 months ago |
mask token predict
做token级别纠错example: examples/deepcontext/demo.py
from pycorrector import DeepContextCorrector
m = DeepContextCorrector()
print(m.correct_batch(['今天新情很好', '你找到你最喜欢的工作,我也很高心。']))
output:
[{'source': '今天新情很好', 'target': '今天心情很好', 'errors': [('新', '心', 2)]},
{'source': '你找到你最喜欢的工作,我也很高心。', 'target': '你找到你最喜欢的工作,我也很高兴。', 'errors': [('心', '兴', 15)]}]
中文维基百科200条数据,见
examples/data/wiki_zh_200.txt
中文维基百科文本均可,本质上是训练一个文本语言模型。
python train.py --do_train --do_predict
python predict.py
output:
input : 老是较书。
predict: 老师教书。 [('是', '师', 1, 2), ('较', '教', 2, 3)]
Text Python other
Dear OpenI User
Thank you for your continuous support to the Openl Qizhi Community AI Collaboration Platform. In order to protect your usage rights and ensure network security, we updated the Openl Qizhi Community AI Collaboration Platform Usage Agreement in January 2024. The updated agreement specifies that users are prohibited from using intranet penetration tools. After you click "Agree and continue", you can continue to use our services. Thank you for your cooperation and understanding.
For more agreement content, please refer to the《Openl Qizhi Community AI Collaboration Platform Usage Agreement》