Skip to content
Discussion options

You must be logged in to vote

If you'd like to change the labels and it being reflected on doc.ents then its better to create a new list of entities and assign it back to doc.ents. So you can loop through doc.ents and for each entity you can decide whether to just add it to new_ents or first create a new Span and then add it to new_ents. Finally, at the end you can assign doc.ents = new_ents.

Replies: 3 comments 6 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@EvelynGriffith
Comment options

Comment options

You must be logged in to vote
5 replies
@EvelynGriffith
Comment options

@kadarakos
Comment options

Answer selected by EvelynGriffith
@EvelynGriffith
Comment options

@kadarakos
Comment options

@EvelynGriffith
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat / ner Feature: Named Entity Recognizer feat / visualizers Feature: Built-in displaCy and other visualizers
2 participants