src/UntypedCoref/CorefReader.cpp
/* Given a token in the form <sentence_number>:<node_number>, look up
 * in parses which SynNode is being referenced
 */
Given a token in the form :, look up
in parses which SynNode is being referenced
Given a token in the form : look up in parses which SynNode is being referenced
const SynNode* CorefReader::interpretMention(char* token, const GrowableArray <Parse *> & parses) {
   int sentence, node_number, working_node_number;
   interpretNumbers(sentence, node_number, token);
   if (sentence < 0 or sentence > parses.length()) {
	  throw UnexpectedInputException("CorefReader.cpp::interpretMention",
									 "invalid reference into parse sentence");
   }
   working_node_number = node_number;
   const SynNode* node = LinkAllMentions::lookupNode(*parses[sentence]->getRoot(), working_node_number);
   if (node == NULL) {
	  throw UnexpectedInputException("CorefReader.cpp::interpretMention",
                                     "invalid reference into parse nodes");
   }
   return node;
}
const SynNode * CorefReader :: interpretMention ( char * token , const GrowableArray < Parse * > & parses ) { int sentence , node_number , working_node_number ; interpretNumbers ( sentence , node_number , token ) ; if ( sentence < 0 or sentence > parses . length ( ) ) { throw UnexpectedInputException ( " " , " " ) ; } working_node_number = node_number ; const SynNode * node = LinkAllMentions :: lookupNode ( * parses [ sentence ] -> getRoot ( ) , working_node_number ) ; if ( node == NULL ) { throw UnexpectedInputException ( " " , " " ) ; } return node ; }
Given a token in the form <sentence_number>:<node_number>, look up
 in parses which SynNode is being referenced
Given a token in the form <sentence_number > : <node_number > look up in parses which SynNode is being referenced