Project for declension of Ukrainian names
Project description
Franko ― Ukrainian Name Declension Library
Description
Franko is a simple yet powerful tool for automatic declension of Ukrainian personal names (family name, given name, patronymic).
It uses the shevchenko-js engine under the hood and provides:
- A Node.js CLI (
decline.js/decline.bundle.js) for quick command-line usage. - A Python module (
Franko.py) with aFrankoclass, allowing you to integrate declension directly into your scripts. - A build script (
build.js) based on esbuild that bundles the CLI into a single file for distribution.
Main Components
-
decline.js/decline.bundle.js- Parses positional arguments (
<Family?> <Given?> <Patronymic?> [masculine|feminine]). - Calls the shevchenko-js API to generate all seven Ukrainian cases.
- Outputs a formatted JSON object.
- Parses positional arguments (
-
Franko.py- Locates
decline.bundle.jsand the Node.js executable at initialization. - Exposes
generate(text: str, gender: str = 'masculine') -> dict, returning a dictionary with keys
nominative,genitive,dative,accusative,instrumental,locative, andvocative.
- Locates
-
build.js- Uses esbuild to bundle
decline.jsand its dependencies intodecline.bundle.js. - Targets Node.js 14 (
platform: 'node',target: ['node14']).
- Uses esbuild to bundle
Usage
Installation
From PyPI (when released) and npm:
pip install franko
npm install shevchenko
Python code
from Franko import Franko
# Create a single instance
f = Franko()
# Decline a masculine name
result = f.generate("Шевченко Тарас Григорович", "masculine")
print(result)
# You can call generate() multiple times with different inputs
for name, gender in [
("Шевченко Тарас Григорович", "masculine"),
("Косач Лариса Петрівна", "feminine")
]:
forms = f.generate(name, gender)
print(forms)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file franko-25.5.3.tar.gz.
File metadata
- Download URL: franko-25.5.3.tar.gz
- Upload date:
- Size: 767.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b4766c918cb04353894752df0cd577b07fafee24d708651b6a1823d066e06972
|
|
| MD5 |
7bddc8807a68e4241fb45c54c733e601
|
|
| BLAKE2b-256 |
85578a4ba235368795567e8203f1b8a845054bbd68fef0205b2e8e26ec910b8a
|
Provenance
The following attestation bundles were made for franko-25.5.3.tar.gz:
Publisher:
publish.yml on TheDanielll/franko
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
franko-25.5.3.tar.gz -
Subject digest:
b4766c918cb04353894752df0cd577b07fafee24d708651b6a1823d066e06972 - Sigstore transparency entry: 211723950
- Sigstore integration time:
-
Permalink:
TheDanielll/franko@6d9085c509522a69196db01b8844a8698edb7355 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/TheDanielll
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@6d9085c509522a69196db01b8844a8698edb7355 -
Trigger Event:
push
-
Statement type:
File details
Details for the file franko-25.5.3-py3-none-any.whl.
File metadata
- Download URL: franko-25.5.3-py3-none-any.whl
- Upload date:
- Size: 779.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
172b26f15be97136896f352ade3f3b9e09d823bc0cf30b45f36732dfcdd83742
|
|
| MD5 |
3dd9e37678e3ff801765e8e031a49510
|
|
| BLAKE2b-256 |
1b3761f0a073b8b5a8335fedc9a65510368ebad57b53414e6e7d7a6543ba5a42
|
Provenance
The following attestation bundles were made for franko-25.5.3-py3-none-any.whl:
Publisher:
publish.yml on TheDanielll/franko
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
franko-25.5.3-py3-none-any.whl -
Subject digest:
172b26f15be97136896f352ade3f3b9e09d823bc0cf30b45f36732dfcdd83742 - Sigstore transparency entry: 211723953
- Sigstore integration time:
-
Permalink:
TheDanielll/franko@6d9085c509522a69196db01b8844a8698edb7355 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/TheDanielll
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@6d9085c509522a69196db01b8844a8698edb7355 -
Trigger Event:
push
-
Statement type: