Skip to content

Picture Naming Task

This task is a modernized version of a classic neuropsychological task known as a "picture naming task", where an individual is presented with a set of pictures on sheets of paper and asked to name each of them (The "Boston Naming Test"1 being the most frequently used). The classic task is "fixed" in terms of the number of images and which images are shown. Classically, the number correct and the answer provided are recorded as a measurement. This expands on the classic version by allowing a user to add and remove stimuli as they deem necessary. Each stimulus also has a difficulty level associated with it. This allows for dynamic advancement and regression according to schedule set by the task administrator.

Table of Contents

Prerequisites

  1. Node.js and npm (if building from source)

Quick Start

  1. Download the latest release from GitHub releases
  2. Extract the files and navigate to the dist directory
  3. Start a local server: python -m http.server
  4. Open your browser to http://localhost:8000

Installation

  1. Go to the releases page
  2. Download the latest release
  3. Extract the archive - you'll find index.html in the dist directory

Option 2: Build from Source

  1. Clone the repository: git clone https://github.com/DouglasNeuroInformatics/PictureNamingTask.git
  2. Install dependencies: npm install
  3. Build the project: npm run build
  4. The built files will be in the dist directory

Running Locally

The recommended way to run this task locally is with a local HTTP server of your choice.

Using Python 3:

cd path/to/dist/directory
python -m http.server 8000

Configuration

Experiment Settings

Configure the task by editing src/experimentSettings.ts before building:

const experimentSettingsJson = {
  "totalNumberOfTrialsToRun": 5,
  "advancementSchedule": 2,
  "regressionSchedule": 0,
  "language": "fr",
  "seed": undefined,
  "initialDifficulty": 5,
  "numberOfLevels": 9,
  "downloadOnFinish": false,
}
export { experimentSettingsJson }
};
Parameter Type Description Default Valid Values
totalNumberOfTrialsToRun number Total number of trials to run 5 1+
advancementSchedule number Correct answers to advance level 2 1+
regressionSchedule number Incorrect answers to regress level 1 1+
language enum Task language "en" "en", "fr"
seed number Random seed for reproducibility null Any integer or null
initialDifficulty number Starting difficulty 5 1 to numberOfLevels
numberOfLevels number Total difficulty levels 9 1+
downloadOnFinish boolean Download results when finished false true, false

Integration with Open Data Capture

This task integrates with Open Data Capture for research data collection.

Setup in ODC Playground

  1. Visit the ODC Playground
  2. Upload a zip archive of all files from the src directory
  3. Or use our pre-configured instrument
  4. Upload bundle to your instance of ODC via the menu available on the playground

For more information on instruments, see the ODC documentation.

Customizing Stimuli

Stimuli Structure

Stimuli are added to the data.csv found in the dist/ directory as follows:

Currently there are nine directories with images corresponding to nine difficulty levels. These are located in dist/level1 ... dist/level9 if the dist was downloaded. In the source code they are located in the public directory.

example stimulus

{
  "stimulus": "path/to/img_of_a_dog.jpg",
  "difficultyLevel": 1,
  "correctResponse": "A dog",
  "language": "en",
}

Data output

The following pieces of data are recorded and downloaded in a .csv file at the end of session or sent to Open Data Capture.

Field Type Description Example Values
stimulus string The stimulus presented "/level1/dog.jpg", "/level2/table.jpg"
correctResponse string The correct reasponse "dog", "table"
difficultyLevel number Difficulty level when trial was presented 1, 2, 3, ..., 9
language string Language of the stimulus pair "en", "fr"
rt number Response time in milliseconds 1250, 2340, 5000
responseNotes string Additional notes about response "hesitated", "confident"
responseResult string Whether the response was correct "correct", "incorrect"
responseResultAsNumber string Numeric representation of result "1", "0"

Technical Details

Task Logic

  • Stimuli are randomly selected from the current difficulty level and the selected language
  • Adaptive algorithm adjusts difficulty based on performance

  1. Kaplan, E., Goodglass, H., & Weintraub, S. (2001). Boston naming test. The Clinical Neuropsychologist.