title: Calculating term frequency in Prolog
body: <p>I searched Google to no avail. Anyone here who can show me how to code up term frequency in Prolog? The more "logic" the better.
  Given a text file, ignore non alphanumeric characters, detect words, remove stop words (possibly given in an external file), count the occurrences of each word in the file and output something like "word : freq" ordered by decreasing frequency.</p>
  
  <p>Thanks!</p>
  
  <p>(this is not homework, btw, this is a project I'm doing)</p>