Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

getType() in opennlp.tools.util.Span class?

Tags:

java

nlp

opennlp

I am using opennlp opennlp.tools.chunker.ChunkerME implementation for finding chunks. In this class i am calling chunkAsSpans(..) method which returns Span[].

So, this Span instance has getType() getter method which is returning types like NP, VP etc.

Here i am wondering what type means for Span? Is it the POS?

like image 292
Sarang Avatar asked Aug 09 '26 06:08

Sarang


1 Answers

NP stands for a noun phrase, and VP stands for a verb phrase.

If you have a look at the Chunker Training help page, you will see the following:

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.

like image 153
Wiktor Stribiżew Avatar answered Aug 11 '26 19:08

Wiktor Stribiżew



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!