Skip to main content

deklinacija-imena

A Python library for declension of personal names in Serbian, Croatian and Bosnian.

Usage

Simply import the package. It is recommended to set the alias to dek.

import deklinacija as dek

As of right now, only first names are supported. To decline names, all you have to do is to call the appropriate function for the grammatical case you want to use, and specify the name and the gender parameter. There is also the third latin parameter, which indicates whether the provided name parameter is written in Cyrillic or Latin script. Currently, only Latin script is supported.

The functions in this example return a string.

import deklinacija as dek

changedName1 = dek.genitiv("Velja","male") #Velje
changedName2 = dek.dativ("Petar","male") #Petru
changedName3 = dek.akuzativ("Jana","female") #Janu
changedName4 = dek.instrumental("Uroš","male") #Urošem
changedName5 = dek.instrumental("Vuk","male") #Vukom
changedName6 = dek.lokativ("Lana","female") #Lani

print("Dobili ste zahtev za prijateljstvo od",changedName1) #Dobili ste zahtev za prijateljstvo od Velje - Translation: You have received a friend request from Velja

You can also immediatelly decline a name through all grammatical cases by calling the declineAll() function.

The declineAll() function returns a dictionary.

import deklinacija as dek

Nikola = dek.declineAll("Nikola","male") #{'nominativ': 'Nikola', 'genitiv': 'Nikole', 'dativ': 'Nikoli', 'akuzativ': 'Nikolu', 'instrumental': 'Nikolom', 'lokativ': 'Nikoli'}

print("Dali ste poklon",Nikola['dativ']) #Dali ste poklon Nikoli - Translation: You have given a gift to Nikola

Todo

The following features are on the roadmap:

  • The vocative case
  • Support for both Latin and Cyrillic scripts
  • Declension of last names

Metadata

Release files for deklinacija 0.0.1

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

Source distribution (sdist)

Source distribution for deklinacija 0.0.1
File Size Uploaded
deklinacija-0.0.1.tar.gz 4.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for deklinacija 0.0.1
File Interpreter ABI Platform
deklinacija-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 9.4 kB

Release files / deklinacija-0.0.1.tar.gz

Download URL deklinacija-0.0.1.tar.gz
Size 4.2 kB
Tags Source
SHA-256 checksum
How to use checksums
9e4fbe55f3245bb97c1abbaa017bfef34ee68010567bc2dc8e1a7696de2b3aa0
BLAKE2b-256 checksum
How to use checksums
4f98df67ac973dc14cdf8390dd1cc9fe61bc4219decbcdd8aa33c7090c715947
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.2

Release files / deklinacija-0.0.1-py3-none-any.whl

Download URL deklinacija-0.0.1-py3-none-any.whl
Size 5.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6cfc31b4d0b767e2e5006ca92baeeee0b7ee938efedc4bceedeaeb8c3c96f5bf
BLAKE2b-256 checksum
How to use checksums
3b611f453eee289e3b1dca37c25872e6c3b64713ffdfcbed852c9965d3e343e0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.2

Release history Release notifications | RSS feed

1.7.1

2 release files

1.7.0

2 release files

1.6.1

2 release files

1.6.0

2 release files

1.5.2

2 release files

1.5.1

2 release files

1.5.0

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.0.3

2 release files

0.0.2

2 release files

This release

0.0.1 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