knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" ) library(lexa)
r badger::badge_devel(color = "orange")
The goal of lexa is to provide a framework and tools to manage linguistic fieldwork data.
The package is still in its infancy and only a very limited set of features are being developed for the time being. The package contains highly unstable code, so expect breaking changes at any point (although I will try to keep these at a minimum).
The current available features are:
.csv
file.You can install the latest version of lexa like so:
remotes::install_github( "stefanocoretta/lexa@v0.0.3", build_vignettes = TRUE )
To create a new database:
library(lexa) create_lexadb( parent = "./", name = "new" )
This will create a directory new_lexadb/
in the parent directory (./
).
See vignette("database-schema", package = "lexa")
for details.
The lexicon/
folder is populated with a file with an entry skeleton you can manually edit.
To create new entries you first need to load the database:
new_db <- load_lexadb("./new_lexadb") new_db
Now you can add a new entry with:
add_entry(new_db)
This will create a new file with the entry skeleton, which you can edit.
The new id
is automatically created for you based on the existing files.
To search your lexicon:
db_path <- system.file("extdata/eleryon_lexadb", package = "lexa") eleryon <- load_lexadb(db_path) eleryon search_lexicon(eleryon, entry = "unullose") search_lexicon(eleryon, definition = "tomorrow")
You can also display texts, sentences and lexical entries!
show_text(eleryon, 1) show_entry(eleryon, 6)
To include interlinear glosses in HTML and LaTeX documents, check out the vignette("interlinear-gloss")
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.