clld-morphology-plugin


Nameclld-morphology-plugin JSON
Version 0.1.2 PyPI version JSON
download
home_pagehttps://github.com/fmatter/clld-morphology-plugin
SummaryA morphology plugin for CLLD apps.
upload_time2023-12-28 08:48:23
maintainer
docs_urlNone
authorFlorian Matter
requires_python>=3.8.1,<4.0.0
licenseApache-2.0
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # clld-morphology-plugin

A plugin for modelling morphology in CLLD apps.

[![Versions](https://img.shields.io/pypi/pyversions/clld_morphology_plugin)](https://www.python.org/)
[![PyPI](https://img.shields.io/pypi/v/clld_morphology_plugin.svg)](https://pypi.org/project/clld_morphology_plugin)
[![License](https://img.shields.io/github/license/fmatter/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:

<img src="https://user-images.githubusercontent.com/2378389/221690084-36690385-7f9d-4bd6-99ac-d87c1964f06b.png" width="50%" height="50%">

`Morpheme` detail view with `Morph`s, inflectional values, and wordforms/corpus tokens:

<img src="https://user-images.githubusercontent.com/2378389/221693305-6e97c3be-b0cc-455a-b435-fd9ac9ddf585.png" width="30%" height="30%">

If a `WordformPart` is not associated with a `Morph`, this is interpreted as zero marking (usually for inflection):
<img src="https://user-images.githubusercontent.com/2378389/221693358-7f8d3ffe-d008-4efe-a49c-b90c7de1e7dc.png" width="60%" height="60%">

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`:

<img src="https://user-images.githubusercontent.com/2378389/221693377-b45ae02b-45b0-4480-9b10-7b271cdb56cc.png" width="50%" height="50%">

Since `InflectionalValue`s are connected via `Inflection`s to `WordformPart`s, their exponents can be easily visualized:
<img src="https://user-images.githubusercontent.com/2378389/221693413-3d95b17c-b67b-434d-8db3-68e9ffe99a4b.png" width="50%" height="50%">

`Stems` can have a `Lexeme`, and `WordformPart`s + `Wordforms` + `InflectionalValue` + `InflectionalCategory` contain all the necessary information to automatically generate inflectional paradigms for lexemes:
<img src="https://user-images.githubusercontent.com/2378389/221693515-b0adcf48-f68a-4040-9f7e-47898bc73b38.png" width="100%" height="100%">

`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:

<img src="https://user-images.githubusercontent.com/2378389/221693470-9c811e78-8fef-45be-a648-fb73c6314dc7.png" width="70%" height="70%">

Detail views of stems also show all derived (directly or indirectly) stems:
<img src="https://user-images.githubusercontent.com/2378389/221693580-91e07656-3b0b-401c-b961-a5f5ca7dc1d0.png" width="70%" height="70%">

`DerivationalProcess`es know what stems they create (optionally using specific morphs):
<img src="https://user-images.githubusercontent.com/2378389/221693636-6f952768-ebda-4966-9b3b-10f5e0e8be8c.png" width="60%" height="60%">




## 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>

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/fmatter/clld-morphology-plugin",
    "name": "clld-morphology-plugin",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8.1,<4.0.0",
    "maintainer_email": "",
    "keywords": "",
    "author": "Florian Matter",
    "author_email": "flmt@mailbox.org",
    "download_url": "https://files.pythonhosted.org/packages/71/0f/b5d74482811e9ac50169bbd85910e59c250b1efefad4ca24571e833b2051/clld_morphology_plugin-0.1.2.tar.gz",
    "platform": null,
    "description": "# clld-morphology-plugin\n\nA plugin for modelling morphology in CLLD apps.\n\n[![Versions](https://img.shields.io/pypi/pyversions/clld_morphology_plugin)](https://www.python.org/)\n[![PyPI](https://img.shields.io/pypi/v/clld_morphology_plugin.svg)](https://pypi.org/project/clld_morphology_plugin)\n[![License](https://img.shields.io/github/license/fmatter/clld-morphology-plugin)](https://www.apache.org/licenses/LICENSE-2.0)\n\n## Models\nThe [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.\n\nThe basic mechanism of segmentation is implemented such that `Wordform`s and `Stem`s have a list column `parts` containing the segmentation.\nThese parts are referenced via indices by `WordformPart`s, `StemPart`s, and `WordformStem`s, so these entities \"know\" their constituents.\nX`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.\nWordform structure and inflectional information is rendered as follows:\n\n<img src=\"https://user-images.githubusercontent.com/2378389/221690084-36690385-7f9d-4bd6-99ac-d87c1964f06b.png\" width=\"50%\" height=\"50%\">\n\n`Morpheme` detail view with `Morph`s, inflectional values, and wordforms/corpus tokens:\n\n<img src=\"https://user-images.githubusercontent.com/2378389/221693305-6e97c3be-b0cc-455a-b435-fd9ac9ddf585.png\" width=\"30%\" height=\"30%\">\n\nIf a `WordformPart` is not associated with a `Morph`, this is interpreted as zero marking (usually for inflection):\n<img src=\"https://user-images.githubusercontent.com/2378389/221693358-7f8d3ffe-d008-4efe-a49c-b90c7de1e7dc.png\" width=\"60%\" height=\"60%\">\n\nMorphophonological change is modeled by `MorphoPhonoInstance`s connecting `MorphoPhonologicalChange`s with one or more of the following things: an `Inflection`, a `WordformPart`, or a `StemPart`:\n\n<img src=\"https://user-images.githubusercontent.com/2378389/221693377-b45ae02b-45b0-4480-9b10-7b271cdb56cc.png\" width=\"50%\" height=\"50%\">\n\nSince `InflectionalValue`s are connected via `Inflection`s to `WordformPart`s, their exponents can be easily visualized:\n<img src=\"https://user-images.githubusercontent.com/2378389/221693413-3d95b17c-b67b-434d-8db3-68e9ffe99a4b.png\" width=\"50%\" height=\"50%\">\n\n`Stems` can have a `Lexeme`, and `WordformPart`s + `Wordforms` + `InflectionalValue` + `InflectionalCategory` contain all the necessary information to automatically generate inflectional paradigms for lexemes:\n<img src=\"https://user-images.githubusercontent.com/2378389/221693515-b0adcf48-f68a-4040-9f7e-47898bc73b38.png\" width=\"100%\" height=\"100%\">\n\n`Derivation`s connect `Stems` with other `Stem`s (or `Morph`s, when derived from a root) and `DerivationalProcess`es.\nThese derivational links can then be used to render the \"derivational lineage\" of a stem:\n\n<img src=\"https://user-images.githubusercontent.com/2378389/221693470-9c811e78-8fef-45be-a648-fb73c6314dc7.png\" width=\"70%\" height=\"70%\">\n\nDetail views of stems also show all derived (directly or indirectly) stems:\n<img src=\"https://user-images.githubusercontent.com/2378389/221693580-91e07656-3b0b-401c-b961-a5f5ca7dc1d0.png\" width=\"70%\" height=\"70%\">\n\n`DerivationalProcess`es know what stems they create (optionally using specific morphs):\n<img src=\"https://user-images.githubusercontent.com/2378389/221693636-6f952768-ebda-4966-9b3b-10f5e0e8be8c.png\" width=\"60%\" height=\"60%\">\n\n\n\n\n## Markdown\nSince 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.\nHowever, 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)`.\nIf you want to use the [clld-markdown-plugin](https://github.com/clld/clld-markdown-plugin/), use the following code in your top-level `.mako`:\n\n    <%def name=\"markdown(request, content)\">\n        <%from clld_markdown_plugin import markdown%>\n        ${markdown(request, content)|n}\n    </%def>\n\nto use plain markdown instead:\n\n    <%def name=\"markdown(request, content)\">\n        <%from markdown import Markdown%>\n        ${Markdown(content)|n}\n    </%def>\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "A morphology plugin for CLLD apps.",
    "version": "0.1.2",
    "project_urls": {
        "Bug tracker": "https://github.com/fmatter/clld-morphology-plugin/issues",
        "Homepage": "https://github.com/fmatter/clld-morphology-plugin",
        "Repository": "https://github.com/fmatter/clld-morphology-plugin"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0738a3799c40cb7f7208ee73ea8467417685e13b3322755b9633acb8a019dd6d",
                "md5": "5a307f05b95ddd9390a8006273b3bfb7",
                "sha256": "bb10520adc7cf80fb30124bf80e61d8c6431ac058111ab960ca0847693af8a3c"
            },
            "downloads": -1,
            "filename": "clld_morphology_plugin-0.1.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5a307f05b95ddd9390a8006273b3bfb7",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8.1,<4.0.0",
            "size": 39260,
            "upload_time": "2023-12-28T08:48:21",
            "upload_time_iso_8601": "2023-12-28T08:48:21.648893Z",
            "url": "https://files.pythonhosted.org/packages/07/38/a3799c40cb7f7208ee73ea8467417685e13b3322755b9633acb8a019dd6d/clld_morphology_plugin-0.1.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "710fb5d74482811e9ac50169bbd85910e59c250b1efefad4ca24571e833b2051",
                "md5": "a318444a3837b25be616056070ce177f",
                "sha256": "e4430984794fc434a7b983e2f2463128ff5584360aae46c70407a7a027a09660"
            },
            "downloads": -1,
            "filename": "clld_morphology_plugin-0.1.2.tar.gz",
            "has_sig": false,
            "md5_digest": "a318444a3837b25be616056070ce177f",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8.1,<4.0.0",
            "size": 25426,
            "upload_time": "2023-12-28T08:48:23",
            "upload_time_iso_8601": "2023-12-28T08:48:23.544435Z",
            "url": "https://files.pythonhosted.org/packages/71/0f/b5d74482811e9ac50169bbd85910e59c250b1efefad4ca24571e833b2051/clld_morphology_plugin-0.1.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-28 08:48:23",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "fmatter",
    "github_project": "clld-morphology-plugin",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "clld-morphology-plugin"
}
        
Elapsed time: 0.16585s