Turkish suffix library
Project description
Turkish.py
Turkish Suffix Library for Python
Install
pip install turkish-suffix-library
Using
Nouns
from turkish_suffix_library import turkish
print(turkish.make_genitive("Öykü", proper_noun=True))
print(turkish.make_dative("Fatma", proper_noun=True))
print(turkish.make_dative("Yasin", proper_noun=True))
print(turkish.make_dative("ALİ", proper_noun=True))
print(turkish.make_abblative("Ali", proper_noun=True ))
print(turkish.make_accusative("Kaliningrad", proper_noun=True))
print(turkish.make_genitive("ağaç", proper_noun=False))
print(turkish.make_cccusative("erik", proper_noun=False))
print(turkish.make_accusative("Erik", proper_noun=True))
print(turkish.possessive_affix("kavanoz", person=1, quantity="singular"))
print(turkish.possessive_affix("kavanoz", person=2, quantity="singular"))
print(turkish.possessive_affix("kavanoz", person=3, quantity="singular"))
print(turkish.possessive_affix("halter", person=1, quantity="plural"))
print(turkish.possessive_affix("halter", person=2, quantity="plural"))
print(turkish.possessive_affix("halter", person=3, quantity=plural))
print(turkish.possessive_affix("Kenya", person=3, quantity=plural))
Output
Öykü'nün
Fatma'ya
Yasin'e
ALİ'YE
Ali'den
Kaliningrad'ı
ağacın
eriği
Erik'i
kavanozum
kavanozun
kavanozu
halterimiz
halteriniz
halterleri
Kenyaları
Verbs
Parameters: person (1, 2, 3), negative (boolean), question (boolean), plural (boolean)
turkish.make_infinitive('git')
> gitmek
turkish.make_infinitive('git', negative=True)
> gitmemek
turkish.make_future('al', person=2, plural=True) # Second person plural
> alacaksın
turkish.make_present_simple('al', person=1) # First person single
> alırım
turkish.make_past('al', person=3, plural=True)
> aldı
turkish.make_command('al', person=3, plural=True)
> alsın
turkish.make_present_continuous('ver', person=1)
> veriyorum
turkish.make_present_continuous_alternative('ver', person=1)
> vermekteyim
turkish.make_must('ver', person=2)
> vermelisin
turkish.make_wish_condition('anlat', person=3)
> anlatsa
turkish.make_wish('sakla', person=3, plural=True)
> saklayasın
turkish.make_past_perfect('anla', person=3, question=True)
> anlamış mı
turkish.make_past_past_perfect('sat', person=2, negative=True)
> satmamıştın
turkish.make_past_perfect_past_perfect('kork', person=3)
> korkmuşmuş
turkish.make_past_perfect_future('oyna', person=2, negative=True)
> oynamayacakmışsın
turkish.make_past_future('oyna', person=2, negative=True, question=True)
> oynamayacak mıydın
turkish.make_past_past('oyna', person=2, negative=True)
> oynamadıydın
turkish.make_past_condition('gül', 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 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.3.5.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b49da7a850d6559712f87c69b9d24487efa8bab0b062b353c8a6cdd4d1086f68 |
|
MD5 | e9c83285228a7cf7dcf17ed8d6dcf377 |
|
BLAKE2b-256 | dfec3cba44acfd242929f6c7051df4abda3f7604554ab5caca8faa4941ad57e4 |
Close
Hashes for turkish_suffix_library-0.3.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 77dca6c644f475a73f1d089517d42407208ae2fd407a57fc588645ca77c2b1c8 |
|
MD5 | d2606b316df0e4817a8918901ff964a5 |
|
BLAKE2b-256 | 067771f37c59977dbff44944ecc3a74275c6238f8950b5c95c5929d81f721939 |