|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.bigdata.search.TermFrequencyData<V>
V - The generic type of the document identifier.public class TermFrequencyData<V extends Comparable<V>>
Models the term-frequency data associated with a single field of some document.
| Field Summary | |
|---|---|
V |
docId
The document identifier. |
int |
fieldId
The field identifier. |
LinkedHashMap<String,ITermMetadata> |
terms
The set of distinct tokens and their ITermMetadata. |
| Constructor Summary | |
|---|---|
TermFrequencyData(V docId,
int fieldId,
String token)
|
|
| Method Summary | |
|---|---|
boolean |
add(String token)
Add a Token. |
int |
distinctTermCount()
The #of distinct terms. |
Map.Entry<String,ITermMetadata> |
getSingletonEntry()
|
double |
normalize()
Computes the normalized term-frequency vector. |
int |
totalTermCount()
The total #of terms, including duplicates. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public final V extends Comparable<V> docId
public final int fieldId
public final LinkedHashMap<String,ITermMetadata> terms
ITermMetadata.
| Constructor Detail |
|---|
public TermFrequencyData(V docId,
int fieldId,
String token)
| Method Detail |
|---|
public boolean add(String token)
Token.
token - The token.
TermFrequencyData.public int distinctTermCount()
public int totalTermCount()
public double normalize()
1.0. The magnitude of the term frequency
vector is computed using the integer term frequency values reported by
TermMetadata.termFreq(). The normalized values are then set on
TermMetadata.localTermWeight.
TermMetadata.termFreq() vector.public Map.Entry<String,ITermMetadata> getSingletonEntry()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||