Create an annotated tag.
978686
def tag(self, tagname, message=None, force=True):
        """"""
        return git_tag(self.repo_dir, tagname, message=message, force=force)
701185
def tag(name, tag_name):
    

    with LOCK:
        # just to check if <name> exists
        metric(name)

        TAGS.setdefault(tag_name, set()).add(name)
601831
protected void appendTag(CharSequence tag) {
        final TagView newTag = new TagView(getContext(), TagView.STATE_NORMAL, tag);
        newTag.setOnClickListener(mInternalTagClickListener);
        addView(newTag);
    }
1050388
function Tag() {
        Model.apply(this, arguments);

        /** @member {TagKind} */
        this.kind = TK_STRING;

        /** @member {*} */
        this.value = '';

        /** @member {Model} */
        this.reference = null;

        /** @member {boolean} */
        this.checked = false;

        /** @member {number} */
        this.number = 0;

    }
656407
def p_annotation(self, p):
        ''''''

        if len(p) == 4:
            p[0] = ast.Annotation(p[1], p[3], lineno=p.lineno(1))
        else:
            p[0] = ast.Annotation(p[1], True, lineno=p.lineno(1))
1273213
public void addTag(String tag) {
        if (this.tags == null) {
            tags = new ArrayList<String>();
        }
        this.tags.add(tag);
    }
511264
def tag_start(self, tag, attrs=None):
        
        """
        return '<%s %s>' % (tag, self.build_attr(attrs)) if attrs else '<%s>' % tag
352421
function tagOutput(descriptor, innerDescriptor, name) {
	var out = '<' + name + innerDescriptor.attributes;
	if (innerDescriptor.style)
		out += ' style="' + innerDescriptor.style + '"';
	if (innerDescriptor.classes)
		out += ' class="' + innerDescriptor.classes + '"';
	if (innerDescriptor.children)
		descriptor.children += out + '>' + innerDescriptor.children + '</' + name + '>';
	else if (openTags.test(name))
		descriptor.children += out + '>';
	else if (strictTags.test(name))
		descriptor.children += out + '></' + name + '>';
	else
		descriptor.children += out + '/>';
}
1325690
def new_tag(self, name: str, category: str=None) -> models.Tag:
        """"""
        new_tag = self.Tag(name=name, category=category)
        return new_tag
84904
@Override
   public void tag(Annotation sentence) {
      SequenceInput<Annotation> sequenceInput = new SequenceInput<>(sentence.tokens());
      Labeling result = labeler.label(featurizer.extractSequence(sequenceInput.iterator()));
      for (int i = 0; i < sentence.tokenLength(); ) {
         if (result.getLabel(i).equals("O")) {
            i++;
         } else {
            Annotation start = sentence.tokenAt(i);
            String type = result.getLabel(i).substring(2);
            i++;
            while (i < sentence.tokenLength() && result.getLabel(i).startsWith("I-")) {
               i++;
            }
            Annotation end = sentence.tokenAt(i - 1);
            HString span = start.union(end);
            Annotation entity = sentence.document()
                                        .annotationBuilder()
                                        .type(annotationType)
                                        .bounds(span)
                                        .createAttached();
            entity.put(annotationType.getTagAttribute(),
                       annotationType.getTagAttribute().getValueType().decode(type));
         }
      }
   }
714082
public static function tag( $name, $param1 = null, $param2 = null ) 
	{
		return static::create( $name, $param1, $param2 );
	}
782571
def add_tag(self, name, value):
        

        self.tags.append(Tag(name, value))
1219548
def do_tag(self, args: argparse.Namespace):
        """"""
        # The Namespace always includes the Statement object created when parsing the command line
        statement = args.__statement__

        self.poutput("The command line you ran was: {}".format(statement.command_and_args))
        self.poutput("It generated this tag:")
        self.poutput('<{0}>{1}</{0}>'.format(args.tag, ' '.join(args.content)))
679885
def build_tag(self, tag, text='', attrs=None):
        
        """
        return '%s%s%s' % (self.tag_start(tag, attrs), text, self.tag_end(tag))
1058296
def make_tag(name, attrs, start_end=False):
    

    text = '<' + name

    if isinstance(attrs, dict):
        attr_list = attrs.items()
    elif isinstance(attrs, list):
        attr_list = attrs
    elif attrs is not None:
        raise TypeError("Unhandled attrs type " + str(type(attrs)))

    for key, val in attr_list:
        if val is not None:
            escaped = html.escape(str(val), False).replace('"', '&#34;')
            text += ' {}="{}"'.format(key, escaped)
    if start_end:
        text += ' /'
    text += '>'
    return flask.Markup(text)
861354
public AnnotatedSentence addAnnotation(String annotationName, Object value) {
    Map<String, Object> newAnnotations = Maps.newHashMap(annotations);
    newAnnotations.put(annotationName, value);
    return new AnnotatedSentence(words, posTags, newAnnotations);
  }
82873
def tag(self, name, attrs=None, selfclosing=None):
        """"""
        if self.disable_tags > 0:
            return

        if name in self.linkable_tags and attrs and len(attrs) > 0:
            for attrib in attrs:
                if attrib[0] in self.linkable_attrs:
                    attrib[1] = INTERNAL_LINK.sub('{\g<1>}', attrib[1])

        super().tag(name, attrs, selfclosing)