Last week, I chatted with a lecturer who was quite impressed with H5P. He wondered if if was possible to use fuzzy answers within clozes aka Fill in the Blanks. It was not, but it's basically no big deal, so I implemented it this weekend. You can either get the source code at github (make sure to grab https://github.com/otacke/h5p-blanks/tree/fuzzy_comparison and the new library https://github.com/otacke/h5p-text-utilities as the latter might be also used for different stuff), or you can use the demo package that I attached to this post - but please beware of using this on a productive system!
I have not created a pull request yet, because I'd like to get your opinions on how to implement it best for the user. There's probably nothing to do for the front end (besides optional hints to the exact answer), but I wonder what would be the best way to make it easy for the teaching user to select the proper options. This could range from a simple on/off switch to even fine tuning details of the algorithms that I used, or even combining them. Right now, I aimed for something in between in the behavioral settings.
First, you can define a maximum number of operations that would be necessary for transforming the answer given to the correct one (deleting, inserting, exchanging or swapping a character). This option uses the Damerau-Levenshtein distance. For example, if you allow a maximum of 1 operation and the correct answer was "Einstein", it would also be okay to have a typo like "Einstien" where i and e are swapped. However, this wouldn't work for accepting "Schroedinger" instead of "Schrödinger", because 2 operations would be required, e.g. replacing the "o" with "ö" and deleting the "e".
Second, you can set a minimum threshold percentags of similarity for still counting as correct. This option uses the Jaro-Winkler distance. This would work given the "Schrödinger" vs. "Schroedinger" example above, but may have trouble in other cases that the previous method works better for.
For now, you can switch both options on and off. If using both, the given answer will be correct if at least one of both methods says it is.
Your ideas are welcome!