Exemple #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
Exemple #2
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
Exemple #3
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
Exemple #4
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