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

[GSOC'24 Amharic chapter] Implement Date time parser for Ethiopian Calendar #763

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

Meti-Adane
Copy link

  • Implements Ethiopian date to Gregorian calendar conversion for Amharic extractions.
  • Implements Geez number to Arabic numeral conversion for dates written in geez number.
  • Address concern mentioned in Issue 761

Copy link
Contributor

@TallTed TallTed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Almost entirely human-facing.

Suggested capitalization on line 9 would be better for humans, but may not be appropriate for machinery.

@@ -6,6 +6,8 @@ object DateTimeParserConfig
val monthsMap = Map(
// For "ar" configuration, right-to-left rendering may seem like a bug, but it's not.
// Don't change this unless you know how it is done.
"am" -> Map("january"->1,"february"->2,"march"->3,"april"->4,"may"->5,"june"->6,"july"->7,"august"->8,"september"->9,"october"->10,"november"->11,"december"->12,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"am" -> Map("january"->1,"february"->2,"march"->3,"april"->4,"may"->5,"june"->6,"july"->7,"august"->8,"september"->9,"october"->10,"november"->11,"december"->12,
"am" -> Map("January"->1,"February"->2,"March"->3,"April"->4,"May"->5,"June"->6,"July"->7,"August"->8,"September"->9,"October"->10,"November"->11,"December"->12,

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if doing uppercase is correct since all other language mappings are lowercase,
IIRC we lowercase our input before processing and this could change could skip the matching

Copy link
Member

@jimkont jimkont left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the mappings look good and there is an extensive test suite for the matching/conversion of Ethiopian dates 👍 . We should also accommodate @TallTed 's comments, except the two cases that I commented on

@@ -6,6 +6,8 @@ object DateTimeParserConfig
val monthsMap = Map(
// For "ar" configuration, right-to-left rendering may seem like a bug, but it's not.
// Don't change this unless you know how it is done.
"am" -> Map("january"->1,"february"->2,"march"->3,"april"->4,"may"->5,"june"->6,"july"->7,"august"->8,"september"->9,"october"->10,"november"->11,"december"->12,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if doing uppercase is correct since all other language mappings are lowercase,
IIRC we lowercase our input before processing and this could change could skip the matching

Copy link

sonarcloud bot commented Sep 8, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
11.0% Duplication on New Code (required ≤ 3%)

See analysis details on SonarCloud

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

Successfully merging this pull request may close these issues.

3 participants