Find a trending topic along the lines of #YinXwords and tweet a random X-word sentence from Project Gutenberg.
Inspired by Darius Kazemi's #FiveWordsToRuinADate, and GenGen, with which I made this prototype. I like that Darius's generators are powered by his gutencorpus, which was inspired by my gutengrep, and gutengrep is used here. Full circle!
- Put all Gutenberg text files in the same directory and
gutengrep.py "^\w+\s\w+\s\w+[\.?\!]$" --cache > /tmp/3.txt
- Edit out guff at start and end
sort /tmp/3.txt | uniq > /tmp/3-word-sentences.txt
- Repeat for four, five and six-word sentences.
wc -l /tmp/*.txt
23949 /tmp/3-word-sentences.txt 91551 /tmp/3.txt 31396 /tmp/4-word-sentences.txt 107418 /tmp/4.txt 29835 /tmp/5-word-sentences.txt 94720 /tmp/5.txt
python inxwords.py --no-web --loop --yamp /path/to/inxwords.yaml --sendir /path/to/dir/of/gutenberg/sentences