}
private PhraseStructureNode identifyHeadChild(HeadRules headRules) throws MaltChainedException {
PhraseStructureNode headChild = (headRules == null)?null:headRules.getHeadChild(this);
if (headChild == null) {
Direction direction = (headRules == null)?Direction.LEFT:headRules.getDefaultDirection(this);
if (direction == Direction.LEFT) {
if ((headChild = leftmostTerminalChild()) == null) {
headChild = leftmostNonTerminalChild();
}
} else {