Skip to content
Discussion options

You must be logged in to vote

Hi @skintflickz , perhaps you're looking for ent.text? It gives you a str that you can use to remove duplicates (e.g., set(people)).

for ent in doc.ents:
    if ent.label_ == "PERSON":
        people.append(ent.text)

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by ljvmiranda921
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
usage General spaCy usage
2 participants