public class PhraseFinder
extends java.lang.Object
| Constructor and Description |
|---|
PhraseFinder()
Initialize the PhraseFinder with no PartOfSpeech tagger.
|
PhraseFinder(PartOfSpeechTagger posTagger)
Initialize the PhraseFinder using the provided Part-of-Speech tagger
|
| Modifier and Type | Method and Description |
|---|---|
void |
addEntities(java.util.Set<java.lang.String> entitySet)
Add known entities to allow the PhraseFinder to treat these as
contiguous objects
|
java.util.List<Phrase> |
findPhrases(java.util.List<PartOfSpeechTag> tagList)
Find the list of phrases for a list of tags from a list of tags.
|
java.util.List<Phrase> |
findPhrases(java.lang.String sentence)
Find the list of phrases for a sentence
|
java.util.List<Phrase> |
findPhrases(java.lang.String sentence,
java.util.List<PartOfSpeechTag> tagList)
Find the list of phrases for a list of tags from a sentence with the
corresponding tag list.
|
PartOfSpeechTagger |
getPosTagger()
Get the Part-of-Speech tagger used by this PhraseFinder
|
void |
setPosTagger(PartOfSpeechTagger posTagger)
Set the Part-of-Speech tagger for this PhraseFinder\
|
public PhraseFinder()
public PhraseFinder(PartOfSpeechTagger posTagger)
posTagger - the Part-of-Speech taggerpublic void addEntities(java.util.Set<java.lang.String> entitySet)
entitySet - a set of entitiespublic java.util.List<Phrase> findPhrases(java.util.List<PartOfSpeechTag> tagList)
tagList - the list of tags representing the words in the sentencepublic java.util.List<Phrase> findPhrases(java.lang.String sentence)
sentence - the sentence to parsepublic java.util.List<Phrase> findPhrases(java.lang.String sentence, java.util.List<PartOfSpeechTag> tagList)
sentence - the original sentencetagList - the list of tags representing the words in the sentencepublic PartOfSpeechTagger getPosTagger()
public void setPosTagger(PartOfSpeechTagger posTagger)
posTagger - the Part-of-Speech tagger