IntegerVector focusMeaning = getSemanticVector(focusWord);
// Create the path iterator for all acceptable paths rooted at
// the focus word in the sentence.
Iterator<DependencyPath> pathIter =
new DependencyIterator(nodes[i], acceptor, pathLength);
// For every path, obtain the index vector of the last word in
// the path and add it to the semantic vector for the focus
// word. The index vector is permuted if a permutation
// function has been provided based on the contents of the path.
while (pathIter.hasNext()) {
DependencyPath path = pathIter.next();
TernaryVector termVector = indexMap.get(path.last().word());
if (permFunc != null)
termVector = permFunc.permute(termVector, path);
add(focusMeaning, termVector);
}