* Update parser training script for tweaked parser API

This commit is contained in:
Matthew Honnibal 2015-01-25 02:20:49 +11:00
parent 4e857ab7a6
commit 72ff9c5082

View File

@ -135,7 +135,7 @@ def evaluate(Language, dev_loc, model_dir):
for words, heads, labels, tags in sents:
tokens = nlp.tokenizer.tokens_from_list(words)
nlp.tagger(tokens)
nlp.parser.parse(tokens)
nlp.parser(tokens)
for i, token in enumerate(tokens):
#print i, token.string, i + token.head, heads[i], labels[i]
if labels[i] == 'P' or labels[i] == 'punct':