Skip to content

Instantly share code, notes, and snippets.

@language-engineering
Created November 9, 2013 17:54
Show Gist options
  • Save language-engineering/7388007 to your computer and use it in GitHub Desktop.
Save language-engineering/7388007 to your computer and use it in GitHub Desktop.
from nltk.tokenize import word_tokenize
from nltk import pos_tag
from sussex_nltk.parse import dep_parse_sentences_arceager
sentences = ["This is the first example sentence",
"This is the second example sentence",
"This is the third example sentence"]
parsed_sents = dep_parse_sentences_arceager(pos_tag(word_tokenize(sentence)) for sentence in sentences)
for parsed_sentence in parsed_sents:
print "--- Sentence ---"
print parsed_sentence
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment