Tutorials

Published

June 8, 2024

Use these introductory tutorials to get started with Tabulae.jl.

Prerequisites

You’ll need to install Julia before you can use Tabulae.

Note: tutorial data sets

All code examples in these tutorials use the data sets in the datasets directory of the Tabulae github repository. Code examples assume that the path to the Tabulae github repository is in the variable repo.

Quickest start

Build a Tabulae dataset from a directory of local files:

using Tabulae, CitableParserBuilder
srcdir = joinpath(repo, "datasets", "core-infl-shared") 
tds = dataset([srcdir])

Compile a parser from the dataset, and parse Latin tokens:

parser = tabulaeStringParser(tds)
parses = parsetoken("animo", parser)
2-element Vector{Analysis}:
 Analysis("animo", ls.n2636, forms.2010001300, latcommon.nounn2636, nouninfl.us_i3)
 Analysis("animo", ls.n2636, forms.2010001500, latcommon.nounn2636, nouninfl.us_i5)

Extract the morphological forms from the parses, and label them:

parses .|> latinForm .|> label
2-element Vector{String}:
 "masculine dative singular"
 "masculine ablative singular"