【问题标题】:Scispacy for biomedical named entitiy recognition(NER)用于生物医学命名实体识别 (NER) 的 Scispacy
【发布时间】:2020-04-03 12:46:08
【问题描述】:

如何使用 scispacy 标记实体?

当我尝试使用scispacy 执行NER 时,它通过将它们标记为Entity 来识别生物医学实体,但未能将它们标记为基因/蛋白质等。那么我该如何使用scispacy 来做到这一点?还是scispacy 不能标记数据?附上图片供参考: jupyter notebook snippet

【问题讨论】:

    标签: python nlp bioinformatics named-entity-recognition


    【解决方案1】:

    模型en_core_sci_smen_core_sci_mden_core_sci_lg 没有命名它们的实体。如果您想要标记实体,请使用模型

    • en_ner_craft_md
    • en_ner_jnlpba_md
    • en_ner_bc5cdr_md
    • en_ner_bionlp13cg_md

    每个都有自己的实体类型见:-

    https://allenai.github.io/scispacy/

    更多信息

    【讨论】:

      【解决方案2】:

      您可以通过“GENE_OR_GENE_PRODUCT”过滤标签以获取所有基因名称。

      import spacy
      import scispacy
      import en_ner_bionlp13cg_md
      
      document = "We aimed to prospectively compare the risk of early progression according to circulating ESR1 mutations, CA-15.3, and circulating cell-free DNA in MBC patients treated with a first-line aromatase inhibitor (AI)"
      
      nlp = spacy.load("en_ner_bionlp13cg_md")
      for X in nlp(document).ents:
          if X.label_=='GENE_OR_GENE_PRODUCT':
              print(X.text)
      

      【讨论】:

        猜你喜欢
        • 2017-12-09
        • 2017-06-19
        • 2012-04-20
        • 2012-04-16
        • 2020-11-04
        • 2017-11-13
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多