count number of occurances of each word in text
This commit is contained in:
parent
6dd47bcdb5
commit
b2b6e0ad30
3
analysis/word_freq.sh
Executable file
3
analysis/word_freq.sh
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
#calculate no occurances of each word
|
||||
bzcat $1 | tr -s '[:punct:][:space:]' '\n' | grep -E "^[^\x00-\x7F]*[[:alpha:]][^\x00-\x7F]*$" | sort | uniq -c | sort -nr > word_freq.txt
|
Loading…
Reference in New Issue
Block a user