Problem while storing the slot value

Hi,

Premise: I have created a slot where I ask for users name and in my nlu file while writing intents for name I’ve also defined entities.

Problem: when user types something like call me “name” or my name is “name” the bot stores the whole sentence instead of name.

I only want to store the name so, how should I do it ?

any help would be appreciated!

There’s a blog post on this subject here. The flowchart there gives a good overview of how to approach entity extraction and the following paragraph address extracting names:

The spaCy library offers pretrained entity extractors. As with the word embeddings, only certain languages are supported. If your language is supported, the component ner_spacy is the recommended option to recognise entities like organization names, people’s names, or places. You can try out the recognition in the interactive demo of spaCy.

Thanks for the help:)

hi stephens, I have created a bot thats asks user information (using forms) and stores in database. I want to extract name from the user. so Im using spacy entity extractor and added dimension [‘PERSON’]. I have some doubts in nlu and domain. should I add the entities PERSON for name in nlu and add the entities in domain.

version: “2.0”

nlu:

  • intent: Names

    examples: |

    • My name is [shanthosh] (PERSON)
    • I am [Virat] (PERSON)
    • [vijay] (PERSON)

version: “2.0”

intents:

  • greet

  • goodbye

  • mobile_number

  • Names:

    use_entities:

    - PERSON
    

entities:

  • PERSON

slots:

name:

type: text

influence_conversation: false

forms:

user_details_form:

required_slots:

  name:

    - type: from_text

      entity: PERSON