The graphical interface for consulting the tables only allows simple filtering operations. For certain manipulations, it is more appropriate to use a script. Our document “Querying Lexique with R” provides detailed information and search examples using the R language.
For example, to search for a list of words, although it is possible to use a regular expression (e.g., sheep|cat|dog
) in the graphical interface, it is more efficient to use R’s subset
function:
- If you do not already have them, you need to install R and R-Studio Desktop.
- Start RStudio and then copy the following lines into the console (bottom-left window):
source('https://raw.githubusercontent.com/chrplr/openlexicon/master/datasets-info/fetch_datasets.R')
lexique <- get_lexique383_rds()
items <- c('boat', 'plane', 'house', 'tree')
selection <- subset(lexique, ortho %in% items)
head(selection)
write_tsv(selection, 'selection.tsv')
Note: the connection may be too slow to load the table, in which case you should download it to your computer and follow the instructions provided in “Querying Lexique with R”.