使用海底蟒蛇

merp的Python项目详细描述


Downloads

在python中使用mer脚本。

(来自MER存储库)

MER是命名实体识别工具,它给出任何词典,任何输入文本都返回列表。 文本中认可的术语,包括它们的确切位置(注释)。

给定一个本体(owl文件),mer还能够将实体链接到它们的类。

有关MER的更多信息,请参见:

  • mer:用于最小命名实体识别和链接的shell脚本和注释服务器,f.couto和a.lamurias,化学信息杂志,10:582018 [https://doi.org/10.1186/s13321-018-0312-9]
  • MER:最小命名实体识别标记器和注释服务器,F.Couto、L.Campos和A.Lamurias,生物创造V.5挑战评估,2017年 [https://www.researchgate.net/publication/316545534_mer_a_minimal_named-entity_recognition_tagger_and_annotation_server]

依赖关系

awk

mer是使用gnu awk(gawk)和grep开发和测试的。如果你的机器里还有另一个awk解释器,就不能保证程序能正常工作。

例如,要在ubuntu上安装gnu awk:

sudo apt-get install gawk

安装

pip install merpy

python setup.py install

基本用法

>>>importmerpy>>>merpy.process_lexicon("hp")>>>document='Influenza, commonly known as "the flu", is an infectious disease caused by an influenza virus. Symptoms can be mild to severe. The most common symptoms include: a high fever, runny nose, sore throat, muscle pains, headache, coughing, and feeling tired'>>>entities=merpy.get_entities(document,"hp")>>>print(entities)[['111','115','mild','http://purl.obolibrary.org/obo/HP_0012825'],['119','125','severe','http://purl.obolibrary.org/obo/HP_0012828'],['168','173','fever','http://purl.obolibrary.org/obo/HP_0001945'],['214','222','headache','http://purl.obolibrary.org/obo/HP_0002315'],['224','232','coughing','http://purl.obolibrary.org/obo/HP_0012735'],['246','251','tired','http://purl.obolibrary.org/obo/HP_0012378'],['175','185','runny nose','http://purl.obolibrary.org/obo/HP_0031417']]>>>lexicons=merpy.get_lexicons()>>>merpy.show_lexicons()lexiconspreloaded:['lexicon','go','cell_line_and_cell_type','chebi_lite','chemical','hp','disease','wordnet_nouns','hpo','radlex','doid','protein','hpomultilang','tissue_and_organ','mirna','subcellular_structure']lexiconsloadedreadytouse:['lexicon','doid','hp']lexiconswithlinkedconcepts:['doid','hp','go','chebi_lite','lexicon']>>>merpy.create_lexicon(["gene1","gene2","gene3"],"genelist")wrotegenelistlexicon>>>merpy.process_lexicon("genelist")>>>merpy.download_lexicon("https://github.com/lasigeBioTM/MER/raw/biocreative2017/data/ChEBI.txt","chebi")wrotechebilexicon>>>merpy.process_lexicon("chebi")

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

推荐PyPI第三方库


热门话题
java应该考虑使用DTO来代替Spring控制器层吗?   java为什么要将Maven与Git结合起来?   java试图将CSV转换为XLSX,但使用了错误的逗号拆分列   mysql Spring 3+Hibernate:java。sql。BatchUpdateException:无法添加或更新子行(ManyToMany)   java基本字符串反转器   java无法使用RestControllerAdvice为身份验证失败生成自定义错误消息   java当只允许SQLException时,如何抛出EOFEException?   java如何创建播放模块?   Android中匿名类的java实例化异常问题   java两个停靠组件,其中第二个组件填充剩余空间   java如何在按钮延迟时启用它   Java中正在运行的应用程序中的后台进程   java我正试图从一个字符串打印出这个字符输出   如何使用java socket通过两个不同的wifi连接两台电脑?   javaapachecamel:如何将分层数据从数据库转换为pojo   java Webrtc:OniconConnectionChange和onConnectionChange之间有什么区别   java如何重写已经创建的JTable方法   爪哇扫雷机堆垛机   雅加达ee Java ee EJB 3.0 Glassfish