public class OpenNlpChunkedSentenceParser extends Object
A utility class for "parsing" the output of the OpenNLP command line chunker. The command line chunker returns strings in this form:
[NP JFK/NNP] [VP was/VBD elected/VBN] [NP president/NN] [PP in/IN] [NP 1960/CD] ./.
This class converts that String representation into a ChunkedSentence
object.
| Constructor and Description |
|---|
OpenNlpChunkedSentenceParser() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
attachOfs() |
void |
attachOfs(boolean attachOfs) |
boolean |
attachPossessives() |
void |
attachPossessives(boolean attachPossessives) |
ChunkedSentence |
parseSentence(String sent)
Converts sent into a
ChunkedSentence object. |
public boolean attachOfs()
public boolean attachPossessives()
public void attachOfs(boolean attachOfs)
attachOfs - public void attachPossessives(boolean attachPossessives)
attachPossessives - public ChunkedSentence parseSentence(String sent) throws ParseException
ChunkedSentence object.sent - ParseException - if sent is malformed.Copyright © 2010-2013 University of Washington CSE. All Rights Reserved.