Examples of WeightingModel


Examples of org.terrier.matching.models.WeightingModel

public class TestWeightingModelFactory {

  @Test public void testGetBasicModels()
  {
    WeightingModel bm25 = WeightingModelFactory.newInstance("BM25");
    assertTrue(bm25 instanceof BM25);
    WeightingModel pl2 = WeightingModelFactory.newInstance("PL2");
    assertTrue(pl2 instanceof PL2);
  }
View Full Code Here

Examples of org.terrier.matching.models.WeightingModel

    assertTrue(pl2 instanceof PL2);
  }
 
  @Test public void testGetBasicModelsWrongNamespace()
  {
    WeightingModel bm25 = WeightingModelFactory.newInstance("uk.ac.gla.terrier.matching.models.BM25");
    assertTrue(bm25 instanceof BM25);
    WeightingModel pl2 = WeightingModelFactory.newInstance("uk.ac.gla.terrier.matching.models.PL2");
    assertTrue(pl2 instanceof PL2);
  }
View Full Code Here

Examples of org.terrier.matching.models.WeightingModel

    assertTrue(pl2 instanceof PL2);
  }
 
  @Test public void testGetAdvancedModels()
  {
    WeightingModel m = WeightingModelFactory.newInstance("DFRWeightingModel(P,L,2)");
    assertNotNull(m);
    assertTrue(m instanceof DFRWeightingModel);
    assertEquals("PL2c1.0", m.getInfo());
  }
View Full Code Here

Examples of org.terrier.matching.models.WeightingModel

    assertEquals("PL2c1.0", m.getInfo());
  }
 
  @Test public void testCacheWorks()
  {
    WeightingModel m1 = WeightingModelFactory.newInstance("BM25");
    WeightingModel m2 = WeightingModelFactory.newInstance("BM25");
    assertTrue(m1 == m2);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.