Last active
August 29, 2015 13:57
-
-
Save rodrigopr/9819765 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
history = [] # previous labels | |
for i, word in enumerate(sentence): | |
featureset = get_features(word, history, sentence, i) | |
label = predict(featureset) | |
history.append(label) | |
... remain processing | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dataset = [] | |
history = [] # previous labels | |
for word, label in training: | |
featureset = get_features(word, history, sentence, i) | |
dataset.append((featureset, label)) | |
history.append(label) | |
... remain processing |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment