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

Ordinal to number

Open hgjkant opened this issue 10 years ago • 4 comments

Hi,

When I'm presenting a numbered list to a user to select something, they might say something containing 'first'. I get an ordinal 'first' as resulting entity, but this is a string. Maybe I'm overlooking it, but is there a way to go from the ordinal to an integer? I'm using the latest node release.

hgjkant avatar Jul 07 '16 12:07 hgjkant

Thanks for the report. This behavior is currently not supported, (the user can say "1" or "1st" but "first" would not work). I put together a small patch to allow this. I still need to test it some, but I will post when we merge this into master!

jorenl avatar Jul 11 '16 21:07 jorenl

Ah thanks! To add to this, I know "last" isn't technically an ordinal, but I guess it will be used as well. If this could also be recognized (resulting in infinity for example), that'd be nice :)

hgjkant avatar Jul 11 '16 22:07 hgjkant

Thanks for the suggestion! Currently, the choice prompt uses the number recognizer internally, and it wouldn't be great to have 'last' be recognized as a number outside of choice prompts - but I'll take a look and see if there's a reasonable approach that would support that also.

jorenl avatar Jul 11 '16 23:07 jorenl

Cool suggestion, thanks! We've added it to our backlog.

danmarshall avatar Aug 12 '16 21:08 danmarshall