import copy


def merge_vocabulary(vocab1, vocab2):
    """
    Merges two vocabularies
    :param vocab1:
    :param vocab2:
    :return: merged vocab
    """

    merged = copy.deepcopy(vocab1)
    for key2 in vocab2.keys():
        if key2 not in merged:
            merged[key2] = len(merged)
    return merged