title: Mahout TFIDF Dictionary File
body: <p>I am trying to perform TFIDF on a set of documents (as text files) using mahout to do to calculations, following <a href="http://www.philippeadjiman.com/blog/2010/12/30/how-to-easily-build-and-observe-tf-idf-weight-vectors-with-lucene-and-mahout/" rel="nofollow">this guide</a>.</p>
  
  <p>I have successfully created the dictionary and vector weights, and am now attempting to access the output. In the guide it says you "can for instance easily load the content of the generated dictionary file into a Map with token index as keys and the tokens as values."</p>
  
  <p>I am not sure how to go about loading in this file to a map as he suggests, does anybody know how it is done?</p>
  
  <p>I created my vectors from a directory of text files, one issue I encountered when running "./mahout seq2sparse..." was the -a flag that controls the analyser - which should be lucene's StandardAnalyzer. When trying to run with this flag I received a ClassNotFoundException, but removing the flag solved the problem and I think the default analyser is also this one anyway, therefore the output should be the same as the example.</p>
  
  <p>If anybody knows how to load this dictionary into a map I will be eternally grateful!</p>
  
  <p>James</p>