Java 类org.apache.lucene.search.similarities.LambdaTTF 实例源码

项目:search    文件:IBSimilarityFactory.java   
private Lambda parseLambda(String expr) {
  if ("DF".equals(expr)) {
    return new LambdaDF();
  } else if ("TTF".equals(expr)) {
    return new LambdaTTF();
  } else {
    throw new RuntimeException("Invalid lambda: " + expr);
  }
}
项目:search    文件:TestIBSimilarityFactory.java   
/** ll/ttf/h3 with parameterized normalization */
public void testParameters() throws Exception {
  Similarity sim = getSimilarity("text_params");
  assertEquals(IBSimilarity.class, sim.getClass());
  IBSimilarity ib = (IBSimilarity) sim;
  assertEquals(DistributionLL.class, ib.getDistribution().getClass());
  assertEquals(LambdaTTF.class, ib.getLambda().getClass());
  assertEquals(NormalizationH3.class, ib.getNormalization().getClass());
  NormalizationH3 norm = (NormalizationH3) ib.getNormalization();
  assertEquals(900f, norm.getMu(), 0.01f);
}
项目:NYBC    文件:IBSimilarityFactory.java   
private Lambda parseLambda(String expr) {
  if ("DF".equals(expr)) {
    return new LambdaDF();
  } else if ("TTF".equals(expr)) {
    return new LambdaTTF();
  } else {
    throw new RuntimeException("Invalid lambda: " + expr);
  }
}
项目:NYBC    文件:TestIBSimilarityFactory.java   
/** ll/ttf/h3 with parameterized normalization */
public void testParameters() throws Exception {
  Similarity sim = getSimilarity("text_params");
  assertEquals(IBSimilarity.class, sim.getClass());
  IBSimilarity ib = (IBSimilarity) sim;
  assertEquals(DistributionLL.class, ib.getDistribution().getClass());
  assertEquals(LambdaTTF.class, ib.getLambda().getClass());
  assertEquals(NormalizationH3.class, ib.getNormalization().getClass());
  NormalizationH3 norm = (NormalizationH3) ib.getNormalization();
  assertEquals(900f, norm.getMu(), 0.01f);
}
项目:search-core    文件:IBSimilarityFactory.java   
private Lambda parseLambda(String expr) {
  if ("DF".equals(expr)) {
    return new LambdaDF();
  } else if ("TTF".equals(expr)) {
    return new LambdaTTF();
  } else {
    throw new RuntimeException("Invalid lambda: " + expr);
  }
}
项目:search-core    文件:TestIBSimilarityFactory.java   
/** ll/ttf/h3 with parameterized normalization */
public void testParameters() throws Exception {
  Similarity sim = getSimilarity("text_params");
  assertEquals(IBSimilarity.class, sim.getClass());
  IBSimilarity ib = (IBSimilarity) sim;
  assertEquals(DistributionLL.class, ib.getDistribution().getClass());
  assertEquals(LambdaTTF.class, ib.getLambda().getClass());
  assertEquals(NormalizationH3.class, ib.getNormalization().getClass());
  NormalizationH3 norm = (NormalizationH3) ib.getNormalization();
  assertEquals(900f, norm.getMu(), 0.01f);
}
项目:read-open-source-code    文件:IBSimilarityFactory.java   
private Lambda parseLambda(String expr) {
  if ("DF".equals(expr)) {
    return new LambdaDF();
  } else if ("TTF".equals(expr)) {
    return new LambdaTTF();
  } else {
    throw new RuntimeException("Invalid lambda: " + expr);
  }
}
项目:read-open-source-code    文件:IBSimilarityFactory.java   
private Lambda parseLambda(String expr) {
  if ("DF".equals(expr)) {
    return new LambdaDF();
  } else if ("TTF".equals(expr)) {
    return new LambdaTTF();
  } else {
    throw new RuntimeException("Invalid lambda: " + expr);
  }
}