Package: lexsync 0.2.0

Pablo Bernabeu

lexsync: Lexical Optimisation and Hardware-Timed Experiment Generation

A cross-platform toolkit for lexical-corpus access (bundled English, Spanish and Mandarin lexica and a registry of citable corpora), the matching of stimuli on several dimensions at once, deterministic pseudoword generation, counterbalancing and the automated generation of experiments from a declarative trial-event model, for 'PsychoPy', 'OpenSesame' and the browser ('jsPsych'). The laboratory targets send electroencephalography onset triggers on the screen refresh that shows the stimulus. Several paradigms are supported (factorial word contrasts, lexical decision, priming, self-paced reading and cued categorisation), and each design is accompanied by a materials datasheet, readable by machines and people, for reproducibility. A 'Python' package of the same name has the same structure and functions.

Authors:Pablo Bernabeu [aut, cre]

lexsync_0.2.0.tar.gz
lexsync_0.2.0.zip(r-4.7-any)lexsync_0.2.0.zip(r-4.6-any)
lexsync_0.2.0.tar.gz(r-4.7-any)lexsync_0.2.0.tar.gz(r-4.6-any)
lexsync_0.2.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
lexsync/json (API)

# Install 'lexsync' in R:
install.packages('lexsync', repos = c('https://cran.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/pablobernabeu/lexsync/issues

Pkgdown/docs site:https://pablobernabeu.github.io

On CRAN:

Conda:

3.85 score 351 downloads 51 exports 29 dependencies

Last updated from:d13c996ace. Checks:6 OK. Indexed: no.

TargetResultTimeFilesSyslog
linux-develOK193
source / vignettesOK200
linux-releaseOK158
windows-develOK170
windows-releaseOK144
wasm-releaseOK114

Exports:add_bigram_frequencyadd_neighbourhoodadd_pair_overlapassign_triggersbalance_checkbalance_listsbuild_datasheetbuild_lexdec_stimulibuild_poolcohens_dcohens_d_cicount_syllablescounterbalancedescribe_stimulidesign_stemexport_experimentsexport_jspsychexport_opensesameexport_psychopyfetch_corpusgenerate_pseudowordslexsync_cache_clearlexsync_cache_dirlist_corporaload_itemsload_lexiconload_poollog_artefactlog_stepmake_pseudowordmatch_reportmatch_report_continuousmatch_stimulimerge_normsmethods_paragraphnew_run_lognormalise_lexiconPARADIGMSparticipant_tablerequired_fieldsresample_stimuliresolve_eventsresolve_trial_timingrun_allrun_pipelineselect_continuous_stimulitost_equivvalidate_designvariance_ratiowrite_datasheetwrite_run_log

Dependencies:bitbit64clicliprcpp11crayondigestgluehmsjsonlitelifecyclemagrittrpillarpkgconfigprettyunitsprogressR6readrrlangstringdiststringitibbletidyselecttzdbutf8vctrsvroomwithryaml

About
Citing lexsync | Citing the corpus | The developer | The two packages | Licence | Versioning and archival | Contributing and support

Last update: 2026-11-22
Started: 2026-09-22

Experiments, paradigms and EEG triggers
The trial-event model | When a response is collected | Instructions and the response mapping | Content and field references | Triggers on an event | Timing that varies from trial to trial | The paradigm registry | Trial orders and runs of one condition | Balanced list assignment | Practice, fillers and feedback | The three presentation targets | Running a counterbalanced experiment | Trigger timing and the flip lock | Checking the timing | Adding a paradigm | References

Last update: 2026-11-22
Started: 2026-09-22

Getting started with lexsync
Define and run a design | Anatomy of a design file | The keys | What is checked before a run | Running one | Inspect the match quality | Generate the experiment scripts | Where next | References

Last update: 2026-11-22
Started: 2026-09-22

Matching, dimensions and designs
The lexical dimensions | Computing dimensions on a pool | Pool filters | Choosing and screening a lexicon | Supplied item pools | Relational designs, where the item is a pair | Conditions, the anchor and matched sets | The four matching methods | The parity caveat on two methods | Ties between equally close candidates | Tolerance windows | Continuous designs | Reading the realised control | Pseudowords | Items as a random factor | References

Last update: 2026-11-22
Started: 2026-09-22

References

Last update: 2026-11-22
Started: 2026-09-22

Reproducibility, parity and the materials datasheet
What is guaranteed | How byte-identical output is achieved | Trial order: a seeded shuffle without a generator | The CSV input contract | The YAML input contract | The Unicode input contract | File names | The documented exceptions | The parity test | The materials datasheet | The methods paragraph and the pre-registration template | The run log | Reproducing a run | References

Last update: 2026-11-22
Started: 2026-09-22

The app
Launching it | The sidebar | Describing the design | A factorial word contrast | Lexical decision | Priming and self-paced reading | Running it | Reading the results | What you leave with | References

Last update: 2026-11-22
Started: 2026-09-22

Readme and manuals

Help Manual

Help pageTopics
Mean bigram probability (type-based, non-positional), a phonotactic-probability proxyadd_bigram_frequency
Compute orthographic-neighbourhood dimensions (Coltheart's N and OLD20)add_neighbourhood
Orthographic overlap between the two members of each pairadd_pair_overlap
Assign EEG trigger codes to stimuliassign_triggers
Check that the levels of given columns occur equally oftenbalance_check
Assign item sets to counterbalancing lists so the lists match on the item dimensionsbalance_lists
Assemble the materials datasheet for one designbuild_datasheet
Assemble a lexical-decision set of words and pseudowords from a candidate poolbuild_lexdec_stimuli
Build an experimental candidate pool by filtering a lexiconbuild_pool
Cohen's d (pooled-SD standardised mean difference)cohens_d
Cohen's d with a confidence interval, complementing the TOST verdictcohens_d_ci
Orthographic syllable estimate: the number of maximal vowel runscount_syllables
Assign stimuli to lists and a randomised, reproducible trial ordercounterbalance
Per-group descriptive statistics for several dimensionsdescribe_stimuli
The stem every file a design writes is named afterdesign_stem
Export all presentation targets (PsychoPy, OpenSesame and jsPsych)export_experiments
Export a browser-runnable jsPsych experimentexport_jspsych
Export a complete plain-text OpenSesame experimentexport_opensesame
Export a runnable PsychoPy script that interprets the event sequenceexport_psychopy
Download a registered corpus into the cachefetch_corpus
A length-matched pseudoword for each base wordgenerate_pseudowords
Remove fetched corpora from the cachelexsync_cache_clear
Per-user cache directory for fetched corporalexsync_cache_dir
List the corpora known to the registrylist_corpora
Load a paradigm item table (such as prime-target pairs or sentences)load_items
Load a lexicon from a CSV fileload_lexicon
Load a supplied candidate pool of words and give it the matcher's dimensionsload_pool
Record a written artefact (path, rows, fingerprint) in the loglog_artefact
Append a step to a run loglog_step
The most bigram-plausible legal non-word at the smallest edit distancemake_pseudoword
Build the full match-quality reportmatch_report
Realised-control report for a continuous designmatch_report_continuous
Match stimuli across conditions on several lexical dimensionsmatch_stimuli
Left-join a norm table (such as concreteness, age of acquisition or valence)merge_norms
A ready-to-adapt methods paragraph rendered from a datasheetmethods_paragraph
Start a new run lognew_run_log
Turn a corpus file in its publisher's layout into a lexiconnormalise_lexicon
The paradigm registry: default event sequences and required fieldsPARADIGMS
Build a participant counterbalancing tableparticipant_table
The item fields a design needs, from its paradigm and its eventsrequired_fields
Produce several disjoint matched item sets (items as a random factor)resample_stimuli
The trial events of a design: its own 'events', or else its paradigm'sresolve_events
Realise per-trial event durations onto the stimuli tableresolve_trial_timing
Run the lexsync pipeline for every design configurationrun_all
Run the lexsync pipeline for one designrun_pipeline
Select a set spread over a continuous predictor, with windows on the controlsselect_continuous_stimuli
Two one-sided tests (TOST) of equivalence on a Cohen's d boundtost_equiv
Check a design and its schema before anything is selected or writtenvalidate_design
Variance ratio: a distributional balance checkvariance_ratio
Write a datasheet to a JSON record and a Markdown renderingwrite_datasheet
Write the run log to Markdown (and optionally JSON Lines)write_run_log