hcrypto.analyzer
Class PatternDictionary
java.lang.Object
|
+--hcrypto.analyzer.PatternDictionary
- public class PatternDictionary
- extends java.lang.Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
KUCERA_3500
public static final int KUCERA_3500
KUCERA_340
public static final int KUCERA_340
KUCERA_100
public static final int KUCERA_100
KUCERA_50
public static final int KUCERA_50
PatternDictionary
public PatternDictionary()
PatternDictionary
public PatternDictionary(int i)
PatternDictionary
public PatternDictionary(java.lang.String filename)
- This constructor creates a dictionary from the named file.
If linebreaks is true, it assumes words and frequencies are listed one
per line with the first line containing the TOTAL_WORDS nnnnn in the
corpus.
- Parameters:
filename
- a String giving the name of the dictionary file
nWords
public int nWords()
getFrequency
public double getFrequency(java.lang.String word)
contains
public boolean contains(java.lang.String word)
containsPattern
public boolean containsPattern(java.lang.String pattern)
countWordsForPattern
public int countWordsForPattern(java.lang.String pattern)
getPatternWordArray
public java.lang.String[] getPatternWordArray(java.lang.String word)
getWordList
public java.lang.String getWordList(java.lang.String word)
size
public int size()
main
public static void main(java.lang.String[] args)