Ai
1 Star 3 Fork 2

Cetteest/pycorrector

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
eval_test.py 844 Bytes
一键复制 编辑 原始数据 按行查看 历史
shibing624 提交于 2021-12-02 21:25 +08:00 . update file header.
# -*- coding: utf-8 -*-
"""
@author:XuMing(xuming624@qq.com)
@description:
"""
import os
import sys
sys.path.append("../")
import pycorrector
pwd_path = os.path.abspath(os.path.dirname(__file__))
# right_rate:0.1798201798201798, right_count:180, total_count:1001;
# recall_rate:0.15376676986584106, recall_right_count:149, recall_total_count:969, spend_time:121.65223574638367 s
def test_eval_rule_with_sighan_2015():
from pycorrector.utils.eval import eval_sighan2015_by_model
eval_sighan2015_by_model(pycorrector.correct)
# right_rate:0.486, right_count:243, total_count:500;
# recall_rate:0.18,recall_right_count:54,recall_total_count:300
def test_eval_rule_with_500():
from pycorrector.utils.eval import eval_corpus500_by_model
# 评估规则方法的纠错准召率
eval_corpus500_by_model(pycorrector.correct)
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/cette/pycorrector.git
git@gitee.com:cette/pycorrector.git
cette
pycorrector
pycorrector
master

搜索帮助