public class GlobalStats extends Object
Constructor and Description |
---|
GlobalStats(HMapIF idf,
HMapIF cf,
int documentCount,
long collectionLength,
float avgDocumentLength,
float defaultDf,
float defaultCf)
Creates an instance of this class with the provided information
|
Modifier and Type | Method and Description |
---|---|
float |
getAvgDocumentLength() |
float |
getCf(int term) |
HMapIF |
getCfs() |
long |
getCollectionLength() |
float |
getDefaultCf() |
float |
getDefaultDf() |
float |
getDefaultIdf() |
int |
getDocumentCount() |
float |
getIdf(int term) |
HMapIF |
getIdfs() |
public GlobalStats(HMapIF idf, HMapIF cf, int documentCount, long collectionLength, float avgDocumentLength, float defaultDf, float defaultCf)
idf
- Map of term ids to IDF valuescf
- Map of term ids to Collection Frequency (CF) valuesdocumentCount
- Number of documents in the collectioncollectionLength
- Length of the collection (i.e., number of terms)avgDocumentLength
- Average length of documents (i.e., average number of term per documentdefaultDf
- Default value for document frequency (used for phrase queries)defaultCf
- Default value for collection frequency (used for phrase queries)public float getAvgDocumentLength()
public float getCf(int term)
term
- Term idpublic HMapIF getCfs()
public long getCollectionLength()
public float getDefaultCf()
public float getDefaultDf()
public float getDefaultIdf()
public int getDocumentCount()
public float getIdf(int term)
term
- Term idpublic HMapIF getIdfs()