Fixing merge_with method in Dictionary with validation code (see extended summary)

# global represents the dict derived from the complete corpus analyzed at once
dict_global = corpora.dictionary.Dictionary.load('global.dict')

# dict_f/g represent the dict derived from analyzing part of the complete corpus where f+g = complete corpus
dict_f = corpora.dictionary.Dictionary.load('f.dict')
dict_g = corpora.dictionary.Dictionary.load('g.dict'

merge_with(dict_f, dict_g)
dict_f.filter_extremes()
dict_f.compactify()

# CONSIDERING THE MERGED_DICT SHALL BE EQUIVALENT TO THE GLOBAL DICT, NO ERROR MESSAGE SHOULD APPEAR ON SCREEN.
for ids,token in dict_f.iteritems():
	if dict_f.dfs[ids] != dict_global.dfs[dict_global.token2id[token]]:
		ErrMsg = "Error at ID " + str(ids)
		paste(ErrMsg)

count = 0;
for ids, token in dict_global.iteritems():
	try:
		dict_f.token2id[token]
	except:
		count = count + 1;
		ErrMsg = "Error " +str(count) + " -- Unpresent token : " + token
		print(ErrMsg)