Package org.terrier.matching

Examples of org.terrier.matching.Model


  try{
            Request rq = (Request)srq;
    if ( (! rq.isEmpty()) || MATCH_EMPTY_QUERY )
    {
      //TODO some exception handling here for not found models
      Model wmodel = getWeightingModel(rq);
     
      /* craigm 05/09/2006: only set the parameter of the weighting model
       * if it was explicitly set if c_set control is set to true. Otherwise
       * allow the weighting model to assume it's default value.
       * This changes previous behaviour. TODO: some consideration for
       * non TREC applications */
      if (rq.getControl("c_set").equals("true"))
      {
        wmodel.setParameter(Double.parseDouble(rq.getControl("c")));
      }
     
      Matching matching = getMatchingModel(rq);
     
      if (logger.isDebugEnabled()){
        logger.debug("weighting model: " + wmodel.getInfo());
      }
      MatchingQueryTerms mqt = rq.getMatchingQueryTerms();
      mqt.setDefaultTermWeightingModel((WeightingModel)wmodel);
      Query q = rq.getQuery();
     
View Full Code Here


  public String getInfo(SearchRequest srq) {
    Request rq = (Request)srq;
    StringBuilder info = new StringBuilder();
   
    //obtaining the weighting model information
    Model wmodel = getWeightingModel(rq);
    final String param = rq.getControl("c");
    if (rq.getControl("c_set").equals("true") && param.length() > 0)
      wmodel.setParameter(Double.parseDouble(param));
    info.append(wmodel.getInfo());
   
    //obtaining the post-processors information
    Map<String,String> controls = rq.getControlHashtable();
   
    for(int i=0; i<PostProcesses_Order.length; i++)
View Full Code Here

TOP

Related Classes of org.terrier.matching.Model

Copyright © 2018 www.massapicom. 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.