Created
November 9, 2013 17:54
-
-
Save language-engineering/7388007 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
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