How to set scoring rules using java API

  • Hayrettin Erdem

    Hayrettin Erdem - 2013-11-10


    I am currently trying to set different scoring rules for my experiments using Indri Java API. How can I specify rules? So far, I have tried the following:

    QueryEnvironment env = new QueryEnvironment();
    String[] rules = {"method:linear", "collectionLambda:0.40", "documentLambda:0.00", "field:text"};

    However, it does not make any change on the retrieval scores. I think I could not set the scoring rules properly. Could you please help me?


  • David Fisher

    David Fisher - 2013-11-12

    Review the syntax for the rule parameter,

    Specifically, the array of rules you want to declare contains one or more rule specifications. The code you have above has a separate string for each of the comma separated components of a single rule, yielding the defaults for linear when you try to use them. Try:

    String[] rules = {"method:linear,collectionLambda:0.40,documentLambda:0.00,field:text"};

    which will give you an array with a single rule for linear smoothing of the text field.


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks