Language samples #
This file defines the rows of a paper's language sample, after the CLDF StructureDataset: the languages of the sample, and the codes a language takes for a parameter the paper records. The parameters, their codes and the rows of a sample are generated per paper.
Main definitions #
Data.Structures.Language: a row of theLanguageTable.Data.Structures.Coded: a value of theValueTable, a code with the marks a source puts on it.
Implementation notes #
- Per-paper data lives in
Linglib/Data/Structures/{AuthorYear}.json, an object holding the CLDF tablesContributionTable,LanguageTable,ParameterTable,CodeTableandValueTableunder CLDF column names, and is compiled byscripts/gen_structures.pyinto{AuthorYear}.lean, declaringnamespace {AuthorYear}.Structures. - Each parameter becomes an inductive type with a constructor for each code. The values, long in the JSON as CLDF has them, are emitted as one row per language with a field for each parameter, so a theorem about the sample reads each language once.
- Each table of a paper is a contribution with its own list of rows. Languages, parameters and
codes are shared, so a language two tables list is one
Languagewith a row in each. - A language may take several codes for a parameter, or none: a row's field is a list.
- A language without a Glottocode is one the source names without saying which Glottolog language it means; the JSON records why.
- Comments, footnotes and the lineage a source prints are its record: the generator validates them and does not emit them.
A Language is a row of a CLDF LanguageTable, a language of the sample.
- id : String
The
IDcolumn holds a stable identifier keyed to the paper. - name : String
The
Namecolumn holds the language's name as the source prints it; where its tables print several, the JSON records the others. - glottocode : Option Glottocode
The
Glottocodecolumn holds the Glottocode, when the source's name determines one.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Data.Structures.instReprLanguage = { reprPrec := Data.Structures.instReprLanguage.repr }
A Coded C is a value of a CLDF ValueTable: a code of the parameter C, with the marks a
source may put on it.
- code : C
The code.
- questionable : Bool
The source marks the code as questionable.
- optional : Bool
The source marks the strategy the code names as optional.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Data.Structures.instReprCoded = { reprPrec := Data.Structures.instReprCoded.repr }
Equations
- One or more equations did not get rendered due to their size.