Refactor expanded OCR match phases#10655
Open
HellbringerOnline wants to merge 1 commit intoSubtitleEdit:mainfrom
Open
Refactor expanded OCR match phases#10655HellbringerOnline wants to merge 1 commit intoSubtitleEdit:mainfrom
HellbringerOnline wants to merge 1 commit intoSubtitleEdit:mainfrom
Conversation
Contributor
Author
|
AppVeyor failure here appears to come from the current I checked the failing PR build (
I also checked the previous AppVeyor build for plain So the current red CI status is inherited from the base branch. This PR only touches |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR is the first step in splitting the current nOCR work into reviewable pieces.
The goal of this step is only to make expanded nOCR matching easier to reason about and test. It does not change which expanded template wins.
What changed
NOcrDbExactRelaxedExactphase winsRelaxedphase winsWhy this step exists
The current expanded matching logic was previously embedded directly in
GetMatchExpanded(...)as two large loops with implicit rules.That made it hard to:
This refactor makes those rules explicit first, so later behavioral changes can be reviewed separately.
What is intentionally not included
This PR does not:
Those belong in later PRs.
Tests
Added
NOcrDbExpandedMatchTestsregression coverage for the current behavior:Validation note
I attempted to run:
dotnet test tests/UI/UITests.csproj --filter "FullyQualifiedName~NOcrDbExpandedMatchTests" -p:BaseOutputPath="D:\Рабочий стол\subtitleedit\artifacts\test-output-stage1\"At the moment, this stops on an unrelated compile error already present on fresh
upstream/main:src/UI/Features/Video/CutVideo/CutVideoViewModel.cs:202;So the current validation blocker is outside the OCR changes in this PR.