Commit f6ac96aa85ea2a3273b477969f6b1ffc0044666c
1 parent
03bf3bbb
poprawienie błędu w typach segmentów
git-svn-id: svn://svn.nlp.ipipan.waw.pl/morfeusz/morfeusz@121 ff4e3ee1-f430-4e82-ade0-24591c43f1fd
Showing
1 changed file
with
2 additions
and
2 deletions
fsabuilder/morfeuszbuilder/tagset/segtypes.py
... | ... | @@ -111,7 +111,7 @@ class Segtypes(object): |
111 | 111 | self._validate( |
112 | 112 | u'Pattern must contain encodedForm and part-of-speech fields', |
113 | 113 | lineNum, |
114 | - re.match(r'.+?\:[a-z_]+', pattern, re.U) and len(pattern.split(':')) == 2) | |
114 | + re.match(r'.+?\:[a-z_]+', pattern, re.U)) | |
115 | 115 | |
116 | 116 | if segtype in self.segtype2Segnum: |
117 | 117 | segnum = self.segtype2Segnum[segtype] |
... | ... | @@ -119,7 +119,7 @@ class Segtypes(object): |
119 | 119 | segnum = len(self.segtype2Segnum) |
120 | 120 | self.segtype2Segnum[segtype] = segnum |
121 | 121 | |
122 | - lemma, pos = pattern.split(':') | |
122 | + lemma, pos = pattern.split(':', 1) | |
123 | 123 | |
124 | 124 | segtypePattern = SegtypePattern(lemma, pos + ':%', segnum) |
125 | 125 | |
... | ... |