mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-22 03:02:35 +01:00
Tesseract - try-modi-for-unknown-words is default enabled again - seems to improve English...
git-svn-id: https://subtitleedit.googlecode.com/svn/trunk@114 99eadd0c-20b8-1223-b5c4-2a2b2df33de2
This commit is contained in:
parent
1ceb5fbad1
commit
21f840c550
1
src/Forms/VobSubOcr.Designer.cs
generated
1
src/Forms/VobSubOcr.Designer.cs
generated
@ -255,6 +255,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
// checkBoxUseModiInTesseractForUnknownWords
|
||||
//
|
||||
this.checkBoxUseModiInTesseractForUnknownWords.AutoSize = true;
|
||||
this.checkBoxUseModiInTesseractForUnknownWords.Enabled = false;
|
||||
this.checkBoxUseModiInTesseractForUnknownWords.Location = new System.Drawing.Point(22, 74);
|
||||
this.checkBoxUseModiInTesseractForUnknownWords.Name = "checkBoxUseModiInTesseractForUnknownWords";
|
||||
this.checkBoxUseModiInTesseractForUnknownWords.Size = new System.Drawing.Size(165, 17);
|
||||
|
@ -1035,7 +1035,6 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (wordsNotFound > 0 || sb.ToString().Replace("~", string.Empty).Trim().Length == 0)
|
||||
{
|
||||
_ocrFixEngine.AutoGuessesUsed.Clear();
|
||||
@ -1132,13 +1131,9 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
|
||||
private string TesseractResizeAndRetry(Bitmap bitmap)
|
||||
{
|
||||
string result = Tesseract3DoOcrViaExe(ResizeBitmap(bitmap, bitmap.Width * 2, bitmap.Height * 2), _languageId);
|
||||
if (result.Trim().Length == 0)
|
||||
{
|
||||
result = Tesseract3DoOcrViaExe(ResizeBitmap(bitmap, bitmap.Width * 3, bitmap.Height * 2), _languageId);
|
||||
if (result.ToString().Trim().Length == 0)
|
||||
result = Tesseract3DoOcrViaExe(ResizeBitmap(bitmap, bitmap.Width * 4, bitmap.Height * 2), _languageId);
|
||||
}
|
||||
string result = Tesseract3DoOcrViaExe(ResizeBitmap(bitmap, bitmap.Width * 3, bitmap.Height * 2), _languageId);
|
||||
if (result.ToString().Trim().Length == 0)
|
||||
result = Tesseract3DoOcrViaExe(ResizeBitmap(bitmap, bitmap.Width * 4, bitmap.Height * 2), _languageId);
|
||||
return result.TrimEnd();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user