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