merge_machine/custom_name_parsing.py
def validatedLexiconMap(lexicon, isFirst, tokenize = False): 
	''' Returns a dictionary from normalized string to list of original strings. '''
	lm = defaultdict(list)
	for s in lexicon:
		k = normalizeAndValidatePhrase(s, isFirst) if tokenize else caseToken(s)
		if k is None: continue
		lm[k].append(s)
	return lm
 Returns a dictionary from normalized string to list of original strings. 
Returns a dictionary from normalized string to list of original strings.
Returns a dictionary from normalized string to list of original strings .
def validatedLexiconMap(lexicon, isFirst, tokenize = False): 
	lm = defaultdict(list)
	for s in lexicon:
		k = normalizeAndValidatePhrase(s, isFirst) if tokenize else caseToken(s)
		if k is None: continue
		lm[k].append(s)
	return lm
def validatedLexiconMap ( lexicon , isFirst , tokenize = False ) : lm = defaultdict ( list ) for s in lexicon : k = normalizeAndValidatePhrase ( s , isFirst ) if tokenize else caseToken ( s ) if k is None : continue lm [ k ] . append ( s ) return lm
Returns a dictionary from normalized string to list of original strings.
Returns a dictionary from normalized string to list of original strings .
''' Returns a dictionary from normalized string to list of original strings. '''
lexicon
isFirst
tokenize