mirror of
https://github.com/explosion/spaCy.git
synced 2025-03-12 23:35:47 +03:00
Support gold_preproc
This commit is contained in:
parent
2d34d2f24a
commit
03b3da26be
|
@ -50,7 +50,11 @@ class Corpus:
|
||||||
|
|
||||||
def make_examples_gold_preproc(self, nlp, reference_docs):
|
def make_examples_gold_preproc(self, nlp, reference_docs):
|
||||||
for whole_reference in reference_docs:
|
for whole_reference in reference_docs:
|
||||||
for ref_sent in whole_reference.sents:
|
if whole_reference.is_sentenced:
|
||||||
|
references = [sent.as_doc() for sent in whole_reference.sents]
|
||||||
|
else:
|
||||||
|
references = [whole_reference]
|
||||||
|
for ref_sent in references:
|
||||||
reference = ref_sent.as_doc()
|
reference = ref_sent.as_doc()
|
||||||
predicted = Doc(
|
predicted = Doc(
|
||||||
nlp.vocab,
|
nlp.vocab,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user