V
- The generic type of the document identifier.public class TermFrequencyData<V extends Comparable<V>> extends Object
Modifier and Type | Field and Description |
---|---|
V |
docId
The document identifier.
|
int |
fieldId
The field identifier.
|
LinkedHashMap<String,ITermMetadata> |
terms
The set of distinct tokens and their
ITermMetadata . |
Constructor and Description |
---|
TermFrequencyData(V docId,
int fieldId,
String token) |
Modifier and Type | Method and Description |
---|---|
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.
|
public final V extends Comparable<V> docId
public final int fieldId
public final LinkedHashMap<String,ITermMetadata> terms
ITermMetadata
.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()
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.