tfidf.js

Dependencies

Normalize a word

undefined

Text frequency

undefined

If the normalized term is empty

undefined

Or a stop word

undefined

Don't count it

undefined

Increase count for every match

undefined

Term count / total word count ratio

undefined

Inverse document frequency

undefined

Main entry point, load the corpus and return an object which can calculate the tfidf for a certain doc

undefined

Total number of (unique) documents

undefined

Number of documents containing the term

undefined

Keep our calculated text frequencies

undefined

Key the corpus on their md5 hash

undefined

One more document

undefined

Calculate and store the text frequency

undefined

One more matching document?

undefined

They are loading a previously analyzed corpus

undefined

They are loading a term and a corpus

undefined

Add the document if it's new to us

undefined

Return a function which calculates the tfidf for this document

undefined

If it's a new document, add it

undefined

Return the tfidf

undefined