question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[EN Number] Entities recognized incorrectly in input cases like "5k-20k"

See original GitHub issue

Describe the bug Don’t recognize 5k-20k

To Reproduce Steps to reproduce the behavior:

  1. code
        Gson gson = new GsonBuilder().create();
        System.out.println("====A");
        String input = "5k-20k";
        System.out.println("input:" + input);

        System.out.println("====B");
        List<ModelResult> results = NumberRecognizer.recognizeNumber(input, Culture.Chinese);
        results.forEach(e -> {
            System.out.println(gson.toJson(e));
        });

        System.out.println("====C");
        results = NumberRecognizer.recognizeNumberRange(input, Culture.Chinese);
        results.forEach(e -> {
            System.out.println(gson.toJson(e));
        });

2.result ====A input:5k-20k ====B WARN: Look-behind groups with no maximum length not supported. Java version <= 8. ====C {“text”:“5k-20k”,“start”:0,“end”:6,“typeName”:“numberrange”,“resolution”:{}}

3.error

  • recognizeNumber don’t recognize
  • recognizeNumberRange recognized,but resolution is null

Expected behavior

  • recognizeNumber:5000,20000
  • recognizeNumberRange:5000 - 20000

Platform (please complete the following information):

  • Platform: Java
  • Environment: package & console
  • Version of package : master

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
tellarincommented, May 21, 2020

Closing now as we’ve validated it works in Java too.

0reactions
tellarincommented, May 15, 2020

@LionbridgeCSII this issue was originally reported in Java, but the issue fix is only validated on .NET, so I don’t think it can be closed yet. While Java is outside your scope, if the new specs pass for Java, then we can close it. Could you test that?

Read more comments on GitHub >

github_iconTop Results From Across the Web

(PDF) Woodward 26348B ECM 3
The ECM3 is designed to be installed directly on the engine. On engine mounting minimizes wiring cost by minimizing wiring length and the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found