private void BasicFinalize(string desiredKey, List<TextTokenSubstring> result)
{
PunctuationToken pTok;
for (int i = 0; i < m_puncts.Count; ++i)
{
pTok = m_puncts[i];
if (pTok.TokenType != PunctuationTokenType.punctuation)
continue;
// Normally i and j end up the same.
// When multiple consecutive periods occur (e.g. blah...blah)
// i will be the first period and j the last period.
int j = i;
while (m_puncts[i].ToString() == "." && j + 1 < m_puncts.Count &&
m_puncts[j + 1].ToString() == ".")
{
++j;
}
string pattern = PunctuationSequencePatternPrefix(i);
for (int k = i; k <= j; ++k)
pattern += m_puncts[k].ToString();
pattern += PunctuationSequencePatternSuffix(j);
pTok.Tts.InventoryText = pattern;
if (desiredKey == String.Empty || desiredKey == pTok.Tts.InventoryText)
result.Add(pTok.Tts);
i = j;
}
}