
Twin R and Python packages for selecting and matching lexical stimuli, counterbalancing lists, generating pseudowords, and writing PsychoPy, OpenSesame and jsPsych experiments, the first two with hardware-timed electroencephalography (EEG) triggers.
lexsync (Bernabeu, 2026a, 2026b) turns a lexical design into a checked set of stimuli and experiment files. It separates the candidate corpus from the design specification, reports whether matching and counterbalancing succeeded, and carries the resulting item table into PsychoPy, OpenSesame or jsPsych. The shared R/Python format makes the design inspectable before any presentation software is involved.
The repository also carries two browser front-ends over the same engines, a Shiny app for R and a Streamlit app for Python. Each assembles a design through the interface, runs the same pipeline as the packages and exports the code that reproduces it. Launch either one from the repository root, so that it finds the bundled corpora and the example item tables.
The main quality-control question for a set of lexical materials is whether the conditions remain comparable on the control variables chosen by the researcher. lexsync answers it as a claim of equivalence, testing each control against a bound fixed before selection, so a control passes only when its interval stays inside that bound. Figure 1 reports that test for the example design.

Save the design, the source lexicon, the matching report and the generated experiment together. Before any electroencephalography (EEG) recording, verify the exported timing, trigger codes, trial order and counterbalancing in the target presentation framework. The R documentation, Python documentation and companion blog post provide the complete workflow.
Bernabeu, P. (2026a). lexsync: Lexical optimisation and hardware-timed experiment generation (Version 0.1.0) [Computer software]. Comprehensive R Archive Network (CRAN). https://doi.org/10.32614/CRAN.package.lexsync
Bernabeu, P. (2026b). lexsync: Lexical optimisation and hardware-timed experiment generation (Version 0.1.1) [Computer software]. PyPI. https://pypi.org/project/lexsync/0.1.1/
Comments are provided by Disqus and are not loaded automatically. Loading them connects your browser to Disqus, which may use cookies and process data under its privacy policy. See this site's privacy notice for details.