Skip to content

Move shared segments into the merge group in which it has the highest probability. - #273

Closed
garretrieger wants to merge 1 commit into
w3c:mainfrom
garretrieger:improve_segmenter_script_assignment
Closed

garretrieger wants to merge 1 commit into
w3c:mainfrom
garretrieger:improve_segmenter_script_assignment

Conversation

@garretrieger

Copy link
Copy Markdown
Contributor

Prior behaviour was to exclude any segments that are shared between merge groups from any merging, by removing them from all merge groups. This change instead picks one of the merge groups to move them too, whichever the segment has the highest probability in. This way these shared segments will still participate in merging.

The tradeoff being made is that merging decisions for the shared segments are made with respect to the cost function of only the one merge group, completely ignoring the other merge groups. The impact of this should be minor overall since with #268 only overall low probability segments will end up shared between multiple merge groups. High probability shared segments will cause the relevant merge groups to be joined.

… probability.

Prior behaviour was to exclude any segments that are shared between merge groups from any merging, by removing them from all merge groups. This change instead picks one of the merge groups to move them too, whichever the segment has the highest probability in. This way these shared segments will still participate in merging.
@garretrieger

Copy link
Copy Markdown
Contributor Author

Batch testing is inprogress to measure the overall impact of this change.

@garretrieger

Copy link
Copy Markdown
Contributor Author

Batch testing is inprogress to measure the overall impact of this change.

Results show this is largely neutral impact on cost and segmentation time, but causes some large increases in costs in a small number of fonts, so doesn't look to be beneficial over all.

@garretrieger
garretrieger deleted the improve_segmenter_script_assignment branch October 16, 2026 17:15
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.

1 participant