💬

Community answer

Collected from the ACE community Discord archive around 2023-03-24. It may be informal or outdated — anyone can edit this page to improve it. Original discussion

Fuzzy-matching a nickname in chat

💬 GeneralUpdated 2 days ago•0 views
Use Levenshtein distance - it returns how many edits turn one string into another. Keep a nickname list, lowercase the input, find the closest match and accept …

How to detect when someone says my name with different spelling/pronunciation

Use Levenshtein distance - it returns how many edits turn one string into another. Keep a nickname list, lowercase the input, find the closest match and accept it if distance < threshold (e.g. 2). There's a ready implementation in lazy-lua's string.lua.

Was this article helpful?

See More

Discussion(0)

No comments yet. Be the first to ask a question!

Have a question? Sign in to join the discussion.