Coder Social home page Coder Social logo

phyme's Introduction

Phyme

Phyme is a Python rhyming dictionary for songwriting.

Pronunciation is taken from The CMU Pronouncing Dictionary. Some background information on rhyming for songwriting can be found here.

To install Phyme, use pip install phyme

By default, Phyme rhymes words based on the last stressed syllable or last stressed-unstressed pair of syllables. Passing in the num_sylls=x keyword arg will find rhymes with more syllables.

Phyme supports 6 types of rhymes:

from Phyme import Phyme

ph = Phyme()

# find perfect rhymes. DOG -> COG
ph.get_perfect_rhymes(word, num_sylls=None)

# find rhymes with the same vowels and consonants of the same type (fricative, plosive, etc) and voicing (voiced or unvoiced). FOB -> DOG
ph.get_family_rhymes(word, num_sylls=None)

 # find rhymes with the same vowels and consonants of the same type, regardless of voicing. HAWK -> DOG
ph.get_partner_rhymes(word)

# find rhymes with the same vowels and consonants, as well as any extra consonants. DUDES -> DUES
ph.get_additive_rhymes(word)

# find rhymes with the same vowels and a subset of the same consonants. DUDE -> DO
ph.get_subtractive_rhymes(word)  

# find rhymes with the same vowels and some of the same consonants, with some swapped out for other consonants. FACTOR -> FASTER
ph.get_substitution_rhymes(word) 

# find rhymes with the same vowels and arbitrary consonants. CASH -> CATS
ph.get_assonance_rhymes(word)

# find word that do not have the same vowels, but have the same consonants. CAT -> BOT
ph.get_consonant_rhymes(word)

phyme's People

Contributors

emo-eth avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.