title: Python Tf idf algorithm
body: <p>I would like to find the most relevant words over a set of documents.</p>
  
  <p>I would like to call a Tf Idf algorithm over 3 documents and return a csv file containing each word and its frequency. </p>
  
  <p>After that, I will take only the ones with a high number and I will use them.</p>
  
  <p>I found this implementation that does what I need <a href="https://github.com/mccurdyc/tf-idf/" rel="nofollow noreferrer">https://github.com/mccurdyc/tf-idf/</a>. </p>
  
  <p>I call that jar using the <code>subprocess</code> library. But there is a huge problem in that code: it commits a lot of mistake in analyzing words. It mixs some words, it has problems with <code>'</code> and <code>-</code> (I think). I am using it over the text of 3 books (Harry Potter) and , for example, I am obtaining words such <code>hermiones, hermionell, riddlehermione, thinghermione</code> instead of just <code>hermione</code> in the csv file.</p>
  
  <p>Am I doing wrong something? Can you give me a working implementation of the Tf idf algorithm? Is there a python library that does that?</p>