|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdatamodel.Term
public class Term
Class representing a term or token. All texts contains a set of terms or tokens. This class also hold information on frequency and weight of the term.
Constructor Summary | |
---|---|
Term(java.lang.String term,
int frequency,
double weight)
Constructor that creates a new term. |
Method Summary | |
---|---|
int |
compareTo(java.lang.Object arg0)
Method for comparing the weights of two terms. |
int |
getFrequency()
Method that returns the frequency of the term. |
double |
getWeight()
Method that returns the weight of the term. |
void |
setFrequency(int frequency)
Method that sets the frequency. |
void |
setWeight(double weight)
Method for setting the weight of the term. |
java.lang.String |
toString()
Method that returns the term. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Term(java.lang.String term, int frequency, double weight)
term
- The termfrequency
- The frequencyMethod Detail |
---|
public java.lang.String toString()
toString
in class java.lang.Object
public void setFrequency(int frequency)
frequency
- The frequencypublic int getFrequency()
public double getWeight()
public void setWeight(double weight)
weight
- The new weightpublic int compareTo(java.lang.Object arg0)
compareTo
in interface java.lang.Comparable
arg0
- Term to compare with
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |