BabelDictionary is a Python project that analyzes a random page of The Library of Babel and checks for dictionary words. It then posts the three longest words to the Twitter account @BabelDictionary
BabelDictionary requests a random page from the library and uses the lxml library to scrape the page title and contents. Then, using a list of 466,000 English words provided by this repository it searches the contents for any matches and returns the three longest word results. Simple!
The Library of Babel has always been an interesting concept to me, and who doesn't love a Twitter Bot? Maybe we'll find something interesting.
- 24th June 2018
- Updated dictionary source
- Optimise searching method