Package it.unimi.dsi.mg4j.search.score

Examples of it.unimi.dsi.mg4j.search.score.BM25Scorer


    }
    */
   
    final QueryEngine queryEngine = new QueryEngine( simpleParser, new DocumentIteratorBuilderVisitor( indexMap, index2Parser, indexMap.get( indexMap.firstKey() ), MAX_STEMMING ), indexMap );
    queryEngine.setWeights( index2Weight );
    queryEngine.score( new Scorer[] { new BM25Scorer(), new VignaScorer() }, new double[] { 1, 1 } );
    // We set up an interval selector only if there is a collection for snippeting
    queryEngine.intervalSelector = documentCollection != null ? new IntervalSelector( 4, 40 ) : new IntervalSelector();
    queryEngine.multiplex = true;
    queryEngine.equalize( 1000 );
   
View Full Code Here


     
    );

    /* Optionally, we can score the results. Here we use a state-of-art ranking
     * function, BM25, which requires document sizes. */
    engine.score( new BM25Scorer() );
   
    /* Optionally, we can weight the importance of each index. To do so, we have to pass a map,
     * and again we use the handy fastutil constructor. Note that setting up a BM25F scorer
     * would give much better results, but we want to keep it simple. */
    engine.setWeights( new Reference2DoubleOpenHashMap<Index>( new Index[] { text, title }, new double[] { 1, 2 } ) );
View Full Code Here

TOP

Related Classes of it.unimi.dsi.mg4j.search.score.BM25Scorer

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.