DictionaryExtensions extension
Extensions on DftMapEntry.
- on
Properties
Methods
-
addEntry(
DftMapEntry value) → void -
Inserts or replaces the
value
in the DftMap. -
getEntries(
Iterable< String> terms) → DftMap - Filters the DftMap by terms.
-
getFrequency(
String term) → Ft -
Returns the mapped value for the
term
key from the DftMap. -
idFt(
String term, int n) → double? -
Returns the inverse document frequency of the
term
for a corpus of sizen
. -
idFtMap(
int collectionSize) → Map< String, double> - Returns a hashmap of term to inverse document frequency of the term.
-
incrementFrequency(
String term) → DftMapEntry -
Returns a DftMapEntry with the key set to
term
. -
setFrequency(
String term, Ft frequency) → DftMapEntry - Returns a DftMapEntry with:
-
tfIdfMap(
Map< String, num> termFrequencies, int n) → Map<String, double> - Returns a hashmap of term to Tf-idf weight for a document.