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
Describe the bug
Expected behaviour
Environment
To reproduce
Bug can easily be re produced by adding tests in the test file.
Here is a simple example for the Greek language