Adds a token object to the text layer
        @type wf_obj: L{Cwf}
        @param wf_obj: token object
327119
def add_wf(self,wf_obj):
        
        if wf_obj.get_id() in self.idx:
            raise ValueError("Text node (wf) with id {} already exists!"
                             .format(wf_obj.get_id()))
        self.node.append(wf_obj.get_node())
        self.idx[wf_obj.get_id()] = wf_obj
184896
def add_content(obj, language, slot, content):
    
    placeholder = obj.placeholders.get(slot=slot)
    add_plugin(placeholder, TextPlugin, language, body=content)
1079076
def add_term(self,term_obj):
        
        if self.term_layer is None:
            self.term_layer = Cterms(type=self.type)
            self.root.append(self.term_layer.get_node())
        self.term_layer.add_term(term_obj)
121305
def add_predicate(self, predicate_obj):
        
        if self.srl_layer is None:
            self.srl_layer = Csrl()
            self.root.append(self.srl_layer.get_node())
        self.srl_layer.add_predicate(predicate_obj)
866985
def __extend_token_object(self, token_object,
                              is_denormalize=True,
                              func_denormalizer=denormalize_text):
        # type: (TokenizedResult,bool,Callable[[str],str])->Tuple
        
        assert isinstance(token_object, TokenizedResult)

        if is_denormalize:
            if token_object.is_feature == True:
                if token_object.is_surface == True:
                    token = (func_denormalizer(token_object.word_surface), token_object.tuple_pos)
                else:
                    token = (func_denormalizer(token_object.word_stem), token_object.tuple_pos)
            else:
                if token_object.is_surface == True:
                    token = func_denormalizer(token_object.word_surface)
                else:
                    token = func_denormalizer(token_object.word_stem)
        else:
            if token_object.is_feature == True:
                if token_object.is_surface == True:
                    token = (token_object.word_surface, token_object.tuple_pos)
                else:
                    token = (token_object.word_stem, token_object.tuple_pos)
            else:
                if token_object.is_surface == True:
                    token = token_object.word_surface
                else:
                    token = token_object.word_stem

        return token
36690
def WrapCFTypeInPython(self, obj):
    
    obj_type = self.dll.CFGetTypeID(obj)
    if obj_type == self.dll.CFBooleanGetTypeID():
      return CFBoolean(obj)
    elif obj_type == self.dll.CFNumberGetTypeID():
      return CFNumber(obj)
    elif obj_type == self.dll.CFStringGetTypeID():
      return CFString(obj)
    elif obj_type == self.dll.CFDictionaryGetTypeID():
      return CFDictionary(obj)
    elif obj_type == self.dll.CFArrayGetTypeID():
      return CFArray(obj)
    else:
      raise TypeError('Unknown type for object: {0}'.format(obj))
414806
def visitObjectMacro(self, ctx: jsgParser.ObjectExprContext):
        
        name = as_token(ctx)
        self._context.grammarelts[name] = JSGObjectExpr(self._context, ctx.membersDef(), name)
337094
def add_layer(self, obj=None):
        
        new_layer = Layer()
        if obj:
            new_layer.merge(obj)
        self.layers.append(new_layer)
923510
void advanceContextToNextPortableToken(int factoryId, int classId, int version) throws IOException {
        cd = serializer.setupPositionAndDefinition(in, factoryId, classId, version);
        initFinalPositionAndOffset(in, cd);
    }
1118202
def _add_token_span_to_document(self, span_element):
        
        for token in span_element.text.split():
            token_id = self._add_token_to_document(token)
            if span_element.tag == 'act':  # doc can have 0+ acts
                self._add_spanning_relation('act_{}'.format(self.act_count),
                                            token_id)
            else:  # <intro> or <conclu>
                self._add_spanning_relation(span_element.tag, token_id)
        if span_element.tag == 'act':
            self.act_count += 1
870480
def add_token(self, token):
        
        token = self.process_token(token)
        self._token_count.update([token])
1334068
private void addTokens(List<AnalyzedToken> taggedTokens, List<AnalyzedToken> l) {
    if (taggedTokens != null) {
      for (AnalyzedToken at : taggedTokens) {
        l.add(at);
      }
    }
  }
1061542
def addNotation(self, obj):
        '''
        
        '''
        add = True
        wrap_notation = [
            Arpeggiate,
            NonArpeggiate,
            Slide,
            Glissando,
            Mark.Caesura,
            Mark.BreathMark,
            GraceNote]
        # method to handle addition of notation: done here to avoid repetitive
        # code in main parser
        if isinstance(obj, Ornaments.Tremolo) or isinstance(obj, Tuplet):
            if isinstance(obj, Ornaments.Tremolo):
                options = {1: 2, 2: 4, 3: 8}
                if hasattr(obj, "value"):
                    self.trem_length = options[obj.value]
            if hasattr(obj, "type"):
                if isinstance(obj, Ornaments.Tremolo) and obj.type != "single":
                    self.trem_length *= 2
                if obj.type == "stop":
                    self.closing_notation.append(obj)
                else:
                    self.prenotation.append(obj)
                return
            else:
                self.prenotation.append(obj)
                return
        if type(obj) in wrap_notation:
            if type(obj) == Slide and not hasattr(obj, "lineType"):
                self.postnotation.append(obj)
                return
            else:
                self.wrap_notation.append(obj)
                return
        if hasattr(obj, "type") and len(self.postnotation) > 0:
            duplicate_check = [
                True for thing in self.postnotation if hasattr(
                    thing,
                    "type") and thing.type == obj.type]
            if len(duplicate_check) > 0:
                add = False
        if len(self.postnotation) == 0 or add:
            self.postnotation.append(obj)
314894
private void insertSpan(TokenImageSpan tokenSpan) {
        CharSequence ssb = tokenizer.wrapTokenValue(tokenToString(tokenSpan.token));

        Editable editable = getText();
        if (editable == null) return;

        // If we haven't hidden any objects yet, we can try adding it
        if (hiddenContent == null) {
            internalEditInProgress = true;
            int offset = editable.length();
            //There might be a hint visible...
            if (hintVisible) {
                //...so we need to put the object in in front of the hint
                offset = prefix.length();
            } else {
                Range currentRange = getCurrentCandidateTokenRange();
                if (currentRange.length() > 0) {
                    // The user has entered some text that has not yet been tokenized.
                    // Find the beginning of this text and insert the new token there.
                    offset = currentRange.start;
                }
            }
            editable.insert(offset, ssb);
            editable.insert(offset  + ssb.length(), " ");
            editable.setSpan(tokenSpan, offset, offset + ssb.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
            internalEditInProgress = false;
        } else {
            CharSequence tokenText = tokenizer.wrapTokenValue(tokenToString(tokenSpan.getToken()));
            int start = hiddenContent.length();
            hiddenContent.append(tokenText);
            hiddenContent.append(" ");
            hiddenContent.setSpan(tokenSpan, start, start + tokenText.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
            updateCountSpan();
        }
    }
930203
private void addToken(final List<String> list, String tok) {
        if (StringUtils.isEmpty(tok)) {
            if (isIgnoreEmptyTokens()) {
                return;
            }
            if (isEmptyTokenAsNull()) {
                tok = null;
            }
        }
        list.add(tok);
    }
431070
def add_tags(self, tags):
        
        # SQLA Adding a SymbolTag object, feels awkward/uneccessary.
        # Should I be implementing this functionality a different way?

        if isinstance(tags, (str, unicode)):
            tags = [tags]

        objs = object_session(self)
        tmps = [SymbolTag(tag=t, sym=self) for t in tags]
        objs.add_all(tmps)
        objs.commit()
809866
def add_object(self, obj):
        
        return self.add_bucket_key_data(obj._bucket._name, obj._key, None)