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

项目:search    文件:IBSimilarityFactory.java   
private Distribution parseDistribution(String expr) {
  if ("LL".equals(expr)) {
    return new DistributionLL();
  } else if ("SPL".equals(expr)) {
    return new DistributionSPL();
  } else {
    throw new RuntimeException("Invalid distribution: " + expr);
  }
}
项目:search    文件:TestIBSimilarityFactory.java   
/** spl/df/h2 with default parameters */
public void test() throws Exception {
  Similarity sim = getSimilarity("text");
  assertEquals(IBSimilarity.class, sim.getClass());
  IBSimilarity ib = (IBSimilarity) sim;
  assertEquals(DistributionSPL.class, ib.getDistribution().getClass());
  assertEquals(LambdaDF.class, ib.getLambda().getClass());
  assertEquals(NormalizationH2.class, ib.getNormalization().getClass());
}
项目:NYBC    文件:IBSimilarityFactory.java   
private Distribution parseDistribution(String expr) {
  if ("LL".equals(expr)) {
    return new DistributionLL();
  } else if ("SPL".equals(expr)) {
    return new DistributionSPL();
  } else {
    throw new RuntimeException("Invalid distribution: " + expr);
  }
}
项目:NYBC    文件:TestIBSimilarityFactory.java   
/** spl/df/h2 with default parameters */
public void test() throws Exception {
  Similarity sim = getSimilarity("text");
  assertEquals(IBSimilarity.class, sim.getClass());
  IBSimilarity ib = (IBSimilarity) sim;
  assertEquals(DistributionSPL.class, ib.getDistribution().getClass());
  assertEquals(LambdaDF.class, ib.getLambda().getClass());
  assertEquals(NormalizationH2.class, ib.getNormalization().getClass());
}
项目:search-core    文件:IBSimilarityFactory.java   
private Distribution parseDistribution(String expr) {
  if ("LL".equals(expr)) {
    return new DistributionLL();
  } else if ("SPL".equals(expr)) {
    return new DistributionSPL();
  } else {
    throw new RuntimeException("Invalid distribution: " + expr);
  }
}
项目:search-core    文件:TestIBSimilarityFactory.java   
/** spl/df/h2 with default parameters */
public void test() throws Exception {
  Similarity sim = getSimilarity("text");
  assertEquals(IBSimilarity.class, sim.getClass());
  IBSimilarity ib = (IBSimilarity) sim;
  assertEquals(DistributionSPL.class, ib.getDistribution().getClass());
  assertEquals(LambdaDF.class, ib.getLambda().getClass());
  assertEquals(NormalizationH2.class, ib.getNormalization().getClass());
}
项目:read-open-source-code    文件:IBSimilarityFactory.java   
private Distribution parseDistribution(String expr) {
  if ("LL".equals(expr)) {
    return new DistributionLL();
  } else if ("SPL".equals(expr)) {
    return new DistributionSPL();
  } else {
    throw new RuntimeException("Invalid distribution: " + expr);
  }
}
项目:read-open-source-code    文件:IBSimilarityFactory.java   
private Distribution parseDistribution(String expr) {
  if ("LL".equals(expr)) {
    return new DistributionLL();
  } else if ("SPL".equals(expr)) {
    return new DistributionSPL();
  } else {
    throw new RuntimeException("Invalid distribution: " + expr);
  }
}