Chinese Text Error corrector
Project description
## Usage
### install
* pip install pycorrector / pip3 install pycorrector
* Or download https://github.com/shibing624/corrector Unzip and run python setup.py install
### correct
input:
```
import pycorrector
corrected_sent, detail = pycorrector.correct('少先队员因该为老人让坐')
print(corrected_sent, detail)
```
output:
```
少先队员应该为老人让座 [[('因该', '应该', 4, 6)], [('坐', '座', 10, 11)]]
```
----
# corrector
中文错别字纠正工具。音似、形似错字(或变体字)纠正,可用于中文拼音、笔画输入法的错误纠正。python开发。
**corrector**依据语言模型检测错别字位置,通过拼音音似特征、笔画五笔编辑距离特征及语言模型困惑度特征纠正错别字。
## 特征
### 语言模型
* Kenlm(统计语言模型工具)
* RNNLM(TensorFlow、PaddlePaddle均有实现栈式双向LSTM的语言模型)
## 使用说明
### 安装
* 全自动安装:pip3 install pycorrector
* 半自动安装:下载 https://github.com/shibing624/corrector 解压缩并运行 python3 setup.py install
### 纠错
使用示例:
```
import pycorrector
corrected_sent, detail = pycorrector.correct('少先队员因该为老人让坐')
print(corrected_sent, detail)
```
输出:
```
少先队员应该为老人让座 [[('因该', '应该', 4, 6)], [('坐', '座', 10, 11)]]
```
### install
* pip install pycorrector / pip3 install pycorrector
* Or download https://github.com/shibing624/corrector Unzip and run python setup.py install
### correct
input:
```
import pycorrector
corrected_sent, detail = pycorrector.correct('少先队员因该为老人让坐')
print(corrected_sent, detail)
```
output:
```
少先队员应该为老人让座 [[('因该', '应该', 4, 6)], [('坐', '座', 10, 11)]]
```
----
# corrector
中文错别字纠正工具。音似、形似错字(或变体字)纠正,可用于中文拼音、笔画输入法的错误纠正。python开发。
**corrector**依据语言模型检测错别字位置,通过拼音音似特征、笔画五笔编辑距离特征及语言模型困惑度特征纠正错别字。
## 特征
### 语言模型
* Kenlm(统计语言模型工具)
* RNNLM(TensorFlow、PaddlePaddle均有实现栈式双向LSTM的语言模型)
## 使用说明
### 安装
* 全自动安装:pip3 install pycorrector
* 半自动安装:下载 https://github.com/shibing624/corrector 解压缩并运行 python3 setup.py install
### 纠错
使用示例:
```
import pycorrector
corrected_sent, detail = pycorrector.correct('少先队员因该为老人让坐')
print(corrected_sent, detail)
```
输出:
```
少先队员应该为老人让座 [[('因该', '应该', 4, 6)], [('坐', '座', 10, 11)]]
```
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pycorrector-0.1.3.tar.gz
(20.4 MB
view hashes)