public abstract class AbstractVocabulary extends Object implements Vocabulary
The class implements all the basic functions related with vocabulary
Copyright: Copyright (c) 2005
Company: IST, Drexel University
| Modifier and Type | Field and Description |
|---|---|
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 String |
nonboundaryPunctuations |
| Constructor and Description |
|---|
AbstractVocabulary(String termFilename) |
AbstractVocabulary(String termFilename,
Lemmatiser lemmatiser) |
| Modifier and Type | Method and Description |
|---|---|
protected 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 String |
getLemma(Word word) |
boolean |
getLemmaOption()
Gets the option of using the base form of the word when matching a phrase.
|
String |
getNonBoundaryPunctuation() |
boolean |
getNPPOption()
Gets the option whether NPP phrase is allowed.
|
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(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(String punctuations) |
void |
setNPPOption(boolean enabled)
Sets the option whether NPP phrase is allowed.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitfindPhrase, isPhrase, isPhraseprotected Lemmatiser lemmatiser
protected boolean enable_npp_option
protected boolean enable_coordinate_option
protected boolean enable_adjterm_option
protected boolean enable_lemma_option
protected String nonboundaryPunctuations
protected SimpleElementList list
protected int maxPhraseLength
protected int minPhraseLength
public AbstractVocabulary(String termFilename)
public AbstractVocabulary(String termFilename, Lemmatiser lemmatiser)
public int getPhraseNum()
VocabularygetPhraseNum in interface Vocabularypublic String getPhrase(int index)
VocabularygetPhrase in interface Vocabularyindex - the position of the phrase in the vocabularypublic int maxPhraseLength()
VocabularymaxPhraseLength in interface Vocabularypublic int minPhraseLength()
VocabularyminPhraseLength in interface Vocabularypublic void setNonBoundaryPunctuation(String punctuations)
public String getNonBoundaryPunctuation()
public void setLemmaOption(boolean enabled)
VocabularysetLemmaOption in interface Vocabularyenabled - the option of using the base form of the word when matching a phrase.public boolean getLemmaOption()
VocabularygetLemmaOption in interface Vocabularypublic void setAdjectivePhraseOption(boolean enabled)
VocabularysetAdjectivePhraseOption in interface Vocabularyenabled - whether adjective phrase is allowed.public boolean getAdjectivePhraseOption()
VocabularygetAdjectivePhraseOption in interface Vocabularypublic void setNPPOption(boolean enabled)
VocabularysetNPPOption in interface Vocabularyenabled - the option whether NPP phrase is allowed.public boolean getNPPOption()
VocabularygetNPPOption in interface Vocabularypublic void setCoordinateOption(boolean enabled)
VocabularysetCoordinateOption in interface Vocabularyenabled - the option whether a phrase can contain a conjunctionpublic boolean getCoordinateOption()
VocabularygetCoordinateOption in interface Vocabularypublic boolean isStartingWord(Word cur)
VocabularyisStartingWord in interface Vocabularycur - the current word for testingprotected boolean isBoundaryWord(Word curWord)
protected boolean isUsefulForPhrase(Word word)
protected void readVocabularyMeta(String termFilename)
Copyright © 2018 JULIE Lab, Germany. All rights reserved.