Skip to content
Discussion options

You must be logged in to vote

Thanks @ljvmiranda921 , I was able to solve it by using this code:

doc_bin = DocBin().from_disk(path_test_data)
examples = []
for doc in doc_bin.get_docs(nlp.vocab):
    entities = []
    for ent in doc.ents:
        entities.append((ent.start_char, ent.end_char, ent.label_))

    spacy_entry = (doc.text, {"entities": entities})
    examples.append(spacy_entry)

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by milos-cuculovic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
training Training and updating models feat / training Feature: Training utils, Example, Corpus and converters
2 participants