Skip to content
This repository has been archived by the owner on May 27, 2024. It is now read-only.

Add pararhyme #10

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Add pararhyme #10

wants to merge 2 commits into from

Conversation

autt
Copy link

@autt autt commented Nov 20, 2020

Resolves #4

This PR adds pararhyme to rhymes that are considered.

Move all the logic to separate functions, so new types of rhymes can
easily be added.
Words that does pararhyme are now also considered to rhyme.

A pararhyme is two words of equal lenght where all consonants match.
@eivindjahren eivindjahren added the enhancement New feature or request label Nov 20, 2020
if not (len(word1) == len(word2)):
return False

for letter1, letter2 in zip(word1, word2):
Copy link
Owner

@eivindjahren eivindjahren Nov 20, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all(letter1 == letter2 or is_vowel(letter1, letter2) for letter1, letter2 in zip(word1,word2))

Copy link
Owner

@eivindjahren eivindjahren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh my god... 🥇

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Other kinds of rhymes
3 participants