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

项目:search    文件:DFRSimilarityFactory.java   
private AfterEffect parseAfterEffect(String expr) {
  if ("B".equals(expr)) {
    return new AfterEffectB();
  } else if ("L".equals(expr)) {
    return new AfterEffectL();
  } else if ("none".equals(expr)) {
    return new AfterEffect.NoAfterEffect();
  } else {
    throw new RuntimeException("Invalid afterEffect: " + expr);
  }
}
项目:search    文件:TestDFRSimilarityFactory.java   
/** LUCENE-3566 */
public void testParameterC() throws Exception {
  Similarity sim = getSimilarity("text_paramc");
  assertEquals(DFRSimilarity.class, sim.getClass());
  DFRSimilarity dfr = (DFRSimilarity) sim;
  assertEquals(BasicModelP.class, dfr.getBasicModel().getClass());
  assertEquals(AfterEffectL.class, dfr.getAfterEffect().getClass());
  assertEquals(NormalizationH2.class, dfr.getNormalization().getClass());
  NormalizationH2 norm = (NormalizationH2) dfr.getNormalization();
  assertEquals(7f, norm.getC(), 0.01f);
}
项目:NYBC    文件:DFRSimilarityFactory.java   
private AfterEffect parseAfterEffect(String expr) {
  if ("B".equals(expr)) {
    return new AfterEffectB();
  } else if ("L".equals(expr)) {
    return new AfterEffectL();
  } else if ("none".equals(expr)) {
    return new AfterEffect.NoAfterEffect();
  } else {
    throw new RuntimeException("Invalid afterEffect: " + expr);
  }
}
项目:NYBC    文件:TestDFRSimilarityFactory.java   
/** LUCENE-3566 */
public void testParameterC() throws Exception {
  Similarity sim = getSimilarity("text_paramc");
  assertEquals(DFRSimilarity.class, sim.getClass());
  DFRSimilarity dfr = (DFRSimilarity) sim;
  assertEquals(BasicModelP.class, dfr.getBasicModel().getClass());
  assertEquals(AfterEffectL.class, dfr.getAfterEffect().getClass());
  assertEquals(NormalizationH2.class, dfr.getNormalization().getClass());
  NormalizationH2 norm = (NormalizationH2) dfr.getNormalization();
  assertEquals(7f, norm.getC(), 0.01f);
}
项目:search-core    文件:DFRSimilarityFactory.java   
private AfterEffect parseAfterEffect(String expr) {
  if ("B".equals(expr)) {
    return new AfterEffectB();
  } else if ("L".equals(expr)) {
    return new AfterEffectL();
  } else if ("none".equals(expr)) {
    return new AfterEffect.NoAfterEffect();
  } else {
    throw new RuntimeException("Invalid afterEffect: " + expr);
  }
}
项目:search-core    文件:TestDFRSimilarityFactory.java   
/** LUCENE-3566 */
public void testParameterC() throws Exception {
  Similarity sim = getSimilarity("text_paramc");
  assertEquals(DFRSimilarity.class, sim.getClass());
  DFRSimilarity dfr = (DFRSimilarity) sim;
  assertEquals(BasicModelP.class, dfr.getBasicModel().getClass());
  assertEquals(AfterEffectL.class, dfr.getAfterEffect().getClass());
  assertEquals(NormalizationH2.class, dfr.getNormalization().getClass());
  NormalizationH2 norm = (NormalizationH2) dfr.getNormalization();
  assertEquals(7f, norm.getC(), 0.01f);
}
项目:read-open-source-code    文件:DFRSimilarityFactory.java   
private AfterEffect parseAfterEffect(String expr) {
  if ("B".equals(expr)) {
    return new AfterEffectB();
  } else if ("L".equals(expr)) {
    return new AfterEffectL();
  } else if ("none".equals(expr)) {
    return new AfterEffect.NoAfterEffect();
  } else {
    throw new RuntimeException("Invalid afterEffect: " + expr);
  }
}
项目:read-open-source-code    文件:DFRSimilarityFactory.java   
private AfterEffect parseAfterEffect(String expr) {
  if ("B".equals(expr)) {
    return new AfterEffectB();
  } else if ("L".equals(expr)) {
    return new AfterEffectL();
  } else if ("none".equals(expr)) {
    return new AfterEffect.NoAfterEffect();
  } else {
    throw new RuntimeException("Invalid afterEffect: " + expr);
  }
}