mirror of
https://github.com/explosion/spaCy.git
synced 2024-11-10 19:57:17 +03:00
* Update parser training script for tweaked parser API
This commit is contained in:
parent
4e857ab7a6
commit
72ff9c5082
|
@ -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':
|
||||
|
|
Loading…
Reference in New Issue
Block a user