Add textual information passed as dictionary.

        All pairs in dictionary will be written, but keys should be latin-1;
        registered keywords could be used as arguments.

        When called more than once overwrite exist data.
766218
def set_text(self, text=None, **kwargs):
        
        if text is None:
            text = {}
        text.update(popdict(kwargs, _registered_kw))
        if 'Creation Time' in text and\
                not isinstance(text['Creation Time'], (basestring, bytes)):
            text['Creation Time'] = datetime.datetime(
                *(check_time(text['Creation Time'])[:6])).isoformat()
        self.text = text
885557
def append(self, key, item):
        
        with self._lock:
            if key in self._dict:
                self._dict[key].append(item)
            else:
                self._dict[key] = [item]
938604
def write_text(self, data, encoding=None, errors=None):
        
        if not isinstance(data, six.text_type):
            raise TypeError(
                'data must be %s, not %s' %
                (six.text_type.__class__.__name__, data.__class__.__name__))
        with self.open(mode='w', encoding=encoding, errors=errors) as f:
            return f.write(data)
31212
def add_info (self, s):
        
        if s not in self.info:
            self.info.append(s)
320556
def __add_text(self, text):
        """"""
        if text is not None and not isinstance(text, six.text_type):
            raise TypeError('Local symbol definition must be a Unicode sequence or None: %r' % text)
        sid = self.__new_sid()
        location = None
        if self.table_type.is_shared:
            location = self.__import_location(sid)
        token = SymbolToken(text, sid, location)
        self.__add(token)
        return token
1038669
def addEntryText(self):
        
        if self.tableType():
            name = self.tableType().schema().displayName().lower()
            return 'add new {0}...'.format(name)
        return 'add new record...'
777492
public static void writeDictionary(NaaccrDictionary dictionary, Writer writer) throws IOException {
        try {
            instanciateXStream().marshal(dictionary, new NaaccrPrettyPrintWriter(dictionary, writer));
        }
        catch (XStreamException ex) {
            throw new IOException("Unable to write dictionary", ex);
        }
    }
467140
def add(self, txt, indent=0):
        
        
        if isinstance(txt, unicode):
            try:
                txt = str(txt)
            except UnicodeEncodeError:
                s = []
                for c in txt:
                    try:
                        s.append(str(c))
                    except UnicodeEncodeError:
                        s.append(repr(c))
                
                txt = ''.join(s)
        
        self.text.append( ' '*indent + txt )
1098510
def __write_text(self, outfile):
        
        for k, v in self.text.items():
            if not isinstance(v, bytes):
                try:
                    international = False
                    v = v.encode('latin-1')
                except UnicodeEncodeError:
                    international = True
                    v = v.encode('utf-8')
            else:
                international = False
            if not isinstance(k, bytes):
                k = strtobytes(k)
            if international:
                # No compress, language tag or translated keyword for now
                write_chunk(outfile, 'iTXt', k + zerobyte +
                            zerobyte + zerobyte +
                            zerobyte + zerobyte + v)
            else:
                write_chunk(outfile, 'tEXt', k + zerobyte + v)
1185943
def add(self, data, overwrite=False):
        

        if is_srec(data):
            self.add_srec(data, overwrite)
        elif is_ihex(data):
            self.add_ihex(data, overwrite)
        elif is_ti_txt(data):
            self.add_ti_txt(data, overwrite)
        else:
            raise UnsupportedFileFormatError()
913920
def add_text(self, text):
        
        for char in text:
            self.add_char(char)
        self.flush()
916389
protected function addDictionaryInformation()
    {
        $translations = [];
        $this->dictionary->removeAllEntries();
        $this->getDictionaryInformation($this->manialink, $translations);

        foreach ($translations as $msgId => $messages) {
            foreach ($messages as $message) {
                $this->dictionary->setEntry($message['Lang'], $msgId, htmlspecialchars($message['Text']));
            }
        }
    }
1056656
def Prepend(self, **kw):
        
        kw = copy_non_reserved_keywords(kw)
        for key, val in kw.items():
            # It would be easier on the eyes to write this using
            # "continue" statements whenever we finish processing an item,
            # but Python 1.5.2 apparently doesn't let you use "continue"
            # within try:-except: blocks, so we have to nest our code.
            try:
                orig = self._dict[key]
            except KeyError:
                # No existing variable in the environment, so just set
                # it to the new value.
                self._dict[key] = val
            else:
                try:
                    # Check if the original looks like a dictionary.
                    # If it is, we can't just try adding the value because
                    # dictionaries don't have __add__() methods, and
                    # things like UserList will incorrectly coerce the
                    # original dict to a list (which we don't want).
                    update_dict = orig.update
                except AttributeError:
                    try:
                        # Most straightforward:  just try to add them
                        # together.  This will work in most cases, when the
                        # original and new values are of compatible types.
                        self._dict[key] = val + orig
                    except (KeyError, TypeError):
                        try:
                            # Check if the added value is a list.
                            add_to_val = val.append
                        except AttributeError:
                            # The added value isn't a list, but the
                            # original is (by process of elimination),
                            # so insert the the new value in the original
                            # (if there's one to insert).
                            if val:
                                orig.insert(0, val)
                        else:
                            # The added value is a list, so append
                            # the original to it (if there's a value
                            # to append).
                            if orig:
                                add_to_val(orig)
                            self._dict[key] = val
                else:
                    # The original looks like a dictionary, so update it
                    # based on what we think the value looks like.
                    if SCons.Util.is_List(val):
                        for v in val:
                            orig[v] = None
                    else:
                        try:
                            update_dict(val)
                        except (AttributeError, TypeError, ValueError):
                            if SCons.Util.is_Dict(val):
                                for k, v in val.items():
                                    orig[k] = v
                            else:
                                orig[val] = None
        self.scanner_map_delete(kw)
751853
private void addDict(String word, String... poses){
		if(word.length() > MAX_LEN)
			MAX_LEN = word.length();
		if(word.length() < MIN_LEN)
			MIN_LEN = word.length();
		if(poses==null||poses.length==0){
			if(!dp.containsKey(word))
				dp.put(word, null);
			return;
		}

		for(int j = 0; j < poses.length; j++) {
			dp.put(word, poses[j]);
			
		}
	}
966592
def add(self, name, value):
        # type: (str, str) -> None
        """"""
        self._last_key = name
        if name in self:
            self._dict[name] = value
            self._as_list[name].append(value)
        else:
            self[name] = value
1249515
def insert(self, s):
        '''
        
        '''
        for c in s:
            self.text.insert(self.cursor_loc, c)
            self.cursor_loc += 1
573447
def add(self, key, item):
        """"""
        mmkeys = self.mmkeys
        if mmkeys is not None and not (key in self.data):
            # add abbreviations as short as minkeylength
            # always add at least one entry (even for key="")
            lenkey = len(key)
            start = min(self.minkeylength,lenkey)
            # cache references to speed up loop a bit
            mmkeysGet = mmkeys.setdefault
            for i in range(start,lenkey+1):
                mmkeysGet(key[0:i],[]).append(key)
        self.data[key] = item