Performs pos-tagging on the given tcas object.
196221
@Override
  public void process(CAS tcas) {

    final AnnotationComboIterator comboIterator = new AnnotationComboIterator(tcas,
        this.sentenceType, this.tokenType);

    for (AnnotationIteratorPair annotationIteratorPair : comboIterator) {
      
      final List<AnnotationFS> sentenceTokenAnnotationList = new LinkedList<AnnotationFS>();

      final List<String> sentenceTokenList = new LinkedList<String>();
      final List<String> additionalContextList = new LinkedList<String>();

      for (AnnotationFS tokenAnnotation : annotationIteratorPair.getSubIterator()) {

        sentenceTokenAnnotationList.add(tokenAnnotation);

        sentenceTokenList.add(tokenAnnotation.getFeatureValueAsString(lexemeFeature));
        
        additionalContextList.add(tokenAnnotation.getFeatureValueAsString(additionalContextFeature));
      }
      
      String[] toks = sentenceTokenList.toArray(new String[sentenceTokenList.size()]);
      
      String[][] additionalContext = new String[toks.length][2];
      
      int i = 0;
      for (String ac : additionalContextList) {
        if(ac != null) {
          if(ac.equals("P")) {
            additionalContext[i][1] = ac;
          } else {
            additionalContext[i][0] = ac;
          }
        }
        i++;
      }
      
      final List<String> posTags = Arrays.asList(this.posTagger.tag(toks, additionalContext));

      double posProbabilities[] = null;

      if (this.probabilityFeature != null) {
        posProbabilities = this.posTagger.probs();
      }

      final Iterator<String> posTagIterator = posTags.iterator();
      final Iterator<AnnotationFS> sentenceTokenIterator = sentenceTokenAnnotationList.iterator();

      int index = 0;
      while (posTagIterator.hasNext() && sentenceTokenIterator.hasNext()) {
        final String posTag = posTagIterator.next();
        final AnnotationFS tokenAnnotation = sentenceTokenIterator.next();

        tokenAnnotation.setStringValue(this.posFeature, posTag);

        if (posProbabilities != null) {
          tokenAnnotation.setDoubleValue(this.posFeature, posProbabilities[index]);
        }

        index++;
      }

      // log tokens with pos
      if (this.logger.isLoggable(Level.FINER)) {

        final StringBuilder sentenceWithPos = new StringBuilder();

        sentenceWithPos.append("\"");

        for (final AnnotationFS token : sentenceTokenAnnotationList) {
          sentenceWithPos.append(token.getCoveredText());
          sentenceWithPos.append('\\');
          sentenceWithPos.append(token.getStringValue(this.posFeature));
          sentenceWithPos.append(' ');
        }

        // delete last whitespace
        if (sentenceWithPos.length() > 1) // not 0 because it contains already the " char
          sentenceWithPos.setLength(sentenceWithPos.length() - 1);
        
        sentenceWithPos.append("\"");

        this.logger.log(Level.FINER, sentenceWithPos.toString());
      }
    }
  }
1327488
def tags(self):
        """"""
        tags = self.pos_tags
        for i, tag in enumerate(self.ner_tags):
            if tag is not None:
                tags[i] = tag
        return tags
730828
def supports_tagging(obj):
    
    if isinstance(obj, type):
        return issubclass(obj, SupportTagging)

    if not isinstance(obj, SupportTagging):
        return False

    if obj.id is None:
        return False

    return True
1262686
public void tagPOS(List<CoreLabel> tokens, Tree tree) {
        try {
            List<TaggedWord> posList = tree.getChild(0).taggedYield();
            for (int i = 0; i < tokens.size(); i++) {
                String pos = posList.get(i).tag();
                tokens.get(i).setTag(pos);
            }
        } catch (Exception e) {
            tagPOS(tokens); // At least gives you something.
            LOG.warn("POS Failed:\n" + tree.pennString());
        }
    }
119423
private static TagList getMonitorTags(Object obj) {
    try {
      Set<Field> fields = getFieldsAnnotatedBy(obj.getClass(), MonitorTags.class);
      for (Field field : fields) {
        field.setAccessible(true);
        return (TagList) field.get(obj);
      }

      Set<Method> methods = getMethodsAnnotatedBy(obj.getClass(), MonitorTags.class);
      for (Method method : methods) {
        method.setAccessible(true);
        return (TagList) method.invoke(obj);
      }
    } catch (Exception e) {
      throw Throwables.propagate(e);
    }

    return null;
  }
238289
def _handle_tag_definetext2(self):
        """"""
        obj = _make_object("DefineText2")
        self._generic_definetext_parser(obj, self._get_struct_rgba)
        return obj
1186258
public void setDescriptionAlignment(final Pos ALIGNMENT) {
        if (null == descriptionAlignment) {
            _descriptionAlignment = ALIGNMENT;
            fireTileEvent(REDRAW_EVENT);
        } else {
            descriptionAlignment.set(ALIGNMENT);
        }
    }
1110748
public static TypeAnnotationPosition
        methodRef(final List<TypePathEntry> location,
                  final JCLambda onLambda,
                  final int pos) {
        return new TypeAnnotationPosition(TargetType.METHOD_REFERENCE, pos,
                                          Integer.MIN_VALUE, onLambda,
                                          Integer.MIN_VALUE, Integer.MIN_VALUE,
                                          location);
    }
793933
def translate(self, pos):
        
        self.matrix = np.dot(self.matrix, transforms.translate(pos[0, :3]))
502023
def pos_detect(str)
      raise ArgumentError, 'str must be a String' unless str.is_a?(String)

      j_instance.sentPosDetect(str).map do |span|
        OpenNlp::Util::Span.new(span.getStart, span.getEnd)
      end
    end
898679
def pos(self, element = None):
		'''  '''

		tags = []
		if element:
			if re.search('[\w|\s]+ [m|f]\.', element, re.U):
				tags.append('NN')
			if '[VERB]' in element:
				tags.append('VB')
			if 'adj.' in element and re.search('([\w|\s]+, [\w|\s]+)', element, re.U):
				tags.append('JJ')
		else:
			for element in self.elements:
				if element.startswith(self.word):
					tags += self.pos(element)
		return list(set(tags))
795407
def _confirm_pos(self, pos):
        """"""
        candidate = None
        if self._get_node(self._treelist, pos) is not None:
            candidate = pos
        return candidate
1088848
def handle_tags(repo, **kwargs):
    """"""
    log.info('tags: %s %s' %(repo, kwargs))
    return [str(t) for t in repo.tags(**kwargs)]
782375
public void note(int pos, Note noteKey) {
        report(diags.note(source, wrap(pos), noteKey));
    }
1231071
def set(self, tclass, tnum, tlvt=0, tdata=''):
        """"""
        if not isinstance(tdata, str):
            raise TypeError("tag data must be str")

        self.tagClass = tclass
        self.tagNumber = tnum
        self.tagLVT = tlvt
        self.tagData = tdata
773376
private void parseArgs(MessageArgsParser parser) {
    while (tag.peek() != Chars.EOF) {
      tag.skip(COMMA_WS);

      // Look for the argument key
      if (!tag.seek(IDENTIFIER, choice)) {
        return;
      }

      // Parse the <key>(:<value>)? sequence
      String key = choice.toString();
      tag.jump(choice);
      if (tag.seek(ARG_SEP, choice)) {
        tag.jump(choice);
        if (tag.seek(ARG_VAL, choice)) {
          tag.jump(choice);
          parser.set(key, choice.toString());
        } else {
          parser.set(key, "");
        }
      } else {
        parser.set(key, "");
        if (!tag.seek(COMMA_WS, choice)) {
          return;
        }
      }
    }
  }
682400
public void show (Popups.Position pos, Widget target)
    {
        Popups.show(this, pos, target);
    }