The Squabble in Strobl...
The Wrangle in Spangle...
The Quarrel in Sorell...
rumbleinthejungle prints humorous rhyming phrases of the form "the dispute in Beirut", as appears in the 2009 film The Slammin' Salmon, itself an homage to the historic boxing match, The Rumble in the Jungle.
For more information on this package, see
virtualenv env -p python3
. env/bin/activate
pip install rumbleinthejungle
python -m rumbleinthejungle
The code comprising this program is copyright 2014, 2017 Jeffrey Finkelstein.
It is licensed under the GNU General Public License, version 3 (or later). For
more information, see LICENSE.txt
in this directory.
The thesaurus data is copyright 2005 Princeton University. It is licensed under
a custom license, similar to the BSD license. For more information, see
LICENSE_WN.txt
in this directory.
This product includes data created by MaxMind, available from
http://www.maxmind.com/. The city name data is copyright 2008 MaxMind Inc. It
is licensed under a custom license, similar to the BSD license. For more
information, see LICENSE_WC.txt
in this directory.
This is a partial listing of the contents of this package.
data/
- the city name and thesaurus data filesLICENSE.txt
- the copyright license for the Python code in this packageLICENSE_WC.txt
- the copyright license for the city name dataLICENSE_WN.txt
- the copyright license for the thesaurus datarequirements.txt
- the pip requirements for installing this packagerequirements-test.txt
- the pip requirements for testing this packagerumbleinthejungle.py
- the Python module containing the programREADME.md
- this filesetup.py
- Python setuptools configuration file for packaging this programtest_rumbleinthejungle.py
- unit tests for rumbleinthejungle
The data/
directory contains the following files:
cities.dat
- a list of cities of the worldth_en_US_v2.dat
- the thesaurus databaseth_en_US_v2.idx
- an index of the thesaurus database
The algorithm is relatively simple.
- get synonyms for some simple "fight" words from a thesaurus
(
data/th_en_US_v2.dat
) that appears to have come originally from WordNet - get a list of cities from a trimmed version of a database from MaxMind
(
data/cities.dat
) - get the pronunciation of the words from the CMU Pronunciation Dictionary, via the pronunciation library.
- compare the last few sounds in the pronunciation of each "fight" word and each city to check if they rhyme
This application requires Python version 3.2 or later.
It also requires the Python package pronouncing to be installed.
pip install pronouncing
python -m rumbleinthejungle
The Python unit tests are contained in the test_rumbleinthejungle.py
file. To run the test suite, run the command
python setup.py test
Jeffrey Finkelstein jeffrey.finkelstein@gmail.com