From 24b95663cfafa5da99096a6e94db7a7ae42324ab Mon Sep 17 00:00:00 2001 From: Nikolaj Olsson Date: Sat, 16 Nov 2024 21:34:45 +0100 Subject: [PATCH] Update Tesseract to 5.5.0 --- src/libse/Common/Configuration.cs | 2 +- src/ui/Forms/Ocr/DownloadTesseract5.cs | 2 +- src/ui/Forms/Ocr/GetTesseractDictionaries.cs | 2 +- src/ui/Forms/Ocr/VobSubOcr.cs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libse/Common/Configuration.cs b/src/libse/Common/Configuration.cs index 47cd537b9..fc0fbca9a 100644 --- a/src/libse/Common/Configuration.cs +++ b/src/libse/Common/Configuration.cs @@ -25,7 +25,7 @@ namespace Nikse.SubtitleEdit.Core.Common public static readonly string TimeCodesDirectory = DataDirectory + "TimeCodes" + Path.DirectorySeparatorChar; public static readonly string AutoBackupDirectory = DataDirectory + "AutoBackup" + Path.DirectorySeparatorChar; public static readonly string VobSubCompareDirectory = DataDirectory + "VobSub" + Path.DirectorySeparatorChar; - public static readonly string TesseractDirectory = DataDirectory + "Tesseract533" + Path.DirectorySeparatorChar; + public static readonly string TesseractDirectory = DataDirectory + "Tesseract550" + Path.DirectorySeparatorChar; public static readonly string Tesseract302Directory = DataDirectory + "Tesseract302" + Path.DirectorySeparatorChar; public static readonly string WaveformsDirectory = DataDirectory + "Waveforms" + Path.DirectorySeparatorChar; public static readonly string PluginsDirectory = DataDirectory + "Plugins"; diff --git a/src/ui/Forms/Ocr/DownloadTesseract5.cs b/src/ui/Forms/Ocr/DownloadTesseract5.cs index ea87c3ce3..0c1e3b703 100644 --- a/src/ui/Forms/Ocr/DownloadTesseract5.cs +++ b/src/ui/Forms/Ocr/DownloadTesseract5.cs @@ -11,7 +11,7 @@ namespace Nikse.SubtitleEdit.Forms.Ocr { public sealed partial class DownloadTesseract5 : Form { - public const string TesseractDownloadUrl = "https://github.com/SubtitleEdit/support-files/releases/download/Tesseract533-2023-10-05/Tesseract533.zip"; + public const string TesseractDownloadUrl = "https://github.com/SubtitleEdit/support-files/releases/download/tesseract550/Tesseract550.zip"; private readonly CancellationTokenSource _cancellationTokenSource; public DownloadTesseract5(string version) diff --git a/src/ui/Forms/Ocr/GetTesseractDictionaries.cs b/src/ui/Forms/Ocr/GetTesseractDictionaries.cs index 2677c448b..3955a59aa 100644 --- a/src/ui/Forms/Ocr/GetTesseractDictionaries.cs +++ b/src/ui/Forms/Ocr/GetTesseractDictionaries.cs @@ -73,7 +73,7 @@ namespace Nikse.SubtitleEdit.Forms.Ocr for (var i = 0; i < comboBoxDictionaries.Items.Count; i++) { - if (comboBoxDictionaries.Items[i] is string n && n == "English") + if (comboBoxDictionaries.Items[i].ToString() == "English") { comboBoxDictionaries.SelectedIndex = i; break; diff --git a/src/ui/Forms/Ocr/VobSubOcr.cs b/src/ui/Forms/Ocr/VobSubOcr.cs index 62766f817..d1a43a40e 100644 --- a/src/ui/Forms/Ocr/VobSubOcr.cs +++ b/src/ui/Forms/Ocr/VobSubOcr.cs @@ -336,7 +336,7 @@ namespace Nikse.SubtitleEdit.Forms.Ocr // Dictionaries/spellchecking/fixing private OcrFixEngine _ocrFixEngine; private int _tesseractOcrAutoFixes; - private string Tesseract5Version = "5.3.3"; + private string Tesseract5Version = "5.5.0"; private Subtitle _bdnXmlOriginal; private Subtitle _bdnXmlSubtitle;