Examples of containsKey()


Examples of edu.luc.cs.laufer.cs313.occurences.Index.containsKey()

    index2.add("uvw", 2);
    assertEquals(2, index.size());
    assertEquals(1, index2.size());
    assertTrue(index.containsKey("abc"));
    assertTrue(index.containsKey("xyz"));
    assertTrue(index2.containsKey("uvw"));
    assertFalse(index2.containsKey("abc"));
    assertFalse(index2.containsKey("xyz"));
    assertFalse(index.containsKey("uvw"));
  }
 
View Full Code Here

Examples of edu.stanford.nlp.ling.CoreLabel.containsKey()

      } while (nextToken != null && nextToken.word().length() == 0);

      // Check for compounds to split
      if (splitAny && nextToken instanceof CoreLabel) {
        CoreLabel cl = (CoreLabel) nextToken;
  if (cl.containsKey(ParentAnnotation.class)) {
      if(splitCompounds && cl.get(ParentAnnotation.class).equals(SpanishLexer.COMPOUND_ANNOTATION))
    nextToken = (T) processCompound(cl);
      else if (splitVerbs && cl.get(ParentAnnotation.class).equals(SpanishLexer.VB_PRON_ANNOTATION))
    nextToken = (T) processVerb(cl);
      else if (splitContractions && cl.get(ParentAnnotation.class).equals(SpanishLexer.CONTR_ANNOTATION))
View Full Code Here

Examples of edu.stanford.nlp.util.CoreMap.containsKey()

          if (!token.containsKey(CoreAnnotations.IndexAnnotation.class)) {
            token.set(CoreAnnotations.IndexAnnotation.class, k + 1);
          }
        }
        // Set normalized named entity for chunked tokens
        if (sentence.containsKey(CoreAnnotations.NumerizedTokensAnnotation.class)) {
          for (CoreMap numerizedToken : sentence.get(CoreAnnotations.NumerizedTokensAnnotation.class)) {
            if (numerizedToken.containsKey(CoreAnnotations.TokensAnnotation.class)) {
              // The normalized named entity got deleted?
              numerizedToken.set(CoreAnnotations.NormalizedNamedEntityTagAnnotation.class,
                  numerizedToken.get(CoreAnnotations.TokensAnnotation.class)
View Full Code Here

Examples of edu.stanford.ppl.concurrent.SnapTreeMap.containsKey()

    /**
     *  containsKey returns true for contained key
     */
    public void testContainsKey() {
        SnapTreeMap map = map5();
        assertTrue(map.containsKey(one));
        assertFalse(map.containsKey(zero));
    }

    /**
     *  containsValue returns true for held values
View Full Code Here

Examples of edu.umd.cloud9.io.map.HMapSFW.containsKey()

            for (int e : ids) {
              String eTerm = rhs[e];
              if (docLangTokenizer.isStemmedStopWord(eTerm))  continue;
              if (scfgDist.containsKey(fTerm)) {
                HMapSFW eToken2Prob = scfgDist.get(fTerm);
                if(eToken2Prob.containsKey(eTerm)) {
                  eToken2Prob.increment(eTerm, prob);
                }else {
                  eToken2Prob.put(eTerm, prob);
                }
              }else {
View Full Code Here

Examples of edu.umd.cloud9.io.map.HMapSIW.containsKey()

        String[] tokens = tokenizer.processContent(line);
        sentLengths.add(tokens.length);
        sumLengths += tokens.length;

        for (String token : tokens) {
          if (!sent.containsKey(token)) {
            dfTable.increment(token);
          }
          sent.increment(token);
        }
        sentTfs.add(sent);
View Full Code Here

Examples of edu.umd.cloud9.io.map.Int2FloatOpenHashMapWritable.containsKey()

      floats[i] = k;
    }

    for (int i = 0; i < size; i++) {
      assertEquals(floats[i], map.get(i), 10e-6);
      assertTrue(map.containsKey(i));
    }

  }

  @Test
View Full Code Here

Examples of edu.umd.cloud9.io.map.Int2IntOpenHashMapWritable.containsKey()

      ints[i] = k;
    }

    for (int i = 0; i < size; i++) {
      assertEquals(ints[i], map.get(i));
      assertTrue(map.containsKey(i));
    }
  }

  @Test
  public void testUpdate() {
View Full Code Here

Examples of edu.umd.cloud9.util.map.HMapID.containsKey()

    for (int i = 0; i < size; i++) {
      double v = map.get(i);

      assertEquals(doubles[i], v, 0.0);
      assertTrue(map.containsKey(i));
    }
  }

  @Test
  public void testUpdate() {
View Full Code Here

Examples of edu.umd.cloud9.util.map.HMapIF.containsKey()

    for (int i = 0; i < size; i++) {
      float v = map.get(i);

      assertEquals(floats[i], v, 0.0f);
      assertTrue(map.containsKey(i));
    }
  }

  @Test
  public void testUpdate() {
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.