3
$\begingroup$

I have a data set in which users have input free text (think "APPLE", "Apple", "apple", "appl") and I'm trying to group the input by response type (e.g. organize all of the preceding examples by "Apple"). What's the best way to do this in Python?

$\endgroup$
2
  • 1
    $\begingroup$ Define "by response type"? $\endgroup$
    – Sean Owen
    Commented Dec 21, 2015 at 22:46
  • $\begingroup$ Just updated the question to reflect what I'm looking for. Let me know if that clarifies things. $\endgroup$
    – user14910
    Commented Dec 22, 2015 at 0:03

1 Answer 1

1
$\begingroup$

That is called "entity resolution" or "record linkage". It is a very hard problem.

If it all possible, I would try to add "type ahead" to the form. That would encourage users to select already used categories.

fuzzywuzzy is a Python package for approximate string matching.

dedupe is "a Python library that uses machine learning to perform fuzzy matching, deduplication, and entity resolution quickly on structured data."

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.