for (int wordIndex = 0; wordIndex < wordIndices.length; wordIndex++)
{
final int stemIndex = wordsStemIndex[wordIndices[wordIndex]];
if (stemToRowIndex.containsKey(stemIndex))
{
final int rowIndex = stemToRowIndex.lget();
double weight = termWeighting.calculateTermWeight(stemsTf[stemIndex],
stemsTfByDocument[stemIndex].length / 2, documentCount);
phraseMatrix.setQuick(rowIndex, i, weight);