🛠️ToolsShed

운율 찾기

내장 사전으로 영어 단어의 라임을 찾습니다.

Browse Rhyme Families

자주 묻는 질문

코드 구현

# Simple rhyme finder using CMU Pronouncing Dictionary
# pip install pronouncing
import pronouncing

def find_rhymes(word: str) -> list[str]:
    """Find all words that rhyme with the given word."""
    rhymes = pronouncing.rhymes(word)
    return sorted(set(rhymes))

# Example usage
word = "light"
rhyming_words = find_rhymes(word)
print(f"Words that rhyme with '{word}':")
for w in rhyming_words[:20]:
    print(f"  {w}")

# Get phonetic representation
phones = pronouncing.phones_for_word(word)
print(f"\nPhonetic: {phones}")

# Find words with same ending sound
def find_by_suffix(phones_list: list[str], suffix: str) -> list[str]:
    """Find words with a specific phonetic ending."""
    results = []
    for phones in phones_list:
        stress = pronouncing.stresses(phones)
        if stress.endswith(suffix):
            results.append(phones)
    return results

Comments & Feedback

Comments are powered by Giscus. Sign in with GitHub to leave a comment.