src/Generic/parse/ParserTrainer/TrainerPOS.cpp
//prints (word features #tags tag count tag count tag count ... )

prints (word features #tags tag count tag count tag count ...
prints ( word features #tags tag count tag count tag count ...
void TrainerPOS::print(char *filename)
{
	UTF8OutputStream out;
	out.open(filename);
	out << size;
	out << '\n';
	Table::iterator iter;
	for (iter = table->begin() ; iter != table->end() ; ++iter) {
		out << "(";
		out << (*iter).first[0].to_string();
		out << ' ';
		out << (*iter).first[1].to_string();
		LinkedTag* value = (*iter).second;
		int count = 1;
		while (value->next != 0)
		{
			value = value->next;
			count++;
		}
		out << ' ';
		out << count;
		value = (*iter).second;
		while (value != 0) {
			out << ' ';
			out << value->tag.to_string();
			out << ' ';
			out << value->count;
			value = value->next;
		}
		out << ")\n";
	}
	out.close();
	return;
}
void TrainerPOS :: print ( char * filename ) { UTF8OutputStream out ; out . open ( filename ) ; out << size ; out << ' \n ' ; Table :: iterator iter ; for ( iter = table -> begin ( ) ; iter != table -> end ( ) ; ++ iter ) { out << " " ; out << ( * iter ) . first [ 0 ] . to_string ( ) ; out << ' ' ; out << ( * iter ) . first [ 1 ] . to_string ( ) ; LinkedTag * value = ( * iter ) . second ; int count = 1 ; while ( value -> next != 0 ) { value = value -> next ; count ++ ; } out << ' ' ; out << count ; value = ( * iter ) . second ; while ( value != 0 ) { out << ' ' ; out << value -> tag . to_string ( ) ; out << ' ' ; out << value -> count ; value = value -> next ; } out << " \n " ; } out . close ( ) ; return ; }
prints (word features #tags tag count tag count tag count ... )
prints ( word features #tags tag count tag count tag count ... )
// print it out
