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:
niksedk 2010-10-30 07:20:43 +00:00
parent 1ceb5fbad1
commit 21f840c550
2 changed files with 4 additions and 8 deletions

View File

@ -255,6 +255,7 @@ namespace Nikse.SubtitleEdit.Forms
// checkBoxUseModiInTesseractForUnknownWords // checkBoxUseModiInTesseractForUnknownWords
// //
this.checkBoxUseModiInTesseractForUnknownWords.AutoSize = true; this.checkBoxUseModiInTesseractForUnknownWords.AutoSize = true;
this.checkBoxUseModiInTesseractForUnknownWords.Enabled = false;
this.checkBoxUseModiInTesseractForUnknownWords.Location = new System.Drawing.Point(22, 74); this.checkBoxUseModiInTesseractForUnknownWords.Location = new System.Drawing.Point(22, 74);
this.checkBoxUseModiInTesseractForUnknownWords.Name = "checkBoxUseModiInTesseractForUnknownWords"; this.checkBoxUseModiInTesseractForUnknownWords.Name = "checkBoxUseModiInTesseractForUnknownWords";
this.checkBoxUseModiInTesseractForUnknownWords.Size = new System.Drawing.Size(165, 17); this.checkBoxUseModiInTesseractForUnknownWords.Size = new System.Drawing.Size(165, 17);

View File

@ -1035,7 +1035,6 @@ namespace Nikse.SubtitleEdit.Forms
} }
} }
if (wordsNotFound > 0 || sb.ToString().Replace("~", string.Empty).Trim().Length == 0) if (wordsNotFound > 0 || sb.ToString().Replace("~", string.Empty).Trim().Length == 0)
{ {
_ocrFixEngine.AutoGuessesUsed.Clear(); _ocrFixEngine.AutoGuessesUsed.Clear();
@ -1132,13 +1131,9 @@ namespace Nikse.SubtitleEdit.Forms
private string TesseractResizeAndRetry(Bitmap bitmap) private string TesseractResizeAndRetry(Bitmap bitmap)
{ {
string result = Tesseract3DoOcrViaExe(ResizeBitmap(bitmap, bitmap.Width * 2, bitmap.Height * 2), _languageId); string result = Tesseract3DoOcrViaExe(ResizeBitmap(bitmap, bitmap.Width * 3, bitmap.Height * 2), _languageId);
if (result.Trim().Length == 0) if (result.ToString().Trim().Length == 0)
{ result = Tesseract3DoOcrViaExe(ResizeBitmap(bitmap, bitmap.Width * 4, bitmap.Height * 2), _languageId);
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(); return result.TrimEnd();
} }