src/Generic/edt/AbbrevTable.cpp
// resolve whole mention bindings, and then word-by-word bindings.
// 7/21/04: Fixed a bug. Now whole-mention bindings aren't the only thing that happen (MRK)

resolve whole mention bindings, and then word-by-word bindings.
resolve whole mention bindings and then word - by - word bindings .
int AbbrevTable::resolveSymbols(const Symbol words[], int nWords, Symbol results[], int max_results) {
	if (!is_initialized) {
		throw InternalInconsistencyException("AbbrevTable::resolveSymbols()",
											 "AbbrevTable has not been initialized.");
	}
	int nResults = 0;
	_debugOut << "unresolved: ";
	for(int i=0; i<nWords; i++) 
		_debugOut << words[i].to_debug_string() << " ";
	_debugOut << "\n";
	nResults = lookupPhrase(words, nWords, results, max_results);
	if(nResults > 0) {
		_debugOut << "resolved  : ";
		for(int i=0; i<nResults; i++) 
			_debugOut << results[i].to_debug_string() << " ";
		_debugOut << "\n\n";
		return nResults;
	}
	else {
		for (int i=0; i<nWords && nResults<max_results; i++) {
			int thisNResults = lookupPhrase(&words[i], 1, &results[nResults], max_results-nResults);
			if(thisNResults == 0) {
				results[nResults++] = words[i];
			}
			else 
				nResults += thisNResults;
		}
	}
			_debugOut << "resolved  : ";
		for(int j=0; j<nResults; j++) 
			_debugOut << results[j].to_debug_string() << " ";
		_debugOut << "\n\n";
	return nResults;
}
int AbbrevTable :: resolveSymbols ( const Symbol words [ ] , int nWords , Symbol results [ ] , int max_results ) { if ( ! is_initialized ) { throw InternalInconsistencyException ( " " , " " ) ; } int nResults = 0 ; _debugOut << " " ; for ( int i = 0 ; i < nWords ; i ++ ) _debugOut << words [ i ] . to_debug_string ( ) << " " ; _debugOut << " \n " ; nResults = lookupPhrase ( words , nWords , results , max_results ) ; if ( nResults > 0 ) { _debugOut << " " ; for ( int i = 0 ; i < nResults ; i ++ ) _debugOut << results [ i ] . to_debug_string ( ) << " " ; _debugOut << " \n \n " ; return nResults ; } else { for ( int i = 0 ; i < nWords && nResults < max_results ; i ++ ) { int thisNResults = lookupPhrase ( & words [ i ] , 1 , & results [ nResults ] , max_results - nResults ) ; if ( thisNResults == 0 ) { results [ nResults ++ ] = words [ i ] ; } else nResults += thisNResults ; } } _debugOut << " " ; for ( int j = 0 ; j < nResults ; j ++ ) _debugOut << results [ j ] . to_debug_string ( ) << " " ; _debugOut << " \n \n " ; return nResults ; }
resolve whole mention bindings, and then word-by-word bindings.
resolve whole mention bindings and then word - by - word bindings .
//resolve whole-mention bindings first
 //found a whole-mention binding
 // lookup this word, if 0 results then simply add on the word itself
