mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-21 18:52:36 +01:00
Minor fix for OCR
space after "-" or "'" for nOCR/BIC + update dictionaries
This commit is contained in:
parent
c45c6cc08a
commit
64589b90c3
@ -1322,6 +1322,7 @@
|
||||
<Word from="let'sjust" to="let's just" />
|
||||
<Word from="Let'sjust" to="Let's just" />
|
||||
<Word from="Lf" to="If" />
|
||||
<Word from="lf" to="If" />
|
||||
<Word from="lfeelonelung" to="I feel one lung" />
|
||||
<Word from="lfhe's" to="If he's" />
|
||||
<Word from="lfl" to="if I" />
|
||||
|
BIN
Ocr/Latin.nocr
BIN
Ocr/Latin.nocr
Binary file not shown.
@ -1,8 +1,8 @@
|
||||
using System;
|
||||
using Nikse.SubtitleEdit.Forms.Ocr;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Nikse.SubtitleEdit.Forms.Ocr;
|
||||
|
||||
namespace Nikse.SubtitleEdit.Logic.Ocr
|
||||
{
|
||||
@ -57,7 +57,7 @@ namespace Nikse.SubtitleEdit.Logic.Ocr
|
||||
sbWord = new StringBuilder();
|
||||
italicCount = 0;
|
||||
}
|
||||
else if (m.Text != " ")
|
||||
else
|
||||
{
|
||||
sbWord.Append(m.Text);
|
||||
if (m.Italic)
|
||||
@ -81,7 +81,9 @@ namespace Nikse.SubtitleEdit.Logic.Ocr
|
||||
sb.Append("</i>");
|
||||
}
|
||||
var text = sb.ToString().Trim();
|
||||
text = text.Replace("<i>-</i>", "-")
|
||||
text = text
|
||||
.Replace("<i>-</i>", "-")
|
||||
.Replace("</i>-<i>", "-")
|
||||
.Replace("<i>s</i>", "s")
|
||||
.Replace("</i>s<i>", "s")
|
||||
.Replace("<i>!</i>", "!")
|
||||
@ -89,9 +91,11 @@ namespace Nikse.SubtitleEdit.Logic.Ocr
|
||||
.Replace("<i>?</i>", "?")
|
||||
.Replace("</i>?<i>", "?")
|
||||
.Replace("<i>'</i>", "'")
|
||||
.Replace("<i>''</i>", "'")
|
||||
.Replace("</i>'<i>", "'")
|
||||
.Replace("</i>''<i>", "'")
|
||||
.Replace("<i>''</i>", "''")
|
||||
.Replace("</i>''<i>", "''")
|
||||
.Replace("<i>\"</i>", "\"")
|
||||
.Replace("</i>\"<i>", "\"")
|
||||
.Replace("<i>:</i>", ":")
|
||||
.Replace("</i>:<i>", ":")
|
||||
.Replace("<i>.</i>", ".")
|
||||
|
Loading…
Reference in New Issue
Block a user