Constructor and Description |
---|
DfTableArray(Path file)
Creates a
DfTableArray object. |
DfTableArray(Path file,
FileSystem fs)
Creates a
DfTableArray object. |
Modifier and Type | Method and Description |
---|---|
int |
getDf(int term)
Returns the document frequency of a term.
|
int |
getMaxDf()
Returns the document frequency of the term with the highest document
frequency.
|
int |
getMaxDfTerm()
Returns the term with the highest document frequency.
|
int |
getNumOfSingletonTerms()
Returns the number of terms that only appear in one document.
|
int |
getVocabularySize()
Returns the number of unique terms in the collection.
|
static void |
main(String[] args) |
public DfTableArray(Path file) throws IOException
DfTableArray
object.file
- collection frequency data fileIOException
public DfTableArray(Path file, FileSystem fs) throws IOException
DfTableArray
object.file
- collection frequency data file pathfs
- FileSystem to read fromIOException
public int getDf(int term)
DfTable
public int getMaxDf()
DfTable
public int getMaxDfTerm()
DfTable
getMaxDfTerm
in interface DfTable
public int getNumOfSingletonTerms()
DfTable
getNumOfSingletonTerms
in interface DfTable
public int getVocabularySize()
DfTable
getVocabularySize
in interface DfTable