I've been searching the documentation but I can't find any answers (perhaps I'm asking the wrong questions).
Say we have a list of animals: Sheep, Cow, Pig, Horse.
All of these animals have attributes (4 legs, etc.)
We have the name of the animal and the attributes stored (for now) as a list for each animal.
I would like to create a program that quickly finds how similar two animals are. E.g. "Compare sheep and cow" - from our list of attributes we get 4 legs, 2 eyes, etc.
Of course, I could do simple list comparison. But how else could I organise the data?
I was thinking perhaps of using a hashed database whereby the "animal" key points to the attributes. But how could I go about this in python?
I'm happy to use a MySQL database (I have the MySQldb module) but I'm just not sure how to organise this stuff.
Any help appreciated.