FAQ
Is Okapi BM25 (its implementation in Lucene:
nlp.uned.es/~jperezi/Lucene-BM25) returning back normalized query scores (in
between 0 and 1) ?

According to Okapi formula the final score should be normalized. Could you
give some information about that ?

thanks

Search Discussions

  • Patrick Diviacco at Apr 29, 2011 at 11:20 am
    Can anybody provide me some information about it ? Even a small clue, I'm
    kinda stuck on this and the owner of the libraries do not answer emails.

    Thanks

    On 28 April 2011 13:49, Patrick Diviacco wrote:

    Is Okapi BM25 (its implementation in Lucene:
    nlp.uned.es/~jperezi/Lucene-BM25) returning back normalized query scores
    (in between 0 and 1) ?

    According to Okapi formula the final score should be normalized. Could you
    give some information about that ?

    thanks

  • Paul Libbrecht at Apr 29, 2011 at 11:48 am
    Patrick if the question is about the code snippert at the page you mention, which I copy below, I believe the answer is no and the author is aware of it since he is adding a comment about not-normalized in the second example.

    ScoreDocs and TopDocs are not returning normalized scores.
    Normalized scores tend to be rare in Lucene nowadays, I believe earlier strategy was to divide by max-score when the latter was bigger than 1.

    paul

    IndexSearcher searcher = new IndexSearcher("IndexPath");

    //Load average length
    BM25Parameters.load(avgLengthPath);
    BM25BooleanQuery query = new BM25BooleanQuery("This is my Query",
    "Search-Field",
    new StandardAnalyzer());

    TopDocs top = searcher.search(query, null, 10);
    ScoreDoc[] docs = top.scoreDocs;

    //Print results
    for (int i = 0; i $<$ top.scoreDocs.length; i++) {
    System.out.println(docs[i].doc + ":"+docs[i].score);
    }


    Le 29 avr. 2011 à 13:20, Patrick Diviacco a écrit :
    Can anybody provide me some information about it ? Even a small clue, I'm
    kinda stuck on this and the owner of the libraries do not answer emails.

    Thanks

    On 28 April 2011 13:49, Patrick Diviacco wrote:

    Is Okapi BM25 (its implementation in Lucene:
    nlp.uned.es/~jperezi/Lucene-BM25) returning back normalized query scores
    (in between 0 and 1) ?

    According to Okapi formula the final score should be normalized. Could you
    give some information about that ?

    thanks


    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-user-help@lucene.apache.org

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupjava-user @
categorieslucene
postedApr 28, '11 at 11:49a
activeApr 29, '11 at 11:48a
posts3
users2
websitelucene.apache.org

People

Translate

site design / logo © 2022 Grokbase