Exemplo 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
Exemplo 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
Exemplo 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
Exemplo 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
Exemplo 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
Exemplo 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
Exemplo 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
Exemplo 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