If I want to use spacy for extracting name then what would the config file looks like?

If I want to use spacy for extracting name then what would the config file looks like???

Hi @faiza_conte, can you tell me a little more about what you mean by spacy? It sounds like you want to use the SpacyEntityExtractor. You can find an example configuration that uses SpacyEntityExtractor here. If you just want to extract names, then dimensions: ["PERSON"] should do it, see the config file I linked for an example.

I did try that but I have to put all possible names in nlu…it doesn’t work like duckling …

Do you have PERSON in your domain file?

if the config looks like this do i have to put the dimenstion for a entity person under spacy feuterizer?

Yes, you would need to put:

- name:SpacyEntityExtractor

dimensions: ["PERSON"]

but it is not found in the documentation why is that?..does that mean that it wont be a problem?

The dimensions are briefly mentioned in the documentation of SpacyEntityExtractor under Configuration here.

You can see it in action in one of our provided examples here.

okay i will check it out thanks so much

here there is something else am curious about…is am using a spacy in config file then other entites that spacy doesnt support that i have written in nlu data, how will they be tokenized and trained?..

Did this work for you?

here there is something else am curious about…is am using a spacy in config file then other entites that spacy doesnt support that i have written in nlu data, how will they be tokenized and trained?..

This depends on what else is in your pipeline! If you want to share your pipeline we can go through it together

Ow I see one of the example you gave me I will try it and will show u the error that might will exists thanks in advance

1 Like

@fkoerner and also why the rasa widget chatbot for a website when refreshing the page the last conversation or past conversation still exists…even if I change the params the chatbot holds the last conversation when refreshing the webpage…and can that be solved??I want the chatbot to be empty when refreshing the page

@fkoerner here it is not detecting the name…it will just map the name with the other entities.see the picture:

One thing I notice is that you have PERSON and name in your entities. This probably isn’t the root cause of your problem, though.

Do you have any nlu data related to name extraction that you could share? It’d be great if you could share the actual text of the file rather than a screenshot. In general, sharing code or error text rather than screenshots helps to condense the information for other people looking at your question!

@fkoerner okay here is my domain,config and nlu file config.yml (2.3 KB) domain.yml (9.0 KB) nlu_converted.yml (15.6 KB)

One thing you can try is to remove the duplicate entities (name and PERSON) and duplicate intents (name and myname). Does that help?

How spacy get confused with other entities that are trained with diet classifier??

Sorry, I’m not sure I’ve understood your question, are you asking why I’m suggesting you remove the duplicates?

For the intents, the examples for myname and name are very similar. This makes it difficult for the classifier to assign an intent. You can keep them if you change the examples to be more distinct for each intent.

For the entities, it is a similar issue, there’s not enough distinction between PERSON and name.

I think that SpacyEntityExtractor may be having trouble extracting some of the names as it hasn’t seen them in the training data. You can try using a larger model, but I think you might be best off using a lookup table in addition. If you know that most of your users will have Ethiopian names then you could pull the most common ones and add them to a lookup table (for the entity PERSON). You will need to use the RegexEntityExtractor in your pipeline. See this post for more information.