|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--dragon.nlp.ontology.AbstractVocabulary
The class implements all the basic functions related with vocabulary
Copyright: Copyright (c) 2005
Company: IST, Drexel University
| Field Summary | |
protected boolean |
enable_adjterm_option
|
protected boolean |
enable_coordinate_option
|
protected boolean |
enable_lemma_option
|
protected boolean |
enable_npp_option
|
protected Lemmatiser |
lemmatiser
|
protected SimpleElementList |
list
|
protected int |
maxPhraseLength
|
protected int |
minPhraseLength
|
protected java.lang.String |
nonboundaryPunctuations
|
| Constructor Summary | |
AbstractVocabulary(java.lang.String termFilename)
|
|
AbstractVocabulary(java.lang.String termFilename,
Lemmatiser lemmatiser)
|
|
| Method Summary | |
protected java.lang.String |
buildString(Word start,
Word end,
boolean useLemma)
|
boolean |
getAdjectivePhraseOption()
Gets the option whether adjective phrase is allowed. |
boolean |
getCoordinateOption()
Gets the option whether a phrase can contain a conjunction. |
protected java.lang.String |
getLemma(Word word)
|
boolean |
getLemmaOption()
Gets the option of using the base form of the word when matching a phrase. |
java.lang.String |
getNonBoundaryPunctuation()
|
boolean |
getNPPOption()
Gets the option whether NPP phrase is allowed. |
java.lang.String |
getPhrase(int index)
Gets the index-th phrase in the vocabulary. |
int |
getPhraseNum()
Gets the number of phrases in the vocabulary. |
protected boolean |
isBoundaryWord(Word curWord)
|
boolean |
isStartingWord(Word cur)
Tests if the specified word could be the starting a word of a phrase. |
protected boolean |
isUsefulForPhrase(Word word)
|
int |
maxPhraseLength()
Gets the maximum number of words a phrase can contain. |
int |
minPhraseLength()
Gets the minimum number of words a phrase can contain. |
protected void |
readVocabularyMeta(java.lang.String termFilename)
|
void |
setAdjectivePhraseOption(boolean enabled)
Sets the option whether adjective phrase is allowed. |
void |
setCoordinateOption(boolean enabled)
Sets the option whether a phrase can contain a conjunction. |
void |
setLemmaOption(boolean enabled)
Sets the option of using the base form of the word when matching a phrase. |
void |
setNonBoundaryPunctuation(java.lang.String punctuations)
|
void |
setNPPOption(boolean enabled)
Sets the option whether NPP phrase is allowed. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface dragon.nlp.ontology.Vocabulary |
findPhrase, isPhrase, isPhrase |
| Field Detail |
protected Lemmatiser lemmatiser
protected boolean enable_npp_option
protected boolean enable_coordinate_option
protected boolean enable_adjterm_option
protected boolean enable_lemma_option
protected java.lang.String nonboundaryPunctuations
protected SimpleElementList list
protected int maxPhraseLength
protected int minPhraseLength
| Constructor Detail |
public AbstractVocabulary(java.lang.String termFilename)
public AbstractVocabulary(java.lang.String termFilename,
Lemmatiser lemmatiser)
| Method Detail |
public int getPhraseNum()
Vocabulary
getPhraseNum in interface Vocabularypublic java.lang.String getPhrase(int index)
Vocabulary
getPhrase in interface Vocabularyindex - the position of the phrase in the vocabulary
public int maxPhraseLength()
Vocabulary
maxPhraseLength in interface Vocabularypublic int minPhraseLength()
Vocabulary
minPhraseLength in interface Vocabularypublic void setNonBoundaryPunctuation(java.lang.String punctuations)
public java.lang.String getNonBoundaryPunctuation()
public void setLemmaOption(boolean enabled)
Vocabulary
setLemmaOption in interface Vocabularyenabled - the option of using the base form of the word when matching a phrase.public boolean getLemmaOption()
Vocabulary
getLemmaOption in interface Vocabularypublic void setAdjectivePhraseOption(boolean enabled)
Vocabulary
setAdjectivePhraseOption in interface Vocabularyenabled - whether adjective phrase is allowed.public boolean getAdjectivePhraseOption()
Vocabulary
getAdjectivePhraseOption in interface Vocabularypublic void setNPPOption(boolean enabled)
Vocabulary
setNPPOption in interface Vocabularyenabled - the option whether NPP phrase is allowed.public boolean getNPPOption()
Vocabulary
getNPPOption in interface Vocabularypublic void setCoordinateOption(boolean enabled)
Vocabulary
setCoordinateOption in interface Vocabularyenabled - the option whether a phrase can contain a conjunctionpublic boolean getCoordinateOption()
Vocabulary
getCoordinateOption in interface Vocabularypublic boolean isStartingWord(Word cur)
Vocabulary
isStartingWord in interface Vocabularycur - the current word for testing
protected boolean isBoundaryWord(Word curWord)
protected java.lang.String getLemma(Word word)
protected java.lang.String buildString(Word start,
Word end,
boolean useLemma)
protected boolean isUsefulForPhrase(Word word)
protected void readVocabularyMeta(java.lang.String termFilename)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||