Exemple #1
0
def test_stresses():
    """Should set the stresses from the original word."""
    CUSTOM_DICT = {
        "phidian": {
            "syllables": ["phi", "dian"],
            "phones": "F IH1 D IY0 N"
        },
    }
    WORDS = {
        "Automatic": "2010",
        "serene": "01",
        "phidian": "10",
        "Poesy.": "",
        "bowèd": "12"
    }
    for word, stresses in WORDS.items():
        wb = WordBuilder(word, custom_dict=CUSTOM_DICT)
        assert wb.stresses == stresses