public void writeData ( Writer w ) throws IOException { PrintWriter out = new PrintWriter ( w ) ; for ( IntTaggedWord itw : seenCounter . keySet ( ) ) { out . println ( itw . toLexicalEntry ( wordIndex , tagIndex ) + " SEEN " + seenCounter . getCount ( itw ) ) ; } for ( IntTaggedWord itw : getUnknownWordModel ( ) . unSeenCounter ( ) . keySet ( ) ) { out . println ( itw . toLexicalEntry ( wordIndex , tagIndex ) + " UNSEEN " + getUnknownWordModel ( ) . unSeenCounter ( ) . getCount ( itw ) ) ; } for ( int i = 0 ; i < smooth . length ; i ++ ) { out . println ( "smooth[" + i + "] = " + smooth [ i ] ) ; } out . flush ( ) ; }
Writes out data from this Object to the Writer w . Rules are separated by newline and rule elements are delimited by \ t .