Created
April 5, 2020 08:28
-
-
Save evanmiltenburg/018eaa0a2432230d4340842786b64b1c to your computer and use it in GitHub Desktop.
Script om personen te vinden in Nederlandse tekst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import spacy | |
nlp = spacy.load('nl_core_news_sm') | |
with open('bordewijk.txt') as f: | |
doc = nlp(f.read()) | |
people = [ent.orth_ for ent in doc.ents if ent.label_ == 'PERSON'] | |
print(people) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Met deze tekst geeft dit de volgende resultaten:
"kim" is ook een false positive; dat woord komt uit de uitdrukking "van kim tot kim".