Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -107,4 +107,5 @@ venv.bak/
.noseids
.vscode/*
*.ipynb
.pypirc
.pypirc
/.vs
8 changes: 8 additions & 0 deletions Phyme/Phyme.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,14 @@ def sorted_search(self, phones, keyword):
sorted_dict = dict()
for k, v in results.items():
sorted_dict[k] = list(sort_words(keyword, v))

#This removes the input word from the return of rhymes
for syl in sorted_dict:
try:
sorted_dict[syl].remove(keyword)
except:
pass

return sorted_dict

def get_perfect_rhymes(self, word, num_syllables=None):
Expand Down