Examples of score()


Examples of fr.neatmonster.nocheatplus.utilities.ActionFrequency.score()

        if (now - TickTask.getTimeStart() < cc.loginsStartupDelay) return false;
        // Split into 6 buckets always.
        final long durBucket = 1000L * cc.loginsSeconds / 6;
        final ActionFrequency freq = getActionFrequency(player.getWorld().getName(), 6, durBucket, cc.loginsPerWorldCount);
        freq.update(now);
        final boolean cancel = freq.score(1f) > cc.loginsLimit; // TODO: >= ...  This will be 1 after the first login (!).
        if (!cancel) freq.add(1f);
        return cancel;
    }

  /**
 
View Full Code Here

Examples of fr.neatmonster.nocheatplus.utilities.ActionFrequency.score()

  @Override
  public void onPacketReceiving(final PacketEvent event) {
      // TODO: Add several (at least has look + has pos individually, maybe none/onground)
      final ActionFrequency freq = getFreq(event.getPlayer().getName());
      freq.add(System.currentTimeMillis(), 1f);
      if (freq.score(1f) > maxPackets) {
          // TODO: Get from a NetConfig (optimized).
          if (ConfigManager.getConfigFile(event.getPlayer().getWorld().getName()).getBoolean(ConfPaths.NET_FLYINGFREQUENCY_ACTIVE)) {
              event.setCancelled(true);
              counters.add(idSilent, 1); // Until it is sure if we can get these async.
          }
View Full Code Here

Examples of gov.nist.scap.xccdf.scoring.ScoringModel.score()

    for (ScoringModelDeclaration modelDeclaration : declarations) {
      String system = modelDeclaration.getSystemId();
      if (supportedScoringModels.containsKey(system)) {
        ScoringModel model = supportedScoringModels.get(system);

        Score score = model.score(document, this, modelDeclaration.getParameters());
        scores.add(score);
      }
    }
  }
View Full Code Here

Examples of it.unimi.dsi.mg4j.query.QueryEngine.score()

     
    );

    /* Optionally, we can score the results. Here we use a state-of-art ranking
     * function, BM25, which requires document sizes. */
    engine.score( new BM25Scorer() );
   
    /* Optionally, we can weight the importance of each index. To do so, we have to pass a map,
     * and again we use the handy fastutil constructor. Note that setting up a BM25F scorer
     * would give much better results, but we want to keep it simple. */
    engine.setWeights( new Reference2DoubleOpenHashMap<Index>( new Index[] { text, title }, new double[] { 1, 2 } ) );
View Full Code Here

Examples of joshua.zmert.BLEU.score()

    // testSentences[i] stores the candidate translation for the i'th sentence
    String[] testSentences = new String[1];
    testSentences[0] = test;
    try {
      // Check BLEU score matches
      double actualScore = bleu.score(testSentences);
      double expectedScore = 0.2513;
      double acceptableScoreDelta = 0.00001f;

      Assert.assertEquals(actualScore, expectedScore, acceptableScoreDelta);
View Full Code Here

Examples of monopoly.model.game.Dice.DiceScore.score()

        DiceScore diceScore = p.dropDice(_dice);
        GameModelEvent event = new GameModelEvent(this, p, diceScore);
        firePlayerDroppedDice(event);

        GameFieldCellBase oldPosition = p.position();
        p.shiftOnField(diceScore.score());
        GameFieldCellBase newPosition = p.position();
        event = new GameModelEvent(this, p, oldPosition, newPosition);
        firePlayerShiftedOnField(event);

        event = new GameModelEvent(this, p);
View Full Code Here

Examples of opennlp.ccg.ngrams.NgramPrecisionModel.score()

      // check 4-gram precision
      Edge retval = null;
      double bestScore = 0;
      NgramPrecisionModel oracle = new NgramPrecisionModel(new String[]{target});
      for (Edge edge : edges) {
        double score = oracle.score(edge.getSign(), true);
        if (score > bestScore) {
          retval = edge; bestScore = score;
        }
      }
      // done
View Full Code Here

Examples of org.apache.lucene.search.Hits.score()

      int iHitCount = oHitSet.length();
      if (iHitCount>0) {
        aRetArr = new BugRecord[iHitCount];
        for (int h=0; h<iHitCount; h++) {
          oDoc = oHitSet.doc(h);
          aRetArr[h] = new BugRecord(oHitSet.score(h),
                   Integer.parseInt(oDoc.get("number")),
                       oDoc.get("guid"), oDoc.get("container"), oDoc.get("title"),
                       oDoc.get("author"), oDoc.get("created"), oDoc.get("type"),
                       oDoc.get("status"), oDoc.get("priority"),
                       oDoc.get("severity"), oDoc.get("abstract"));
View Full Code Here

Examples of org.apache.lucene.search.Hits.score()

      if (iHitCount>0) {
        aRetArr = new NewsMessageRecord[iHitCount];
        for (int h=0; h<iHitCount; h++) {
          oDoc = oHitSet.doc(h);
          try {
            aRetArr[h] = new NewsMessageRecord(oHitSet.score(h), oDoc.get("workarea"),
                         oDoc.get("guid"), oDoc.get("container"), oDoc.get("title"),
                         oDoc.get("author"), DateTools.stringToDate(oDoc.get("created")), oDoc.get("abstract"));
          } catch (java.text.ParseException neverthrown) {
            throw new ParseException("NewsMessageSearcher.search() Error parsing date "+oDoc.get("created")+" of document "+oDoc.get("guid"));
          }
View Full Code Here

Examples of org.apache.lucene.search.Hits.score()

     IndexableDoc idoc = new IndexableDoc();
     idoc = (IndexableDoc) idoc.getBdbBinding().entryToObject(data);
     String line= idoc.getContents().toString();
     if (line.length() > 1000) line = line.substring(0, 999);
 
     retv.append(" Score: " + hits.score(i) + " TEXT: " + line + Constants.NEWLINE);
     retv.append(explanation.toString());
     retv.append("------------------------------------------------------------------");
     retv.append(Constants.NEWLINE); retv.append(Constants.NEWLINE);
   }
  } //*-- end of try
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.