public bool DetectTypo(string articleText, string articleTitle)
{
string originalArticleText = articleText;
if (TypoCount == 0 || IgnoreRegex.IsMatch(articleText))
return false;
HideText removeText = new HideText(true, false, true);
articleText = removeText.HideMore(articleText, true);
// remove newlines, whitespace and hide tokens from bottom
// to avoid running 2K regexps on them
Match m = RemoveTail.Match(articleText);
if (m.Success)
articleText = articleText.Remove(m.Index);
string strSummary = "";
foreach (TypoGroup grp in Groups)
{
grp.FixTypos(ref articleText, ref strSummary, articleTitle, originalArticleText);
if (strSummary.Length > 0)
return true;
}
return false;
}