Skip to main content

Chinese Text Error corrector

Project description

## Usage

### install
* pip3 install pycorrector
* Or download https://github.com/shibing624/corrector Unzip and run python3 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


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.4.tar.gz (16.4 MB view details)

Uploaded Source

File details

Details for the file pycorrector-0.1.4.tar.gz.

File metadata

  • Download URL: pycorrector-0.1.4.tar.gz
  • Upload date:
  • Size: 16.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.6.6

File hashes

Hashes for pycorrector-0.1.4.tar.gz
Algorithm Hash digest
SHA256 ef6dd1b681f3f94d9ca936bc014abf4cd4d034d5c8dbd04a1bc578ebf866d2bc
MD5 26e0726325cf7f933de9edb6a6d3d9c6
BLAKE2b-256 19f79f923dde26714be6bf164eb915f91cda2b670704d410e65ff910e5098ae7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page