用于Python的Averbis REST API客户端。
averbis-python-api的Python项目详细描述
Averbis是医疗保健和生命科学领域领先的文本挖掘和机器学习公司。我们从文本中提取信息,自动化智能过程并做出有意义的预测。在
Averbis Python API允许方便地访问Averbis产品的REST API。这尤其包括与这些产品提供的文本挖掘管道进行交互的能力,例如,在Jupyter笔记本电脑等数据科学环境中使用这些管道,或将Averbis产品集成到其他企业系统中。在
支持的产品包括:
特点
当前支持的功能包括:
- 管理项目
- 管理管道
- 管理术语
- 使用服务器端文本挖掘管道分析文本
- 使用服务器端分类器对文本进行分类
安装
可以通过pip
轻松安装库
pip install averbis-python-api
使用
将客户端连接到平台
^{pr2}$连接到管道并确保其启动
pipeline=client.get_project('YOUR_PROJECT_NAME').get_pipeline('YOUR_PIPELINE_NAME')pipeline.ensure_started()
分析字符串
document='This is the string we want to analyse.'annotations=pipeline.analyse_text(document,language='en')forannotationinannotations:print(annotation)
分析文本文件
withopen('/path/to/text_file.txt','rb')asdocument:annotations=pipeline.analyse_text(document,language='en')forannotationinannotations:print(annotation)
返回的注释类型
annotations=pipeline.analyse_text(document,language='en',annotation_types='*Diagnosis')# will return only annotations that end with 'Diagnosis'
发展
要设置本地开发环境,请检查存储库,设置虚拟环境
并安装所需的依赖项(如果--no-site-packages
在您的系统上不起作用,请忽略它):
virtualenv venv --python=python3 --no-site-packages source venv/bin/activate pip install -e ".[test, dev, doc]"
要直接从GitHub安装库的最新开发版本,可以使用以下命令:
$ pip install --upgrade git+https://github.com/averbis/averbis-python-api.git
- 项目
标签: