spacy.cli.evaluate: fix TypeError (#3101)

This commit is contained in:
Jari Bakken 2018-12-28 11:14:28 +01:00 committed by Ines Montani
parent 0546135fba
commit ba8a840f84

View File

@ -49,9 +49,9 @@ def evaluate(
end = timer()
nwords = sum(len(doc_gold[0]) for doc_gold in dev_docs)
results = {
"Time": "%.2f s" % end - begin,
"Time": "%.2f s" % (end - begin),
"Words": nwords,
"Words/s": "%.0f" % nwords / (end - begin),
"Words/s": "%.0f" % (nwords / (end - begin)),
"TOK": "%.2f" % scorer.token_acc,
"POS": "%.2f" % scorer.tags_acc,
"UAS": "%.2f" % scorer.uas,