Merge pull request #8060 from ivandrofly/feature/ocr-engine-fix

Adjust FixCommonOcrLineErrors implementation in OcrFixEngine
This commit is contained in:
Nikolaj Olsson 2024-03-24 04:48:15 +01:00 committed by GitHub
commit 19eb96a2b4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -868,9 +868,9 @@ namespace Nikse.SubtitleEdit.Logic.Ocr
private string FixCommonOcrLineErrors(string input, Subtitle subtitle, int index, string lastLine, string lastLastLine)
{
var text = input;
text = _ocrFixReplaceList.FixOcrErrorViaLineReplaceList(input, subtitle, index);
text = _ocrFixReplaceList.FixOcrErrorViaLineReplaceList(text, subtitle, index);
text = FixOcrErrorsViaHardcodedRules(text, lastLine, lastLastLine, _abbreviationList);
text = _ocrFixReplaceList.FixOcrErrorViaLineReplaceList(input, subtitle, index);
text = _ocrFixReplaceList.FixOcrErrorViaLineReplaceList(text, subtitle, index);
if (Configuration.Settings.Tools.OcrFixUseHardcodedRules)
{