Aproximative string matching

2005-11-20 Thread javuchi
I'm searching for a library which makes aproximative string matching,
for example, searching in a dictionary the word "motorcycle", but
returns similar strings like "motorcicle".

Is there such a library?

-- 
http://mail.python.org/mailman/listinfo/python-list


Anyway to clarify this code? (dictionaries)

2005-11-22 Thread javuchi
I've been searching thru the library documentation, and this is the
best code I can produce for this alogorithm:

I'd like to return a dictionary which is a copy of 'another' dictionary
whoes values are bigger than 'x' and has the keys 'keys':

def my_search (another, keys, x):
temp = another.fromkeys(keys)
return dict([[k,v] for k in temp.keys() for v in temp.values()
if v>=x])

Is there any way to improve this code?
I want to avoid converting the dictionary to a list and then to a
dictionay. Are there speed penalties for such a conversion?

Bye.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Xah's Edu Corner: Examples of Quality Technical Writing

2005-12-14 Thread javuchi
Why do you have such a need of being hating everything and everybody
and expressing it so offen?
Can you live without hate?
Can you let others live without your hates?

-- 
http://mail.python.org/mailman/listinfo/python-list