|
TC Java 2011 Version |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object gov.nih.nlm.nls.tc.FilterApi.LegalWords
public class LegalWords
This class is to detect a word is a legal word from files & algorithm. A legal word is define as follows:
History:
Constructor Summary | |
---|---|
LegalWords(java.lang.String sFile,
java.lang.String rFile,
java.lang.String wFile)
Initiate the LegalWords object by specifying files of stopwords and restrictwords. |
|
LegalWords(java.lang.String sFile,
java.lang.String rFile,
java.lang.String wFile,
boolean verbose)
Initiate the LegalWords object by specifying files of stopwords and restrictwords. |
Method Summary | |
---|---|
java.lang.String |
GetDebugMsg()
Get the debug message |
java.util.HashSet<java.lang.String> |
GetRestrictWords()
Get the collection object (in hash set) of restrictwords |
java.util.HashSet<java.lang.String> |
GetStopWords()
Get the collection object (in hash set) of stopwords |
boolean |
IsLegalWord(java.lang.String word,
boolean useMinLength,
int minLength,
boolean removeStopWord,
boolean useRestrictWord,
boolean useMinSignal,
int minSignal,
boolean useMaxSignal,
int maxSignal,
boolean useMinWc,
int minWc,
boolean useMinDc,
int minDc)
A method to detect if a word is a legal word by specifying all options. |
boolean |
IsLegalWord(java.lang.String word,
LegalWordsOption option)
A method to detect if a word is a legal word by specifying LegalWordsOption object. |
static void |
main(java.lang.String[] args)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LegalWords(java.lang.String sFile, java.lang.String rFile, java.lang.String wFile)
sFile
- file name for the stopwordsrFile
- file name for the restrictwordswFile
- file name for the wordSignalWcDcpublic LegalWords(java.lang.String sFile, java.lang.String rFile, java.lang.String wFile, boolean verbose)
sFile
- file name for the stopwordsrFile
- file name for the restrictwordswFile
- file name for the wordSignalWcDcverbose
- flag of verbose on reading input filesMethod Detail |
---|
public java.util.HashSet<java.lang.String> GetStopWords()
public java.util.HashSet<java.lang.String> GetRestrictWords()
public boolean IsLegalWord(java.lang.String word, LegalWordsOption option)
word
- word to be testedpublic boolean IsLegalWord(java.lang.String word, boolean useMinLength, int minLength, boolean removeStopWord, boolean useRestrictWord, boolean useMinSignal, int minSignal, boolean useMaxSignal, int maxSignal, boolean useMinWc, int minWc, boolean useMinDc, int minDc)
word
- word to be testeduseMinLength
- boolean flag of using min. lengthminLength
- size of min. legnthremoveStopWord
- boolean flag of using stopwordsuseRestrictWord
- boolean flag of using restrictwordsuseMinSignal
- boolean flag of using min. signalminSignal
- min. value of normalized signaluseMaxSignal
- boolean flag of using max. signalmaxSignal
- max. value of normalized signaluseMinWc
- boolean flag of using min. word countminWc
- min. value of word countuseMinDc
- boolean flag of using min. document countminDc
- min. value of document count
public java.lang.String GetDebugMsg()
public static void main(java.lang.String[] args)
|
TC Java 2011 Version |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |