Package org.terrier.matching.models

Examples of org.terrier.matching.models.DLH13


    assertEquals(1, index.getCollectionStatistics().getNumberOfDocuments());
    Matching matching = makeMatching(index);
    assertNotNull(matching);
    MatchingQueryTerms mqt = new MatchingQueryTerms();
    mqt.setTermProperty("quick", 1);
    mqt.setDefaultTermWeightingModel(new DLH13());
    ResultSet rs = matching.match("query1", mqt);
    assertNotNull(rs);
    assertEquals(1, rs.getResultSize());
    assertEquals(0, rs.getDocids()[0]);
    assertTrue(rs.getScores()[0] > 0);
View Full Code Here


    MatchingQueryTerms mqt;
    ResultSet rs;
   
    mqt = new MatchingQueryTerms();
    mqt.setTermProperty("quick", 1);
    mqt.setDefaultTermWeightingModel(new DLH13());
    rs = matching.match("query1", mqt);
    assertNotNull(rs);
    assertEquals(1, rs.getResultSize());
    assertEquals(0, rs.getDocids()[0]);
    assertTrue(rs.getScores()[0] > 0);
   
    mqt = new MatchingQueryTerms();
    mqt.setTermProperty("dog", 1);
    mqt.setDefaultTermWeightingModel(new DLH13());
    rs = matching.match("query2", mqt);
    assertNotNull(rs);
    assertEquals(2, rs.getResultSize());   
    assertTrue(rs.getScores()[0] > 0);
    assertTrue(rs.getScores()[1] > 0);
View Full Code Here

    MatchingQueryTerms mqt;
    ResultSet rs;
   
    mqt = new MatchingQueryTerms();
    mqt.setTermProperty("quick|waggily");
    mqt.setDefaultTermWeightingModel(new DLH13());
    rs = matching.match("query1", mqt);
    assertNotNull(rs);
    assertEquals(2, rs.getResultSize());
    TIntHashSet docids = new TIntHashSet(rs.getDocids());
    System.err.println("" + rs.getDocids()[0] + " "+ rs.getScores()[0]);
View Full Code Here

    assertEquals(1, index.getCollectionStatistics().getNumberOfDocuments());
    Matching matching = makeMatching(index);
    assertNotNull(matching);
   
    MatchingQueryTerms mqt = new MatchingQueryTerms();
    mqt.setDefaultTermWeightingModel(new DLH13());
    LexiconEntry le = index.getLexicon().getLexiconEntry("quick");
    assertNotNull(le);
    le.setStatistics(1, 40);
    mqt.setTermProperty("quick", le);
    ResultSet rs = matching.match("query1", mqt);
View Full Code Here

TOP

Related Classes of org.terrier.matching.models.DLH13

Copyright © 2018 www.massapicom. 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.