Distributional semantics and semantic transparency: resources and pointers
Installation of R and RStudio
R is a programming language, and RStudio is a software that provides a graphical user interface for R. You always need to install R first, followed by RStudio. Both pieces of software are available for free, and available for Linux and proprietary systems like Windows or Mac.
- Install R first! Go to the page https://cran.rstudio.com/. Install R by selecting the correct version for your operating system and following the respective instructions.
- Afterwards, install RStudio! Having installed R, go to the RStudio homepage (https://docs.posit.co/ide/user/#rstudio-ide-oss-downloads and select and install the appropriate version of RStudio.
Installation of further packages/libraries:
In R, you can install a package with the command "install.packages()". For examples, "install.packages("LSAfun")" installs the package LSAfun. You can execute this command directly in the "console" window of RStudio.
Using vectorspaces with R and RStudio
A great resource is Fritz Günther's page. This subpage provides a number of vectorspaces for download. Fritz Günther is the author of the "LSAfun" package that we will be using a lot in our class. There is also a very gentle introduction to the package on youtube: https://www.youtube.com/watch?v=IlwIZvM2kg8. For documentation to that package, see here
Behavioral data
- Balota, D.A., Yap, M.J., Cortese, M.J., Hutchison, K.A., Kessler, B., Loftis, B., Neely, J.H., Nelson, D.L., Simpson, G.B., & Treiman, R. (2007). The English Lexicon Project. Behavior Research Methods, 39, 445-459. Data available via their website: https://elexicon.wustl.edu/index.html [note: the website is functional, but their certificate is expired]
- Gagne, Christina & Spalding, Thomas & Schmidtke, Daniel (2019).
LaDEC: Large database of English compounds.
- Keuleers, E., Lacey, P., Rastle, K. et al. The British Lexicon Project: Lexical decision data for 28,730 monosyllabic and disyllabic English words. Behav Res 44, 287–304 (2012). https://doi.org/10.3758/s13428-011-0118-4. They offer their data also as r-dataobjects, please go to the section "Electronic supplementary material" and download the ZIP file linked under "ESM 2". After unzipping that file, the file "blp-items.Rdata" is located in the unzipped folder
Other stuff
Four papers with non-distributional operationalizations of semantic transparency
-
ARNDT-LAPPE S. Analogy in suffix rivalry: the case of English -ity and -ness. English Language and Linguistics. 2014;18(3):497-548. https://doi.org/10.1017/S136067431400015X
- Gagné, C.L., Spalding, T.L. & Schmidtke, D. LADEC: The Large Database of English Compounds. Behav Res 51, 2152–2179 (2019). https://doi.org/10.7939/r3-dyqx-9b36
[see also above :)].
-
Hay, J. (2001). "Lexical frequency in morphology: is everything relative?" Linguistics, vol. 39, no. 6, pp. 1041-1070. https://doi.org/10.1515/ling.2001.041
-
Gary Libben, Martha Gibson, Yeo Bom Yoon, Dominiek Sandra (2003). Compound fracture: The role of semantic transparency and morphological headedness, Brain and Language, Volume 84, Issue 1, Pages 50-64, https://doi.org/10.1016/S0093-934X(02)00520-5
Moodleless sessions
- [02.11.2026] [04] Hands-on distributional semantics [bring laptop] (S1)
Download the file "blp-items.Rdata" via the British lexicon project
before class (see resources, under Keuleers et al. 2012). As before,
just save the file, do not open it with RStudio.
[We also will again be using the EN_100k vectorset, but this should be
already available on your laptops (see last week :))]
Script documenting what we did in class (+ something extra):
WS26_4_handsOn_3_disSem2_inClass_DOCUMENTATION.R
- [ST] [04] Open session: work in class on your scriptfile, I am there for questions/help
- [09.11.2026] [05] Discussion scripting assignment 1 [bring laptops]
HA: Please try your hand at the scripting assignment. Use the script
below as a starting point and fill it with your code. In the end,
please save your final version, and send a copy to me by the deadline
(Saturday, November 7th, 24:00). Follow the naming scheme in the file
(so if I were to submit, I would call my file
"Schaefer_Martin_WS26_disSem_scriptingAssignment_1.R").
WS26_disSem_scriptingAssignment_1.R
[13.11.2026] A closer look at the scriptfile-dataset
Please make sure that you understand all the steps in the scriptfile below. Save the resulting dataset somewhere on your computer where you can find it again (so that we can re-use it in class).
WS26_disSem_scriptingAssignment_1_DOCUMENTATION.R
- [16.11.2026] [06] Word formation and vector operations [bring laptops]
Please read the paper by Mitchell and Lapata (2010) (access via https://doi.org/10.1111/j.1551-6709.2010.01106.x), do not worry if
you do not understand every little detail.
Focus especially on sections 3 to 5:
How do the composition models work? You do not need to understand every detail, focus instead on the general idea, and start with the simplest model, that is, simple vector addition (see Fig. 3, equation 8, and the calculation of the sum vector for "practical" + "difficulty" immediately below).
Which human data is used for validation, and how is it collected?
What are the results of the
modelling experiments?
Please feel free to send me an email (until Friday 13th 24:00) if you encounter any specific problem/question while reading the text.
Note: Mitchell & Lapata (2008) is a related paper by the same authors. It has the typical length of a computational linguistics conference contribution, the composition models are largely the same but the evaluation task is different.
Mitchell, J., & Lapata, M. (2008). Vector-based models of semantic composition. In J. Moore, S. Teufel, J. Aller,
& S. Furui (Eds.), Proceedings of ACL-08: HLT (pp. 236–244). Columbus, OH. Stroudsburg, PA: ACL
Press.
[19.11.2026] More R: composition functions, regression etc. [please have the dataset created in the last script ready to use]
WS26_disSem_LinearRegression_DOCUMENTATION_inClass.R
- [23.11.2026] [07] Enter sandman (The CAOSS model)
Please send me you HA by Saturday, November 21st.
WS26_disSem_sandman_HA.pdf
[26.11.2026] Preparation for class:
- Download the Enter-sandman datafile: The dataset is provided at http://dx.doi.org/10.1037/xlm0000677.supp. The file you need is: "XLM-2018-0127_elp_data.txt". Save it somewhere on your computer where you can find it.
- Please install the following three libraries (in RStudio, run "install.packages("NameOfLibrary")").
"plyr", "corrplot","lme4"
In class, we are going to start to explore the dataset and further deepen our understanding of the regression models they used in the paper.
Script documenting what we did in class (and a bit more :))
WS26_scriptSandmanSession1.R
- [30.11.2026] [08] Hands on distributional semantics [bring laptops] (S2)
- Have the dataset for the Enter-Sandman paper at hand (see last week's script for download-details). Also download the "baroni" vector space from Fritz Günther's homepage. Test that you can read them in correctly BEFORE class. For the Enter-Sandman data, use the command from the R-script for last week, for the vectorspace the load() command known from our previous sessions. You can test both by modifying the TODO-script (see 3). Save the script you use for testing, so that you can continue with that script in class.
- We again need the package "plyr" used in the first part of last week's script.
- Also download the file "scriptSandmanSession2_TODO.R" (see below). It contains an outline of what we are going to do in class and you can use it as a starting point in R-Studio.
WS26_scriptSandmanSession2_TODO.R