How to extract noun phrases using Open NLP

I'm new to Open NLP and need help extracting the name phrases using it. I created a tree structure that contains pos tags with text. But I can't extract nouns from the tree structure. Here is the code I'm using:

InputStream is = new FileInputStream("en-parser-chunking.bin");
ParserModel model = new ParserModel(is);
Parser parser = ParserFactory.create(model);
Parse topParses[] = ParserTool.parseLine(line, parser, 1);
    for (Parse p : topParses){
             p.show();} 

      

Here p.show()

prints the tree structure and returns nothing. How can I use p.show()

phrases to extract nouns or is there any other way to get them from a tree structure?

Please help me with this.

Thanks in Advance

Gouse.

+3
java nlp opennlp stanford-nlp


source to share


No one has answered this question yet

Check out similar questions:

12
How to extract noun phrases using Open nlp chunking parser
3
What is the modernity when extracting noun. Phrases from text content?
1
highlighting concepts from stanford nlp parse tree
1
Punctuation when highlighting a phrase
1
extract the phrase "String" from the stanford parse tree
1
NLP - Extract "correct" nominal phrases
1
Extracting noun phrases with OpenNLP from bulleted words
0
How to get location from text using OpenNLP?
0
Can't extract noun pharses from open nlp Chunking parser result
0
Extract unrelated noun phrases from texts



All Articles
Loading...
X
Show
Funny
Dev
Pics