Examples of PunctuationToken


Examples of org.apache.ctakes.core.fsm.token.PunctuationToken

   * Called to check if the conditional meets the criteria defined by this
   * state.
   */
  public boolean satisfiedBy(Object conditional) {
    if (conditional instanceof PunctuationToken) {
      PunctuationToken t = (PunctuationToken) conditional;
      if (t.getChar() == iv_punctChar) {
        return true;
      }
    }

    return false;
View Full Code Here

Examples of org.apache.ctakes.core.fsm.token.PunctuationToken

      case Token.TYPE_WORD:
        WordToken wt = new WordTokenAdapter(t);
        baseTokens.add(wt);
        break;
      case Token.TYPE_PUNCT:
        PunctuationToken pt = new PunctuationTokenAdapter(t);
        baseTokens.add(pt);
        break;
      case Token.TYPE_NUMBER:
        if (t.isInteger()) {
          IntegerToken it = new IntegerTokenAdapter(t);
View Full Code Here

Examples of org.apache.ctakes.typesystem.type.syntax.PunctuationToken

        } else if (oldSystemTokenClass.equals(NumToken.class.getName()))
        {
          newGoldToken = new NumToken(goldView, oldSystemToken.getBegin(), oldSystemToken.getEnd());
        } else if (oldSystemTokenClass.equals(PunctuationToken.class.getName()))
        {
          newGoldToken = new PunctuationToken(goldView, oldSystemToken.getBegin(), oldSystemToken.getEnd());
        } else if (oldSystemTokenClass.equals(SymbolToken.class.getName()))
        {
          newGoldToken = new SymbolToken(goldView, oldSystemToken.getBegin(), oldSystemToken.getEnd());
        } else if (oldSystemTokenClass.equals(BaseToken.class.getName()))
        {
View Full Code Here

Examples of org.apache.ctakes.typesystem.type.syntax.PunctuationToken

      if (nta.getNumType() == TokenizerAnnotator.TOKEN_NUM_TYPE_INTEGER) {
        return new IntegerTokenAdapter(nta);
      }
      return new DecimalTokenAdapter(nta);
    } else if (obj instanceof PunctuationToken) {
      PunctuationToken pta = (PunctuationToken) obj;
      return new PunctuationTokenAdapter(pta);
    } else if (obj instanceof NewlineToken) {
      NewlineToken nta = (NewlineToken) obj;
      return new NewlineTokenAdapter(nta);
    } else if (obj instanceof ContractionToken) {
View Full Code Here

Examples of org.apache.ctakes.typesystem.type.syntax.PunctuationToken

      {
        return new DecimalTokenAdapter(nta);
      }
    } else if (obj instanceof PunctuationToken)
    {
      PunctuationToken pta = (PunctuationToken) obj;
      return new PunctuationTokenAdapter(pta);
    } else if (obj instanceof NewlineToken)
    {
      NewlineToken nta = (NewlineToken) obj;
      return new NewlineTokenAdapter(nta);
View Full Code Here

Examples of org.apache.ctakes.typesystem.type.syntax.PunctuationToken

        }
      }
    } else if (elementType == PunctuationToken.type) {
      while (neItr.hasNext()) {
        boolean foundPair = false;
        PunctuationToken nea = (PunctuationToken) neItr.next();
        if (nea.getCoveredText().compareTo("(")==0)
          lastLocation[0] = nea.getBegin();
        else if (nea.getCoveredText().compareTo(")")==0) {
          lastLocation[1] = nea.getEnd();
          foundPair = true;
        }
        if (nea.getBegin()>=begin && nea.getEnd() <= end && foundPair && (counter == || (counter> 0 && lastLocation[0] !=  location[counter - 1][0]))) {
          location[counter][0]= lastLocation[0];
          location[counter][1]= lastLocation[1];
          counter++;
        }
      }
View Full Code Here

Examples of org.apache.ctakes.typesystem.type.syntax.PunctuationToken

      }
    } else if (elementType == PunctuationToken.type) {
      while (neItr.hasNext()) {
        int holdBeginElement = 0;
        boolean foundPair = false;
        PunctuationToken nea = (PunctuationToken) neItr.next();
        if (nea.getCoveredText().compareTo("(")==0 || nea.getCoveredText().compareTo("[")==0)
          lastLocation[0] = nea.getBegin();
        else if (nea.getCoveredText().compareTo(")")==0 || nea.getCoveredText().compareTo("]")==0) {
          lastLocation[1] = nea.getEnd();
          foundPair = true;
        }
        if (holdBeginElement < nea.getBegin() && nea.getBegin()>=begin && nea.getEnd() <= end && foundPair) {
          location[counter][0]= lastLocation[0];
          location[counter][1]= lastLocation[1];
          counter++;
        }
      }
View Full Code Here

Examples of org.apache.ctakes.typesystem.type.syntax.PunctuationToken


      } else if (clas.equals(PunctuationToken.class)) {

    if (jcas!=null)
        token = new PunctuationToken(jcas, beginFromStartOfDocument, endFromStartOfDocument);
    else {
        token = new Token(beginFromStartOfDocument, endFromStartOfDocument);
        ((Token)token).setText(s.substring(begin, end));
    }
       
View Full Code Here

Examples of org.apache.ctakes.typesystem.type.syntax.PunctuationToken

        } else if (oldSystemTokenClass.equals(NumToken.class.getName()))
        {
          newGoldToken = new NumToken(goldView, oldSystemToken.getBegin(), oldSystemToken.getEnd());
        } else if (oldSystemTokenClass.equals(PunctuationToken.class.getName()))
        {
          newGoldToken = new PunctuationToken(goldView, oldSystemToken.getBegin(), oldSystemToken.getEnd());
        } else if (oldSystemTokenClass.equals(SymbolToken.class.getName()))
        {
          newGoldToken = new SymbolToken(goldView, oldSystemToken.getBegin(), oldSystemToken.getEnd());
        } else if (oldSystemTokenClass.equals(BaseToken.class.getName()))
        {
View Full Code Here

Examples of org.apache.ctakes.typesystem.type.syntax.PunctuationToken

      }
    } else if (elementType == PunctuationToken.type) {
      while (neItr.hasNext()) {
        int holdBeginElement = 0;
        boolean foundPair = false;
        PunctuationToken nea = (PunctuationToken) neItr.next();
        if (nea.getCoveredText().compareTo("(")==0 || nea.getCoveredText().compareTo("[")==0)
          lastLocation[0] = nea.getBegin();
        else if (nea.getCoveredText().compareTo(")")==0 || nea.getCoveredText().compareTo("]")==0) {
          lastLocation[1] = nea.getEnd();
          foundPair = true;
        }
        if (holdBeginElement < nea.getBegin() && nea.getBegin()>=begin && nea.getEnd() <= end && foundPair) {
          location[counter][0]= lastLocation[0];
          location[counter][1]= lastLocation[1];
          counter++;
        }
      }
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.