Skip to content

zshot spaCy ignoring email and phone entities? #13419

Discussion options

You must be logged in to vote

Hi!

The pretrained NER model from the English models doesn't have specific labels for Email or Phone_number. It does however recognize Cardinal and Ordinal entities, which might be relevant for your use-case. They might not capture exactly what you want though.

For this type of information extraction, I would recommend using builtin attributes that spaCy defines on the token-level, such as like_num and like_email. These can then be used to design custom matcher rules, see here.

So for instance, you can write something like:

    text = "Hello Jake is your email still jake@nowhere.ai and your phone number 0342-42-66?"
    nlp = spacy.load("en_core_web_lg")
    doc = nlp(text)
    for ent in…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by svlandeg
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 feat / matcher Feature: Token, phrase and dependency matcher perf / accuracy Performance: accuracy
2 participants