<!--
SPDX-FileCopyrightText: 2024 Lady <https://www.ladys.computer/about/#lady>
SPDX-License-Identifier: CC0-1.0
-->
# Langdev

## Directory Structure

Each language is given a directory inside of `data/`, named by language
  code.
Within this directory the following subdirectories may exist :⁠—

- **`info`:**
  An X·M·L file providing basic information about the language, its
    encoding, and its variants.

- **`cdex/`:**
  Codex entries for the language, in the manner of
    [🪾📰 Caudex][Caudex].

- **`docs/`:**
  Prose documentation for the language.

- **`srcs/`:**
  Files from which those in `VARIANT/` and `docs/` were derived.
  By convention, all X·M·L files have a `encoding` component to their
    X·M·L declaration, which is used to identify them as “assets” and
    avoid further processing.

- **`txts/`:**
  Extant texts written in the language.

- **`VARIANT/`:**
  A directory of lexemes for a given `VARIANT`, which has the form of a
    variant subtag (a digit followed by three to seven characters, or
    a letter followed by four to seven characters).
  When formulating language tags using these variants, they must be
    preceded by the singleton `x`, as they are not registered.

  Variants which begin with the string `block` are _blocks_, intended
    to partition the language semantically to make it easier to work
    with.
  This is the common form of variant for actively‐developed languages.

  Other variants are not partitions, and instead denote different
    versions of the language thru time or space.
  For example, the variant `qho-0001` denotes the version of the
    language which precedes `qho-0002`.

Each variant directory, itself, contains the following files :⁠—

- **`LEXEME`:**
  A single lexeme with·in the variant.
  `LEXEME` is an Ascii representation of the lemma form of the lexeme
    which matches the following regular expression :⁠—

      [&'=@0-9A-Za-z~-]\.?(_?[&'=@0-9A-Za-z~-]\.?)*__[1-9][0-9]*

## Languages, Scripts, and Tags

Each language developed in this repository is assigned a (private·use)
  primary language subtag in the range `qga`‥`qpz`.
This is outside of the range reserved by Unicode (`qaa`‥`qfy`) and
  leaves the tags `qfz` and `qqa`‥`qtz` for implementations.
The current list of assigned primary language subtags is as
  follows :⁠—

| Language Subtag | Language Name |
| :-------------: | ------------- |
| `qho` | Eho         |
| `qjl` | Jastulae    |
| `qjt` | Jastugay    |
| `qjx` | Pre‐Zheshwi |
| `qjz` | Zheshwi     |
| `qlr` | Elrex       |
| `qpt` | Fizonal     |

This repository also reserves the script subtags `Qaaq`‥`Qabp`,
  leaving aside `Qaaa`‥`Qaap` for Unicode and `Qabq`‥`Qabx` for
  implementations.
The current list of assigned script tags is as follows :⁠—

| Script Subtag | Script Name |
| :-----------: | ----------- |
| `Qabj` | Jastugay Syllables |

## Crossreferences and Identifiers

This repository assigns identifiers in the
  `urn:fdc:langdev.ladys.computer:2024:` namespace.
Most of these identifiers can be dereferenced on the Web by prepending
  `https://langdev.ladys.computer/` to them.
(Identifier resolution is handled thru server redirects, not as part of
  the build process.)

### Codex Entry Identifiers

Codex entries for a language with primary language subtag `PLS` are
  assigned identifiers of the form :⁠—

    urn:fdc:langdev.ladys.computer:2024:PLS:cdex:ENTRYID

—⁠: where `ENTRYID` is the identifier of the entry within the codex.

These identifiers resolve to the files at `/PLS/cdex/ENTRYID.xhtml`.

### Documentation Identifiers

Documentation files for a language with primary language subtag `PLS`
  are assigned identifiers of the form :⁠—

    urn:fdc:langdev.ladys.computer:2024:PLS:docs:DOCID

—⁠: where `DOCID` is some local identifier for the documentation.

These identifiers resolve to the files at `/PLS/docs/DOCID/`.

### Source Identifiers

Source entries for a language with primary language subtag `PLS` are
  assigned identifiers of the form :⁠—

    urn:fdc:langdev.ladys.computer:2024:PLS:srcs:SOURCEID

—⁠: where `SOURCEID` is some local identifier for the documentation.

These identifiers resolve to the files at `/PLS/srcs/SOURCEID/`.

### Text Identifiers

Texts written in a language with primary language subtag `PLS` are
  assigned identifiers of the form :⁠—

    urn:fdc:langdev.ladys.computer:2024:PLS:txts:TEXTID

—⁠: where `TEXTID` is some local identifier for the text.

These identifiers resolve to the files at `/PLS/txts/TEXTID/`.

### Lexeme Identifiers

An identifier for a given lexeme can be constructed from its language,
  variant, and Ascii representation.
Given primary language subtag `PLS`, variant subtag `VARIANT`, and
  Ascii representation `LEXEME`, the resulting identifier is as
  follows :⁠—

    urn:fdc:langdev.ladys.computer:2024:PLS:VARIANT:LEXEME

Within this repository, lexemes reference each other according to the
  U·R·I scheme above.
These identifiers resolve to the files at
  `/PLS/#PLS-VARIANT--LEXEME`.

A less‐universal identifier, suitable for use as an X·M·L `ID`, is :⁠—

    PLS-VARIANT--LEXEME

## Encoding Principles

Dictionary information is expressed in a constrained R·D·F format which
  conforms to the `DTD` in this repository.
This D·T·D should not be considered stable and should be inspected for
  changes when·ever pulling in new data.

## Website

The `site/` directory contains documentation and data used for building
  the Langdev website (<https://langdev.ladys.computer/>).
Files and directories which are not meant to reference language subtags
  will be given names which are either :⁠—

- Of any length, containing at least one apostrophe, hyphen,
    underscore, or period.

- Exactly four lowercase alphabetic letters (distinguishable from a
    script subtag as it conventionally begins with a capital letter).

- More than four letters or numbers, starting with a capital letter
    (distinguishable from a variant subtag as it conventionally begins
    with a lowercase letter).

- More than eight characters (all language subtags are eight or fewer
    characters in length).

The site is built using [⛩📰 书社][Shushe].

[Caudex]: <https://git.ladys.computer/Caudex>
[Shushe]: <https://git.ladys.computer/Shushe>
