Examples of Token


Examples of uk.ac.cam.ch.wwmm.oscar3.recogniser.document.Token

        neByLastToken.put(ne.getLastToken(), ne);
      }
    }

    for(NamedEntity ne : entities) {
      Token prev = ne.getFirstToken().getNAfter(-1);
      Token next = ne.getLastToken().getNAfter(1);
      if(prev != null && next != null && prev.getValue().equals("(") && next.getValue().equals(")")) {
        Token prev2 = ne.getFirstToken().getNAfter(-2);
        if(prev2 != null) {
          String surf = ne.getSurface();
          if(surf.matches(".*[A-Z]s") || prev2.getValue().endsWith("s")) surf = surf.substring(0, surf.length()-1);
          List<String> featuresForAbbrev;
          if(abbrevFeatures.containsKey(surf)) {
            featuresForAbbrev = abbrevFeatures.get(surf);
          } else {
            featuresForAbbrev = new ArrayList<String>();
View Full Code Here

Examples of uk.ac.ucl.panda.utility.parser.Token

      curLexState = lexState;
}

protected Token jjFillToken()
{
   Token t = Token.newToken(jjmatchedKind);
   t.kind = jjmatchedKind;
   String im = jjstrLiteralImages[jjmatchedKind];
   t.image = (im == null) ? input_stream.GetImage() : im;
   t.beginLine = input_stream.getBeginLine();
   t.beginColumn = input_stream.getBeginColumn();
View Full Code Here

Examples of wyc.io.WhileyFileLexer.Token

        filename.length() - 7);
    WhileyFile wf = new WhileyFile(pkg.append(name), filename);

    skipWhiteSpace();
    while (index < tokens.size()) {
      Token lookahead = tokens.get(index);
      if (lookahead.kind == Import) {
        parseImportDeclaration(wf);
      } else {
        List<Modifier> modifiers = parseModifiers();
        checkNotEof();
View Full Code Here

Examples of wycs.io.WyalFileLexer.Token

    }
    return (byte) val;
  }

  private Attribute.Source sourceAttr(int start, int end) {
    Token t1 = tokens.get(start);
    Token t2 = tokens.get(end);
    // FIXME: problem here with the line numbering ?
    return new Attribute.Source(t1.start, t2.end(), 0);
  }
View Full Code Here

Examples of x.y.z.Token

    }
  }

  public void testIteratorGetsJCasType() throws Exception {
    try {
      Token tok1 = new Token(jcas);
      tok1.addToIndexes();
      FSIterator it = jcas.getJFSIndexRepository().getIndex("all", Token.type).iterator();
      while (it.hasNext()) {
        Token token = (Token) it.next();
        token.addToIndexes(); // something to do to keep Java from optimizing this away.
      }
    } catch (Exception e) {
      JUnitExtension.handleException(e);
    }
  }
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.