【问题标题】:What features Apache OpenNLP does use by default while running its named entity recognition (NER) models?Apache OpenNLP 在运行其命名实体识别 (NER) 模型时默认使用哪些功能?
【发布时间】:2019-03-22 06:43:35
【问题描述】:

我知道 Apache OpenNLP 使用 MaxEnt 模型作为其 NER 标记器。但是,Apache OpenNLP 在运行其命名实体识别 (NER) 模型时(默认情况下)使用了哪些功能?以及我们如何在 OpenNLP(Java 实现)中合并/自定义新功能?

【问题讨论】:

    标签: opennlp named-entity-recognition maxent


    【解决方案1】:

    在 Apache OpenNLP NER 中,它允许用户通过 XML 文件定义特征。默认的 XML 是这样的:

    https://github.com/apache/opennlp/blob/master/opennlp-tools/src/main/resources/opennlp/tools/namefind/ner-default-features.xml

    如果要自定义,请在训练模型时使用-featuregen 选项:

    $ opennlp TokenNameFinderTrainer -featuregen your-features-definition.xml -model my-model.bin ...
    

    在执行 TokenNameFinder 时,您不需要指定您自定义的特征 XML 文件,因为模型文件包含您的特征信息。

    【讨论】:

      猜你喜欢
      • 2013-02-21
      • 2017-06-19
      • 2012-04-20
      • 1970-01-01
      • 1970-01-01
      • 2012-05-12
      • 2020-11-04
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多