Skip to content
Discussion options

You must be logged in to vote

Hi @musicnandpeace , this may be more of how Python's dict.fromkeys works than in spaCy. One solution is to use a dictionary comprehension:

extracted_entities = {ent: [] for ent in entities}

Also, next time please format the codeblocks using backticks (```), it helps us better debug and copy-paste your sample code

Replies: 1 comment 1 reply

Comment options

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

Answer selected by musicnandpeace
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