Ejemplo n.º 1
0
 public void FixOcrErrorsUrl()
 {
     using (var form = new GoToLine())
     {
         Configuration.Settings.Tools.OcrFixUseHardcodedRules = true;
         const string input = "www.addic7ed.com";
         var          ofe   = new Nikse.SubtitleEdit.Logic.Ocr.OcrFixEngine("eng", "us_en", form);
         var          res   = ofe.FixOcrErrorsViaHardcodedRules(input, "Previous line.", new HashSet <string>());
         Assert.AreEqual(res, input);
     }
 }
Ejemplo n.º 2
0
 public void FixOcrErrorsViaHardcodedRules1()
 {
     using (var form = new GoToLine())
     {
         Configuration.Settings.Tools.OcrFixUseHardcodedRules = true;
         //string input = "i'I'll see you.";
         const string input = "l-l'll see you.";
         var          ofe   = new Nikse.SubtitleEdit.Logic.Ocr.OcrFixEngine("eng", "us_en", form);
         var          res   = ofe.FixOcrErrorsViaHardcodedRules(input, "Previous line.", new HashSet <string>());
         Assert.AreEqual(res, "I-I'll see you.");
     }
 }