spooner

spooner


Keywords
natural-language-processing, nlp, python, rhyme-analysis
License
MIT
Install
pip install spooner==0.5.11

Documentation

Documentation Status PyPI version codecov Build Status Code style: black

spooner

Generates spoonerisms based on sounds in words. Created just for fun and learning.

STANDARD DISCLAIMER: Spoonerisms made by this program are not guaranteed to be funny, but they are technically spoonerisms.

Installation

pip install spooner

Usage

Use it like this:

>>> import spooner as sp
>>> sp.phonemes("trail")
['T', 'R', 'EY1', 'L']
>>> sp.spoon("trail snacks")
{'trail': ['snail'], 'snacks': ['tracks', 'trax']}
>>> sp.spoonsentence("let's eat trail snacks")
["let's treat ail snacks", "let's treat ale snacks", "let's eat snail tracks", "let's eat snail trax"]