예제 #1
0
def test_phonemes_count_none():
    drop_caches()
    assert SubstitutionFeaturesMixin._phonemes_count() == _get_pronunciations().keys()
    for word in SubstitutionFeaturesMixin._phonemes_count():
        assert word.islower()
예제 #2
0
def test_phonemes_count():
    drop_caches()
    assert SubstitutionFeaturesMixin._phonemes_count("hello") == 4
    assert SubstitutionFeaturesMixin._phonemes_count("mountain") == 6
    assert np.isnan(SubstitutionFeaturesMixin._phonemes_count("makakiki"))