knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
library(lexa)
A Lexa database (lexadb
) is a directory containing the following files/dirs:
config.yaml
: the database configuration file.grammar.yaml
: the grammar specification file.lexicon/
: directory containing Lexa lexicon files.texts/
: directory containing Lexa text collections (lexatxt
).You can find examples of Lexa databases as part of the lexa package (https://github.com/stefanocoretta/lexa/tree/main/inst/extdata).
To quickstart a new database, just run:
library(lexa) create_lexadb(name = "my_")
A database called my_lexadb
will be created in your working directory.
id: lx_00000n lexeme: <string> phon: <string> morph_category: <lexical, grammatical> morph_type: <root, stem, affix, clitic, particle, compound, phrase> part_of_speech: <string> inflectional_features: <feature_n>: <string> etymology: <string> loan_word: <string> notes: [<string>] allomorphs: al_0n: id: al_0n morph: <string> phon: <string> conditioning: type: <phonological, morphosyntactic, free> context: <string> senses: se_0n: id: se_0n gloss: <string> definition: <string> literal: <string> scientific: <string> usage: <string> inflectional_features: <feature_n>: <string> examples: ["tx_00000n:st_00000n"] etymology: <string> crossref: ["lx_00000n"] variants: [<string>] semantics: semantic_domain: ["sd_00000n"] synonyms: ["lx_00000n"] antonyms: ["lx_00000n"] date_created: <date> date_modified: <date>
Texts are located in the texts/
folder.
Each text is saved in a separate .yaml
file.
id: tx_00000n title: <string> topic: <string> genre: <string> participants: [<string>] translators: [<string>] source: <string> sentences: st_00000n: sentence: <string> transcription: <string> transliteration: <string> phon: <string> morpho_phon: <string> morpho: <string> gloss: <string> translation: <string> literal: <string> notes: [<string>] notes: [<string>]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.