How to set scoring rules using java API

Retrieval
2013-11-10
2013-11-12
  • Hayrettin Erdem

    Hayrettin Erdem - 2013-11-10

    Hi,

    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"};
    env.setScoringRules(rules);
    //...

    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?

    Thanks

     
  • David Fisher

    David Fisher - 2013-11-12

    Review the syntax for the rule parameter, https://sourceforge.net/p/lemur/wiki/IndriRunQuery/

    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