Wordcloud based on personal notes of my work at ILRI ranging from 2010 to 2021.
Go to file
2021-10-24 22:16:31 +03:00
src Initial commit 2021-10-24 22:11:42 +03:00
cow-wordcloud.png Initial commit 2021-10-24 22:11:42 +03:00
LICENSE Initial commit 2021-10-24 22:11:42 +03:00
poetry.lock Initial commit 2021-10-24 22:11:42 +03:00
pyproject.toml Initial commit 2021-10-24 22:11:42 +03:00
README.md README.md: minor edit 2021-10-24 22:16:31 +03:00
setup.cfg Initial commit 2021-10-24 22:11:42 +03:00
wordcloud.png Initial commit 2021-10-24 22:11:42 +03:00

Wordcloud of my ILRI work

Wordcloud in a cow mask

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