Greasy Fork is available in English.
A script that helps you guess words in skribblio
< Părere la script-ul WordSleuth
Here is the idea. Not sure if the code works, I never ran it.
function removeDissimilarWords(filterWord, wordList) {
var filteredList = [];
for (var i = 0; i < wordList.length; i++) {
var word = wordList[i];
if (filterWord.length !== word.length) {
continue;
}
var diffCount = 0;
for (var j = 0; j < filterWord.length; j++) {
if (filterWord[j] !== word[j]) {
diffCount++;
if (diffCount > 1) {
break;
}
}
}
if (diffCount <= 1) {
filteredList.push(word);
}
}
return filteredList;
}
// Example
var filterWord = "hit";
var wordList = ["hit", "him", "hot", "fit", "hey", "got", "day"];
var filteredWords = removeDissimilarWords(filterWord, wordList);
console.log(filteredWords);
Thank you for the suggestion. I have implemented it and added observable hints to the chat. You can see how I did it by checking the history tab on GreasyFork. I utilized a technique called the Levenshtein distance to efficiently measure the difference between the strings.
When guessing in chat, a message saying "[word] is close!" might appear. It seems to happen when the guessed word is only one letter away from the correct word.
You might be able to use this message to narrow down suggestions by learning the conditions for triggering the message.