Grammaticality judgment template
Last updated
Last updated
To install this experiment template, use the command pushkin install experiment
, then select grammaticality.
When correctiveFeedback is set to true
: the two-alternative forced choice question will indicate if the participant's response was correct (in green font) or not (in red font). For the likert scale or slider, text indicating if the sentence was grammatical or ungrammatical will show. For all response types, when this is set to false, a fixation cross appears instead of corrective feedback.
responseType: Set whether the response type is two-alternative forced choice (set to "2afc"), five-point likert scale (set to "likert"), or a slider from 0-100 (set to "slider").
sentence_grammatical: The grammatically correct sentence.
sentence_ungrammatical: The grammatically incorrect sentence.
If you have installed an experiment using the grammaticality judgment experiment template and called it gram
, you should have a directory called gram
in your experiments folder. This directory should be structured like this:
In order to customize your simple grammaticality judgment experiment, you will need to access two files, config.js
and stim.js
. These files can be found in web page/src/
, a directory that looks like this:
config.js
This file controls the aesthetics of your experiment, including font color, font size, and font family. If you wanted to set the font color to green
, set the font size to 24px
, and set the font family to a monospace font such as Courier New, you would modify config.js
as follows:
You'll notice that 'Courier New'
is not fontFamily
's only specification. This is because it's important to list backup fonts in case your preferred font can't be loaded. You can read more about this practice here and see other CSS font combination ideas here.
You'll also notice that correctiveFeedback
is set to true
. You can change this to false
so that participants don't receive any feedback. Once you make this change, your config.js
should look like this:
By default, responseType
is set to 2afc
. You can change this to likert
or slider
to change the response type to a 5-item likert scale or a slider from 0-100. If you wanted to use a likert scale, your final config.js
should look like this:
You can run pushkin prep
and pushkin start
to see your changes.
stim.js
This file controls the stimuli presented to participants. It specifies the sentences for each trial and denotes which is grammatical (sentence_grammatical) and which is not (sentence_ungrammatical).
Say you have created the following table of stimuli for your experiment.
In order to be able to use these stimuli in the grammaticality judgment experiment, you must use a table-to-JSON converter such as this one to format it correctly for jsPsych.
Once it has been converted, paste the JSON into the stim.js
file. You may need to manually add spaces, as the file should now look like this:
Run pushkin prep
and pushkin start
again, and your experiment should be ready to go!
sentence_grammatical | sentence_ungrammatical |
---|---|
The frog is jumping.
The frog are jumping.
Where did she go?
Where she did go?
He went for a walk.
He went a walk.
This is an example.
This an example.