opennlp.tools.util.Span class 中的 getType()?
getType() in opennlp.tools.util.Span class?
我正在使用 opennlp opennlp.tools.chunker.ChunkerME
实现来查找块。在这个 class 中,我正在调用 chunkAsSpans(..)
方法,其中 returns Span[]
.
因此,此 Span
实例具有 getType()
getter 方法,该方法返回类型如下
NP、VP等
在这里我想知道Span 的type 是什么意思?是 POS 吗?
NP
代表名词短语,VP
代表动词短语。
如果您查看 Chunker Training 帮助页面,您将看到以下内容:
The training data must be converted to the OpenNLP chunker training format, that is based on CoNLL2000: 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.
我正在使用 opennlp opennlp.tools.chunker.ChunkerME
实现来查找块。在这个 class 中,我正在调用 chunkAsSpans(..)
方法,其中 returns Span[]
.
因此,此 Span
实例具有 getType()
getter 方法,该方法返回类型如下
NP、VP等
在这里我想知道Span 的type 是什么意思?是 POS 吗?
NP
代表名词短语,VP
代表动词短语。
如果您查看 Chunker Training 帮助页面,您将看到以下内容:
The training data must be converted to the OpenNLP chunker training format, that is based on CoNLL2000: 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.