mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-25 17:36:30 +03:00
minor cleanup
This commit is contained in:
parent
39d3cbfdba
commit
5ba970b495
|
@ -6,7 +6,7 @@ To achieve that, it duplicates some of spaCy's internal functionality.
|
||||||
|
|
||||||
Specifically, in this example, we don't use spaCy's built-in Language class to
|
Specifically, in this example, we don't use spaCy's built-in Language class to
|
||||||
wire together the Vocab, Tokenizer and EntityRecognizer. Instead, we write
|
wire together the Vocab, Tokenizer and EntityRecognizer. Instead, we write
|
||||||
our own simle Pipeline class, so that it's easier to see how the pieces
|
our own simple Pipeline class, so that it's easier to see how the pieces
|
||||||
interact.
|
interact.
|
||||||
|
|
||||||
Input data:
|
Input data:
|
||||||
|
@ -149,7 +149,8 @@ def report_scores(i, loss, scores):
|
||||||
precision = '%.2f' % scores['ents_p']
|
precision = '%.2f' % scores['ents_p']
|
||||||
recall = '%.2f' % scores['ents_r']
|
recall = '%.2f' % scores['ents_r']
|
||||||
f_measure = '%.2f' % scores['ents_f']
|
f_measure = '%.2f' % scores['ents_f']
|
||||||
print('Epoch %d: %d %s %s %s' % (i, int(loss), precision, recall, f_measure))
|
print('Epoch %d: %d %s %s %s' % (
|
||||||
|
i, int(loss), precision, recall, f_measure))
|
||||||
|
|
||||||
|
|
||||||
def read_examples(path):
|
def read_examples(path):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user