https://github.com/jflinchum/pow-generator
A play-on-words generator that uses phonetics to find similar sounding words and replaces those words in sentences with a pun.
https://github.com/jflinchum/pow-generator
phonetics puns
Last synced: 11 months ago
JSON representation
A play-on-words generator that uses phonetics to find similar sounding words and replaces those words in sentences with a pun.
- Host: GitHub
- URL: https://github.com/jflinchum/pow-generator
- Owner: Jflinchum
- License: mit
- Created: 2017-10-03T23:38:32.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-10-07T01:27:38.000Z (over 8 years ago)
- Last Synced: 2025-07-01T14:07:57.239Z (11 months ago)
- Topics: phonetics, puns
- Language: Python
- Size: 8.79 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Play-On-Words Generator
A play-on-words generator that uses phonetics to find similar sounding words and replaces those words in sentences with a pun.
# Usage
This project uses a library called `phonetics`. You can install it with pip and find it here https://pypi.python.org/pypi/phonetics
The main file is `powGenerator.py`. Running this with a word to make the pun off of and a directory full of a bunch of .txt files will first search for a similar sounding word from the user's dictionary. Afterwards, it will search for sentence usecases in the directory's .txt files and replace the word with the subject given in the arguments.
i.e Running `python powGenerator.py /some/path/to/text cat` will generate a sentence like `The predicament was a catastrophe`
The results can vary, as choosing the pun and sentence usecase is pseudo-random to add some variety.