diff --git a/analysis/bigrams_freq.sh b/analysis/bigrams_freq.sh new file mode 100755 index 0000000..510e1ab --- /dev/null +++ b/analysis/bigrams_freq.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +# Convert text to lowercase and replace non-alphabetic characters with spaces, then use awk to print bigrams +bzcat $1 | tr '[:upper:]' '[:lower:]' | tr -cs '[:alpha:]' ' ' | fold -w 1000 | sed -e 's/\b\s\+\b/ /g' | awk '{for(i=1;i bigram_freq.txt \ No newline at end of file