Пример #1
0
def genphonerr(wurd):
	if wurd.isdigit(): return wurd # just rtn num if num## FUTURE: convert "6" to 'six' and run with that
	wurdcode = notquitesoundex(wurd) # the soundex alg's phonetic id looks like this: s0000
	err = wurdcode[0] # 
	#print 'wurdcode is ', wurdcode 
	wurdcode = wurdcode[1:] # only the numbers 
	#print 'wurdcode NOW is ', wurdcode 

	for w in wurdcode:
		err += getletter(w)
	return err
def genphonerr(wurd):
	if wurd.isdigit(): return wurd
	wurdcode = notquitesoundex(wurd) # the soundex alg's phonetic id looks like this: s0000
	err = wurdcode[0] # 
	#print 'wurdcode is ', wurdcode 
	wurdcode = wurdcode[1:] # only the numbers 
	#print 'wurdcode NOW is ', wurdcode 

	for w in wurdcode:
		err += getletter(w)
	return '['+err+']'