Millisecond Forums

Extracting words for encoding word list out of a pool

https://forums.millisecond.com/Topic21763.aspx

By xxPsyWWUxx - 6/1/2017

Hello. 

In my experiment I am presenting a word list of 9 words. This word list should consist of three words of three different categories (3x3). These words should be extracted out of a pool of words (three pools for each of the categories). The position of words should be randomised. 

I tried a lot, but nothing worked so far. 
Thank you for your help. 


By Dave - 6/2/2017

xxPsyWWUxx - Friday, June 2, 2017
Hello. 

In my experiment I am presenting a word list of 9 words. This word list should consist of three words of three different categories (3x3). These words should be extracted out of a pool of words (three pools for each of the categories). The position of words should be randomised. 

I tried a lot, but nothing worked so far. 
Thank you for your help. 



Set up a <list> containting the item numbers comprising each "pool of words". Select the requisite amount of item numbers from each pool /onexptbegin and store the respective item numbers in a master list. Use that master list for selection.

<item allitems>
/ 1 = "Category A Item 01"
/ 2 = "Category A Item 02"
/ 3 = "Category A Item 03"
/ 4 = "Category A Item 04"

/ 5 = "Category B Item 01"
/ 6 = "Category B Item 02"
/ 7 = "Category B Item 03"
/ 8 = "Category B Item 04"

/ 9 = "Category C Item 01"
/ 10 = "Category C Item 02"
/ 11 = "Category C Item 03"
/ 12 = "Category C Item 04"
</item>


<text mytext>
/ items = allitems
/ select = list.masterlist.nextvalue
</text>

// will be populated with item numbers /onexptbegin
<list masterlist>

</list>

// items 1 to 4 are category A
<list cat_a_itemnumbers>
/ items = (1,2,3,4)
/ selectionrate = always
</list>

// items 5 to 8 are category B
<list cat_b_itemnumbers>
/ items = (5,6,7,8)
/ selectionrate = always
</list>

// items 9 to 12 are category C
<list cat_c_itemnumbers>
/ items = (9,10,11,12)
/ selectionrate = always
</list>

<trial mytrial>
/ stimulusframes = [1=mytext]
/ validresponse = (57)
</trial>

<block myblock>
/ trials = [1-6 = mytrial]
</block>

// select 2 random item numbers from category A
// select 2 random item numbers from category B
// select 2 random item numbers from category C
<expt>
/ onexptbegin = [
    list.masterlist.appenditem(list.cat_a_itemnumbers.nextvalue);
    list.masterlist.appenditem(list.cat_a_itemnumbers.nextvalue);

    list.masterlist.appenditem(list.cat_b_itemnumbers.nextvalue);
    list.masterlist.appenditem(list.cat_b_itemnumbers.nextvalue);

    list.masterlist.appenditem(list.cat_c_itemnumbers.nextvalue);
    list.masterlist.appenditem(list.cat_c_itemnumbers.nextvalue);
]
/ blocks = [1=myblock]
</expt>