Package it.unimi.dsi.mg4j.query

Examples of it.unimi.dsi.mg4j.query.QueryEngine.score()


     
    );

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