Showing
1 changed file
with
3 additions
and
0 deletions
... | @@ -70,6 +70,7 @@ def word2features(sent, i): | ... | @@ -70,6 +70,7 @@ def word2features(sent, i): |
70 | #'word.isupper()': word.isupper(), | 70 | #'word.isupper()': word.isupper(), |
71 | 'word': word, | 71 | 'word': word, |
72 | 'lemma': lemma, | 72 | 'lemma': lemma, |
73 | + 'postag': postag, | ||
73 | 'lemma[-3:]': lemma[-3:], | 74 | 'lemma[-3:]': lemma[-3:], |
74 | 'lemma[-2:]': lemma[-2:], | 75 | 'lemma[-2:]': lemma[-2:], |
75 | 'lemma[-1:]': lemma[-1:], | 76 | 'lemma[-1:]': lemma[-1:], |
... | @@ -86,6 +87,7 @@ def word2features(sent, i): | ... | @@ -86,6 +87,7 @@ def word2features(sent, i): |
86 | features.update({ | 87 | features.update({ |
87 | '-1:word': word1, | 88 | '-1:word': word1, |
88 | '-1:lemma': lemma1, | 89 | '-1:lemma': lemma1, |
90 | + '-1:postag': postag1, | ||
89 | }) | 91 | }) |
90 | 92 | ||
91 | if i < len(sent) - 1: | 93 | if i < len(sent) - 1: |
... | @@ -96,6 +98,7 @@ def word2features(sent, i): | ... | @@ -96,6 +98,7 @@ def word2features(sent, i): |
96 | features.update({ | 98 | features.update({ |
97 | '+1:word': word1, | 99 | '+1:word': word1, |
98 | '+1:lemma': lemma1, | 100 | '+1:lemma': lemma1, |
101 | + '+1:postag': postag1, | ||
99 | }) | 102 | }) |
100 | 103 | ||
101 | ''' | 104 | ''' | ... | ... |
-
Please register or login to post a comment