Skip to content

finding the date of an event #2403

Discussion options

You must be logged in to vote

I use:

doc = nlp(text)
for ent in doc.ents:
    if ent.label_ == 'DATE':
        return ent.text

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ines
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
usage General spaCy usage feat / ner Feature: Named Entity Recognizer resolved The issue was addressed / answered
2 participants
Converted from issue

This discussion was converted from issue #2403 on December 10, 2020 13:25.