gurkult / gurkbot

Our community bot, used for running the server.
MIT License
18 stars 16 forks source link

Improved gurkanrate function #69

Closed v1nam closed 3 years ago

v1nam commented 3 years ago

Removed use of fuzzywuzzy completely, now function uses regex to check the span of string match and rate is decided based upon that

vivekashok1221 commented 3 years ago

Don't forget to resolve the conflicts in bot/constants.py :)

gustavwilliam commented 3 years ago

Hey @Akarys42, could you have a second look at this and see if your requested changes are addressed?

gustavwilliam commented 3 years ago

Has anyone tested this and can confirm that it not only works, but that the rates that appear make sense?

v1nam commented 3 years ago

I have tested it, i will do it one more time rn, and about the rates, it depends on how you want them to make sense, but to me its better than using fuzzywuzzy which will show 90% on the letter k, which is not the case here and we are using regex, so any name that doesnt match gurkan|urkan|gurk will have 0, i added gurkan in the regex too because if i just use gurk and urkan, so if someone has gurkan in there names the rate will be lower

gustavwilliam commented 3 years ago

It seems like this would make the steps more incremental. As long as it makes sense on most gurkan names (and non-gurkan ones), I’d be fine with doing it like this.

Could you try it with 5 random names (from our member list?) and post the results here, so I get get an overview of how it would perform.

v1nam commented 3 years ago

sure, i will do it in a second

v1nam commented 3 years ago

image image

v1nam commented 3 years ago

@gustavwilliam so basically, it checks if you have gurkan|urkan|gurk in your name, (in that order) and then the rate will be the span of of the match, (i.e if your match is gurkan span will be 6) divided by the length of your name

gustavwilliam commented 3 years ago

Hmmm okay. It looks slightly weird when UncomfyMelonGurkan only got 33.33% (also, round it to 33%).

uncomfyhalomacro commented 3 years ago

@gustavwilliam that is because i am wearing a disguise. i am actually a melon.

Shivansh-007 commented 3 years ago

Is this ready? We have got 3 approvals on this.

v1nam commented 3 years ago

@gustavwilliam is it necessary to round it? IMO decimals seem better :thinking:

gustavwilliam commented 3 years ago

I mean, that precision just looks weird. I don’t like the decimals

v1nam commented 3 years ago

Alright then, tbh I don't mind either way, and the decimals can be quite annoying sometimes