Giter Site home page Giter Site logo

gasparl / lextale Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 7.0 443 KB

LexTALE (EN, DE, NL, CH) in JavaScript and PsychoPy.

Home Page: https://gasparl.github.io/lextale/

License: BSD 2-Clause "Simplified" License

Python 45.13% HTML 14.42% JavaScript 34.56% CSS 4.77% PHP 1.12%
lextale lextale-ch web-application psychopy language english chinese german dutch

lextale's Introduction

LexTALE(_CH)

Web-based (HTML/JavaScript) and PsychoPy (Python) implementations of the original LexTALE (English, German, Dutch; Lemhöfer & Broersma, 2012) and LexTALE_CH (Mandarin Chinese; Chan & Chang, 2018).

The original three languages are also freely available at the official website (http://www.lextale.com/), but the present implementation has some advantages:

  • It's open source and thereby easy to modify for any specific uses online and offline (see below).
  • It does not automatically display the end results (so participants won't know it unless the experimenter allows it).
  • It records each response including response times. (And also records full test duration.)

As for LexTALE_CH, to my knowledge this is the first computerized implementation available for use.

HOW TO USE

The simplest way to use this application is via the "GitHub Pages" website of this repository itself: https://gasparl.github.io/lextale/. Just open it in a modern browser (practically anything except Internet Explorer), select the language and click START to begin the test.

Results

At the end of the test a simple text "The test is completed." is displayed. Results are not displayed automatically so that the tested persons would not see them if they are not supposed to. The summary as well as detailed (trial level) results can be accessed by simply double-clicking on this "The test is completed." text. (They are also written to the browser Console; and the detailed trial level data stored in the full_data variable also accessible via the Console.) On smartphones, long press can be used instead of double click – but generally this application is not optimized for mobile phones.

Download or Clone

The application can of course also be downloaded or forked/cloned via Git. E.g. simply use the green "Clone or download" button on this page chosing Download ZIP. After downloading, extract the zip file into a single folder. Open the index.html file in a browser, and it will work just as well as the online version, but with no need for active internet connection.

This way the code can also be modified for specific purposes. For example, you can add instructions in the participants' native language: just open the html file in any text editor and add your text next to (or in place of) the original instructions. As long as the tags and similar special characters are intact, the test will work just the same.

Another simple modification you can do is to remove start page selection options and select another default language to be tested. For this, in the html file (around the beginning), remove all the option labels between LexTALE: select language to be tested and START. In the main.js change the language code value 'en' in the initial line let lexlang = 'en'; to the desired language, e.g. let lexlang = 'nl'; for Dutch (see all options listed in a comment in the same line in the file).

If the modified version of the application is uploaded (forked/pushed/cloned) into a new GitHub repository, a webpage for the application may also be easily created using GitHub Pages (available under repository Settings).

Online studies

The present application is intended for in-lab use (i.e., where the participants come to you and complete the test on a computer on which you afterwards save the data). However, it can also be used online. For such a case, you need a server that supports some server-side code like PHP via which to save the data. GitHub for instance gives no such option, but universities typically have some free webspace with PHP support. As for the code, an example solution is given in the JavaScript function store_via_php() (in main.js) that uses the store.php file, storing the results as a single file; disabled (commented out) by default. To enable it, just add (or uncomment) it to the desired place in the JavaScript code. Crucially, this is not a full solution (I added this basic template only because of repeated requests, but I never used it): you would need to modify it to save each participant's data in a different file (e.g., give them a subject ID, and add it to the file name) or, if they are to be saved in the same file, a subject ID column in the data or such.

PsychoPy

To embed the LexTale into a PsychoPy task (which was my reason) or for extreme timing precision (which is hardly necessary), you can use the .py files. For this, you'll need PsychoPy 2 (ideal version: StandalonePsychoPy2-1.90.3) (not 3 or 2020+!). From this repository, you only need the one .py file for the specific language, e.g. LexTALE_en.py for English. Then you run that file from PsychoPy. (Note: I don't have Chinese version for PsychoPy, only English/German/Dutch.)

SUPPORT

If you find any problems, write an email or open a new issue.

(You can also contact me if you need another language implemented, though no promises.)

REFERENCES

Chan, I. L., & Chang, C. B. (2018). LEXTALE_CH: A quick, character-based proficiency test for Mandarin Chinese. In A. B. Bertolini & M. J. Kaplan (Eds.), Proceedings of the 42nd Annual Boston University Conference on Language Development, vol. 1 (pp. 114–130). Somerville, MA: Cascadilla Press. (Material from https://osf.io/qdy4n/)

Lemhöfer, K., & Broersma, M. (2012). Introducing LexTALE: A quick and valid Lexical Test for Advanced Learners of English. Behavior Research Methods, 44(2), 325–343. https://doi.org/10.3758/s13428-011-0146-0 (Material from http://www.lextale.com/)

If you want to cite this code source, please cite the study for which I originally implemented it:

Lukács, G., Kawai, C., Ansorge, U., & Fekete, A. (2022). Detecting concealed language knowledge via response times. Applied Linguistics Review. Advance online publication. https://doi.org/10.1515/applirev-2020-0130

DOI

lextale's People

Contributors

gasparl avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

lextale's Issues

Chinese items as text

Hi Gaspar Lukacs,

Do you maybe know where I can find the Chinese LexTALE items as text and not as an image?

Thanks in advance!

Cheers,
Pol

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.