shibing624
commited on
Commit
•
e4d3c39
1
Parent(s):
ba9490a
Update README.md
Browse files
README.md
CHANGED
@@ -1,3 +1,48 @@
|
|
1 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
license: bigscience-bloom-rail-1.0
|
|
|
|
|
|
|
3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
+
language:
|
3 |
+
- zh
|
4 |
+
tags:
|
5 |
+
- chatglm
|
6 |
+
- pytorch
|
7 |
+
- zh
|
8 |
+
- Text2Text-Generation
|
9 |
license: bigscience-bloom-rail-1.0
|
10 |
+
widget:
|
11 |
+
- text: "对下面中文拼写纠错:\n少先队员因该为老人让坐。\n答:"
|
12 |
+
|
13 |
---
|
14 |
+
|
15 |
+
# Chinese language Model(kenlm)
|
16 |
+
kenlm language model:
|
17 |
+
|
18 |
+
- big model: zh_giga.no_cna_cmn.prune01244.klm
|
19 |
+
- small model: people2014corpus_chars.klm
|
20 |
+
## Usage
|
21 |
+
|
22 |
+
本项目开源在 pycorrector 项目:[pycorrector](https://github.com/shibing624/pycorrector),可支持kenlm模型,通过如下命令调用:
|
23 |
+
|
24 |
+
Install package:
|
25 |
+
```shell
|
26 |
+
pip install -U pycorrector
|
27 |
+
```
|
28 |
+
|
29 |
+
```python
|
30 |
+
from pycorrector import Corrector
|
31 |
+
model = Corrector(language_model_path='people_chars_tiny.klm')
|
32 |
+
print(model.correct('少先队员因该为老人让坐')) # ['少先队员应该为老人让座。']
|
33 |
+
```
|
34 |
+
|
35 |
+
如果需要训练文本纠错模型,请参考[https://github.com/shibing624/pycorrector](https://github.com/shibing624/pycorrector)
|
36 |
+
|
37 |
+
|
38 |
+
|
39 |
+
## Citation
|
40 |
+
|
41 |
+
```latex
|
42 |
+
@software{pycorrector,
|
43 |
+
author = {Ming Xu},
|
44 |
+
title = {pycorrector: Text Error Correction Tool},
|
45 |
+
year = {2023},
|
46 |
+
url = {https://github.com/shibing624/pycorrector},
|
47 |
+
}
|
48 |
+
```
|