public void testLMDirichlet() throws IOException {
  float p=(FREQ + 2000.0f * (TOTAL_TERM_FREQ + 1) / (NUMBER_OF_FIELD_TOKENS + 1.0f)) / (DOC_LEN + 2000.0f);
  float a=2000.0f / (DOC_LEN + 2000.0f);
  float gold=(float)(Math.log(p / (a * (TOTAL_TERM_FREQ + 1) / (NUMBER_OF_FIELD_TOKENS + 1.0f))) + Math.log(a));
  correctnessTestCore(new LMDirichletSimilarity(),gold);
}

public void testLMDirichlet ( ) throws IOException { float p = ( FREQ + 2000.0f * ( TOTAL_TERM_FREQ + 1 ) / ( NUMBER_OF_FIELD_TOKENS + 1.0f ) ) / ( DOC_LEN + 2000.0f ) ; float a = 2000.0f / ( DOC_LEN + 2000.0f ) ; float gold = ( float ) ( Math . log ( p / ( a * ( TOTAL_TERM_FREQ + 1 ) / ( NUMBER_OF_FIELD_TOKENS + 1.0f ) ) ) + Math . log ( a ) ) ; correctnessTestCore ( new LMDirichletSimilarity ( ) , gold ) ; }
correctness test for the dirichlet lm model .
