TreeElement[] elements = node.getElements();
for (int i = 0; i < elements.length; i++) {
if (elements[i].isLeaf()) {
boolean isIntermediate = false;
String tag = phraseTag;
Leaf leaf = (Leaf) elements[i];
String localChunk = getChunkTag(leaf);
if(localChunk != null && !tag.equals(localChunk)) {
tag = localChunk;
}
if(isIntermediate(tags, target, tag) && (inherited || i > 0)) {
isIntermediate = true;
}
if(!isIncludePunctuations() && leaf.getFunctionalTag() == null &&
(
!( i + 1 < elements.length && elements[i+1].isLeaf() ) ||
!( i > 0 && elements[i - 1].isLeaf() )
)
){