protected override void Decompose()
{
int len = termAtt.Length;
for (int i = 0; i <= len - this.minSubwordSize; ++i)
{
CompoundToken longestMatchToken = null;
for (int j = this.minSubwordSize; j <= this.maxSubwordSize; ++j)
{
if (i + j > len)
{
break;
}
if (dictionary.Contains(termAtt.Buffer(), i, j))
{
if (this.onlyLongestMatch)
{
if (longestMatchToken != null)
{
if (longestMatchToken.txt.Length < j)
{
longestMatchToken = new CompoundToken(this, i, j);
}
}
else
{
longestMatchToken = new CompoundToken(this, i, j);
}
}
else
{
tokens.AddLast(new CompoundToken(this, i, j));
}
}
}
if (this.onlyLongestMatch && longestMatchToken != null)
{
tokens.AddLast(longestMatchToken);
}
}
}
}