++



         

- 7


if ( loc_cnt )

cout << ",";

else ++loc_cnt;

cout << "(" << (*liter).first

<< "," << (*liter).second << ")";

++"liter;

}

cout << ")\n";

++iter;

}

cout << endl;

}

void

TextQuery::

disp1ay_text_locations()

{

vector<string,allocator> *text_words =

text_locations->first;

vector<location,allocator> *text_locs =

text_locations->second;

register int elem_cnt = text_words->size();

if ( elem_cnt != text_locs->size() )

{

cerr

<< "oops! internal error: word and position vectors "

<< "are of unequal size\n"

<< "words: " << elem_cnt << " "

<< "locs: " << text_locs->size()

<< " -- bailing out!\n";

exit( -2 );

}

for ( int ix=0; ix < elem_cnt; ix++ )

{

cout << "word: " << (*text_words)[ ix ] << "\t"

<< "location: ("

<< (*text_locs)[ix].first << ","

<< (*text.locs)[ix].second << ")"

<< "\n";

}

cout << endl;

}

6.25

, inserter - ( 6.13.1, 12.4.1).

set<string> exclusion_set;

ifstream infile( "exclusion_set" );

copy( default_excluded_words, default_excluded_words+25,

inserter(exclusion_set, exclusion_set.begin() ));

6.26

: . , TextQuery. . ?

6.27

. ; 7 , . ?