NamedEntityExtractorSK.Finder.LetterPairs C# (CSharp) Method

LetterPairs() private method

Generates an array containing every two consecutive letters in the input string
private LetterPairs ( string str ) : string[]
str string
return string[]
		private string[] LetterPairs(string str)
		{
			int numPairs = str.Length - 1;

			string[] pairs = new string[numPairs];

			for (int i = 0; i < numPairs; i++)
			{
				pairs[i] = str.Substring(i, 2);
			}

			return pairs;
		}