ramack / ActivityDiary

Android diary for any kind of activities
GNU General Public License v3.0
73 stars 37 forks source link

Detect Similar Activity Names #231

Closed Spartee closed 5 years ago

Spartee commented 5 years ago

Add in a JaroWinkler Similarity test adapted from this github repo to test for similarly named activities during activity creation.

Adds a JaroWinkler class in /helpers and a JaroWinklerTest class in test/helpers/

A new Query is created for the similarity test that is run when the text in the activity name textbox is changed. If the metric returns a 1.0(meaning the text entered is identical to a previously entered activity) then checkContraints is called so that the previous name checking functionality is not affected.

ramack commented 5 years ago

Thanks for the PR! I really appreciate it. And if the JaroWinkler algo outperforms the Levensthein, I am happy to replace that also for the existing search.

I did not forget you, but these days I have too much around in real life and at work to invest much time into free software like this one here. But I promise to come back to you! Sorry Sorry Sorry!

ramack commented 5 years ago

first of all sorry, that it took me so long, anyhow, these days look like I can put some more effort into ActivityDiary again, so your PR pops up.

Your code nicely detects similar names, but I see some issues:

ramack commented 5 years ago

I tried to sorting with the JaroWinkler and it seems to perfom very bad. So I suggest to keep the Levensthein for sorting and use the JaroWinkler only for similarity.