private void writeDomains ( ) throws IOException { int domIndex = 0 ; for ( String [ ] domain : model . scoringDomains ( ) ) { if ( domain == null ) continue ; startWritingTextFile ( String . format ( "domains/d%03d.txt" , domIndex ++ ) ) ; for ( String category : domain ) { writeln ( category . replaceAll ( "\n" , "\\n" ) ) ; // replace newlines with "\n" escape sequences } finishWritingTextFile ( ) ; } }
Create files containing domain definitions for each categorical column .