public class DictionaryEntry
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
static long |
serialVersionUID |
Modifier and Type | Method and Description |
---|---|
int |
getDocumentCount()
Provides the number of documents this token appears in
|
int |
getFrequencyCount()
Provides the frequency count for this entry
|
double |
getIDF()
Provides the IDF of this token
|
double |
getIDF(int totalDocuments)
Computes the IDF of this token using the
totalDocuments |
int |
getPosition()
Provides the position of the token in this dictionary.
|
java.lang.String |
getToken()
Provides the name of the token
|
void |
incrementDocumentCount()
Increases the number of documents this token has been seen in by 1
|
void |
incrementDocumentCount(int amount)
Increases the number of documents this token has been seen in by
amount |
void |
incrementFrequencyCount()
Increases the number of times this token has been seen by 1
|
void |
incrementFrequencyCount(int amount)
Increases the number of times this token has been seen by
amount |
void |
setPosition(int position)
Sets the position of the token in this dictionary.
|
public static final long serialVersionUID
public int getPosition()
int
value of this token's most recent positionpublic void setPosition(int position)
position
- the int
value of the new positionpublic java.lang.String getToken()
public void incrementFrequencyCount()
public void incrementFrequencyCount(int amount)
amount
amount
- the int
value to increment the frequency count bypublic int getFrequencyCount()
int
value of the number of times this token has been seenpublic void incrementDocumentCount()
public void incrementDocumentCount(int amount)
amount
amount
- the int
value of the amount to increment bypublic int getDocumentCount()
int
value of the number of documents this token has been seen inpublic double getIDF()
double
value of the inverse document frequency (IDF) of this tokenpublic double getIDF(int totalDocuments)
totalDocuments
totalDocuments
- the int
value of the total number of documents in the dictionarydouble
value of the inverse document frequency (IDF) of this token