Commit 22f68665ac73e878eee9e9b0e4740e73a24941d5
1 parent
4528e001
ignorowanie homonimii w sekcji [lexemes] w regułach segmentacji
git-svn-id: svn://svn.nlp.ipipan.waw.pl/morfeusz/morfeusz@127 ff4e3ee1-f430-4e82-ade0-24591c43f1fd
Showing
1 changed file
with
2 additions
and
0 deletions
fsabuilder/morfeuszbuilder/tagset/segtypes.py
... | ... | @@ -189,6 +189,8 @@ class SegtypePattern(object): |
189 | 189 | patterns2Match = [] |
190 | 190 | patterns2Match.append(self.pattern.replace('%', '.*')) |
191 | 191 | patterns2Match.append(re.sub(r'\:\%$', '', self.pattern).replace('%', '.*')) |
192 | + if lemma: | |
193 | + lemma = lemma.split(':')[0] if len(lemma) > 1 else lemma | |
192 | 194 | if (self.lemma is None or self.lemma == lemma) \ |
193 | 195 | and any([re.match(p, tag) for p in patterns2Match]): |
194 | 196 | return self.segnum |
... | ... |