public WordSimilarityResolverFactory AddPersianCommonMistakes() { if (File.Exists("CommonPersianWordMistakes.xml")) { var repo = MistakesFactory.FromXml <Word>("CommonPersianWordMistakes.xml"); var mistakes = repo.GetMistakes(); foreach (var mistake in mistakes) { _resolver.RegisterMistake(mistake.Left, mistake.Right, mistake.Similarity); } } return(this); }
public CharacterSimilarityResolverFactory AddEnglishCommonMistakes() { if (File.Exists("CommonEnglishCharacterMistakes.xml")) { var repo = MistakesFactory.FromXml <char>("CommonEnglishCharacterMistakes.xml"); var mistakes = repo.GetMistakes(); foreach (var mistake in mistakes) { _resolver.RegisterMistake(mistake.Left, mistake.Right, mistake.Similarity); } } return(this); }