@Override public void before(DerivationState state,int indent,int tailNodeIndex){
  HyperEdge edge=state.edge;
  Rule rule=edge.getRule();
  if (rule == null) {
    return;
  }
  String lhs=Vocabulary.word(rule.getLHS());
  String unbracketedLHS=lhs.substring(1,lhs.length() - 1);
  Tree fragment=Tree.getFragmentFromYield(rule.getEnglishWords());
  if (fragment == null) {
    String subtree=String.format("(%s{%d-%d} %s)",unbracketedLHS,state.parentNode.i,state.parentNode.j,quoteTerminals(rule.getEnglishWords()));
    fragment=Tree.fromString(subtree);
  }
  merge(fragment);
}

@ Override public void before ( DerivationState state , int indent , int tailNodeIndex ) { HyperEdge edge = state . edge ; Rule rule = edge . getRule ( ) ; if ( rule == null ) { return ; } String lhs = Vocabulary . word ( rule . getLHS ( ) ) ; String unbracketedLHS = lhs . substring ( 1 , lhs . length ( ) - 1 ) ; Tree fragment = Tree . getFragmentFromYield ( rule . getEnglishWords ( ) ) ; if ( fragment == null ) { String subtree = String . format ( "(%s{%d-%d} %s)" , unbracketedLHS , state . parentNode . i , state . parentNode . j , quoteTerminals ( rule . getEnglishWords ( ) ) ) ; fragment = Tree . fromString ( subtree ) ; } merge ( fragment ) ; }
before visiting the children , find the fragment representation for the current rule , and merge it into the tree we ' re building .
