Skip to main content

Project for declension of Ukrainian names

Project description

Franko ― Ukrainian Name Declension Library

Documentation

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 a Franko class, 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

  1. 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.
  2. Franko.py

    • Locates decline.bundle.js and 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, and vocative.
  3. build.js

    • Uses esbuild to bundle decline.js and its dependencies into decline.bundle.js.
    • Targets Node.js 14 (platform: 'node', target: ['node14']).

Usage

Installation

From PyPI :

pip install franko

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

franko-25.5.7.tar.gz (766.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

franko-25.5.7-py3-none-any.whl (779.5 kB view details)

Uploaded Python 3

File details

Details for the file franko-25.5.7.tar.gz.

File metadata

  • Download URL: franko-25.5.7.tar.gz
  • Upload date:
  • Size: 766.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for franko-25.5.7.tar.gz
Algorithm Hash digest
SHA256 94fa1ed3ce043d33efeb6067e0784472b60497c93935423fc56c9117b249b424
MD5 a6c3010c56a4337ba5466c9a1b8a7a2f
BLAKE2b-256 dfa674dce26e9f81bdd9f131b06f1df2a4af61b5b4f4669c50c3ed6edd64df2f

See more details on using hashes here.

Provenance

The following attestation bundles were made for franko-25.5.7.tar.gz:

Publisher: publish.yml on TheDanielll/franko

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file franko-25.5.7-py3-none-any.whl.

File metadata

  • Download URL: franko-25.5.7-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

Hashes for franko-25.5.7-py3-none-any.whl
Algorithm Hash digest
SHA256 166a0f0a46a14eae27ec3f3b9db8c6ea767e1d9d498d1c18a2f29aaf57d311db
MD5 20757c20b5f2101f25b5bf4cbc310412
BLAKE2b-256 40cb1f39ea340d96face8a5163a20947c11e73043ccd1ec8fcb1fec1c9250d2e

See more details on using hashes here.

Provenance

The following attestation bundles were made for franko-25.5.7-py3-none-any.whl:

Publisher: publish.yml on TheDanielll/franko

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page