Skip to content

Sync engine source with upstream - #242

Merged
zonble merged 1 commit into
openvanilla:masterfrom
lukhnos:sync-viterbi
Mar 1, 2026
Merged

Sync engine source with upstream#242
zonble merged 1 commit into
openvanilla:masterfrom
lukhnos:sync-viterbi

Conversation

@lukhnos

@lukhnos lukhnos commented Feb 3, 2026

Copy link
Copy Markdown
Collaborator

This switches to use the Viterbi algorithm to compute the shortest path.

See openvanilla/McBopomofo#777

@lukhnos
lukhnos requested a review from tianjianjiang February 3, 2026 02:29

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request refactors the shortest path computation to use the Viterbi algorithm, which is a great improvement for this type of problem. The implementation is mostly correct, but I've found a critical issue that could lead to a crash if no valid segmentation path is found for a given input. I've also suggested a performance optimization for the Viterbi loop to avoid processing unreachable states. Addressing these points will make the implementation more robust and efficient.

Comment thread src/Engine/gramambular2/reading_grid.cpp
Comment thread src/Engine/gramambular2/reading_grid.cpp
@zonble
zonble merged commit a869319 into openvanilla:master Mar 1, 2026
14 checks passed
@xatier

xatier commented Mar 6, 2026

Copy link
Copy Markdown
Contributor

Thanks for porting this to Linux!

@lukhnos
lukhnos deleted the sync-viterbi branch March 11, 2026 17:33
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