Get word frequency distribution


/ Published in: Bash
Save to your folder(s)

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


Copy this code and paste it in your HTML
  1. tr -sc 'A-Za-z' '\012' < text_file.txt | sort | uniq -c | sort -nr > output_ngram.txt

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.