Raid Sub Manager

Raid Sub Manager

1.3k Downloads

Loose mode for character names?

elierotenberg opened this issue · 1 comments

commented

Hello! First thanks for this fantastic addon!

I often find myself in a situation where there's a slight typo in the character name, especially ones with exotic symbols (ỹ, ß etc).
Would it be possible to have a "loose" mode such that when a character name is not found, we try to match a close one, using e.g. Levenshtein distance sorting / threshold? e.g. if character name in addon is "Somebody" and real character name is "Sømebødỹ" (Levenshtein distance = 3).

I have no experience in writing WoW Addons but I could give it a shot.

commented

Hello, thanks for your message.

It can be possible to put it as option, because first at all we need to put the exactly same same as In Game.

As option we can do this like 'no accurate mode' but if the name is not same, all of functions will not work like invite, organize etc, if addon need to check every pseudo not found with nearest match, save it etc the memory can easly give up, plus the function can found a multiple nearest, need to check if one is valid, if it is, replace it in variable stored etc.

In levensthein distance within the both name given i got 7:

$str1 = 'Somebody';
$str2 = 'Sømebødỹ';
$result = levenshtein ($str1, $str2);
$result (var_dump):
int(7)

For resume in 'simple way' for the moment i dont know how to perform this & i dont know if levenstein exist for LUA(didn't checked yet) the Accurate player name given is very important for the whole functionnality of the AddOn.