org.encog.util.text
public class BagOfWords extends Object
Constructor and Description |
---|
BagOfWords() |
BagOfWords(int laplace) |
Modifier and Type | Method and Description |
---|---|
void |
clear() |
boolean |
contains(String word) |
int |
getCount(String word) |
int |
getK() |
int |
getLaplaceClasses() |
int |
getTotalWords() |
int |
getUniqueWords() |
Map<String,Integer> |
getWords() |
void |
increase(String word) |
boolean |
isBreakSpaces() |
boolean |
isIgnoreCase() |
double |
probability(String word) |
void |
process(String str) |
void |
setBreakSpaces(boolean breakSpaces) |
void |
setIgnoreCase(boolean ignoreCase) |
void |
setLaplaceClasses(int laplaceClasses) |
void |
setTotalWords(int totalWords) |
String |
toString() |
public void process(String str)
public void increase(String word)
public boolean isBreakSpaces()
public void setBreakSpaces(boolean breakSpaces)
breakSpaces
- the breakSpaces to setpublic boolean isIgnoreCase()
public void setIgnoreCase(boolean ignoreCase)
ignoreCase
- the ignoreCase to setpublic void clear()
public boolean contains(String word)
public int getK()
public int getTotalWords()
public int getCount(String word)
public double probability(String word)
public int getLaplaceClasses()
public void setLaplaceClasses(int laplaceClasses)
laplaceClasses
- the laplaceClasses to setpublic void setTotalWords(int totalWords)
totalWords
- the totalWords to setpublic int getUniqueWords()
Copyright © 2014. All Rights Reserved.