Ada.Matchers.BoWPoS.PosTagger.TagInlineCode C# (CSharp) Method

TagInlineCode() private method

private TagInlineCode ( string body ) : string
body string
return string
        private string TagInlineCode(string body)
        {
            var tagged = body;
            var m = inlineCode.Match(tagged);

            while (m.Success)
            {
                var code = tagged.Substring(m.Index, m.Length);

                tagged = tagged.Remove(m.Index, m.Length);

                if (code.Length < 6)
                {
                    tagged = tagged.Insert(m.Index, " •ICS• ");
                }
                else if (code.Length < 26)
                {
                    tagged = tagged.Insert(m.Index, " •ICM• ");
                }
                else
                {
                    tagged = tagged.Insert(m.Index, " •ICL• ");
                }

                m = inlineCode.Match(tagged);
            }

            return tagged;
        }