Package com.aliasi.util

Examples of com.aliasi.util.ScoredObject


      logger.info(StringTools.fillin("JointLogProb", 15, true, ' ') + StringTools.fillin("Tags", 80, true, ' '));
      Iterator nBestIt = decoder.nBest(tokens);
      for (int n = 0; n < 3 && nBestIt.hasNext(); ++n)
      {
        //*-- get the ScoredObject to fetch the score and tags
        ScoredObject tagScores = (ScoredObject) nBestIt.next();
       
        //*-- format the score
        double score = tagScores.score();
        String f_score = Strings.decimalFormat(score, "#,##0.000", 9);
        StringBuffer sb = new StringBuffer(); sb.append(StringTools.fillin(f_score, 15, true, ' '));
       
        //*-- format the tags
        String[] tags = (String[]) tagScores.getObject();
        for (int i = 0; i < tokens.length; ++i)
          sb.append(StringTools.fillin(tokens[i] + "_" + tags[i], 16, true, ' ' ) );
        logger.info(sb.toString());
      } //*-- end of for
    }
View Full Code Here

TOP

Related Classes of com.aliasi.util.ScoredObject

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.