Skip to content

About

lexsync is a cross-platform toolkit for psycholinguistics. It selects stimuli matched or controlled across several lexical dimensions, counterbalances them, and generates the experiment that presents them, with EEG triggers bound to stimulus onset on the laboratory targets. It ships as two structurally identical packages, one for R and one for Python, and the two select byte-identical stimuli under the deterministic matching methods.

What it is for

The tools in this area are capable but fragmented. Stimulus-control packages such as LexOPS, LIBRA and LASTU match words but stop before the experiment exists. Experiment builders such as PsychoPy and OpenSesame present stimuli but do not match them. The R and Python ecosystems rarely meet, and most matching tools target a single language. lexsync spans the whole path, from a many-language corpus through parallel multidimensional matching and counterbalancing to flip-locked experiment scripts, identically in both languages.

Beyond matching, it treats the stimulus set as a research artefact rather than a by-product. Each run emits a materials datasheet carrying its provenance, its checksums, the realised control with an effect size, a confidence interval and an equivalence test, and a pre-registration skeleton. A design is therefore something a reader can rerun.

How to cite

Cite the software. The authoritative record is CITATION.cff at the root of the repository, which GitHub also renders into several formats through the 'Cite this repository' button. The reference for the current version of the Python package is:

Bernabeu, P. (2026). lexsync: Lexical optimisation and hardware-timed experiment generation. Python package version 0.1.1. https://doi.org/10.5281/zenodo.22906962

@Manual{lexsync,
  title  = {{lexsync}: Lexical optimisation and hardware-timed experiment generation},
  author = {Pablo Bernabeu},
  year   = {2026},
  note   = {Python package version 0.1.1},
  doi    = {10.5281/zenodo.22906962},
  url    = {https://pypi.org/project/lexsync/},
}

Download .bib

A manuscript describing lexsync is in preparation, under the title lexsync: A cross-platform pipeline for multidimensional lexical optimisation and hardware-timed experiment generation. It is unpublished and has no venue as yet. Once it is accepted, CITATION.cff will name it as the preferred citation, and until then the software reference above is the one to use. It gives the Zenodo concept DOI, which archives every release of the repository and so covers the Python package, since PyPI assigns no DOI. The R package's reference gives the DOI that CRAN assigned to it, https://doi.org/10.32614/CRAN.package.lexsync, which resolves to that package's page. CITATION.cff describes both packages, so it gives the Zenodo DOI and lists each package's identifiers.

Cite the corpus as well. The software citation covers the tool, not the data it drew your items from, and the corpora are third-party work with their own terms. Every one is cited, with its licence and retrieval date, in corpora/ATTRIBUTION.md, and each run's datasheet records which source file it read and its SHA-256.

The developer

lexsync is developed by Pablo Bernabeu, a researcher in the Department of Education at the University of Oxford, with hands-on experience of behavioural experiments, EEG, corpus analysis, computational modelling and statistics. He develops open, reproducible research software in R and Python, and is a Fellow of the Software Sustainability Institute. His ORCID record lists his other work.

The two packages

This site documents the Python package, which is published on PyPI. The R package is documented at its own site and published on CRAN. The two are built from one repository and share one version number.

The R package Source on GitHub

Two browser front-ends also live in the repository, a Streamlit app over the Python engine and a Shiny app over the R engine. Each lets a researcher assemble a design without writing code and then exports the configuration and the one-line R, Python and command-line code that reproduces the run, so what the interface yields is a shareable artefact a reader can retrace. Both call their engine directly and need a local install, so neither is published beside this site. The app walks through the Streamlit one control by control, and apps/README.md covers launching either of them.

Licence

The source code is under the MIT licence. The bundled corpus derivatives are under CC BY-SA 4.0 and are not covered by it. See Licence for the text and the distinction.

Versioning and archival

lexsync follows semantic versioning, and each release is tagged on GitHub, with the R and the Python package carrying the same version. The R package is on CRAN, which keeps the source of every version it publishes and gave the package the DOI mentioned above. The Python package is on PyPI. Zenodo archives every GitHub release, which carries both packages, and its concept DOI, https://doi.org/10.5281/zenodo.22906962, always resolves to the latest one. The reference above cites it and names the version, so it identifies the release as well. The changelog records what changed in each release.

Contributing and support

Bug reports and feature requests belong on the issue tracker. A report that includes the design YAML and the run log is one someone can act on, since between them they pin the inputs and every step that ran. The contributing guide describes the development setup for both engines and the parity rule that governs every change, and everyone taking part is asked to honour the Code of Conduct.