mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-22 19:22:53 +01:00
Minor fix for OCR unknown word (line split)
This commit is contained in:
parent
d5eeea8a4e
commit
1026af5cfc
@ -88,7 +88,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
{
|
||||
if (word != null && richTextBoxParagraph.Text.Contains(word))
|
||||
{
|
||||
const string ExpectedWordBoundaryChars = " <>-\"”“[]'‘`´¶()♪¿¡.…—!?,:;/\r\n";
|
||||
const string ExpectedWordBoundaryChars = " <>-\"”“«»[]'‘`´¶()♪¿¡.…—!?,:;/\r\n";
|
||||
for (int i = 0; i < richTextBoxParagraph.Text.Length; i++)
|
||||
{
|
||||
if (richTextBoxParagraph.Text.Substring(i).StartsWith(word))
|
||||
|
@ -959,7 +959,7 @@ namespace Nikse.SubtitleEdit.Logic.Ocr
|
||||
}
|
||||
}
|
||||
|
||||
string[] words = tempLine.Replace("</i>", string.Empty).Split((Environment.NewLine + " ¡¿,.!?:;()[]{}+-£\"”“#&%…—♪").ToCharArray(), StringSplitOptions.RemoveEmptyEntries);
|
||||
string[] words = tempLine.Replace("</i>", string.Empty).Split((Environment.NewLine + " ¡¿,.!?:;()[]{}+-£\"”“«»#&%…—♪").ToCharArray(), StringSplitOptions.RemoveEmptyEntries);
|
||||
for (int i = 0; i < words.Length; i++)
|
||||
{
|
||||
string word = words[i].TrimStart('\'');
|
||||
@ -1382,7 +1382,7 @@ namespace Nikse.SubtitleEdit.Logic.Ocr
|
||||
return 0;
|
||||
|
||||
int wordsNotFound = 0;
|
||||
var words = HtmlUtil.RemoveOpenCloseTags(line, HtmlUtil.TagItalic).Split((Environment.NewLine + " ¡¿,.!?:;()[]{}+-$£\"#&%…“”").ToCharArray(), StringSplitOptions.RemoveEmptyEntries);
|
||||
var words = HtmlUtil.RemoveOpenCloseTags(line, HtmlUtil.TagItalic).Split((Environment.NewLine + " ¡¿,.!?:;()[]{}+-$£\"#&%…“”«»").ToCharArray(), StringSplitOptions.RemoveEmptyEntries);
|
||||
for (int i = 0; i < words.Length; i++)
|
||||
{
|
||||
string word = words[i];
|
||||
|
Loading…
Reference in New Issue
Block a user