# UCL Corpus with PMB Data

This folder contains

- jupyter notebook which extracts sequence notation from individual pmb sentences and stores the result into one tsv file in the folder `data/merged` (the result of that script can already be found in that folder).

- prepare_data.Rmd/html and prepare_data.html which provides a script that merges all PMB data with all experimental data from Frank et al. (both self-paced reading and eye-tracking measures). Additionally, it also merges the data with frequency information from van Heuven et al. (2014).

- the folder `data` which contains PMB data.

- the folder `frank_etal` which contains Frank et al. self-paced reading and eye-tracking data.

If you want to run the scripts (but you don't have to! We provide the results on osf, see below), you have to download subtlex-uk into this folder as subtlex\_uk.csv.

## Data Files

The Rmd scripts generate the following files.

- `UCL_corpus_with_PMB_and_frequencies.tsv`: Complete dataset including word frequency information
- `UCL_corpus_with_PMB_without_frequencies.tsv`: Dataset without frequency columns (smaller size)

This README file describes the columns in the dataset `UCL_corpus_with_PMB_without_frequencies.tsv`. The other tsv file is the same, only it also includes the information about frequencies. The description of the additional columns in `UCL_corpus_with_PMB_and_frequencies.tsv` are given in van Heuven et al. (2014).

These files are not present in this zip because they do not fit sizewise in this supplementary material. You can generate them by running the Rmd script. Or, better, you can go to osf, where the files are already generated:

https://doi.org/10.17605/OSF.IO/PES63

The osf also always stores the most up-to-date version of the data.

## Column Descriptions for UCL_corpus_with_PMB

### Semantic Information (from PMB)

- **Sense**: Semantic sense annotation from the Parallel Meaning Bank
- **Operator**: Semantic operator from PMB semantic representation
- **Word**: Original word representation from PMB (may contain multiple words separated by spaces)
- **DocID**: Document identifier from PMB
- **Word1**: First word extracted from the Word field (after splitting on whitespace)
- **Word2**: Second word extracted from the Word field
- **Word3**: Third word extracted from the Word field
- **Word4**: Fourth word extracted from the Word field
- **Word5**: Fifth word extracted from the Word field
- **CharactersOrder**: Contains character ordering annotations in the format [n-n] when present in the Word field
- **CoreWord**: The core semantic word identified by selecting the first non-dashed word from Word1-Word5

### Reading Time Data (from Frank et al., 2013)

See also README.txt file from Frank et al., 2013, for more details.

- **sent_nr**: Sentence number (1-361 for the corpus)
- **word**: The word as it appeared in the reading experiment (lowercase, punctuation removed)
- **subj_nr**: Subject identifier (numeric for self-paced reading; prefixed with "ET_" for eye tracking)
- **exp**: Experiment type
  - *spr*: Self-paced reading
  - *et*: Eye tracking
- **sent_pos**: Position of the sentence in the experimental session
- **correct**: Whether the comprehension question was answered correctly  (c for correct, e for error, hyphen if there was no question)
- **answer_time**: Time taken to answer the comprehension question (milliseconds), or NaN if there was no question
- **word_pos**: Position of the word within the sentence

### Reading Time Measures

#### Self-Paced Reading (exp="spr")
- **RT**: Reading time for the word (milliseconds)
- **RTfirstfix**: NA (not applicable for self-paced reading)
- **RTfirstpass**: NA (not applicable for self-paced reading)
- **RTrightbound**: NA (not applicable for self-paced reading)
- **RTgopast**: NA (not applicable for self-paced reading)

#### Eye Tracking (exp="et")
- **RT**: NA (not applicable for eye tracking)
- **RTfirstfix**: First fixation time on current word (or 0 if word not fixated)
- **RTfirstpass**: First-pass reading time (total fixation time on current word before first fixation on any other word)
- **RTrightbound**: Right-bounded reading time (total fixation time on current word before first fixation on any word to the right)
- **RTgopast**: Go-past reading time (total fixation time from first fixation on current word up to first fixation on any word to the right)

### Frequency Measures

Freqeuncy measures were taken from van Heuven et al. (2014). They are only present in the file `UCL_corpus_with_PMB_and_frequencies.tsv`. Read that paper for details on the definitions of each column.

## Citing

Of course, cite our work:

Dotlačil, Jakub, Fortuny, Laia Colina , Kloostra, Li and Johan Bos (2026). Lexical and discourse semantics in a reading-time corpus of English. Proceedings of the Fifteenth International Conference on Language Resources and Evaluation (LREC’26).

Also cite the original UCL corpus (Frank et al., 2013). If you use the frequency data, do not forget to cite Heuven et al. (2014).

## Data Processing Notes

1. **Word Matching**: Words are matched between PMB and reading data based on:
   - The CoreWord from PMB semantic annotations
   - Words from the reading experiments (with punctuation removed and converted to lowercase)
   - Position within the sentence (uniquepos ensures correct matching when a word appears multiple times)

2. **Character Ordering**: Tokens in the format [n-n] (e.g., [1-2]) are extracted into the CharactersOrder column and excluded from Word1-Word5

3. **Missing Values**:
   - Eye tracking measures (RTfirstfix, RTfirstpass, RTrightbound, RTgopast) are NA for self-paced reading trials
   - Self-paced reading measure (RT) is NA for eye tracking trials
   - Words have 0 values for eye tracking measures if they were not fixated. This is the way they were coded in Frank et al. For any follow-up analysis on eye-tracking reading measures, it is recommended to remove those words, rather than including them and treating them as zeros.

4. **Data Sorting**: Data is ordered by experiment type (exp), subject number (subj_nr), sentence number (sent_nr), and word position (word_pos)

## References

Frank, S. L., Otten, L. J., Galli, G., & Vigliocco, G. (2013). Word surprisal predicts N400 amplitude during reading. *Proceedings of the 51st Annual Meeting of the Association for Computational Linguistics*, 878-883.

van Heuven, W. J. B., Mandera, P., Keuleers, E., & Brysbaert, M. (2014). SUBTLEX-UK: A new and improved word frequency database for British English. *The Quarterly Journal of Experimental Psychology, 67*(6), 1176-1190.
