Recognizers-Text icon indicating copy to clipboard operation
Recognizers-Text copied to clipboard

[EN] 'a last' in recognizerNumbers get INFINITY

Open ShukiPesso opened this issue 3 years ago • 0 comments

Describe the bug If you put in the input of Recognizer.recognizeNumber function the string 'a last' you get recognizer result with the value INFINITY

To Reproduce Steps to reproduce the behavior:

  1. run this javascript: import * as Recognizers from "@microsoft/recognizers-text-suite"; const results = Recognizers.recognizeNumber( "whatever you would like to write with the words a last somewhere", "en-en" ); results.forEach((element) => { console.log({ element }); console.log(element.resolution.value); });

  2. See that the "a last" return INFINITY

Expected behavior not to recognize 'a last' to any number

Sample input/output { element: { start: 49, end: 54, resolution: { value: 'INFINITY' }, text: 'a last', typeName: 'number' } } INFINITY

Platform (please complete the following information):

  • Platform: [JavaScript]
  • Environment: [npm package, mac m1]
  • Version of package [ v1.3.0] ("@microsoft/recognizers-text-suite": "^1.3.0",)

ShukiPesso avatar Jun 26 '22 15:06 ShukiPesso