}
/** Called by {@link EnglishC2DConverter#mapEmtpyCategories(CTTree)}. */
private void mapICH(CTTree cTree, CTNode ec)
{
CTNode parent = ec.getParent();
CTNode ante = ec.getAntecedent();
if (ec.form.startsWith(CTLibEn.EC_ICH) && parent.getPrevSibling("+WH.*") != null)
removeCTNode(ec);
else if (ante == null || ec.isDescendantOf(ante))
removeCTNode(ec);
else
{
List<CTNode> list = cTree.getCoIndexedEmptyCategories(ante.coIndex);
boolean isRNR = ec.form.startsWith(CTLibEn.EC_RNR);
int i, size = list.size();
CTNode node;
Deque<CTNode> dq = isRNR ? new ArrayDeque<CTNode>() : null;
if (ec.getTerminalId() < ante.getFirstTerminal().getTerminalId())
{
for (i=0; i<size-1; i++)
{
node = list.get(i);
if (isRNR) dq.addLast(node.getParent().getParent());
removeCTNode(node);
}
ec = list.get(size-1);
}
else
{
for (i=size-1; i>0; i--)
{
node = list.get(i);
if (isRNR) dq.addFirst(node.getParent().getParent());
removeCTNode(node);
}
ec = list.get(0);
}