Randomize DashedSentence

PennController for IBEX Forums Support Randomize DashedSentence

This topic contains 2 replies, has 2 voices, and was last updated by Avatar adamliter 3 weeks, 6 days ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #4186
    Avatar
    adamliter
    Participant

    Is it possible to randomize the presentation of sentences using PCIbex’s randomize function with DashedSentence? I have not been able to find a straightforward way to do this. The following does not work:

    PennController.ResetPrefix(null);
    
    PennController.Template( randomize(PennController.GetTable("mystimuli.csv")) ,
        row => [
            "DashedSentence", {s: row.Sentence},
        ]
    );

    I’ve also tried this, which didn’t work, either:

    PennController.ResetPrefix(null);
    
    PennController.Sequence(randomize("DashedSentence"), "send");
    
    PennController.Template( PennController.GetTable("mystimuli.csv") ,
        row => [
            "DashedSentence", {s: row.Sentence},
        ]
    );
    
    PennController.SendResults("send");
    #4188
    Jeremy
    Jeremy
    Keymaster

    Hi Adam,

    The latter method is the correct one, you just need to properly label your items so you can refer to them in Sequence:

    PennController.ResetPrefix(null);
    
    PennController.Sequence( randomize("dashed") , "send" );
    
    PennController.Template( PennController.GetTable("mystimuli.csv") ,
        row => [
            "dashed", "DashedSentence", {s: row.Sentence},
        ]
    );
    
    PennController.SendResults("send");

    This will only work starting with PennController 1.4 though (newly created experiments on expt.pcibex.net currently come with version 1.5).

    NB: you don’t need to use GetTable if you’re not filtering your table, you can directly pass the string "mystimuli.csv" as the first argument of Template.

    Jeremy

    #4189
    Avatar
    adamliter
    Participant

    Ah, thanks, Jeremy! I really appreciate the quick response.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.