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

Support remap rules in the segmenter #949

Merged
merged 38 commits into from
Oct 17, 2024
Merged

Conversation

eggrobin
Copy link
Member

@eggrobin eggrobin commented Oct 14, 2024

This will vastly improve the maintainability of that copy of the rules, as they can closely mirror the UAX; note that this removes 84 lines from SegmenterDefault.txt, including some nontrivial things like

$NotEastAsian=( $NotEastAsian | [$NotEastAsian - $Spec1_] $X)

or

# LB 10  Treat any remaining combining mark as AL and non-$EastAsian.
$AL=($AL | ^ $CM | (?<=$Spec1_) $CM)
$NotEastAsian=( $NotEastAsian | ^ $CM | (?<=$Spec1_) $CM )

Further, this should make it possible to generate ICU’s old monkeys, which implement the remap rules as specified (only the production implementation integrates them into the regices).

No changes to LineBreakTest.txt except in comments.

@eggrobin eggrobin changed the title Remap redux Support remap rules in the segmenter Oct 14, 2024
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.

Nice!

@eggrobin eggrobin merged commit 109fcb4 into unicode-org:main Oct 17, 2024
16 checks passed
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