Check a response with the distance function Demo Experiment Run Experiment

Check a response with the distance function

Jaap Murre

Shows how you can use the distance() function to check a response, allowing for a certain amount of error like typos.

This example shows how you can use the distance() function to check a response, allowing for a certain amount of error like typos. E.g., if the distance is 0, the response is perfect. If it is 1, there was one typo, etc. Formally, the Levenshtein Distance is used, see https://en.wikipedia.org/wiki/Levenshtein_distance.

If you are a registered user and signed in, you can here copy this script and its stimuli to your own account, where you can edit it and change it in any way you want.

It is absolutely free to register (no credit card info asked!). You can then instantly copy this experiment with one click and edit it, change its accompanying texts, its landing page, stimuli, etc. Invite your colleagues, friends, or students to check out your experiment. There is no limit on how many people can do your experiment, even with a free account.

The catch? There is no catch! Just keep in mind that with a free account, you cannot collect data. For teaching that is usually not a problem. For research, prepaid data collection (unlimited subjects) starts as low as €10.00 for a 10-day period.

text("Remember the following words");
await(3000);
text("chair");
await(1000);
clear();
await(2000);
text("a normal experiment would have more words here");
await(3000);
input("Type a word you remember","word");
text("Distance response with 'chair': " + distance(response.word,"chair"));
await(3000);
text("If the distance is 0, the response was perfect");
await(3000);
This experiment has no files of this type
This experiment has no files of this type
This experiment has no files of this type
This experiment has no YouTube links
This experiment has no files of this type