Skip to content

Instantly share code, notes, and snippets.

@ducalpha
Created January 5, 2019 22:31
Show Gist options
  • Save ducalpha/7a8464770419b4bd3bc89067e7cc78d0 to your computer and use it in GitHub Desktop.
Save ducalpha/7a8464770419b4bd3bc89067e7cc78d0 to your computer and use it in GitHub Desktop.
Predict raw data in Allennlp
# http://ai.orbifold.net/default/what-is-semantic-role-labeling/
instance = self.predictor._dataset_reader.text_to_instance(doc, verb_labels)
output = self.predictor._model.forward_on_instance(instance, -1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment