I migrated the question.
Your problem essentially boils down to a clustering and classification problem.
If you knew the categories beforehand, then it would be a classification issue (e.g. naive Baysean classifier, k-nearest-neighbor).
In this case, you don't, so it's a clustering problem (e.g. k-means clustering). You want to group like things together without actually knowing what those like things are.
Regardless, these topics are covered extensively on Cross Validated, as their tags page currently indicates (both
classification are currently on the first page of tags).
The fact that you want to do it "in software" doesn't make it more suitable for Stack Overflow. Your first problem is that you aren't sure what to do, Cross Validated will help you figure that out.
When you figure out the what, then I'd recommend a new question on Stack Overflow if you have issues with the how.
Note, I don't dislike the question, I rather like statistics questions; it was migrated because I knew that the community there is more focused on problems such as this (and yes, they use software/code to solve them) and believe that it's presence there would get you a better result, given that you have more of a problem with the approach than actual code.
P.S. I burninated the jeopardy tag before migrating that question; it had six questions it was applied to and has no real reason (currently) to exist on Stack Overflow.