PennController for IBEX › Forums › Support › Target words preceded by a word randomly chosen among a specified set › Reply To: Target words preceded by a word randomly chosen among a specified set
April 3, 2022 at 10:23 pm
#8005
Jeremy
Keymaster
Hi,
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:
prewords,target,type she.he.it,discards,target her.their.his.your.our.my,disclaimers,target she,miscarried,filler she's.he's.they're.I'm.you're.we're,misconceiving,filler
And then generate my trials like this:
Template( "table.csv", row => newTrial( "trial" , prewords = row.prewords.split('.'), fisherYates(prewords) , newText(prewords[0]+" "+row.target).print() , newButton("Next") .print() .wait() ) .log("preword", prewords[0]) .log("target", row.target) )
Jeremy