ChimpRewriter API的Python绑定
项目描述
Chimp Rewriter是一个在线服务,用于对文本进行改写(同义词替换),以创建现有文本的独特版本。此软件包提供了一种轻松与ChimpRewriter API交互的方法。使用需要API订阅,在此获取。
在虚拟环境中安装
$ virtualenv foo
$ cd foo
$ git clone https://github.com/niteoweb/chimprewriter
$ bin/pip install chimprewriter/
# running tests:
$ bin/pip install unittest2 mock
$ bin/python -m unittest discover -s chimprewriter/src/chimprewriter/tests
Buildout
$ git clone https://github.com/niteoweb/chimprewriter
$ cd chimprewriter
$ python bootstrap.py
$ bin/buildout
# running tests:
$ bin/py -m unittest discover -s src/chimprewriter/tests
# check code for imperfections
$ bin/vvv src/chimprewriter
用法
>>> import chimprewriter
>>> cr = chimprewriter.ChimpRewriter("<youremail>", "<yourapikey>", "<yourappname>")
>>> cr.text_with_spintax(text="My name is Ovca!")
"{I am|I'm|My friends call me|Throughout southern california|Im} Ovca!"
>>> cr.unique_variation(text="My name is Ovca!")
"Im Ovca!"
变更日志
0.1 (2013-04-05)
ChimpRewriter类。[Matej Cotman]
测试和文档。[Matej Cotman]
许可证(3条款BSD)
版权(c)2012,NiteoWeb Ltd。保留所有权利。
在满足以下条件的情况下,允许以源代码和二进制形式重新分发和使用,是否修改不限:
源代码重新分发必须保留上述版权声明、本条件和以下免责声明。
二进制形式的重新分发必须在文档和/或其他与分发一起提供的材料中重新生产上述版权声明、本条件和以下免责声明。
未经NiteoWeb Ltd.或其贡献者事先书面许可,不得使用其名称或其贡献者的名称来认可或推广由此软件衍生出的产品。
本软件由版权所有者和贡献者提供,"现状"并且不提供任何明示或暗示的保证,包括但不限于适销性和特定用途的适用性保证。在任何情况下,NITEOWEB LTD.均不对任何直接、间接、偶然、特殊、示范性或后续损害(包括但不限于替代货物或服务的采购;使用、数据或利润的损失;或业务中断)承担责任,无论损害产生的原因是什么,也不论基于何种责任理论,无论是合同、严格责任还是侵权(包括疏忽或其他),即使被告知此类损害的可能性。
项目详情
关闭
chimprewriter-0.1.zip 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 0cf5e63f6eb23392e79b6bd9d8c10a5e3bb6dcd0e67b321985fb70b0e6734c5a |
|
MD5 | 5f79fa6533460ce4e919435897baac1b |
|
BLAKE2b-256 | 8c1bb0fb5805c90596d78e2477a7e493effe58c67833a7527a0eef0469ded05b |