|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgr.demokritos.iit.jinsect.documentModel.representations.DocumentNGramHistogram
public class DocumentNGramHistogram
Field Summary | |
---|---|
protected java.lang.String |
DataString
|
protected int |
MaxSize
|
protected int |
MinSize
|
java.util.HashMap |
NGramHistogram
|
TextPreprocessorListener |
TextPreprocessor
|
WordEvaluatorListener |
WordEvaluator
|
Constructor Summary | |
---|---|
DocumentNGramHistogram()
Creates a new instance of INSECTDocumentNGrams with n-gram sizes from 3 to 5. |
|
DocumentNGramHistogram(int iMinSize,
int iMaxSize)
Creates a new instance of INSECTDocumentNGrams |
Method Summary | |
---|---|
void |
createHistogram()
Creates the histogram of n-grams in the data string. |
void |
deleteItem(java.lang.String sItem)
|
java.lang.String |
getDataString()
|
DocumentNGramHistogram |
intersectHistogram(DocumentNGramHistogram dgOtherHistogram)
|
void |
inverseIntersectHistogram(DocumentNGramHistogram dgOtherHistogram,
boolean bAffectOtherHistogram)
|
int |
length()
Returns the size of the histogram (unique element count). |
void |
loadDataStringFromFile(java.lang.String sFilename)
Opens a text file and sets its contents as data string |
void |
mergeHistogram(DocumentNGramHistogram dnOtherDocumentNGram,
double fNewDataImportance)
Merges the data of another histogram [dnOtherDocumentNGram] with this histogram data. |
void |
nullify()
|
void |
nullifyItem(java.lang.String sItem)
Sets item value to zero, without removing it. |
int |
numberOfTotalNGrams()
Returns the number of total n-grams in the analyzed data string. |
void |
setDataString(java.lang.String sDataString)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected int MinSize
protected int MaxSize
protected java.lang.String DataString
public java.util.HashMap NGramHistogram
public WordEvaluatorListener WordEvaluator
public TextPreprocessorListener TextPreprocessor
Constructor Detail |
---|
public DocumentNGramHistogram(int iMinSize, int iMaxSize)
iMinSize
- The minimum n-gram sizeiMaxSize
- The maximum n-gram sizepublic DocumentNGramHistogram()
Method Detail |
---|
public int length()
public int numberOfTotalNGrams()
public void loadDataStringFromFile(java.lang.String sFilename) throws java.io.IOException, java.io.FileNotFoundException
sFilename
- The filename of the file to open.
java.io.IOException
java.io.FileNotFoundException
public void createHistogram()
public void mergeHistogram(DocumentNGramHistogram dnOtherDocumentNGram, double fNewDataImportance)
fNewDataImportance
- Value of 1.0 means immediate change to new data value.
0.0 means no change. 0.5 means normal change towards new data.public DocumentNGramHistogram intersectHistogram(DocumentNGramHistogram dgOtherHistogram)
public void inverseIntersectHistogram(DocumentNGramHistogram dgOtherHistogram, boolean bAffectOtherHistogram)
public void deleteItem(java.lang.String sItem)
public void nullifyItem(java.lang.String sItem)
sItem
- The item to nullifypublic void nullify()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getDataString()
public void setDataString(java.lang.String sDataString)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |