Skip to content

Instantly share code, notes, and snippets.

@formigarafa
Forked from chrislloyd/gist:1001907
Created June 1, 2011 15:27
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 formigarafa/1002552 to your computer and use it in GitHub Desktop.
Save formigarafa/1002552 to your computer and use it in GitHub Desktop.
require 'logger'
class String
LOGGER = Logger.new($stderr)
def -@; LOGGER.info self; end
end
# Extracted earlier, hardcoded for speed
ENTITIES = %w(I-ORG O I-MISC I-PER I-LOC B-LOC B-MISC MO B-ORG)
- 'started parsing training data'
TRAINING_DATA = CONLL03.parse_file(STDIN)
- 'finished parsing training data'
model = Perceptron.new ENTITIES, CONLL03.labels
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment