tf-idf is a popular term weighting scheme. Think Google Search, SEO, ranking of search results, NYTimes article text summarization. One can definitely develop fancier algorithms on top of this elegant and powerful concept.
How to calculate TF-IDF by hand?
Natural Language Processing (NLP) in general and with sklearn:
Here's a nice tutorial series on how to tokenize, stem, remove stop words using nltk library, a popular python natural language processing library.
It also shows how to marry tokenization and stemming with sklearn tf-idf frequency inverse document frequency TfidfVectorizer