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

Full transliterator datagen #5712

Merged
merged 10 commits into from
Oct 22, 2024
Merged

Full transliterator datagen #5712

merged 10 commits into from
Oct 22, 2024

Conversation

robertbastian
Copy link
Member

@robertbastian robertbastian commented Oct 18, 2024

CLDR issues

  • Han-Latin-Names.json should have alias Han-Latin-Names, currently it just has source (Han) and target (Latin), and the alias derived from that clashes with Han-Latin.json

  • de-ASCII.xml refers to a Any-ASCII transform, which is not defined in CLDR or UTS-35. This issue was raised on the original ticket: CLDR-10092

  • Thai-Latin.xml refers to a Any-BreakInternal transform, which is not defined in CLDR or UTS-35

  • und-Ethi-t-und-latn-m0-beta_metsehaf-geminate.xml refers to a Ethiopic-Latin/BetaMetsehaf transform which is not defined.

  • am-Ethi-t-d0-morse.xml uses unescaped $ in Unicode set, this is not compatible with the variable semantics introduced in CLDR-16811

  • byn-Ethi-t-byn-latn-m0-xaleget.xml does not currently parse in ICU4X, the error messages is an invalid back reference. Need to investigate

  • Han-Spacedhan.xml defines a variable as a sequence of two Unicode sets, when probably a union is intended. This doesn't currently parse in ICU4X, and is therefore probably incompatible with the semantics introduced in CLDR-16811

  • Multiple transliterators use non-canonical property casing, which ICU4X does not support

    • [:script=foo:] instead of [:Script=foo:] or [:sc=foo:]
    • [:ideographic:] instead of [:Ideographic:]
    • [:case-ignorable:] instead of [:Case_Ignorable:]
  • Filed CLDR-18043 for the rest

@robertbastian robertbastian requested review from Manishearth, sffc and a team as code owners October 18, 2024 23:40
@robertbastian robertbastian force-pushed the zv branch 3 times, most recently from 8f20633 to db3f275 Compare October 19, 2024 00:38
sffc
sffc previously approved these changes Oct 19, 2024
utils/zerovec/src/varzerovec/databake.rs Outdated Show resolved Hide resolved
@@ -65,7 +66,7 @@ impl<'de> serde::Deserialize<'de> for RuleBasedTransliterator<'de> {
#[serde(borrow)]
pub id_group_list: VarZeroVec<'a, VarZeroSlice<SimpleIdULE>>,
#[serde(borrow)]
pub rule_group_list: VarZeroVec<'a, VarZeroSlice<RuleULE>>,
pub rule_group_list: VarZeroVec<'a, VarZeroSlice<RuleULE, Index32>, Index32>,
Copy link
Member

Choose a reason for hiding this comment

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

Nit: probably only 1 of these needs to be Index32.

It looks like the biggest are Hant to Hans, Hans to Hant, and Hani to Latn.

Copy link
Member Author

Choose a reason for hiding this comment

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

The inner one needs to be Index32, and therefore the outer one needs to be as well.

@@ -39,15 +39,57 @@ impl CldrCache {
continue;
};

if transform == "und-Ethi-t-und-latn-m0-beta_metsehaf-geminate" {
Copy link
Member

Choose a reason for hiding this comment

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

Nit: We should have issues for all these with a TODO in the code. One big issue is probably fine.

Comment on lines +241 to +242
#[cfg(feature = "compiled_data")]
pub fn try_new(locale: &Locale) -> Result<Self, DataError> {
Copy link
Member

Choose a reason for hiding this comment

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

🥳

@sffc sffc merged commit 74ae3a9 into unicode-org:main Oct 22, 2024
27 of 28 checks passed
@robertbastian robertbastian deleted the zv branch October 22, 2024 18:27
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.

2 participants