StringBuilder nullEnd = new StringBuilder(pathLength * 16);
StringBuilder noNulls = new StringBuilder(pathLength * 16);
// Iterate over each pair in the path and create the pattern string that
// represents this path. The pattern string is pos:rel:pos[,...] .
DependencyTreeNode first = path.first();
for (int i = 1; i < pathLength; ++i) {
DependencyTreeNode second = path.getNode(i);
// Check that the nodes weren't filtered out. If so reject the path
// even if the part of speech and relation text may have matched a
// template.
if (first.word().equals(IteratorFactory.EMPTY_TOKEN))
return false;
// Get the relation between the two nodes
String rel = path.getRelation(i - 1);
String firstPos = first.pos();
String secPos = second.pos();
// Check whether each POS has a class category to which it should be
// mapped. These classes are necessary to handle the singificant
// number of variations for a general category of POS's, e.g. verb
// -> VBZ, VBJ, etc., which were not present when the MINIPAR tags