06/29/17 Notes (Trying to find a way to merge using sequence matcher)
Still working on similarity function.
- To use as a reference, I am going to measure the similarity between the names Torri couldn’t get to appear because one name had a space on the end and the other didn’t. That way, I can test to see if the similarity function works.
- Here are the names I tested and their similarity:
- Cierra Black, .96
- Raynaia Gilchrist, .9714285714285714
- I’m going to use .96
- I tried a command that I found online. It uses difflib’s get_close_matches to find comparable items in two strings, then the person joined the two files. Here is what I typed (I didn’t try to merge yet, I just wanted to see which names the code would mark as similar.
- import difflib
difflib.get_close_matches
ConfidenceS14['Full Name'].index = ConfidenceS14['Full Name'].index.map(lambda x: difflib.get_close_matches(x, Attendance['Full Name'].index)[0])
- This gave me an error
Comments
Post a Comment