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

CLDR-18187 Add complex segmentation to scriptMetadata.txt #4262

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

sffc
Copy link
Member

@sffc sffc commented Jan 6, 2025

CLDR-18187

  • This PR completes the ticket.

CC @eggrobin @makotokato @Manishearth

See ticket for details. The issue discussed in multiple CLDR Design WG meetings, but this specific solution was not.

ALLOW_MANY_COMMITS=true

@sffc sffc requested a review from macchiati January 6, 2025 19:35
Copy link
Member

@macchiati macchiati left a comment

Choose a reason for hiding this comment

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

Structure looks good. The file is actually created using a tool as described on https://cldr.unicode.org/development/updating-codes/updating-script-metadata.
I'll add you to the writers on the sheet, and the PR will need to also modify GenerateScriptMetadata.java*

*When we do that, we need to add to the header of the .txt file that it is generated according to https://cldr.unicode.org/development/updating-codes/updating-script-metadata

@srl295
Copy link
Member

srl295 commented Jan 7, 2025

100% on the value of the data. Is it time to move this to an XML document though perhaps in supplemental? Could still output it as a .txt for release.

@sffc
Copy link
Member Author

sffc commented Jan 8, 2025

OK, I added it to the Java file and the Google Sheets.

While doing this, I realized, is this data meaningfully different from the column "LB letters"?

CC @markusicu

@sffc
Copy link
Member Author

sffc commented Jan 9, 2025

We could potentially add a third value to the enumeration in the LB Letters column to distinguish scripts like Thai, which need a dictionary for word and line segmentation, from Han, which needs a dictionary for only word segmentation.

@markusicu
Copy link
Member

Idea: Consider changing LBLetters(Hani) to "No" but adding WBLetters and making that "Yes" for Hani.

@macchiati
Copy link
Member

Good idea!

@macchiati
Copy link
Member

macchiati commented Jan 9, 2025 via email

@sffc
Copy link
Member Author

sffc commented Jan 9, 2025

I kind-of like a new column because (1) it doesn't break users of the old column and (2) it would potentially allow for scripts that need special rules for line break but not for word break (say, line break allowed on syllable boundaries).

@eggrobin
Copy link
Member

eggrobin commented Jan 9, 2025

# 7 - LB letters:
#		YES if the major languages using the script allow linebreaks between letters (excluding hyphenation). 
#		Derived from LB property.

How is that derivation actually done? Depending on how you interpret between letters, the values in this file look wrong (or at the very least inconsistent) for all but one of the scripts that use the Brahmic style of line breaking (see https://www.unicode.org/reports/tr14/#BreakOpportunities).

Bali; 33; 1B05; ID; 1; LIMITED_USE; NO; NO; YES; NO; NO; NO
Batk; 33; 1BC0; ID; 1; LIMITED_USE; NO; NO; YES; NO; NO; NO
Brah; 33; 11005; IN; 1; EXCLUSION; NO; NO; YES; NO; NO; NO
Cham; 33; AA00; VN; 1; LIMITED_USE; NO; NO; YES; NO; NO; NO
Diak; 33; 1190C; MV; 1; EXCLUSION; NO; NO; YES; YES; NO; NO
Gran; 33; 11315; IN; 1; EXCLUSION; NO; NO; NO; NO; NO; NO
Gukh; 33; 1611C; NP; 1; EXCLUSION; NO; NO; YES; NO; NO; NO
Java; 33; A984; ID; 1; LIMITED_USE; NO; NO; YES; NO; NO; NO
Kawi; 33; 11F1B; ID; 1; EXCLUSION; NO; YES; YES; NO; NO; NO # That one looks correct.
Maka; 33; 11EE5; ID; 1; EXCLUSION; NO; NO; MIN; NO; NO; NO
Tutg; 33; 11392; IN; 1; EXCLUSION; NO; NO; YES; NO; NO; NO

@sffc
Copy link
Member Author

sffc commented Jan 9, 2025

Bali, Java, Hatr, and Elym have comments in the spreadsheet saying that they might be wrong.

But, if we go by that description of the column, I would expect Thai to be "NO" because Thai should have line-breaks at word boundaries. I've seen bugs before where the break engine found breaks in the middle of words and it was wrong.

@macchiati
Copy link
Member

macchiati commented Jan 9, 2025 via email

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.

5 participants