Fun Share: Fuzzy Search with Roger Root Method

a recent query in the forum about fuzzy search prompted me to research on the topic and i found out that there are dozens of algorithms out there - one of the first ones was Soundex but it turned out to have many mismatches. i found one that seemed not too difficult to code in thunkable - it’s called Roger Root method.
this link brings up a PDF describing several algorithms - Roger Root, its description, pseudo code and examples can be found towards the end.

this demo shows what it can do.

all these names convert to the same roger_root code! even if they’re not spelled the same, they can be found to match - phonetically.

this block performs the above demo.

simply call the function to do compute the roger_root for any name, like this:

here is the link to the project. (NEW LINK)

if you feel you might need a (simple) fuzzy search in your project, feel free to use this.

(edit: - I uploaded a new project link)

Wow, this is great! I’ll try this! Thanks!

I guess I don’t understand how that results in something you can use for a fuzzy search. I would expect to type in a search term such as “san frasisco” and have it find “San Francisco.” What does the Roger Root value of 18000 have to do with finding search results?

The words in your list aren’t phonetic matches but I guess they are… approximations of each other?

Also, the PDF link takes me to this site and I’m not sure where to find the documentation you mentioned:

presumably, your reference table would have all rows populated with a new column containing the roger_root for that row’s key value. for example, your table may contain an entry for DAVIES (roger root=18000). now when your app receives an input for DAVEIS , presumably it would convert it to a roger_root code then it should return a list of possible matches (ie. rows with the same roger_root). i called them phonetic matches beause the algorithm takes into account that some consonants sound alike or that vowels other than the first are ignored beause they all sound like “uh”?

sorry about the bad link.
here’s the link to the file i uploaded to my google drive: