编程语言
首页 > 编程语言> > java-opennlp.tools.util.Span类中的getType()?

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.

标签:nlp,opennlp,java
来源: https://codeday.me/bug/20191118/2025443.html