Constructor and Description |
---|
CfTableArray(Path file)
Creates a
CfTableArray object. |
CfTableArray(Path file,
FileSystem fs)
Creates a
CfTableArray object. |
Modifier and Type | Method and Description |
---|---|
long |
getCf(int term)
Returns the collection frequency of a term.
|
long |
getCollectionSize()
Returns the total number of terms in this collection.
|
long |
getMaxCf()
Returns the collection frequency of the term with the highest collection
frequency.
|
int |
getMaxCfTerm()
Returns the term with the highest collection frequency.
|
int |
getNumOfSingletonTerms()
Returns the number of terms that only appear once in the collection.
|
int |
getVocabularySize()
Returns the number of unique terms in the collection.
|
public CfTableArray(Path file) throws IOException
CfTableArray
object.file
- collection frequency data fileIOException
public CfTableArray(Path file, FileSystem fs) throws IOException
CfTableArray
object.file
- collection frequency data filefs
- FileSystem to read fromIOException
public long getCf(int term)
CfTable
public long getCollectionSize()
CfTable
getCollectionSize
in interface CfTable
public long getMaxCf()
CfTable
public int getMaxCfTerm()
CfTable
getMaxCfTerm
in interface CfTable
public int getNumOfSingletonTerms()
CfTable
getNumOfSingletonTerms
in interface CfTable
public int getVocabularySize()
CfTable
getVocabularySize
in interface CfTable