We have checked the same scenario at our end.
Kindly refer the below example where we would be asking the user for name and printing the same name in a message node.
1- Create an entity node with type “Person Name”. (This type would automatically detect the name from a sentence and stores only name as the entity value)
2-In the message node, add the prompt message as
your name is {{context.entities.EntityName}}
3- The response from the bot
Let us know if you need any further clarification on the above.
We have enabled the “Portuguese” language from Settings >> Language management of the bot.
Then, opened the chat window to test the entity.
We could observe that the bot is able to pick only name from the response given in Portuguese.
Kindly refer the attached screenshots.
If you are still facing the issue, please send us the screenshots for further debugging.
Sorry
when creating a new bot in Portuguese as default language, the detection of Person Name seens to not work correctly.
Does it only work when English is enabled?
thank you @yogaramya.mendu but I´m still having trouble to make work things that I imagine, are basic.
The bot
On the screenshot you see that I made two tests:
The first test: meu nome é Felipe
Bot says: Olá Felipe, em que posso ajudar? (this answer is ok)
on the second test I reply: meu nome é Márcio (my name is Márcio)
The bot says: Olá Meu, em que posso ajudar? (Hello My, how may I help you?)
I cannot understand what may be causing this since both names are very tipical in portguese.
this also happens with other names, like Marcele, Zento…
We have discussed this issue with our engineering team.
This is a bug from our end where few specific names in any language are not recognized.
We have raised a ticket for the same, this issue would be addressed in further release.
The Person Name entity is showing: John from Company X.
tried to get only the first word with this JS but didn´t work. Is there another way?
var lower = context.entities.AskForName;
var firstWords = [lower];
for (var i=0;i<codelines.length;i++)
{
var codeLine = codelines[i];
var firstWord = codeLine.substr(0, codeLine.indexOf(" "));
firstWords.push(firstWord);
}
var upper = firstWord.charAt(0).toUpperCase() + firstWord.substr(1);
print('Hello'+ upper + ', how can we help you today?');
We have checked with the same Utterance and the name John is appropriately detected by the Entity node with Type “Person Name”. Please refer the screenshots: