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(f'{Turkish("Elif").genitive(proper_noun=True)} {Turkish("öküz").possessive(person=3)}.')
print(Turkish('Öykü').genitive(proper_noun=True))
print(Turkish('Cem').dative(proper_noun=True))
print(Turkish('Nil').dative(proper_noun=True))
print(Turkish('ALİ').dative(proper_noun=True))
print(Turkish('Taylan').ablative(proper_noun=True))
print(Turkish('Amasya').accusative(proper_noun=True))
print(Turkish('ağaç').genitive(proper_noun=False))
print(Turkish('erik').accusative(proper_noun=False))
print(Turkish('Erik').accusative(proper_noun=True))
print(Turkish('kavanoz').possessive(person=1))
print(Turkish('kavanoz').possessive(person=2))
print(Turkish('kavanoz').possessive(person=3))
print(Turkish('halter').possessive(person=1, plural=True))
print(Turkish('halter').possessive(person=2, plural=True))
print(Turkish('halter').possessive(person=3, plural=True))
print(Turkish('Kenya').possessive(person=3, plural=True))
print(Turkish('çanta').plural().possessive(person=1).ablative().to_json())
Output
Elif'in öküzü.
Öykü'nün
Cem'e
Nil'e
ALİ'YE
Taylan'dan
Amasya'yı
ağacın
eriği
Erik'i
kavanozum
kavanozun
kavanozu
halterimiz
halteriniz
halterleri
Kenyaları
{'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': {}}]}
Verbs
Parameters: person (1, 2, 3), negative (boolean), question (boolean), plural (boolean)
Turkish('git').infinitive()
> gitmek
Turkish('git').infinitive(negative=True)
> gitmemek
Turkish('al').future(person=2, plural=True) # Second person plural
> alacaksınız
Turkish('al').present_simple(person=1) # First person single
> alırım
Turkish('al').past(person=3, plural=True)
> aldılar
Turkish('al').command(person=3, plural=True)
> alsınlar
Turkish('ver').present_continuous(person=1)
> veriyorum
Turkish('ver').present_continuous_alternative(person=1)
> vermekteyim
Turkish('ver').must(person=2)
> vermelisin
Turkish('anlat').wish_condition(person=3)
> anlatsa
Turkish('sakla').wish(person=3, plural=True)
> saklayalar
Turkish('anla').learned_past(person=3, question=True)
> anlamış mı
Turkish('sat').past_learned_past(person=2, negative=True)
> satmamıştın
Turkish('kork').learned_past_learned_past(person=3)
> korkmuşmuş
Turkish('oyna').learned_past_future(person=2, negative=True)
> oynamayacakmışsın
Turkish('oyna').past_future(person=2, negative=True, question=True)
> oynamayacak mıydın
Turkish('oyna').past_past(person=2, negative=True)
> oynamadıydın
Turkish('gül').past_condition(person=2)
> güldüysen
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.
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-0.4.6.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | bfa4b8d1d6f963a14131e08f4eae8a1460d347bc05567a9578e24d64e724ed48 |
|
MD5 | 62d02f4c80f74da2e2dd40bd9e0a0de2 |
|
BLAKE2b-256 | b2dcac762f4c305b781fe283db163c718b45f2bf18aee5fd39bcaeaade6c5199 |
Close
Hashes for turkish_suffix_library-0.4.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 53e7ec767c1184c0a0d61a0c18404f07cbec4f0cfb6cc72c1afcbdc08ecac0a4 |
|
MD5 | d08bcd965858386596d3f60ef768c1c9 |
|
BLAKE2b-256 | c95dd33bb9d4a4d79d88795391d93f5f0342b2fbed0112488e424e5a619e985a |