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

项目:search    文件:DFRSimilarityFactory.java   
private BasicModel parseBasicModel(String expr) {
  if ("Be".equals(expr)) {
    return new BasicModelBE();
  } else if ("D".equals(expr)) {
    return new BasicModelD();
  } else if ("G".equals(expr)) {
    return new BasicModelG();
  } else if ("I(F)".equals(expr)) {
    return new BasicModelIF();
  } else if ("I(n)".equals(expr)) {
    return new BasicModelIn();
  } else if ("I(ne)".equals(expr)) {
    return new BasicModelIne();
  } else if ("P".equals(expr)) {
    return new BasicModelP();
  } else {
    throw new RuntimeException("Invalid basicModel: " + expr);
  }
}
项目:NYBC    文件:DFRSimilarityFactory.java   
private BasicModel parseBasicModel(String expr) {
  if ("Be".equals(expr)) {
    return new BasicModelBE();
  } else if ("D".equals(expr)) {
    return new BasicModelD();
  } else if ("G".equals(expr)) {
    return new BasicModelG();
  } else if ("I(F)".equals(expr)) {
    return new BasicModelIF();
  } else if ("I(n)".equals(expr)) {
    return new BasicModelIn();
  } else if ("I(ne)".equals(expr)) {
    return new BasicModelIne();
  } else if ("P".equals(expr)) {
    return new BasicModelP();
  } else {
    throw new RuntimeException("Invalid basicModel: " + expr);
  }
}
项目:search-core    文件:DFRSimilarityFactory.java   
private BasicModel parseBasicModel(String expr) {
  if ("Be".equals(expr)) {
    return new BasicModelBE();
  } else if ("D".equals(expr)) {
    return new BasicModelD();
  } else if ("G".equals(expr)) {
    return new BasicModelG();
  } else if ("I(F)".equals(expr)) {
    return new BasicModelIF();
  } else if ("I(n)".equals(expr)) {
    return new BasicModelIn();
  } else if ("I(ne)".equals(expr)) {
    return new BasicModelIne();
  } else if ("P".equals(expr)) {
    return new BasicModelP();
  } else {
    throw new RuntimeException("Invalid basicModel: " + expr);
  }
}
项目:read-open-source-code    文件:DFRSimilarityFactory.java   
private BasicModel parseBasicModel(String expr) {
  if ("Be".equals(expr)) {
    return new BasicModelBE();
  } else if ("D".equals(expr)) {
    return new BasicModelD();
  } else if ("G".equals(expr)) {
    return new BasicModelG();
  } else if ("I(F)".equals(expr)) {
    return new BasicModelIF();
  } else if ("I(n)".equals(expr)) {
    return new BasicModelIn();
  } else if ("I(ne)".equals(expr)) {
    return new BasicModelIne();
  } else if ("P".equals(expr)) {
    return new BasicModelP();
  } else {
    throw new RuntimeException("Invalid basicModel: " + expr);
  }
}
项目:read-open-source-code    文件:DFRSimilarityFactory.java   
private BasicModel parseBasicModel(String expr) {
  if ("Be".equals(expr)) {
    return new BasicModelBE();
  } else if ("D".equals(expr)) {
    return new BasicModelD();
  } else if ("G".equals(expr)) {
    return new BasicModelG();
  } else if ("I(F)".equals(expr)) {
    return new BasicModelIF();
  } else if ("I(n)".equals(expr)) {
    return new BasicModelIn();
  } else if ("I(ne)".equals(expr)) {
    return new BasicModelIne();
  } else if ("P".equals(expr)) {
    return new BasicModelP();
  } else {
    throw new RuntimeException("Invalid basicModel: " + expr);
  }
}
项目:search    文件:TestDFRSimilarityFactory.java   
/** dfr with default parameters */
public void test() throws Exception {
  Similarity sim = getSimilarity("text");
  assertEquals(DFRSimilarity.class, sim.getClass());
  DFRSimilarity dfr = (DFRSimilarity) sim;
  assertEquals(BasicModelIF.class, dfr.getBasicModel().getClass());
  assertEquals(AfterEffectB.class, dfr.getAfterEffect().getClass());
  assertEquals(NormalizationH2.class, dfr.getNormalization().getClass());
}
项目:search    文件:TestDFRSimilarityFactory.java   
/** dfr with parameterized normalization */
public void testParameters() throws Exception {
  Similarity sim = getSimilarity("text_params");
  assertEquals(DFRSimilarity.class, sim.getClass());
  DFRSimilarity dfr = (DFRSimilarity) sim;
  assertEquals(BasicModelIF.class, dfr.getBasicModel().getClass());
  assertEquals(AfterEffectB.class, dfr.getAfterEffect().getClass());
  assertEquals(NormalizationH3.class, dfr.getNormalization().getClass());
  NormalizationH3 norm = (NormalizationH3) dfr.getNormalization();
  assertEquals(900f, norm.getMu(), 0.01f);
}
项目:NYBC    文件:TestDFRSimilarityFactory.java   
/** dfr with default parameters */
public void test() throws Exception {
  Similarity sim = getSimilarity("text");
  assertEquals(DFRSimilarity.class, sim.getClass());
  DFRSimilarity dfr = (DFRSimilarity) sim;
  assertEquals(BasicModelIF.class, dfr.getBasicModel().getClass());
  assertEquals(AfterEffectB.class, dfr.getAfterEffect().getClass());
  assertEquals(NormalizationH2.class, dfr.getNormalization().getClass());
}
项目:NYBC    文件:TestDFRSimilarityFactory.java   
/** dfr with parameterized normalization */
public void testParameters() throws Exception {
  Similarity sim = getSimilarity("text_params");
  assertEquals(DFRSimilarity.class, sim.getClass());
  DFRSimilarity dfr = (DFRSimilarity) sim;
  assertEquals(BasicModelIF.class, dfr.getBasicModel().getClass());
  assertEquals(AfterEffectB.class, dfr.getAfterEffect().getClass());
  assertEquals(NormalizationH3.class, dfr.getNormalization().getClass());
  NormalizationH3 norm = (NormalizationH3) dfr.getNormalization();
  assertEquals(900f, norm.getMu(), 0.01f);
}
项目:search-core    文件:TestDFRSimilarityFactory.java   
/** dfr with default parameters */
public void test() throws Exception {
  Similarity sim = getSimilarity("text");
  assertEquals(DFRSimilarity.class, sim.getClass());
  DFRSimilarity dfr = (DFRSimilarity) sim;
  assertEquals(BasicModelIF.class, dfr.getBasicModel().getClass());
  assertEquals(AfterEffectB.class, dfr.getAfterEffect().getClass());
  assertEquals(NormalizationH2.class, dfr.getNormalization().getClass());
}
项目:search-core    文件:TestDFRSimilarityFactory.java   
/** dfr with parameterized normalization */
public void testParameters() throws Exception {
  Similarity sim = getSimilarity("text_params");
  assertEquals(DFRSimilarity.class, sim.getClass());
  DFRSimilarity dfr = (DFRSimilarity) sim;
  assertEquals(BasicModelIF.class, dfr.getBasicModel().getClass());
  assertEquals(AfterEffectB.class, dfr.getAfterEffect().getClass());
  assertEquals(NormalizationH3.class, dfr.getNormalization().getClass());
  NormalizationH3 norm = (NormalizationH3) dfr.getNormalization();
  assertEquals(900f, norm.getMu(), 0.01f);
}