Closed Spartee closed 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!
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:
Copyright (C) 2017 Thibault Debatty
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.
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 intest/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.