WikiFunctions.Parse.RegExTypoFix.DetectTypo C# (CSharp) Метод

DetectTypo() публичный Метод

Checks for known typos on the page
public DetectTypo ( string articleText, string articleTitle ) : bool
articleText string The wiki text of the article.
articleTitle string Title of the article
Результат bool
        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;
        }