Examples of BM25Scorer


Examples of it.unimi.di.big.mg4j.search.score.BM25Scorer

        return String.format("BM25(b=%f,k1=%f)", b, k1);
    }

    @Override
    public void init(DocumentCollection collection, IndexConfiguration index) throws Exception {
        scorer = new BM25Scorer(k1, b);
        super.init(collection, index);
    }
View Full Code Here

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

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

     
    );

    /* 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
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.