Turkish suffix library
Project description
Turkish.py
Turkish Suffix Library for Python
Install
pip install turkish-suffix-library
Using
Nouns
from turkish_suffix_library.turkish import Turkish
print(Turkish('araba').dative())
print(Turkish('sebep').ablative())
print(Turkish('sebep').accusative())
print(Turkish('ecdat').accusative())
print(Turkish('çanta').plural().possessive(person=1).ablative().to_json())
print(Turkish('aparat').possessive(person=2))
print(Turkish('batak').possessive(person=3))
print(Turkish('idrak').possessive(person=1, plural=True))
print(Turkish('ok').possessive(person=2, plural=True))
print(Turkish('çanta').possessive(person=3, plural=True))
print(f'{Turkish("Elif").genitive(proper_noun=True)} {Turkish("Öküz").possessive(person=3)}.')
print(Turkish('dört').ordinal())
print(Turkish('yedi').distributive())
Turkish('kedi').instrumental()
Output
arabaya
sebepten
sebebi
ecdadı
{
'result': 'çantalarımdan',
'stem': 'çanta',
'history': [
{'action': 'plural', 'current': 'çantalar', 'kwargs': {}},
{'action': 'possessive', 'current': 'çantalarım', 'kwargs': {'person': 1}},
{'action': 'ablative', 'current': 'çantalarımdan', 'kwargs': {}}
]
}
aparatın
batağı
idrakımız
okunuz
çantaları
Elif'in Öküzü.
dördüncü
yedişer
kediyle
Turkish Grammar
-
Turkish is a highly agglutinative language, i.e., Turkish words have many grammatical suffixes or endings that determine meaning. Turkish vowels undergo vowel harmony. When a suffix is attached to a stem, the vowel in the suffix agrees in frontness or backness and in roundedness with the last vowel in the stem. Turkish has no gender.
-
Turkish Language is a language with strict rules with an only couple of exceptions which makes it very easy for simulating by coding.
User Interface
The most of the methods are not supported yet, under development
-
Source code: https://github.com/miklagard/tr
-
Demo: https://trstem.com
Other Languages
C# Version
https://github.com/yasinkuyu/Turkish.cs
PHP Version
https://github.com/yasinkuyu/Turkish.php
JavaScript Version
https://github.com/yasinkuyu/Turkish.js
Special thanks for C#, PHP and JavaScript versions
Yasin Kuyu
https://github.com/yasinkuyu/
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
Close
Hashes for turkish-suffix-library-1.0.6.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 301d28519f932af3d154fc55be96dc6ba00dbbdff752fda6612b6ea10c40d546 |
|
MD5 | db705715089692d1931d5f1098a8a6b8 |
|
BLAKE2b-256 | c26d0a5781fad1de8bec7f5e51b8dc608c10e541b9c09fbf94f3a2b007c50769 |
Close
Hashes for turkish_suffix_library-1.0.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6bacc45634b05c3742a652864b175c36d73e81c33104ae8aac5f70855d9db568 |
|
MD5 | 19e854c0aec61abec67b8ac47ca79e36 |
|
BLAKE2b-256 | 2d95fa8d1481113596575b0e686b9935816cc20e68d214b5d0bb5c1a077ffb39 |