微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

java-opennlp.tools.util.Span类中的getType()?

我正在使用opennlp opennlp.tools.chunker.ChunkerME实现来查找块.在此类中,我将调用chunkAsSpans(..)方法,该方法返回Span [].

因此,此Span实例具有getType()getter方法,该方法返回的类型如下
NP,VP等

在这里,我想知道Span的类型是什么?是POS吗?

解决方法:

NP代表名词短语,VP代表动词短语.

如果您查看Chunker Training帮助页面,将会看到以下内容:

The training data must be converted to the OpenNLP chunker training format, that is based on 07001: The train data consist of three columns separated by spaces. Each word has been put on a separate line and there is an empty line after each sentence. The first column contains the current word, the second its part-of-speech tag and the third its chunk tag. The chunk tags contain the name of the chunk type, for example I-NP for noun phrase words and I-VP for verb phrase words.

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐