Spacy and regex for entity extraction

Hi all and @akelad

Can I use SpacyEntityExtractor with regex patterns at the same time. My plan is to extract the names using SpacyEntityExtractor while postal codes are extracted by regex patterns?

Thanks, AV

Yeah, you can use both!

Thanks for the fast reply. Could you please tell me how? Any example?

Just the way it’s described here for regex: Training Data Format

The SpacyEntityExtractor doesn’t need any training data

@akelad, thanks for the info provided, quite helpful. If I understood your point well, we can add “SpacyEntityExtractor” in the pipeline and have “regex:” in nlu data (with no example), right?

In this case, do I still need to have “RegexFeaturizer” in the pipeline?


regex: doesn’t affect SpacyEntityExtractor. If you want to use just the SpacyEntityExtractor, you don’t need any regex examples, or RegexFeaturizer in the pipeline. But if you want to use some regex features for intent classification or other entity extraction, you would need it.

1 Like

Hello @akelad , I want to use SpacyEntityExtractor for dimensions: [“PERSON”]. could you please tell me what all changes i need to do in my project files.

Thanks :slight_smile:

Hii @amvas were you able to extract name entity using SpacyEntityExtractor ? I want to extract the name from user input. Please let me know if there is any way. Thanks!