Carlos-Francisco Méndez-Cruz

Conditional Random Fields

......@@ -60,7 +60,7 @@ def word2features(sent, i):
features = {
#'word': word,
'lemma': lemma,
#'postag': postag,
'postag': postag,
}
if i > 0:
listElem = sent[i - 1].split('|')
......@@ -70,7 +70,7 @@ def word2features(sent, i):
features.update({
#'-1:word': word1,
'-1:lemma': lemma1,
#'-1:postag': postag1,
'-1:postag': postag1,
})
if i < len(sent) - 1:
......@@ -81,7 +81,7 @@ def word2features(sent, i):
features.update({
#'+1:word': word1,
'+1:lemma': lemma1,
#'+1:postag': postag1,
'+1:postag': postag1,
})
return features
......