public class ChineseVocabulary extends Object implements Vocabulary
Chinese Vocabulary
Copyright: Copyright (c) 2005
Company: IST, Drexel University
| Constructor and Description |
|---|
ChineseVocabulary(String vobFile) |
| Modifier and Type | Method and Description |
|---|---|
Word |
findPhrase(Word start)
Finds out the phrase beging with the given word.
|
boolean |
getAdjectivePhraseOption()
Gets the option whether adjective phrase is allowed.
|
boolean |
getCoordinateOption()
Gets the option whether a phrase can contain a conjunction.
|
boolean |
getLemmaOption()
Gets the option of using the base form of the word when matching a phrase.
|
boolean |
getNPPOption()
Gets the option whether NPP phrase is allowed.
|
String |
getPhrase(int index)
Gets the index-th phrase in the vocabulary.
|
int |
getPhraseIndex(long phraseUID) |
int |
getPhraseNum()
Gets the number of phrases in the vocabulary.
|
long |
getUID(String phrase) |
boolean |
isPhrase(String term)
Tests if the term is a phrase
|
boolean |
isPhrase(Word start,
Word end)
Tests if the term specified by the starting word and the ending word is a prhase.
|
boolean |
isStartingWord(Word cur)
Tests if the specified word could be the starting a word of a phrase.
|
int |
maxPhraseLength()
Gets the maximum number of words a phrase can contain.
|
int |
minPhraseLength()
Gets the minimum number of words a phrase can contain.
|
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 |
setNPPOption(boolean enabled)
Sets the option whether NPP phrase is allowed.
|
public ChineseVocabulary(String vobFile)
public int getPhraseIndex(long phraseUID)
public boolean isPhrase(String term)
VocabularyisPhrase in interface Vocabularyterm - the term for testingpublic boolean isPhrase(Word start, Word end)
VocabularyisPhrase in interface Vocabularystart - the starting word of the phraseend - the ending word of the phrasepublic boolean isStartingWord(Word cur)
VocabularyisStartingWord in interface Vocabularycur - the current word for testingpublic Word findPhrase(Word start)
VocabularyfindPhrase in interface Vocabularystart - the starting wordpublic 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 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 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 long getUID(String phrase)
Copyright © 2018 JULIE Lab, Germany. All rights reserved.