public void generateDict ( ) { if ( data . trnData == null ) { System . out . println ( "No data available for generating dictionary" ) ; return ; } // scan all data observations of the training data for ( int i = 0 ; i < data . trnData . size ( ) ; i ++ ) { Observation obsr = ( Observation ) data . trnData . get ( i ) ; for ( int j = 0 ; j < obsr . cps . length ; j ++ ) { addDict ( obsr . cps [ j ] , obsr . humanLabel , 1 ) ; } } }
Generate dict .