【发布时间】:2015-11-07 19:14:04
【问题描述】:
我刚刚开始使用 OpenNLP。我需要创建一个简单的训练模型来识别名称实体。
在这里阅读文档https://opennlp.apache.org/docs/1.8.0/apidocs/opennlp-tools/opennlp/tools/namefind 我看到了这个简单的文本来训练模型:
<START:person> Pierre Vinken <END> , 61 years old , will join the board as a nonexecutive director Nov. 29 .
Mr . <START:person> Vinken <END> is chairman of Elsevier N.V. , the Dutch publishing group .
<START:person> Rudolph Agnew <END> , 55 years old and former chairman of Consolidated Gold Fields PLC ,
was named a director of this British industrial conglomerate .
问题有两个:
-
为什么我必须将人名放在文本(短语)上下文中?为什么不在每一行写一个人的名字呢?喜欢:
<START:person> Robert <END> <START:person> Maria <END> <START:person> John <END> 如何向该名称添加额外信息? 例如,我想为每个名字保存男性/女性信息。
(我知道有些系统会尝试通过阅读最后一个字母来理解它,例如 Female 的“a”等,但我想自己添加)
谢谢。
【问题讨论】:
标签: java nlp text-mining opennlp named-entity-recognition