将另一个字典的内容合并进来。
<p>
Merge the words from another dictionary into this one.

@param dict	将要被合并进来的另一个字典
<br>The other dictionary that will be merged into this one.
176615
public void merge(Dictionary dict){
		for (Word word: dict.getWords().values()){
			addWord(word, true);
		}
	}
938196
def merge_dicts(dict1, dict2):
    
    tmp = dict1.copy()
    tmp.update(dict2)
    return tmp
729207
def _merge_metadata(self_or_cls, obj, fn, *dicts):
        
        merged = dict([(k,v) for d in dicts for (k,v) in d.items()])
        return dict(merged, **fn(obj)) if fn else merged
1101593
private static void registerMorse(Character abc, String dict) {
		alphabets.put(Integer.valueOf(abc), dict);
		dictionaries.put(dict, Integer.valueOf(abc));
	}
1279764
def combine_dicts(*args, **kwargs):
    
    dicts = [arg for arg in args if isinstance(arg, dict)]
    dicts.append(kwargs)
    super_dict = collections.defaultdict(dict)

    for d in dicts:
        for k, v in iteritems(d):
            if k:
                super_dict[k] = v
    return dict(super_dict)
960133
public void setDictionary(Dictionary dict, boolean isSetSegDict)   {
		removeDictionary(isSetSegDict);
		if(cws != null && isSetSegDict)
			cws.setDictionary(dict);
		dictPipe = null;
		dictPipe = new DictPOSLabel(dict, labels);
		oldfeaturePipe = featurePipe;
		featurePipe = new SeriesPipes(new Pipe[] { dictPipe, featurePipe });
		LinearViterbi dv = new ConstraintViterbi(
				(LinearViterbi) getClassifier().getInferencer(),labels.size());
		getClassifier().setInferencer(dv);
	}
1311284
public static <T> Iterable<T> merge(Iterable<T>... iterables)
    {
        return merge(null, iterables);
    }
1366199
def combine_dictionaries(a, b):
    

    c = {}
    for key in list(b.keys()): c[key]=b[key]
    for key in list(a.keys()): c[key]=a[key]
    return c
919758
def merge(self, dct=None, **kwargs):
        
        if dct is None:
            dct = {}
        if kwargs:
            dct.update(**kwargs)

        for key, value in dct.items():
            if all((
                    isinstance(value, dict),
                    isinstance(self.get(key), Configuration),
                    getattr(self.get(key), "__merge__", True),
            )):
                # recursively merge
                self[key].merge(value)
            elif isinstance(value, list) and isinstance(self.get(key), list):
                # append
                self[key] += value
            else:
                # set the new value
                self[key] = value
212624
def merge_dicts(a, b, path=None):
    
    if path is None:
        path = []

    for key in b:
        if key in a:
            if isinstance(a[key], dict) and isinstance(b[key], dict):
                merge_dicts(a[key], b[key], path + [str(key)])
            elif a[key] == b[key]:
                pass  # same leaf value
            else:
                raise Exception(
                    'Conflict at %s' % '.'.join(path + [str(key)]))
        else:
            a[key] = b[key]
    return a
1256798
def deep_merge_dict(a, b):
    """"""
    if not isinstance(a, dict):
        raise TypeError("a must be a dict, but found %s" % a.__class__.__name__)
    if not isinstance(b, dict):
        raise TypeError("b must be a dict, but found %s" % b.__class__.__name__)

    _a = copy(a)
    _b = copy(b)

    for key_b, val_b in iteritems(_b):
        # if it's a sub-dictionary
        if isinstance(val_b, dict):
            if key_b not in _a or not isinstance(_a[key_b], dict):
                _a[key_b] = {}

            # perform the deep merge recursively
            _a[key_b] = deep_merge_dict(_a[key_b], val_b)
        else:
            _a[key_b] = val_b

    # b should now be deep-merged into a
    return _a
818256
private void merge(Map<String, NodeT> source, Map<String, NodeT> target) {
        for (Map.Entry<String, NodeT> entry : source.entrySet()) {
            String key = entry.getKey();
            if (!target.containsKey(key)) {
                target.put(key, entry.getValue());
            }
        }
    }
1333664
def merge(d, *dicts):
    

    for d_update in dicts:
        if not isinstance(d, dict):
            raise TypeError("{0} is not a dict".format(d))

        dict_merge_pair(d, d_update)

    return d
376554
def merge_dictionaries(a, b):
  """"""
  res = {}
  for k in a:
    res[k] = a[k]
  for k in b:
    res[k] = b[k]
  return res
1020429
def _dict_merge_right(dict_left, dict_right, merge_method):
    """"""
    new_dict = deepcopy(dict_left)
    for key, value in dict_right.items():
        if key not in new_dict:
            new_dict[key] = value
        else:
            recurse = (merge_method == 'take_right_deep' and
                       isinstance(dict_left[key], dict) and
                       isinstance(dict_right[key], dict))
            if recurse:
                new_dict[key] = dict_merge(dict_left[key],
                                           dict_right[key],
                                           merge_method='take_right_deep')
            else:
                new_dict[key] = value
    return new_dict
800951
def merge(self, other):
        
        if not isinstance(other, DictCell):
            raise Exception("Incomparable")
        if self.is_equal(other):
            # pick among dependencies
            return self
        elif other.is_entailed_by(self):
            return self
        elif self.is_entailed_by(other):
            self.__dict__['p'] = other.__dict__['p'].copy()
        elif not self.is_contradictory(other):
            # partial information in both, add from other
            for o_key, o_val in other:
                if not o_key in self.__dict__['p']:
                    self.__dict__['p'][o_key] = o_val
                else:
                    self.__dict__['p'][o_key].merge(o_val)
        else:
            raise Contradiction("Dictionaries are contractory, cannot Merge")
        return self
23955
def merge_dicts(dict_a, dict_b):
    """"""
    obj = {}
    for key, value in iteritems(dict_a):
        if key in dict_b:
            if isinstance(dict_b[key], dict):
                obj[key] = merge_dicts(value, dict_b.pop(key))
        else:
            obj[key] = value

    for key, value in iteritems(dict_b):
        obj[key] = value

    return obj