Documentation

Linglib.Data.Forms.Schema

CLDF word forms #

Substrate types for word-level data, aligned with the Wordlist module of the Cross-Linguistic Data Formats ([forkel-etal-2018]), version 1.3 ([forkel-etal-2024]): a Form is a row of the FormTable (a form of a language expressing a concept, with its segmentation), and a Parameter is a row of the ParameterTable (the concept). The sentence-level LinguisticExample of Data/Examples/ is the Examples component; this is its counterpart for morphology, where the datum is a word and its parts rather than an utterance and its gloss.

Per-paper data lives in Linglib/Data/Forms/{AuthorYear}.json, an object whose keys are CLDF table names holding arrays of rows under the CLDF column names, and is compiled by scripts/gen_forms.py into Linglib/Data/Forms/{AuthorYear}.lean, declaring namespace {AuthorYear}.Forms.

FormRelation is a linglib extension table, FormRelationTable, for the paradigmatic pairs a paper asserts between forms (a stem and its past, an adjective and its comparative, a base and its reduplicant); CLDF has no standard component for these and permits custom tables.

Implementation notes #

References #

A row of a CLDF FormTable: a word form of a language expressing a concept, with its segmentation.

  • id : String

    ID: a stable, paper-keyed identifier.

  • languageId : Examples.Glottocode

    Language_ID: the Glottocode of the language.

  • parameterId : String

    Parameter_ID: the concept the form expresses.

  • form : String

    Form: the written form.

  • segments : List String

    Segments: the form's segmentation.

  • comment : String

    Comment.

  • source : List Examples.SourceRef

    Source: the references, each a bibkey with a locator.

  • columns : List (String × String)

    The custom columns of the table, by column name.

Instances For
    def Data.Forms.instDecidableEqForm.decEq (x✝ x✝¹ : Form) :
    Decidable (x✝ = x✝¹)
    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      @[instance_reducible]
      Equations
      def Data.Forms.instReprForm.repr :
      FormStd.Format
      Equations
      • One or more equations did not get rendered due to their size.
      Instances For
        def Data.Forms.Form.slots (f : Form) (i : Fin f.segments.length) :
        Flat String

        The segments of a form as a slot-indexed item on the flat carrier.

        Equations
        Instances For
          def Data.Forms.Form.column? (f : Form) (name : String) :
          Option String

          The value of a custom column, if the form has one.

          Equations
          Instances For

            A row of a CLDF ParameterTable: a concept forms express.

            • id : String

              ID.

            • name : String

              Name.

            • description : String

              Description.

            Instances For
              def Data.Forms.instDecidableEqParameter.decEq (x✝ x✝¹ : Parameter) :
              Decidable (x✝ = x✝¹)
              Equations
              • One or more equations did not get rendered due to their size.
              Instances For
                def Data.Forms.instReprParameter.repr :
                ParameterStd.Format
                Equations
                • One or more equations did not get rendered due to their size.
                Instances For

                  A row of the FormRelationTable: a paradigmatic relation a paper asserts from one form to another, named by the paper's term for it.

                  • id : String

                    ID.

                  • formId : String

                    Form_ID: the first form.

                  • targetId : String

                    Target_ID: the second form.

                  • relation : String

                    Relation: the paper's name for the relation.

                  • source : List Examples.SourceRef

                    Source.

                  Instances For
                    def Data.Forms.instDecidableEqFormRelation.decEq (x✝ x✝¹ : FormRelation) :
                    Decidable (x✝ = x✝¹)
                    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