[![Documentation Status](https://readthedocs.org/projects/spooner/badge/?version=latest)](https://spooner.readthedocs.io/en/latest/?badge=latest)
[![PyPI version](https://badge.fury.io/py/spooner.svg)](https://pypi.org/project/spooner/)
[![codecov](https://codecov.io/gh/danmaps/spooner/branch/master/graph/badge.svg)](https://codecov.io/gh/danmaps/spooner)
[![Build Status](https://dev.azure.com/danmaps/spooner/_apis/build/status/danmaps.spooner?branchName=master)](https://dev.azure.com/dannybmcvey0582/spooner/_build/latest?definitionId=1&branchName=master)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black) 

# spooner

Generates [spoonerisms](https://en.wikipedia.org/wiki/Spoonerism) 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")
[['snail'], ['tracks', 'trax']]
~~~
~~~
>>> sp.spoonsentence("let's eat trail snacks")
"let's eat snail tracks"
~~~




Examples:

**input: three cheers for our dear old queen**
```
three fears chore our dear old queen
three queers for our dear old cheane
three cheers dohr our fier old queen
three cheers orr our dear fold queen
three cheers for our queer old deane
```
**input: I've got hope in my soul**
```
I've motte hope in ngai soul
I've got mope in heye soul
I've got soap in my hohl
I've got hope in psi mohl
```
**input: you missed my history lecture**
```
you hissed my mystery lecture
you missed high mystery lecture
```
**input: a blushing crow**
```
a crushing blow
```

**input: There’s nothing like a good spoonerism to tickle your funny bone**
```
There’s nothing teich a good spoonerism leu tickle your funny bone
There’s nothing fyke a good spoonerism to tickle your lunny bone
There’s nothing bike a good spoonerism to tickle your funny lone
There’s nothing like a good spoonerism yue tickle tore funny bone
There’s nothing like a good spoonerism phu tickle your tunny bone
There’s nothing like a good spoonerism boo tickle your funny tone
There’s nothing like a good spoonerism to fickle your tunny bone
There’s nothing like a good spoonerism to bickle your funny tone
There’s nothing like a good spoonerism to tickle your bunnie fone
```
**input: Is the dean busy**
```
Is the bean dizzy
```
**input: jelly beans**
```
belly jeans
```
**input: trail snacks**
```
snail tracks
```
**input: Far out in the uncharted backwaters of the unfashionable end of the western spiral arm of the Galaxy lies a small unregarded yellow sun**
```
Far lout in the uncharted backwaters of the unfashionable end of the western spiral arm of the Galaxy eis a small unregarded yellow sun
Far out in the uncharted backwaters love the unfashionable end love the western spiral arm love the Galaxy ayes a small unregarded yellow sun
Far out in the uncharted backwaters of the unfashionable lend of the western spiral arm of the Galaxy eyes a small unregarded yellow sun
Far out in the uncharted backwaters of the unfashionable send of the western spiral arm of the Galaxy lies a small unregarded yellow un
Far out in the uncharted backwaters love the unfashionable end love the western spiral arm love the Galaxy ais a small unregarded yellow sun
Far out in the uncharted backwaters love the unfashionable end love the western spiral arm love the Galaxy eis a small unregarded yellow sun
Far out in the uncharted backwaters of the unfashionable end of the western spiral arm of the Galaxy size a small unregarded yellow lun
Far out in the uncharted backwaters of the unfashionable end of the western spiral arm of the Galaxy lies a small unregarded celo youn
```