评估翻译编辑率的简单库

pyter3的Python项目详细描述


===== 皮特

pyter是一个简单的翻译错误率评估包。

============ 安装

签出存储库

。代码块::bash

git clone https://github.com/BramVanroy/pyter.git
cd pyter
pip install -e .

===== 用法

。代码块::python

import pyter

# To get a TER score, both hypothesis sentence and reference sentence have to be tokenised (a list of words).

ref = 'SAUDI ARABIA denied THIS WEEK information published in the AMERICAN new york times'.split()
hyp = 'THIS WEEK THE SAUDIS denied information published in the new york times'.split()
print(pyter.ter(hyp, ref))
# 0.308

=========== 发布说明

v0.3

  • 仅保留用作模块的必备组件(已删除的cli)
  • 将其转换为Python3脚本

V0.2.2.1

  • 错误修复版本

V0.2.2

  • 修正1,无效记分。

V0.2.1

  • 新的cli界面
  • 重构整个代码
  • 此版本与以前的版本不兼容。 v0.2
  • 用缓存版本替换普通的基于dp的编辑距离。性能有点提高。 v0.1.1
  • 小修复,并注册到pypi v0.1
  • 初始版本

=============== 致谢

基于用户afcl在afcl/pyter的原始版本。

。_彼得:https://github.com/aflc/pyter

======= 许可证

它是根据麻省理工学院的许可证发行的。

Copyright (c) 2011 Hiroyuki Tanaka

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java如何使用“this”关键字调用类中具有1个以上参数的多个构造?   java中轮廓的opencv并集   java Qt软件包安卓。支持v4。应用程序不存在   java JPA:如何将字符串持久化到数据库字段中,键入MYSQL文本   java扫雷器随机生成地雷算法不正确   ApacheStorm中的java并行性和告诉主管该怎么做   jvm或AWS S3端的java Max文件上载限制   java Spring安全OAuth2在成功登录后重定向到登录   当我运行jframe时,它总是显示“java.lang.NumberFormatException:空字符串”   java返回Spring MVC Post请求的JSON响应   java用户登录和密码:数据库确认   安卓的问题。getToken()java。木卫一。IOException:无效的\u目标\u版本   从Android连接到IBM Watson对话API时发生java未知模式字符“X”异常   java我们可以在春季会话超时之前设置条件吗?   java理解@MockBean与“RestTemplate RestTemplate”的用法