Esempio n. 1
0
int main() 
{
	vector<string,allocator>   *text_file      = retrieve_text();
        text_loc 		   *text_locations = separate_words( text_file );

        string filt_elems( "\",.;:!?)(" );
        filter_text( text_locations->first, filt_elems );
        suffix_text( text_locations->first );	
	strip_caps(  text_locations->first );

	map<string,loc*,less<string>,allocator> *text_map = build_word_map( text_locations );
        query_text( text_file, text_map );

	return 0;
}
Esempio n. 2
0
int main() 
{
	vector<string,allocator>   *text_file      = retrieve_text();
        text_loc 		   *text_locations = separate_words( text_file );

        string filt_elems( "\",.;:!?)(" );
        filter_text( text_locations->first, filt_elems );
        suffix_text( text_locations->first );	
	strip_caps(  text_locations->first );

	ostream_iterator< string > output( cout, "\n" );

	cout << "----------- about to generate text read --------------\n";
        copy( text_file->begin(), text_file->end(), output );

	cout << "-------- about to generate word and location data ----\n";
	display_text_locations( text_locations );

	return 0;
}