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

[HE Number] Support for Number in Hebrew - Javascript

Open hershkoy opened this issue 4 years ago • 6 comments

Made the changes in the files, but at the moment it is still not working. I tried running the tests for Hebrew, but ava returns an error:

Recognizers-Text\JavaScript>npm test test/runner.js --match='*Hebrew*'

> [email protected] test E:\WORK\ML\develop\NLP\Recognizers-Text\JavaScript
> ava "test/runner.js"



  × No tests found in test\runner.js, make sure to import "ava" at the top of your test file

hershkoy avatar Aug 25 '21 08:08 hershkoy

CLA assistant check
All CLA requirements met.

@hershkoy, can you remove the duplicate cases in the specs, so the build can go through?

tellarin avatar Aug 25 '21 10:08 tellarin

I removed the duplicates and now I see there are regex syntax errors in the Hebrew files. I will check that and I will update (it can take some time though) Thanks for the help

hershkoy avatar Aug 25 '21 11:08 hershkoy

Thanks for keeping pushing this, @hershkoy! I'll try to take a closer look and see if I can help you a bit. We can start by merging partially the pieces that are already good. Especially the specs. How many of the total English Number specs have you localized into Hebrew?

tellarin avatar Sep 16 '21 05:09 tellarin

I am currently working only on Specs\Number\Hebrew\NumberModel.json. I localized all specs inside it, and currently about half of the cases are failing (mainly the Fraction phrases still require work).

If you want to merge, maybe I should add:

 "NotSupported": "javascript, java, python",

On the failing tests?

hershkoy avatar Sep 17 '21 10:09 hershkoy

I am trying to add support to more fraction sentences in Hebrew,

Sentence can be translated as the sun is one out of hundred trillion stars. In Hebrew it looks something like: the sun is one outofhundred trillion stars

I have an issue with fracLikeNumberParse function to parse this correctly.

While debugging this sentence, I compared to how English sentences work, and I think it is also not working. I opened an issue: https://github.com/microsoft/Recognizers-Text/issues/2716

What do you think? Is there a way to override fracLikeNumberParse in side JavaScript\packages\recognizers-number\src\number\hebrew\parserConfiguration.ts?

hershkoy avatar Sep 17 '21 15:09 hershkoy