Exemplo n.º 1
0
def test_word_similarity_far():
    index = rhymes.word_similarity("test", "nothing")

    assert index == 0
Exemplo n.º 2
0
def test_word_similarity_end():
    index = rhymes.word_similarity("test", "best", start_phone=-2)

    assert index == 1
Exemplo n.º 3
0
def test_word_similarity_close():
    index = rhymes.word_similarity("test", "best")

    assert index == 4/5
Exemplo n.º 4
0
def test_word_similarity_start():
    index = rhymes.word_similarity("blurt", "blurb", end_phone=2)

    assert index == 1
Exemplo n.º 5
0
def test_word_similarity_exact():
    index = rhymes.word_similarity("test", "test")

    assert index == 1