评估翻译编辑率的简单库

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第三方库


热门话题
JavaSpring重定向请求处理程序   SwingJava:拆分字符串并将其放入文本区域的   Java:标记“”上出现语法错误,此标记后面应为表达式   web服务Java RestService从日志文件写入和读取数据   java如何将ArrayList<String>转换为char数组,然后向后打印每个单词?   java SimpleDataFormat解析返回年终日期   加密Java aes解密bytebuffer,包括填充为空字节   java有没有办法从特定的if语句调用变量?   java从更新返回到渲染   spring GRPC Java登录测试   java为什么下面的代码不工作(StringBuffer.toString!=null)   java是一种可行的模式吗?   使用Spring集成测试的JavaOSGi片段   java jCommander为未知和未使用的值引发异常?   在imageView的editText中输入的java图像URL