ilri-wordcloud/README.md

1.2 KiB

Wordcloud of my ILRI Work

Generate

Concatenate text files together, put every word on its own line, and do some minor replacements to remove HTML tags, Markdown, and normalize some technical terms:

$ cat changelog/*.txt ~/src/git/cgspace-notes/content/posts/* | tr -s '[:blank:]' '\n' | sed -f src/replacements.sed | fgrep -vwf src/stopwords-en.txt > src/work.txt

Then create a normal wordcloud:

$ wordcloud_cli --text src/work.txt --stopwords src/stopwords-en.txt --fontfile /usr/share/fonts/TTF/CascadiaCode.ttf --height 1080 --width 1920 --imagefile wordcloud.png

And create the cow-shaped wordcloud:

$ src/masked.py

This code is based on examples/masked.py in the word_cloud project.

Acknowledgements

License

MIT