Skip to content

Instantly share code, notes, and snippets.

@rodrigopr
Last active August 29, 2015 13:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rodrigopr/9819765 to your computer and use it in GitHub Desktop.
Save rodrigopr/9819765 to your computer and use it in GitHub Desktop.
history = [] # previous labels
for i, word in enumerate(sentence):
featureset = get_features(word, history, sentence, i)
label = predict(featureset)
history.append(label)
... remain processing
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