botframework-sdk icon indicating copy to clipboard operation
botframework-sdk copied to clipboard

[Node] Entities are lower case

Open hgjkant opened this issue 10 years ago • 9 comments

Hi, In my bot (v3.2.2) entities directly passed in an utterance are transformed to lowercase. If I respond to a prompt the response is case sensitive though.

hgjkant avatar Aug 10 '16 13:08 hgjkant

I assume this is the Node version of the SDK?

willportnoy avatar Aug 10 '16 16:08 willportnoy

Oh my bad, it is.

hgjkant avatar Aug 10 '16 19:08 hgjkant

Can you provide an example? I'm not completely following you? Are you using LUIS?

Stevenic avatar Aug 23 '16 07:08 Stevenic

I am using LUIS. For example, a user can change the name the bot uses to refer to the user by saying either Change my name to FooBar or Change my name, after which the bot prompts for the new name. In the first case, the bot responds with Hi foobar (all lowercase), but in the second case (after the prompt) the bot responds with Hi FooBar.

I've tried the same utterance on luis.ai itself (in the publish current application dialog), and there the entity was also lowercase, so it seems to be a LUIS issue.

hgjkant avatar Aug 24 '16 08:08 hgjkant

The LUIS response includes a pointer to the offset within the original query string - maybe you can use that. For example, here is the C# exposition of that:

https://github.com/Microsoft/BotBuilder/blob/master/CSharp/Library/Luis/Models/EntityRecommendation.cs#L61

willportnoy avatar Aug 25 '16 19:08 willportnoy

This is by design the entities detected are all lowercase. Will add this as request to our backlog

CarolHanna avatar Aug 30 '16 08:08 CarolHanna

as @willportnoy mentioned the start and end index are char indexes on the original text lower-cased, so you can store the raw text and use them to extract the unmodified text.

yshahin avatar Aug 30 '16 08:08 yshahin

I see, I will use this as a workaround, thanks.

hgjkant avatar Aug 30 '16 10:08 hgjkant

I'm facing the same issue now. May I know how to resolve this?

praneethnooli avatar Jul 29 '20 18:07 praneethnooli