Name entity is not extracting

I am trying to extract name other than one defined in training dataset . When I say my bot my name is john with user_name as a slot .It should answer hello john , whatever name I put in the bracket .

1 Like

@sakshi14 you want that when user input his/her name the bot fetch the name entity and display with the message Hello John, How can I help you today? Right!

@sakshi14

domain.yml

responses: utter_show_detail:

  • text: Thanks {name}! for the Email id {email}. How can I help you!

actions: action_show_detail

action.py

class ActionDetailt(Action):

 def name(self) -> Text:
     return "action_show_detail"

 def run(self, dispatcher: CollectingDispatcher,
         tracker: Tracker,
         domain: Dict[Text, Any]) -> List[Dict[Text, Any]]:
        
     name=tracker.get_slot("name")
     email=tracker.get_slot("email")

     dispatcher.utter_message(template="utter_show_detail")
     
     return []

You need to create the intent in nlu.yml, mention the Intent, Entities, Slots in domain.yml and create the story for the bot/user conversation.

I guess you want this only?

forms: user_info_form: ignored_intents: - greet - goodbye required_slots: user_type: - type: from_entity entity: user_type intent: - user_type user_name: - type: from_text entity: user_name intent: - user_name I am using form and trying to extract the name from_text . I am not extracting entity actually. i am just trying to extract text here

@sakshi14 Hi! Your query is solved?

No …My query still not solved

sounds more like an entity extraction problem over a slot set problem. Do you mean that the NLU model isn’t able to extract names based on the training you have done. Did you use DIET?

Names are incredibly hard and i wouldn’t rely on an extractor for names to work perfectly because they don’t have any definite pattern. Probably best if you can use lookup tables… if your namelist is finite in nature.

I am also facing the name extraction issues

nlu recipe: default.v1 assistant_id: 20231017-115141-knurled-estimator language: en pipeline:

  • name: “WhitespaceTokenizer”
  • name: “CRFEntityExtractor”
  • name: “CountVectorsFeaturizer”
  • name: “CountVectorsFeaturizer”
  • name: “DIETClassifier”
  • name: “SpacyNLP” model: “en_core_web_md”
  • name: “RegexFeaturizer”
  • name: SpacyEntityExtractor dimensions: [“name”,“PERSON”,“ORG”]
  • name: “SpacyEntityExtractor”
  • name: “EntitySynonymMapper”
  • name: RegexEntityExtractor case_sensitive: False use_lookup_tables: True use_regexes: True

policies:

  • name: MemoizationPolicy
  • name: TEDPolicy
  • name: RulePolicy

entities:

  • name

  • intent: contact_us examples: |

and if i

the name ramakrishna only extracting