Welcome!

Sign in with your CogSci, Facebook, Google, or Twitter account.

Or register to create a new account.

We'll use your information only for signing in to this forum.

Supported by

help with a self_paced reading task

Hi everyone,

I am planning to create a self-paced reading task using Opensesame. In this experiment, participants will be presented with a number of sentences in Arabic. These sentences will be presented word-by-word. By pressing a particular key (possibly the space bar), the first word in the sentence appears. Each subsequent key-press reveals the next word in the sentence and hides the previous word. The response time is going to be logged for each word. Each sentence is followed by a (true/false) question.

Also, there will be a practical phase at the beginning of the experiment (4 items). The real experiment will be divided into three parts, separated by a break of one minute. Each part consists of 44 items. The 44 sentences will be randomised only with each other.

Sentences are of variable length

Can anyone help me with creating this experiment? Is it by creating four loops,(one for the practical phase and the other three for the experimental phase), each one consisting of an inline script, followed by an advanced delay for one minute in case of the experimental loops?

Where should I add the experimental variables? In the experimental loop or inside the inline script?

I really appreciate if someone could help me.

Comments

  • sebastiaansebastiaan Posts: 2,813

    Hi Mila,

    Here's my suggestion. First create an experiment with a simpler trial sequence:

    • Show the full sentence (i.e. all words separated by spaces)
    • Collect a keyboard response
    • Show the question
    • Collect another keyboard response

    This is quite straightforward, and you should be able to implement it after walking through the tutorials (or see how far you get, and then you can of course post specific questions when you get stuck).

    Once you have this simplified experiment, we can see how to modify it so that words are shown one at a time. That won't be very difficult either, but it goes slightly beyond the basic tutorial stuff.

    How does that sound?

    Cheers,
    Sebastiaan

    There's much bigger issues in the world, I know. But I first have to take care of the world I know.
    cogsci.nl/smathot

  • milamila Posts: 7

    Dear Sebastian,

    Thank you for your reply. I have done what you've suggested me to do, but when I run the experiment, Arabic characters were not connected. Is there any solution for this problem? I can't use images as the my experiment is so long.

    Thanks

  • milamila Posts: 7

    Hi Sebastian,

    Sorry for any inconvenience, but the problem of the non-connected Arabic characters is resolved.

    Now, could you please show me how to modify the experiment so that each word is presented in isolation?

    Thanks

  • sebastiaansebastiaan Posts: 2,813

    Good to hear that you managed to get the basic task up and running! It would be best if you attach your experiment to this discussion, so that I can see what you've done so far, and how to best implement the word-by-word presentation.

    There's much bigger issues in the world, I know. But I first have to take care of the world I know.
    cogsci.nl/smathot

  • milamila Posts: 7

    Thank you for your reply. I attached the experiment file with this post

  • milamila Posts: 7

    Hi Sebastian,
    If you have seen my experiment file, am I doing things correctly?

  • sebastiaansebastiaan Posts: 2,813

    Hi Mila,

    You're very close. I think you only need to replace the practice_stimuli and the following new_keyboard_response (make sure to give items useful names!) by a simple inline_script.

    In the Prepare tab you would then create a keyboard object and a list of canvas objects that each contain a single word:

    # Create a keyboard that only accepts a space
    my_keyboard = keyboard(keylist=['space'])
    # Create a list of canvas objects with one target each
    target_canvas_list = []
    for target in var.practice_stimuli.split():
        target_canvas = canvas()
        target_canvas.text(target)
        target_canvas_list.append(target_canvas)
    

    In the Run tab, you would then show each canvas object from this list, and register the space-bar-press response time to it:

    # Loop through the list of canvas objects, show them, collect a keypress, and
    # set the response time as an experimental variable
    for target_nr, target_canvas in enumerate(target_canvas_list):
        t0 = target_canvas.show()
        key, t1 = my_keyboard.get_key()
        var.set('response_time_%d' % target_nr, t1-t0)
    

    Do you see the logic? It's really quite simple. Note that you either need to change the reference var.practice_stimuli to make this work in the experimental loop, or (even better) just use the same variable for stimuli in both the practice and the experimental loop.

    See also:

    Cheers!
    Sebastiaan

    There's much bigger issues in the world, I know. But I first have to take care of the world I know.
    cogsci.nl/smathot

  • milamila Posts: 7

    Thank you very much for your reply. I really appreciate that. The experiment is running now as I want. However, there is still a problem. The Arabic sentences are read from right to left, but the words of each stimuli in this experiment are represented from left to right. That is, the last word from each stimuli is represented first, followed by the word preceding it, and so on. Is there any solution for this problem?

  • milamila Posts: 7

    The problem is resolved by using the reverse() function. Thanks a lot for your help.

  • sebastiaansebastiaan Posts: 2,813

    Great to hear that you figured it out!

    Thanked by 1mila

    There's much bigger issues in the world, I know. But I first have to take care of the world I know.
    cogsci.nl/smathot

Sign In or Register to comment.