Skip to main content

paradigm-panes

Installable package that produces a paradigm for a given word, given a pointer to paradigm layouts and FST file. Originally built for itwêwina.

PyPi Package

Latest version of the package posted to PyPi: paradigm-panes 0.3.2

Install

pip install paradigm-panes

Developing

Developing is done and managed through Python Poetry package manager.

To start development:

# Download the repo
git clone https://github.com/UAlbertaALTLab/paradigm-panes.git

# Set up virutal env
virtualenv venv --python=python3.9
source venv/bin/activate

# Install dependencies
poetry install

# Now cd into main directory and try out the package
cd paradigm_panes
python
    >>> import paradigm_manager
    >>> ...

Package Documentation:

The package is very simple to use and requires two types of linguistic files to operate. First:

Installing

Install the paradigm manager with:

pip install paradigm-manager

Usage and Configuration

Import the library:

import paradigm_manager

Create PaneManager and specify path to FST file and layouts resources:

pm = paradigm_manager.ParadigmManager(
            layout_directory="/home/ubuntu/paradigm_panes/resources/layouts", 
            generation_fst="/home/ubuntu/paradigm_panes/resources/fst/crk-strict-generator.hfstol")

Paths to the layout directory and generation FST are required arguments.

Pass lemma and paradigm type to generate a paradigm:

lemma = "amisk"
p_type = "NA"
pm.set_lemma(lemma)
pm.set_paradigm(p_type)

Generate the paradigm:

paradigm = pm.generate()

Optionally add recordings to the paradigm with the following steps:

wordforms = pm.get_all_wordforms()
matched_recordings = <fetch recordings for all wordforms>
paradigm = pm.bulk_add_recordings(matched_recordings)

Testing

To run the tests you need to install required dependencies, it is easier by using a virtual environment like this:

# Set up virutal env
virtualenv venv --python=python3.9
source venv/bin/activate

# Install dependencies
poetry install

Once the dependencies are installed you can run tests by calling pytest.

pytest

Release

Package version number is sorted in pyproject.toml. With every release to PyPi the version needs to be updated.
Build the package from the main directory before publishing it:

poetry build

To publish to Test PyPi use poetry and enter credentials associated with Test PyPi account

poetry publish -r testpypi

To publish to real PyPi use poetry and enter credentials associated with PyPi

poetry publish

All relevant package specifications and dependencies are managed in pyproject.toml file.

Metadata

Release files for paradigm-manager 0.3.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for paradigm-manager 0.3.5
File Size Uploaded
paradigm-manager-0.3.5.tar.gz 9.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for paradigm-manager 0.3.5
File Interpreter ABI Platform
paradigm_manager-0.3.5-py3-none-any.whl Python 3 none any Details

Total release size: 23.3 kB

Release files / paradigm-manager-0.3.5.tar.gz

Download URL paradigm-manager-0.3.5.tar.gz
Size 9.4 kB
Tags Source
SHA-256 checksum
How to use checksums
4b0b0f387c4de11230a91bf7246102aedf389eb4cfb56c3ff9328ff90b9b3f9a
BLAKE2b-256 checksum
How to use checksums
ec2f8c02155367d1430ca7a36a85bf4609b0462533f0c774447a96c24306e367
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.13 CPython/3.9.12 Darwin/21.6.0

Release files / paradigm_manager-0.3.5-py3-none-any.whl

Download URL paradigm_manager-0.3.5-py3-none-any.whl
Size 14.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
04dce00f558bbb7af1f6829c4e1724e9265d2f51a8099c0fcb6f74e9e5cfb47f
BLAKE2b-256 checksum
How to use checksums
24c7b575f01bf2f700f8b8399a00feacc9bf26c2102edc5ecf4b8aa5b8b2a34d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.13 CPython/3.9.12 Darwin/21.6.0

Release history Release notifications | RSS feed

This release

0.3.5 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page