Frappe similar string method?

I’m building a custom app for Frappe. I need a way to compare some strings to sort them by similarity.

Before I write my own algorithm to do this, does Frappe have a built-in method for this?