Posted By

clopez on 01/27/12


Tagged

Bash text frequency distribution


Versions (?)

Get word frequency distribution


 / Published in: Bash
 

For any text document this snippet generates an output file that looks like this:

30 m 29 por 29 aplicaci 27 modelo 27 datos 24 con 21 este 21 esta

  1. tr -sc 'A-Za-z' '\012' < text_file.txt | sort | uniq -c | sort -nr > output_ngram.txt

Report this snippet  

You need to login to post a comment.