Skip to content
Discussion options

You must be logged in to vote

The simple reason is probably that the sentence you've given the model is unlike the data on which the model is trained. Your sentence in particular reads as if titles of headers are mixed into the sentence, which might explain what you're seeing.

Here's an alternative sample that does detect a "simple date".

import spacy
nlp = spacy.load("en_core_web_trf")
string = 'My birthday is on 12/12/12'
doc = nlp(string)
[ent for ent in doc.ents]

Note that in this example, if I only read "My birthday is on HIDDENTOKEN" I'm able to guess that "HIDDENTOKEN" might be a date. In the example that you mentioned this is perhaps less obvious and might explain the behaviour.

In general it's good to remembe…

Replies: 1 comment 1 reply

Comment options

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

Answer selected by adrianeboyd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
perf / accuracy Performance: accuracy feat / transformer Feature: Transformer
2 participants