Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[EN Number] Issue with fracLikeNumberParse in JavaScript #2716

Open
hershkoy opened this issue Sep 17, 2021 · 1 comment
Open

[EN Number] Issue with fracLikeNumberParse in JavaScript #2716

hershkoy opened this issue Sep 17, 2021 · 1 comment

Comments

@hershkoy
Copy link

hershkoy commented Sep 17, 2021

Describe the bug
In English Number, I tried to parse the sentence: "two out of five hundred tvs". The result I expected was 2/500=0.004. But see below, it doesn't work.

To Reproduce
Steps to reproduce the behavior:
Add this case to

  {
    "Input": "two out of five hundred tvs",
    "Results": [
      {
        "Text": "two out of five hundred",
        "TypeName": "number",
        "Resolution": {
          "subtype": "fraction",
          "value": "0.004"
        },
        "Start": 0,
        "End": 22
      }
    ]
  },  

Run:

>ava --match='*tvs*'

Result is:

  index-number » Number - English - NumberModel - "two out of five hundred tvs"

  Result.Resolution.value

  Difference:

  - 'INFINITY'
  + '0.004'

Expected behavior
It should pass the test

@tellarin
Copy link
Collaborator

"two out of five hundred tvs" work in .NET. But weirdly "two out of five hundreds tvs" produces wrong results.
@aitelint Can you take a quick look? At least the incorrect sentence shouldn't produce such incorrect results in .NET.

@tellarin tellarin changed the title Issue with fracLikeNumberParse? [EN Number] Issue with fracLikeNumberParse in JavaScript Dec 31, 2021
aitelint pushed a commit to aitelint/Recognizers-Text that referenced this issue Dec 31, 2021
tellarin pushed a commit that referenced this issue Jan 4, 2022
)

Co-authored-by: aitelint <Fabrizio.Sorba@telusinternational.com>
andrew-gradinari pushed a commit to purecloudlabs/Recognizers-Text that referenced this issue Feb 4, 2022
…2716) (microsoft#2819)

Co-authored-by: aitelint <Fabrizio.Sorba@telusinternational.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants