1 Star 3 Fork 2

Cetteest/pycorrector

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
load_custom_language_model.py 477 Bytes
一键复制 编辑 原始数据 按行查看 历史
xuming624 提交于 4年前 . add se2seq demo.
# -*- coding: utf-8 -*-
"""
@author:XuMing(xuming624@qq.com)
@description:
"""
import os
import sys
sys.path.append("../")
from pycorrector import Corrector
pwd_path = os.path.abspath(os.path.dirname(__file__))
if __name__ == '__main__':
lm_path = os.path.join(pwd_path, './people2014corpus_chars.klm')
model = Corrector(language_model_path=lm_path)
corrected_sent, detail = model.correct('少先队员因该为老人让坐')
print(corrected_sent, detail)
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/cette/pycorrector.git
git@gitee.com:cette/pycorrector.git
cette
pycorrector
pycorrector
master

搜索帮助