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

Duration parser in DIEF fails for words written in non latin alphabets. #760

Open
Meti-Adane opened this issue Jul 31, 2024 · 0 comments
Open

Comments

@Meti-Adane
Copy link

Describe the bug

  • The regex used in DurationParser.scala replaces all non latin alphabet characters with empty string hence duration indicator words for some languages are completely dropped and do not get parsed properly even if they are added in the config file.

Expected behaviour

  • should parse duration indicator words written in non latin alphabet as long as they are listed in the config file.

Environment

  • OS: macOS x 14.5
  • Java SDK Version 1.8:
  • Maven version 3.9.6 :

To reproduce

  • Bug can easily be re produced by adding tests in the test file.

  • Here is a simple example for the Greek language

"DurationParser" should "return 14400 seconds for 'context 4 ώρες'" in
{
parse("el", "Time", "context 4 ώρες").get should equal (14400.0)
}

  • run the test
  • the parser will return None even if the word (ώρες) corresponding to "hour" is listed in the config file
Meti-Adane added a commit to Meti-Adane/extraction-framework that referenced this issue Jul 31, 2024
Meti-Adane added a commit to Meti-Adane/extraction-framework that referenced this issue Jul 31, 2024
Meti-Adane added a commit to Meti-Adane/extraction-framework that referenced this issue Jul 31, 2024
…ers not present in the config file instead of all non latin characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant