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)
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.
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?)
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: