Examples of addValue()


Examples of nlp.com.knowledgebooks.nlp.util.ScoredList.addValue()

        if (words == null) return ret;
        for (int i=0; i<words.size(); i++) {
            // 5 word human names:
            if (isHumanName(words, i, 5)) {
                String s = words.get(i) + " " + words.get(i+1) + " " + words.get(i+2) + " " + words.get(i+3) + " " + words.get(i+4);
                humanNames.addValue(s);
                i += 4;
                continue;
            }
            // 4 word human names:
            if (isHumanName(words, i, 4)) {
View Full Code Here

Examples of no.priv.garshol.duke.CompactRecord.addValue()

  }

  public static Record makeRecord(String p1, String v1, String p2, String v2,
                            String p3, String v3) {
    CompactRecord rec = new CompactRecord();
    rec.addValue(p1, v1);
    if (v2 != null)
      rec.addValue(p2, v2);
    if (v3 != null)
      rec.addValue(p3, v3);
    return rec;
View Full Code Here

Examples of no.priv.garshol.duke.RecordImpl.addValue()

    if (parser.getOptionValue("maxhits") != null)
      max_hits = Integer.parseInt(parser.getOptionValue("maxhits"));

    // build record
    RecordImpl prototype = new RecordImpl();
    prototype.addValue(argv[1], argv[2]);

    // search
    Collection<Record> records = database.findCandidateMatches(prototype);
    int hitno = 1;
    for (Record record : records) {
View Full Code Here

Examples of org.apache.aries.blueprint.mutable.MutableCollectionMetadata.addValue()

            MutableBeanMetadata bean = context.createMetadata(MutableBeanMetadata.class);
            bean.setRuntimeClass(ServiceListener.class);
            bean.addProperty("listener", listener.getListenerComponent());
            bean.addProperty("registerMethod", createValue(context, listener.getRegistrationMethod()));
            bean.addProperty("unregisterMethod", createValue(context, listener.getUnregistrationMethod()));
            listenerCollection.addValue(bean);
        }
        factoryMetadata.addProperty("listeners", listenerCollection);
       
        context.getComponentDefinitionRegistry().registerComponentDefinition(factoryMetadata);
       
View Full Code Here

Examples of org.apache.commons.math.stat.DescriptiveStatistics.addValue()

       
        double[] testArray =
        { 12.5, 12, 11.8, 14.2, 14.9, 14.5, 21, 8.2, 10.3, 11.3, 14.1,
          9.9, 12.2, 12, 12.1, 11, 19.8, 11, 10, 8.8, 9, 12.3 };
        for( int i = 0; i < testArray.length; i++) {
            u.addValue( testArray[i]);
        }
       
        assertEquals("mean", 12.40455, u.getMean(), 0.0001);
        assertEquals("variance", 10.00236, u.getVariance(), 0.0001);
        assertEquals("skewness", 1.437424, u.getSkewness(), 0.0001);
View Full Code Here

Examples of org.apache.commons.math.stat.Frequency.addValue()

 
  Frequency make(IList dataValues){
    Frequency freq = new Frequency();
    for(IValue v : dataValues){
      if(v instanceof INumber)
        freq.addValue(new ComparableValue((INumber)v));
      else if(v instanceof IString)
        freq.addValue(new ComparableValue((IString)v));
      else
        throw RuntimeExceptionFactory.illegalArgument(v,null, null);
    }
View Full Code Here

Examples of org.apache.commons.math.stat.StorelessDescriptiveStatisticsImpl.addValue()

   
    /** test stats */
    public void testStats() {
        StorelessDescriptiveStatisticsImpl u = new StorelessDescriptiveStatisticsImpl();
        assertEquals("total count",0,u.getN(),tolerance);
        u.addValue(one);
        u.addValue(twoF);
        u.addValue(twoL);
        u.addValue(three);
        assertEquals("N",n,u.getN(),tolerance);
        assertEquals("sum",sum,u.getSum(),tolerance);
View Full Code Here

Examples of org.apache.commons.math.stat.descriptive.DescriptiveStatistics.addValue()

      super.testTakedown();
      if (opts.reportLatency) {
        Arrays.sort(times);
        DescriptiveStatistics ds = new DescriptiveStatistics();
        for (double t : times) {
          ds.addValue(t);
        }
        LOG.info("randomRead latency log (ms), on " + times.length + " measures");
        LOG.info("99.9999% = " + ds.getPercentile(99.9999d));
        LOG.info(" 99.999% = " + ds.getPercentile(99.999d));
        LOG.info("  99.99% = " + ds.getPercentile(99.99d));
View Full Code Here

Examples of org.apache.commons.math.stat.descriptive.DescriptiveStatisticsImpl.addValue()

    averageScores = new HashMap<String,Double>();
    maxScores = new HashMap<String,Double>();
    for(String surf : scoresForEntity.keySet()) {
      DescriptiveStatistics descStats = new DescriptiveStatisticsImpl();
      for(double score : scoresForEntity.get(surf)) {
        descStats.addValue(score);
      }
      maxScores.put(surf, descStats.getMax());
      averageScores.put(surf, descStats.getMean());
    }
   
View Full Code Here

Examples of org.apache.commons.math.stat.descriptive.SummaryStatistics.addValue()

            final long durationValue = min + random.nextInt(max - min);
            final int callCountValue = min + random.nextInt(max - min);
            final int peakRecursionDepthValue = min + random.nextInt(max - min);
            durationStats.addValue(durationValue);
            servletCallCountStats.addValue(callCountValue);
            peakRecursionDepthStats.addValue(peakRecursionDepthValue);
           
            final RequestData requestData = context.mock(RequestData.class, "requestData" + i);
            context.checking(new Expectations() {{
                one(requestData).getElapsedTimeMsec();
                will(returnValue(durationValue));
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.