|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--net.sf.classifier4J.Utilities
| Constructor Summary | |
Utilities()
|
|
| Method Summary | |
static int |
countWords(java.lang.String word,
java.lang.String[] words)
Count how many times a word appears in an array of words |
static java.util.Set |
getMostFrequentWords(int count,
java.util.Map wordFrequencies)
|
static java.lang.String[] |
getSentences(java.lang.String input)
|
static java.lang.String |
getString(java.io.InputStream is)
Given an inputStream, this method returns a String. |
static java.lang.String[] |
getUniqueWords(java.lang.String[] input)
Find all unique words in an array of words |
static java.util.Map |
getWordFrequency(java.lang.String input)
|
static java.util.Map |
getWordFrequency(java.lang.String input,
boolean caseSensitive)
|
static java.util.Map |
getWordFrequency(java.lang.String input,
boolean caseSensitive,
ITokenizer tokenizer,
IStopWordProvider stopWordsProvider)
Get a Map of words and Integer representing the number of each word |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Utilities()
| Method Detail |
public static java.util.Map getWordFrequency(java.lang.String input)
public static java.util.Map getWordFrequency(java.lang.String input,
boolean caseSensitive)
public static java.util.Map getWordFrequency(java.lang.String input,
boolean caseSensitive,
ITokenizer tokenizer,
IStopWordProvider stopWordsProvider)
input - The String to get the word frequency ofcaseSensitive - true if words should be treated as separate if they have different casetokenizer - a junit.framework.TestCase#run()stopWordsProvider -
public static java.util.Set getMostFrequentWords(int count,
java.util.Map wordFrequencies)
public static java.lang.String[] getUniqueWords(java.lang.String[] input)
input - an array of Strings
public static int countWords(java.lang.String word,
java.lang.String[] words)
word - The word to countwords - non-null array of wordspublic static java.lang.String[] getSentences(java.lang.String input)
input - a String which may contain many sentences
public static java.lang.String getString(java.io.InputStream is)
throws java.io.IOException
java.io.IOException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||