https://github.com/fmatter/clld-morphology-plugin
A plugin for modelling morphology in CLLD apps
https://github.com/fmatter/clld-morphology-plugin
clld morphology
Last synced: about 2 months ago
JSON representation
A plugin for modelling morphology in CLLD apps
- Host: GitHub
- URL: https://github.com/fmatter/clld-morphology-plugin
- Owner: fmatter
- License: apache-2.0
- Created: 2022-03-22T09:02:05.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-12-28T08:48:29.000Z (over 1 year ago)
- Last Synced: 2025-03-14T13:17:08.096Z (3 months ago)
- Topics: clld, morphology
- Language: Python
- Homepage:
- Size: 210 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Citation: CITATION.cff
Awesome Lists containing this project
README
# clld-morphology-plugin
A plugin for modelling morphology in CLLD apps.
[](https://www.python.org/)
[](https://pypi.org/project/clld_morphology_plugin)
[](https://www.apache.org/licenses/LICENSE-2.0)## Models
The [models](/src/clld_morphology_plugin/models.py) largely reflect the structure of the morphological components of the [cldf-ldd](https://github.com/fmatter/cldf-ldd) collection.The basic mechanism of segmentation is implemented such that `Wordform`s and `Stem`s have a list column `parts` containing the segmentation.
These parts are referenced via indices by `WordformPart`s, `StemPart`s, and `WordformStem`s, so these entities "know" their constituents.
X`Parts` can in turn be referenced by `Inflection`s, meaning that `InflectionalValue`s (which belong to `InflectionalCategorie`s) are associated with part of a wordform.
Wordform structure and inflectional information is rendered as follows:
`Morpheme` detail view with `Morph`s, inflectional values, and wordforms/corpus tokens:
If a `WordformPart` is not associated with a `Morph`, this is interpreted as zero marking (usually for inflection):
Morphophonological change is modeled by `MorphoPhonoInstance`s connecting `MorphoPhonologicalChange`s with one or more of the following things: an `Inflection`, a `WordformPart`, or a `StemPart`:
Since `InflectionalValue`s are connected via `Inflection`s to `WordformPart`s, their exponents can be easily visualized:
`Stems` can have a `Lexeme`, and `WordformPart`s + `Wordforms` + `InflectionalValue` + `InflectionalCategory` contain all the necessary information to automatically generate inflectional paradigms for lexemes:
`Derivation`s connect `Stems` with other `Stem`s (or `Morph`s, when derived from a root) and `DerivationalProcess`es.
These derivational links can then be used to render the "derivational lineage" of a stem:
Detail views of stems also show all derived (directly or indirectly) stems:
`DerivationalProcess`es know what stems they create (optionally using specific morphs):
## Markdown
Since this plugin is primarily being developed for an [interactive digital corpus-based grammar](https://github.com/fmatter/indicogram), comments on models are rendered using markdown.
However, it is up to the app developer to choose what markdown you want to use; the templates here assume that the parent mako template provides a function `markdown(request, content)`.
If you want to use the [clld-markdown-plugin](https://github.com/clld/clld-markdown-plugin/), use the following code in your top-level `.mako`:<%def name="markdown(request, content)">
<%from clld_markdown_plugin import markdown%>
${markdown(request, content)|n}
%def>to use plain markdown instead:
<%def name="markdown(request, content)">
<%from markdown import Markdown%>
${Markdown(content)|n}
%def>