如何在斯坦福 NER 训练中使用 pos 标签作为特征?

how to use pos tag as feature in Stanford NER training?

我正在尝试使用 useTags 和相关功能来训练 Stanford NER CRF 模型。然而,尽管我在 .prop 文件中指定我将使用此功能,但 CoreAnnotations.PartOfSpeechAnnotation.class 似乎没有 return 任何东西,因此训练根本不使用此功能。我做错了什么没有使用这个功能吗?谢谢!

您需要指定 training/test 数据中的哪一列具有 pos 标签并将 pos 标签添加到 CoNLL。

您在这部分属性中指定该列:

map = word=0,answer=1,tag=2

(例如,如果您在第 3 列中添加了标签)