Exemplo n.º 1
0
    def test_tag_with_unknown_prefix(self):
        word = 'мегакот'
        pred1 = UnknownPrefixAnalyzer(morph)
        pred2 = KnownPrefixAnalyzer(morph)

        parse1 = pred1.tag(word, word.lower(), set())
        parse2 = pred2.tag(word, word.lower(), set())
        assert parse1 == parse2
Exemplo n.º 2
0
    def test_tag_with_unknown_prefix(self, morph):
        word = 'мегакот'

        pred1 = UnknownPrefixAnalyzer()
        pred1.init(morph)
        pred2 = KnownPrefixAnalyzer(lang.ru.KNOWN_PREFIXES)
        pred2.init(morph)

        parse1 = pred1.tag(word, word.lower(), set())
        parse2 = pred2.tag(word, word.lower(), set())
        assert parse1 == parse2