

def test_gloss_special_case(self):
    utter_tier = poioapi.io.graf.Tier(self._parser.tier_labels.tier_label(poioapi.data.TIER_UTTERANCE))
    word_tier = poioapi.io.graf.Tier(self._parser.tier_labels.tier_label(poioapi.data.TIER_WORD))
    m_tier = poioapi.io.graf.Tier(self._parser.tier_labels.tier_label(poioapi.data.TIER_MORPHEME))
    g_tier = poioapi.io.graf.Tier(self._parser.tier_labels.tier_label(poioapi.data.TIER_GLOSS))
    root = self._parser.get_annotations_for_tier(self._root_tier)[0]
    utter = self._parser.get_annotations_for_tier(utter_tier, root)[0]
    words = self._parser.get_annotations_for_tier(word_tier, utter)
    morphemes = []
    for w in words:
        utter.extend(self._parser.get_annotations_for_tier(m_tier, w))
    glosses = []
    for m in morphemes:
        glosses.extend(self._parser.get_annotations_for_tier(g_tier, m))
    assert (len(glosses) == 7)
    expected = ['the', 'Paulo', 'worked', 'more', 'than', 'what', 'nobody']
    assert (set(expected) == set([a.value for a in glosses]))

dataset/ETHPy150Open cidles/poio-api/src/poioapi/tests/io/test_odin.py TestParser.test_gloss_special_case/VarMisuse@171/270 `morphemes`->`utter`