|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objecttc.TCTerm
Class representing a single term in either a document, a category or the corpus
| Field Summary | |
private int |
documentFrequency
the frewuency in either a category or the entire corpus |
private double |
inverseDocumentFrequency
the inverse document frequency in the corpus |
private int |
termFrequency
number of occurences in either a document, a category or the entire corpus |
private double |
weightValue
the weight calculated by the weight functions |
private java.lang.String |
word
the actual token (word). |
| Constructor Summary | |
(package private) |
TCTerm(java.lang.String term)
Constructor of the Class TCTerm |
| Method Summary | |
int |
addDocumentFrequency(int num)
|
int |
addTermFrequency(int num)
|
java.lang.Object |
clone()
clones the term object |
int |
compareTo(java.lang.Object arg0)
The terms will be compared using the weight variable |
boolean |
equals(java.lang.Object arg0)
The string in the class is the unique "index" |
int |
getDocumentFrequency()
returns the frequency of the term (in either a category or the entire corpus) |
double |
getInverseDocumentFrequency()
returns the inverse document frequency of the term (in the corpus) |
int |
getTermFrequency()
returns the number of occurences |
double |
getWeightValue()
returns the weight-value for the term, calculated by one of the many wighting functions available in TCCorpus |
java.lang.String |
getWord()
returns the word (index) of the string |
void |
setDocumentFrequency(int freq)
sets the frequency of the term |
void |
setInverseDocumentFrequency(double ifreq)
|
void |
setTermFrequency(int occ)
sets the occurence of the term |
void |
setWeightValue(double wv)
|
| Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private java.lang.String word
private int termFrequency
private int documentFrequency
private double inverseDocumentFrequency
private double weightValue
| Constructor Detail |
TCTerm(java.lang.String term)
term - the term represented by this object| Method Detail |
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
java.lang.CloneNotSupportedExceptionpublic java.lang.String getWord()
public int getTermFrequency()
public int getDocumentFrequency()
public double getInverseDocumentFrequency()
public double getWeightValue()
public void setTermFrequency(int occ)
occ - the new value for the occurence fieldpublic void setDocumentFrequency(int freq)
freq - the new document frequency of the termpublic void setInverseDocumentFrequency(double ifreq)
public void setWeightValue(double wv)
public int addTermFrequency(int num)
public int addDocumentFrequency(int num)
public boolean equals(java.lang.Object arg0)
public int compareTo(java.lang.Object arg0)
compareTo in interface java.lang.Comparable
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||