question: public grammaticalityEstimator ( Set FileNames , int iMinChar , int iMaxChar , int iMinWord , int iMaxWord , int iNeighbourhoodWindow ) { iMinCharNGram = iMinChar ; iMaxCharNGram = iMaxChar ; iMinWordNGram = iMinWord ; iMaxWordNGram = iMaxWord ; DistroDocs = new TreeMap < Integer , DistributionDocument > ( ) ; DistroWordDocs = new TreeMap < Integer , DistributionWordDocument > ( ) ; StringBuffer sb = new StringBuffer ( ) ; Iterator iTexts = FileNames . iterator ( ) ; while ( iTexts . hasNext ( ) ) { String sFile = ( String ) iTexts . next ( ) ; try { BufferedReader bf = new BufferedReader ( new FileReader ( sFile ) ) ; String sTmp ; while ( ( sTmp = bf . readLine ( ) ) != null ) sb . append ( sTmp ) ; bf . close ( ) ; } catch ( FileNotFoundException ex ) { ex . printStackTrace ( System . err ) ; } catch ( IOException ex ) { ex . printStackTrace ( System . err ) ; } sb . append ( ( char ) 0 ) ; } FullTextDataString = sb . toString ( ) ; for ( int iCnt = iMinCharNGram ; iCnt <= iMaxCharNGram ; iCnt ++ ) { DistroDocs . put ( iCnt , new DistributionDocument ( iNeighbourhoodWindow , iCnt ) ) ; } for ( int iCnt = iMinWordNGram ; iCnt <= iMaxWordNGram ; iCnt ++ ) { DistroWordDocs . put ( iCnt , new DistributionWordDocument ( iNeighbourhoodWindow , iCnt ) ) ; } }
target:  Creates a new instance of grammaticalityEstimator, using a given set of documents for training.