Target words preceded by a word randomly chosen among a specified set

PennController for IBEX Forums Support Target words preceded by a word randomly chosen among a specified set

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #8003


    I’m designing an experiment in which participants see the same target and filler words, but with these words preceded by (possibly) different prewords (please see below). For example, let’s say that I have two target words (discards, disclaimers) and two filler words (miscarried, misconceiving).

    – Each participant goes through four trials, one for each target/filler (i.e. discards, disclaimers, miscarried, misconceiving)
    – The target/filler words are always preceded by a randomly chosen preword. The target/filler words differ from each other in terms of which preword they can follow. For instance, “discards” can be preceded by one of “she”, “he”, or “it”; “miscarried” can only be followed by “she”.
    – For more specific hypothetical examples: Participant 1 sees “she miscarried”, “their disclaimers”, “it discards”, “they’re misconceiving”, and Participant 2 sees “their disclaimers”, “he discards”, “she miscarried”, “I’m misconceiving”, etc. The column “test_sentence” is what is presented to the participants.

    she,discards,she discards,target
    he,discards,he discards,target
    it,discards,it discards,target
    her,disclaimers,her disclaimers,target
    their,disclaimers,their disclaimers,target
    his,disclaimers,his disclaimers,target
    your,disclaimers,your disclaimers,target
    their,disclaimers,their disclaimers,target
    our,disclaimers,our disclaimers,target
    my,disclaimers,my disclaimers,target
    she,miscarried,she miscarried,filler
    she’s,misconceiving,she’s misconceiving,filler
    he’s,misconceiving,he’s misconceiving,filler
    they’re,misconceiving,they’re misconceiving,filler
    I’m,misconceiving,I’m misconceiving,filler
    you’re,misconceiving,you’re misconceiving,filler
    we’re,misconceiving,we’re misconceiving,filler

    I am having difficulty specifying in the script which target/filler is accompanied by which preword. Is there way to ensure some word is always preceded by a word that is randomly chosen among a specific set of words?

    Thank you!



    What I would do is have one line per item, and one column listing all the possible prewords for that item, separated by a specific character. For example, using . as the separating character, I would have this table:


    And then generate my trials like this:

    Template( "table.csv", row => 
      newTrial( "trial" ,
        prewords = row.prewords.split('.'),
        newText(prewords[0]+" "
      .log("preword", prewords[0])



    Hi Jeremy,

    This is working great. Thank you very much!!

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.