tfIdfMap method
Returns a hashmap of term to Tf-idf weight for a document.
Implementation
Map<String, double> tfIdfMap(Map<String, num> termFrequencies, int n) {
final retVal = <String, double>{};
for (final e in termFrequencies.entries) {
final f = idFt(e.key, n);
if (f != null) {
retVal[e.key] = f;
}
}
return retVal;
}