Adds a new Word to the sentence.
            Other Sentence._do_[tag] functions assume a new word has just been appended.
193946
def _do_word(self, word, lemma=None, type=None):
        
        # Improve 3rd person singular "'s" lemma to "be", e.g., as in "he's fine".
        if lemma == "'s" and type in ("VB", "VBZ"):
            lemma = "be"
        self.words.append(Word(self, word, lemma, type, index=len(self.words)))
461323
function add_action($tag, $function_to_add, $priority = 10, $accepted_args = 1)
	{
		if( is_callable($function_to_add) )
		{
			add_action($tag, $function_to_add, $priority, $accepted_args);
		}
	}
828989
def add_word(self, word, freq=None, tag=None):
        
        self.check_initialized()
        word = strdecode(word)
        freq = int(freq) if freq is not None else self.suggest_freq(word, False)
        self.FREQ[word] = freq
        self.total += freq
        if tag:
            self.user_word_tag_tab[word] = tag
        for ch in xrange(len(word)):
            wfrag = word[:ch + 1]
            if wfrag not in self.FREQ:
                self.FREQ[wfrag] = 0
        if freq == 0:
            finalseg.add_force_split(word)
146714
def new_sent(self, text, ID=None, **kwargs):
        '''  '''
        if ID is None:
            ID = next(self.__idgen)
        return self.add_sent(Sentence(text, ID=ID, **kwargs))
687325
def add_texts(self, reference_id, texts):
        
        self.add_words(reference_id, chain(*(self._tokenize(t) for t in texts)))
698860
public void addComment(String tag, String comment) {
        String nt = normaliseTag(tag);
        if(! comments.containsKey(nt)) {
            comments.put(nt, new ArrayList<String>());
        }
        comments.get(nt).add(comment);
    }
866589
def add(term)
      if !driver? && !@@changed.include?(self)
        @@changed << self
      end

      if @accum_param.is_a?(Proc)
        @value = @accum_param.call(@value, term)
      else
        add_by_symbol(term)
      end
    end
367816
def _add_new_labels(self, sentences):
        '''
        

        '''
        sentence_no = -1
        total_words = 0
        vocab = self.model.vocab
        model_sentence_n = len([l for l in vocab if l.startswith("DOC_")])
        n_sentences = 0
        for sentence_no, sentence in enumerate(sentences):
            sentence_length = len(sentence.words)
            for label in sentence.labels:
                total_words += 1
                if label in vocab:
                    vocab[label].count += sentence_length
                else:
                    vocab[label] = gensim.models.word2vec.Vocab(
                        count=sentence_length)

                    vocab[label].index = len(self.model.vocab) - 1
                    vocab[label].code = [0]
                    vocab[label].sample_probability = 1.
                    self.model.index2word.append(label)
                    n_sentences += 1
                    
        return n_sentences
1229101
def add_deferred_effect(self, effect, pos):
        
        if not isinstance(pos, (unicode, str)):
            raise Exception("Invalid POS tag. Must be string not %d" % (type(pos)))
        if self['speaker_model']['is_syntax_stacked'] == True:
            self.__dict__['deferred_effects'].insert(0,(pos, effect,))
        elif self['speaker_model']['is_syntax_stacked'] == False:
            self.__dict__['deferred_effects'].append((pos, effect,))
        else:
            raise Contradiction("Speaker Model undefined")
50425
def chain_add(word, next_word)
    markov_chains[word] ||= Hash.new(0)
    markov_chains[word][next_word] += 1
  end
999677
def add_words(self):
        

        data_blocks = len(self.buffer.getvalue()) // 8
        total_blocks = tables.data_capacity[self.version][self.error][0] // 8
        needed_blocks = total_blocks - data_blocks

        if needed_blocks == 0:
            return None

        #This will return item1, item2, item1, item2, etc.
        block = itertools.cycle(['11101100', '00010001'])

        #Create a string of the needed blocks
        return ''.join([next(block) for x in range(needed_blocks)])
1141361
def _add_phrase(cls, phrase, phrase_id, dictionary=None, word_list=None):
        
        # @Note: this function is called recursively
        if dictionary is None:
            dictionary = {}
        if len(phrase):
            current_word = phrase[0]
            # if word_list is not None and current_word not in word_list: #@TODO remove, words should already be ids
            #     word_list.add(current_word)
            if current_word not in dictionary:
                dictionary[current_word] = {}
            cls._add_phrase(phrase[1:], phrase_id, dictionary[current_word], word_list)
        else:
            dictionary[None] = phrase_id
        return dictionary
427994
def add_word(self, word):
        
        word_id = self.get_element_id(word)
        if word.getparent().tag in ('node', 'sentence'):
            parent_id = self.get_parent_id(word)
        else:
            # ExportXML is an inline XML format. Therefore, a <word>
            # might be embedded in weird elements. If this is the case,
            # attach it directly to the closest <node> or <sentence> node
            try:
                parent = word.iterancestors(tag=('node', 'sentence')).next()
                parent_id = self.get_element_id(parent)
            except StopIteration as e:
                # there's at least one weird edge case, where a <word> is
                # embedded like this: (text (topic (edu (word))))
                # here, we guess the sentence ID from the
                parent_id = self.get_element_id(word).split('_')[0]

        self.tokens.append(word_id)
        # use all attributes except for the ID
        word_attribs = self.element_attribs_to_dict(word)
        # add the token string under the key namespace:token
        token_str = word_attribs[self.ns+':form']
        word_attribs.update({self.ns+':token': token_str, 'label': token_str})
        self.add_node(word_id, layers={self.ns, self.ns+':token'},
                      attr_dict=word_attribs)
        self.add_edge(parent_id, word_id, edge_type=dg.EdgeTypes.dominance_relation)
        self.parse_child_elements(word)
843729
def add_text(self, reference_id, text):
        
        self.add_words(reference_id, self._tokenize(text))
855491
def append(self, text):
        
        cursor = QTextCursor(self._doc)
        cursor.movePosition(QTextCursor.End)
        cursor.insertBlock()
        cursor.insertText(text)
1232123
def appendText(self, text):
        '''
            
        '''
        # self.text is just raw string of the text
        self.text += text
        self.isSelfClosing = False # inner text means it can't self close anymo
        # self.blocks is either text or tags, in order of appearance
        self.blocks.append(text)
62334
def add_tags(self, *tags):
        
        self.tags.extend([
            Tag(name=tag) for tag in tags
        ])