src/Generic/UTCoref/LinkAllMentions.cpp
/*
 * if this node is not linkable but the parent would be, and this node
 * only has one sibling, and that sibling precedes it, then we might
 * give the parent node instead if:
 *  - the preceding node is THE
 *  - the preceding node is an honorific and we're tagged PER
 * if we do make this adjustment, we also adjust the name theory.
*/
if this node is not linkable but the parent would be, and this node
only has one sibling, and that sibling precedes it, then we might
give the parent node instead if:
- the preceding node is THE
- the preceding node is an honorific and we're tagged PER
if we do make this adjustment, we also adjust the name theory.
if this node is not linkable but the parent would be and this node only has one sibling and that sibling precedes it then we might give the parent node instead if : - the preceding node is THE - the preceding node is an honorific and we ' re tagged PER if we do make this adjustment we also adjust the name theory .
const SynNode *LinkAllMentions::adjustForLinkability(const SynNode &node) const {
   if (!is_linkable(node)) {
	  if (node.getParent() && meetsMovementCriterion(*node.getParent())) {
		 std::ostringstream ostr;
		 ostr << "CorefReplacement: treating this as the corefed item\n"
				   << *node.getParent() << "\ninstead of the original\n"
				   << node << std::endl;
		 SessionLogger::info("SERIF") << ostr.str();
		 return node.getParent();
	  }
	  else {
		 std::ostringstream ostr;
		 ostr << "Corefed unlinkable node:\n" << node << std::endl;
		 if (node.getParent()) {
			ostr << "Parent:\n" << *node.getParent() << std::endl;
		 }
		 SessionLogger::info("SERIF") << ostr.str();
	  }
   }
   return &node;
}
const SynNode * LinkAllMentions :: adjustForLinkability ( const SynNode & node ) const { if ( ! is_linkable ( node ) ) { if ( node . getParent ( ) && meetsMovementCriterion ( * node . getParent ( ) ) ) { std :: ostringstream ostr ; ostr << " \n " << * node . getParent ( ) << " \n \n " << node << std :: endl ; SessionLogger :: info ( " " ) << ostr . str ( ) ; return node . getParent ( ) ; } else { std :: ostringstream ostr ; ostr << " \n " << node << std :: endl ; if ( node . getParent ( ) ) { ostr << " \n " << * node . getParent ( ) << std :: endl ; } SessionLogger :: info ( " " ) << ostr . str ( ) ; } } return & node ; }
if this node is not linkable but the parent would be, and this node
 only has one sibling, and that sibling precedes it, then we might
 give the parent node instead if:
  - the preceding node is THE
  - the preceding node is an honorific and we're tagged PER
 if we do make this adjustment, we also adjust the name theory.
if this node is not linkable but the parent would be and this node only has one sibling and that sibling precedes it then we might give the parent node instead if : - the preceding node is THE - the preceding node is an honorific and we ' re tagged PER if we do make this adjustment we also adjust the name theory .