Пример #1
0
def test_word_similarity_far():
    index = rhymes.word_similarity("test", "nothing")

    assert index == 0
Пример #2
0
def test_word_similarity_end():
    index = rhymes.word_similarity("test", "best", start_phone=-2)

    assert index == 1
Пример #3
0
def test_word_similarity_close():
    index = rhymes.word_similarity("test", "best")

    assert index == 4/5
Пример #4
0
def test_word_similarity_start():
    index = rhymes.word_similarity("blurt", "blurb", end_phone=2)

    assert index == 1
Пример #5
0
def test_word_similarity_exact():
    index = rhymes.word_similarity("test", "test")

    assert index == 1