Displaying recent text Input
Hi, i'm trying to design an experiment using OS. As part of the experiment, a list of word is displayed to the subjects, then they are presented with a free recall task - using a loop-sequence they have to input as many words as they can recall, one word at time (in a text input form).
After that, i'd like to be able to display to the subjects the words they correctly recalled and then ask them to describe why they think they were able to recall each word (again one at a time is fine).
Bottom line:
1. How can i access the words just typed in by the subjects?
2. How can i validate these words (by comparison to the original list, to make sure the word was actually on it)?
3. How can i display to the subjects (say in a sketchpad), each word correctly recalled?
Thanks in advance!!
Comments
I am sorry but your description of the task is a bit confusing. From what I read I can understand that:
1. You're displaying a list of words
2. You ask them to sequentially input as many words they can remember
3. Then sequentially display them words that were recalled correctly and ask them why they think they could recall it.
Let's break up the above problems.
1. You can use the sketchpad item to display the words. You can put these words in a loop item and then display then display it sequentially. See this: https://osdoc.cogsci.nl/3.2/tutorials/beginner/.
2. Now inorder to take response from them you have to use a text input form. First go through this: https://osdoc.cogsci.nl/3.2/manual/forms/custom/
Then this: https://osdoc.cogsci.nl/3.2/manual/forms/widgets/#text_input-textinput
The former link gives you the idea as to how to create a form in OS and the later link introduce you to text input form.
3. This one would require the python coding. A piece of code to match the words entered by the participant. Its not difficult however, I am not sure which variable in the text input form stores the response from the participant may be @sebastiaan can guide us here. Once we match the words that have been correctly entered we can use another python code to display those correctly recalled words sequentially to them
This link can help us: https://osdoc.cogsci.nl/3.2/tutorials/advanced/#step-9-create-rsvp-stream-prepare-phase
Hope this gives you some idea
Thanks
Vatsal
Hi @vatsalthebest , thanks for your help, and sorry about the confusion.
I managed to build my experiment as i wanted, except now i encountered a new problem, how can i check if the input to the text input form was blank?
I tried with an inline script, using codes:
if not var.form_var:
var.myWord = var.myWord.append(form_var)
if var.form_var != None:
var.myWord = var.myWord.append(form_var)
(form_var is the variable for the input form, myWord an array to store the words recalled.)
but neither seem to work.
Thanks
Avi
I am afraid I am stuck at the first place. That is I can't find what variable the text inputs are stored.
I urge @eduard or @sebastiaan could help you out in this.
I read on the forum that 'stub' is the variable that shows whether text input was empty or there was an entry there.
Sorry I couldn't help you
Vatsal
Hi Avi,
How far did you get already? If you share your experiment, we can probably help you more straightforwardly.
https://osdoc.cogsci.nl/3.2/manual/forms/variables/#text_input
The
varkeyword takes the variable that you want to use to access the text input. So if you set `var = 'input_resp', this will be the word that was put in.I suppose every text input is in a loop/sequence structure, right? If you do so, add an inline_script to that sequence in which you put this (or similar) code:
Once you have the list with correct words, you can loop over it and present those words in a sketchpad, one by one, or you can just draw all of them on the same canvas, maybe even a form. Depending on your experiment, the implementation can look very different.
Hope this helps,
Eduard