Esempio n. 1
0
 def tag(self, word, word_lower, seen_tags):
     result = []
     for prefix, unprefixed_word in self.possible_splits(word_lower):
         for tag in self.morph.tag(unprefixed_word):
             if not tag.is_productive():
                 continue
             add_tag_if_not_seen(tag, result, seen_tags)
     return result
Esempio n. 2
0
 def tag(self, word, word_lower, seen_tags):
     result = []
     for prefix, unprefixed_word in self.possible_splits(word_lower):
         for tag in self.morph.tag(unprefixed_word):
             if not tag.is_productive():
                 continue
             add_tag_if_not_seen(tag, result, seen_tags)
     return result
Esempio n. 3
0
 def tag(self, word, word_lower, seen_tags):
     # By default .tag() uses .parse().
     # Usually it is possible to write a more efficient implementation;
     # analyzers should do it when possible.
     result = []
     for p in self.parse(word, word_lower, set()):
         add_tag_if_not_seen(p[1], result, seen_tags)
     return result
Esempio n. 4
0
 def tag(self, word, word_lower, seen_tags):
     # By default .tag() uses .parse().
     # Usually it is possible to write a more efficient implementation;
     # analyzers should do it when possible.
     result = []
     for p in self.parse(word, word_lower, set()):
         add_tag_if_not_seen(p[1], result, seen_tags)
     return result
Esempio n. 5
0
    def tag(self, word, word_lower, seen_tags):
        result = []
        for _, unprefixed_word in word_splits(word_lower):

            tags = self.dict_analyzer.tag(unprefixed_word, unprefixed_word, seen_tags)
            for tag in tags:

                if not tag.is_productive():
                    continue

                add_tag_if_not_seen(tag, result, seen_tags)

        return result
Esempio n. 6
0
    def tag(self, word, word_lower, seen_tags):
        result = []
        for _, unprefixed_word in word_splits(word_lower):

            tags = self.dict_analyzer.tag(unprefixed_word, unprefixed_word, seen_tags)
            for tag in tags:

                if not tag.is_productive():
                    continue

                add_tag_if_not_seen(tag, result, seen_tags)

        return result
Esempio n. 7
0
 def tag(self, word, word_lower, seen_tags):
     result = []
     # TODO: do not use self.parse
     for p in self.parse(word, word_lower, set()):
         add_tag_if_not_seen(p[1], result, seen_tags)
     return result
Esempio n. 8
0
 def tag(self, word, word_lower, seen_tags):
     result = []
     # TODO: do not use self.parse
     for p in self.parse(word, word_lower, set()):
         add_tag_if_not_seen(p[1], result, seen_tags)
     return result