我正在根据在线手册(http://opennlp.apache.org/documentation/1.5.2-incubating/manual/opennlp.html)构建一个名为:en-ner-person.train 的 15k 行训练数据文档。
我的问题是:在我的培训文档中,我是否包含完整的报告?或者我只包含有名称的行:<START:person> John Smith <END>
?
例如,我是否在训练数据中使用整个报告:
<START:person> Pierre Vinken <END> , 61 years old , will join the board as a nonexecutive director Nov. 29 .
A nonexecutive director has many similar responsibilities as an executive director.
However, there are no voting rights with this position.
Mr . <START:person> Vinken <END> is chairman of Elsevier N.V. , the Dutch publishing group .
或者我是否只在我的培训文档中包含这两行:
<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 .
您应该使用整个报告。这将有助于系统学习何时不标记实体,从而提高漏报分数。
您可以使用评估工具 http://opennlp.apache.org/documentation/1.5.2-incubating/manual/opennlp.html#tools.namefind.eval.tool。保留语料库中的一些句子用于测试,例如总数的 1/10,并使用其他 9/10 句子训练您的模型。您可以尝试使用整个报告进行训练,也可以尝试使用仅包含名称的句子进行训练。结果将表示为准确率和召回率 http://en.wikipedia.org/wiki/Precision_and_recall.
请记住将测试样本与整个报告一起保留,而不仅仅是带有名称的句子,否则您将无法准确测量模型在没有名称的句子中的表现。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)