mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-22 03:02:35 +01:00
Change how names list works with split word list - thx Dnkhatri :)
This commit is contained in:
parent
1b48c9bde1
commit
6e93a8248f
2451
Dictionaries/ita_WordSplitList.txt
Normal file
2451
Dictionaries/ita_WordSplitList.txt
Normal file
File diff suppressed because it is too large
Load Diff
@ -16,6 +16,7 @@ EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{B1BB9DD1-0EE8-4D43-AAAB-C39D0CC882A9}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
.gitignore = .gitignore
|
||||
appveyor.yml = appveyor.yml
|
||||
build.bat = build.bat
|
||||
build_beta.bat = build_beta.bat
|
||||
build_helpers.bat = build_helpers.bat
|
||||
|
@ -414,7 +414,7 @@ namespace Nikse.SubtitleEdit.Logic.Ocr
|
||||
|
||||
var wordList = File.ReadAllText(fileName).SplitToLines().Where(p => p.Trim().Length > 0).ToList();
|
||||
wordList.AddRange(nameList.GetNames().Where(p => p.Length > 4));
|
||||
return wordList.ToArray();
|
||||
return wordList.OrderByDescending(p => p.Length).ToArray();
|
||||
}
|
||||
|
||||
public string SpellCheckDictionaryName
|
||||
@ -1921,7 +1921,7 @@ namespace Nikse.SubtitleEdit.Logic.Ocr
|
||||
{
|
||||
foreach (string s in word.Split(' '))
|
||||
{
|
||||
if (!DoSpell(s))
|
||||
if (!DoSpell(s) && !_nameList.Contains(s))
|
||||
{
|
||||
if (IsWordKnownOrNumber(word, word))
|
||||
{
|
||||
@ -1955,9 +1955,11 @@ namespace Nikse.SubtitleEdit.Logic.Ocr
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user