'Spacy transformer misses simple dates: Am I implementing something wrong?

If I run the following:

import spacy
nlp = spacy.load("en_core_web_trf")
string = 'POLICY DETAILS Penod of Cover Your Policy gives you 18/11/21 (Noor) 18/11/22 Comprehensive Sections AB,C,'
doc = nlp(string)
[ent for ent in doc.ents if ent.label_ == "DATE"]

I get an empty list... Am I missing something in the implementation?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source