Examples of score()


Examples of bgu.bio.util.ScoringMatrix.score()

    sim.setStem1(str1);
    sim.setStem2(str1);
    sim.run();
    double scoreSelf = sim.getAlignmentScore();
    double diff = scoreSelf - score;
    double expected = structureScoringMatrix.score(
        stemAlphabet.mapAndHash("G|C"), stemAlphabet.mapAndHash("G|C"))
        - structureScoringMatrix.score(stemAlphabet.mapAndHash("G|C"),
            stemAlphabet.mapAndHash("G|U"));
    Assert.assertEquals(expected, diff, 0.01);
  }
View Full Code Here

Examples of com.aliasi.classify.JointClassification.score()

      JointClassification jc =  compiledClassifier.classifyJoint(text);
          confMatrix.increment(CATEGORIES[i], jc.bestCategory());
          logger.debug("Best Category: " + jc.bestCategory() );
          StringBuffer sb = new StringBuffer();
          sb.append("Scores ");
          for (int k = 0; k < CATEGORIES.length; k++) sb.append(nf.format(jc.score(k)) + " ");
          logger.debug(sb);
     } //*-- end of inner for
    } //*-- end of outer for
     
      logger.info("--------------------------------------------");
View Full Code Here

Examples of com.aliasi.classify.JointClassification.score()

      JointClassification jc =  compiledClassifier.classifyJoint(text);
          confMatrix.increment(CATEGORIES[i], jc.bestCategory());
          logger.debug("Best Category: " + jc.bestCategory() );
          StringBuffer sb = new StringBuffer();
          sb.append("Scores ");
          for (int k = 0; k < CATEGORIES.length; k++) sb.append(nf.format(jc.score(k)) + " ");
          logger.debug(sb);
     } //*-- end of inner for
    } //*-- end of outer for
     
      logger.info("--------------------------------------------");
View Full Code Here

Examples of com.aliasi.classify.JointClassification.score()

        if (text.length() > 500text = text.substring(0, 500);
      logger.debug("Testing on " + CATEGORIES[i] + File.separator + testingFiles[j]);
      JointClassification jc =  compiledClassifier.classifyJoint(text);
     
      //*-- check if we have sufficient confidence in the decision
      String bestCategory = (jc.score(0) > -2.5) ? jc.bestCategory(): "text";
      confMatrix.increment(CATEGORIES[i], bestCategory)
          logger.debug("Best Category: " + bestCategory );
          StringBuffer sb = new StringBuffer();
          sb.append("Scores ");
          for (int k = 0; k < CATEGORIES.length; k++)
View Full Code Here

Examples of com.aliasi.classify.JointClassification.score()

      confMatrix.increment(CATEGORIES[i], bestCategory)
          logger.debug("Best Category: " + bestCategory );
          StringBuffer sb = new StringBuffer();
          sb.append("Scores ");
          for (int k = 0; k < CATEGORIES.length; k++)
            sb.append(nf.format(jc.score(k)) + " ");
          logger.debug(sb);
     } //*-- end of inner for
    } //*-- end of outer for
     
      logger.info("--------------------------------------------");
View Full Code Here

Examples of com.aliasi.classify.JointClassification.score()

   //*-- return book if the length of the document seems large
   if (length > Constants.DB_DOC_STORE_LIMIT) return "book";
  
   //*-- assign a default file type of text when insufficient evidence
   JointClassification jc =  fileTypeClassifier.classifyJoint(contents);
   return ( (jc.score(0) > -2.5) ? jc.bestCategory(): "text");
  }

  /**
   * Classify the passed text string into one of the pre-defined categories - rec, business, news, etc.
   * @param idoc IndexableDoc The document whose contents are to be classified
View Full Code Here

Examples of com.aliasi.classify.JointClassification.score()

   */
  public String classifyTextContents(IndexableDoc idoc)
  {
   //*-- assign a default text type of "" when insufficient evidence
   JointClassification jc =  textTypeClassifier.classifyJoint(idoc.getContents().toString());
   return ( (jc.score(0) > -2.5) ? jc.bestCategory(): "miscellaneous");
  }
 
}
View Full Code Here

Examples of com.aliasi.util.ScoredObject.score()

      {
        //*-- 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();
View Full Code Here

Examples of com.browseengine.bobo.query.scoring.BoboDocScorer.score()

      if(!(handler instanceof FacetScoreable))
        throw new IllegalArgumentException(facetName + " does not implement FacetScoreable");
       
      FacetScoreable facetScoreable = (FacetScoreable)handler;
      BoboDocScorer scorer = facetScoreable.getDocScorer(reader, _scoringFunctionFactory, boostEntry.getValue());
      float facetBoost = scorer.score(docid);

      Explanation facetExp = new Explanation();
      facetExp.setDescription(facetName);
      facetExp.setValue(facetBoost);
      facetExp.addDetail(scorer.explain(docid));
View Full Code Here

Examples of edu.stanford.nlp.fsm.DFSATransition.score()

      double minCost = Double.POSITIVE_INFINITY;
      DFSATransition bestTransition = null;
      for (Iterator iter = inputs.iterator(); iter.hasNext();) {
        Object predictSpace = iter.next();
        DFSATransition transition = tSource.transition(predictSpace);
        double transitionCost = transition.score();
        if(transitionCost < minCost) {
          if(predictSpace != null) {
            System.err.printf("mincost (%s): %e -> %e\n", predictSpace.toString(), minCost, transitionCost);
            minCost = transitionCost;
            answerConstraint = predictSpace;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.