public void serialize ( final OutputStream out ) throws IOException { final Writer writer = new BufferedWriter ( new OutputStreamWriter ( out ) ) ; for ( final List < String > entry : this . predContexts ) { writer . write ( entry . get ( 0 ) + "\t" + entry . get ( 1 ) + "\t" + entry . get ( 2 ) + "\n" ) ; } writer . flush ( ) ; }
Serialize the dictionary to original corpus format