return false;
}
private int resetBeVerb(DEPState state)
{
DEPNode lambda = state.getLambda();
DEPNode beta = state.getBeta();
if (isOutOfDomain(state, lambda, beta))
return -1;
DEPNode beVerb = lambda.getHead();
if (!isAuxiliaryBe(state, beVerb, lambda, beta))
return -1;
String subj = lambda.getLabel();
int vType = 0;
if (beta.isPos(CTLibEn.POS_VBN))
vType = 1;
else if (beta.isPos(CTLibEn.POS_VBG))
vType = 2;
else if (beta.isPos(CTLibEn.POS_VBD))
{
String p2 = beta.getFeat(DEPLib.FEAT_POS2);
if (p2 != null && p2.equals(CTLibEn.POS_VBN)) vType = 1;
}
// be - subj(lambda) - vb[ng](beta)
if (vType > 0 && (DEPLibEn.isSubject(subj) || (subj.equals(DEPLibEn.DEP_ATTR) && hasNoDependent(beVerb, 1, lambda.id, state) && hasNoDependent(beVerb, lambda.id+1, beta.id, state))))
{
// System.out.println(beVerb.form+" "+lambda.id+" "+beta.id+"\n"+state.getTree().toStringDEP()+"\n");
int i, size = beta.id;
DEPNode node;
for (i=beVerb.id+1; i<size; i++)
{
node = state.getNode(i);
if (node.isDependentOf(beVerb))
node.setHead(beta);
}
clearPreviousDependents(beVerb, state);
beVerb.setHead(beta);