Package types

Examples of types.Alphabet.lookupObject()


              // if a middle character is labeled "B",
              // update the new end offset, create a token
              // annotation
              // and update the new start offset
              if (labels[j] == labelAlphabet.lookupObject("B")) {

                newEnd = start + j;
                outputAS.add(newStart, newEnd, labelType,
                    features);
                newStart = newEnd;
View Full Code Here


     
      if (labels.length == tokens.size()) {
       
        for (int i = 0; i < tokens.size(); i++) {
         
          if (labels[i] == labelAlphabet.lookupObject("B-NP")) {
            start = tokens.get(i).getStartNode().getOffset();
            end = tokens.get(i).getEndNode().getOffset();
           
            while ((i + 1 < tokens.size()) &&
                (labels[i + 1] == labelAlphabet.lookupObject("I-NP"))) {
View Full Code Here

          if (labels[i] == labelAlphabet.lookupObject("B-NP")) {
            start = tokens.get(i).getStartNode().getOffset();
            end = tokens.get(i).getEndNode().getOffset();
           
            while ((i + 1 < tokens.size()) &&
                (labels[i + 1] == labelAlphabet.lookupObject("I-NP"))) {
              end = tokens.get(i + 1).getEndNode().getOffset();
              i++;
            }
           
            outputAS.add(start, end, nChunkType, features);
View Full Code Here

            }
           
            outputAS.add(start, end, nChunkType, features);
          }
         
          else if (labels[i] == labelAlphabet.lookupObject("B-VP")) {
            start = tokens.get(i).getStartNode().getOffset();
            end = tokens.get(i).getEndNode().getOffset();
           
            while ((i + 1 < tokens.size()) &&
                (labels[i + 1] == labelAlphabet.lookupObject("I-VP"))) {
View Full Code Here

          else if (labels[i] == labelAlphabet.lookupObject("B-VP")) {
            start = tokens.get(i).getStartNode().getOffset();
            end = tokens.get(i).getEndNode().getOffset();
           
            while ((i + 1 < tokens.size()) &&
                (labels[i + 1] == labelAlphabet.lookupObject("I-VP"))) {
              end = tokens.get(i + 1).getEndNode().getOffset();
              i++;
            }
           
            outputAS.add(start, end, vChunkType, features);
View Full Code Here

      if (labels.length == tokens.size()) {

        for (int i = 0; i < tokens.size(); i++) {

          if (labels[i] == labelAlphabet.lookupObject("B-DAT")) {
            start = tokens.get(i).getStartNode().getOffset();
            end = tokens.get(i).getEndNode().getOffset();

            while ((i + 1 < tokens.size()) &&
                (labels[i + 1] == labelAlphabet.lookupObject("I-DAT"))) {
View Full Code Here

          if (labels[i] == labelAlphabet.lookupObject("B-DAT")) {
            start = tokens.get(i).getStartNode().getOffset();
            end = tokens.get(i).getEndNode().getOffset();

            while ((i + 1 < tokens.size()) &&
                (labels[i + 1] == labelAlphabet.lookupObject("I-DAT"))) {
              end = tokens.get(i + 1).getEndNode().getOffset();
              i++;
            }

            outputAS.add(start, end, datType, features);
View Full Code Here

            }

            outputAS.add(start, end, datType, features);
          }

          else if (labels[i] == labelAlphabet.lookupObject("B-LOC")) {
            start = tokens.get(i).getStartNode().getOffset();
            end = tokens.get(i).getEndNode().getOffset();

            while ((i + 1 < tokens.size()) &&
                (labels[i + 1] == labelAlphabet.lookupObject("I-LOC"))) {
View Full Code Here

          else if (labels[i] == labelAlphabet.lookupObject("B-LOC")) {
            start = tokens.get(i).getStartNode().getOffset();
            end = tokens.get(i).getEndNode().getOffset();

            while ((i + 1 < tokens.size()) &&
                (labels[i + 1] == labelAlphabet.lookupObject("I-LOC"))) {
              end = tokens.get(i + 1).getEndNode().getOffset();
              i++;
            }

            outputAS.add(start, end, locType, features);
View Full Code Here

            }

            outputAS.add(start, end, locType, features);
          }

          else if (labels[i] == labelAlphabet.lookupObject("B-ORG")) {
            start = tokens.get(i).getStartNode().getOffset();
            end = tokens.get(i).getEndNode().getOffset();

            while ((i + 1 < tokens.size()) &&
                (labels[i + 1] == labelAlphabet.lookupObject("I-ORG"))) {
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.