slg: Stimuli List Generator

Program for automatic genaration of stimuli lists with given parameters.

Description
Setup
Usage
Bug tracker
Download

Description

The program allows you:

  • automatically generate one stimuli list of given length with filters against categorical and/or numeric parameters
    For example, you have initial list of 200 verbs with the categorical parameter «instumentality» and the numeric parameters «frequency» and «imageability». From this list you can randomly generate a list of 30 instrumental verbs with the frequency from 35 to 100 and the imageability less than 3. Or, for example, a list of 40 verbs, 20 of them being instrumental and 20 being non-instrumental.
  • generate two lists using a filter and (optionally) choosing variables that should and should not differ between the lists
    For instance, you have the same list of 200 verbs with the categorical parameter “instrumentality” and numeric parameters “frequency” and “imageability”. From this lists you can generate two verb lists that differ in frequency (one list with high-frequency verbs and one with low-frequency verbs) that match on their imageability values.

Installation and running SLG

Windows

In case you use Windows OS and you do not have Python 2.7 installed on your machine, you can use the Windows installation package that you can download below. In this case you should do the following:

  • download and launch the installation package setup-slg-0.x.exe
  • choose the installation folder. Important: DO NOT choose a folder with administrator rights (e.g. C:\\Program Files). Te best option is just the root folder (e.g., D:\\slg)
  • make sure to tick “create desktop icon” box. The icon is necessary to launch the program.

To launch the program you need to double-click the desktop icon. The command line will appear, you can minimise it (without closing; it background runs the program). At the same time, a default browser window will launch with the address http://127.0.0.1/ and the program home screen. If you close the browser window, the program will still run, and you can enter this address again and continue. To close the program you need to close the command line window.

Linux

In case you use Linux, you can download the source code from the repository (see the link below). To run the program, you will need the following:

  • Python 2.7
  • Numpy, SciPy. You can install them with a command:
    $ pip install numpy scipy matplotlib ipython jupyter pandas sympy nose
  • Flask. You can install it with a command:
    $ pip install Flask

To run the program, you should go to the catalog with the main script app.py and launch it by typing in the terminal:
$ cd slg/slg/
$ python app.py

A default browser window will launch with the address http://127.0.0.1/ and the program home screen. If you close the browser window, the program will still run, and you can enter this address again and continue. To close the program, you should go back to the terminal and terminate the process by pressing ctrl + C.

Instructions

When you successfully run the program, follow the instructions in the interface. Follow these steps to generate lists:

  • on the first page, choose the number of lists you’d like to generate (1 or 2)
  • after you press далее the source data file will be read, and a message will pop up in case of an error
  • after that, a page with parameter selection will appear. The filters for numeric parameters work inclusively
  • on the third page, you choose the list size and a statistical test, if necessary. After the lists are generated, the .zip file will be saved to your browser’s default download folder

Creating your own source data file

To generate lists from your own source data file, you need to format it according to the following requirements:

  • the name of the file should be data.tsv, and it should be located at slg/slg/data/. Initially, there is a file with the same name that goes with the program; you should replace it
  • the file is a text document in the tsv format (tab-separated values) with utf-8 encoding. This means each line is a table line and the columns are tab-separated. The easiest way to create such a file is to create a table in a table editor (MS Excel, LibreOffice Calc) and copy it to a text editor
  • the name of the first column is always name; it contains names of the stimuli
  • the number of the columns and their names are optional
  • three variable types are permitted: categorical, float или int. The variable type is indicated in the second line of the column
  • float decimal is a dot
  • if a value is irrelevant for a stimulus you should put an NR in the cell (for example, instrumentality for nouns)

An example of a table:

name POS instrumentality frequency phonemes
categorical categorical float int
1. автобус (a bus) noun NR 64.8 7
2. автомат (a sub-machine gun) noun NR 56 7
3. бинтовать (bandage tr) verb on 0.7 8

Report a bug

Please report in detail the conditions under which the error occurred, your actions in the program at the time, and what data you were processing using the program, to the email address stimulidatabase@gmail.com.

Download links

Windows, installation package
Linux