harbor run -t LiteCoder/shakespeare-ngram-frequency-pipelineharbor download LiteCoder/shakespeare-ngram-frequency-pipelineBuild a shell-based pipeline that cleans and tokenizes the Complete Works of William Shakespeare and produces unigram and bigram frequency tables, using only standard Unix utilities (e.g., sed, awk, tr, sort, uniq, grep, cut, paste). No Python, Perl, or other scripting languages are allowed — the entire pipeline must be pure shell + coreutils.
/app/shakespeare.txt — the raw Project Gutenberg plain-text file of the Complete Works of William Shakespeare. This file is already provided; do not download it.All output files must be produced by running a single script:
/app/cleaned.txt — the cleaned corpus, one lowercase word per line (no blank lines)./app/unigrams.tsv — unigram frequency table./app/bigrams.tsv — bigram frequency table./app/pipeline.sh — the reproducible shell script that generates all of the above.cleaned.txt)*** START OF (inclusive) and everything from the first line that starts with *** END OF (inclusive) onward./app/unigrams.tsv)word and count.count in descending numeric order. Ties are broken alphabetically (ascending) by word.the 27378
and 26082
i 22538
/app/bigrams.tsv)cleaned.txt (line N and line N+1).word1, word2, and count.count in descending numeric order. Ties are broken alphabetically by word1, then by word2.i am 1234
my lord 1100
/app/pipeline.sh)#!/bin/bash (or #!/bin/sh).chmod +x)./app (i.e., cd /app && bash pipeline.sh), it must regenerate cleaned.txt, unigrams.tsv, and bigrams.tsv from shakespeare.txt reproducibly.