Skip to main content

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).to_string())
print(Turkish('Cem').dative(proper_noun=True).to_string())
print(Turkish('Nil').dative(proper_noun=True).to_string())
print(Turkish('ALİ').dative(proper_noun=True).to_string())
print(Turkish('Taylan').ablative(proper_noun=True).to_string())
print(Turkish('Amasya').accusative(proper_noun=True).to_string())
print(Turkish('ağaç').genitive(proper_noun=False).to_string())
print(Turkish('erik').accusative(proper_noun=False).to_string())
print(Turkish('Erik').accusative(proper_noun=True).to_string())
print(Turkish('kavanoz').possessive(person=1).to_string())
print(Turkish('kavanoz').possessive(person=2).to_string())
print(Turkish('kavanoz').possessive(person=3).to_string())
print(Turkish('halter').possessive(person=1, plural=True).to_string())
print(Turkish('halter').possessive(person=2, plural=True).to_string())
print(Turkish('halter').possessive(person=3, plural=True).to_string())
print(Turkish('Kenya').possessive(person=3, plural=True).to_string())
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ı

Verbs

Parameters: person (1, 2, 3), negative (boolean), question (boolean), plural (boolean)

Turkish('git').infinitive().to_string()
> gitmek 

Turkish('git').infinitive(negative=True).to_string()
> gitmemek

Turkish('al').future(person=2, plural=True).to_string()  # Second person plural
> alacaksınız

Turkish('al').present_simple(person=1).to_string()  # First person single
> alırım

Turkish('al').past(person=3, plural=True).to_string()
> aldılar

Turkish('al').command(person=3, plural=True).to_string()
> alsınlar

Turkish('ver').present_continuous(person=1).to_string()
> veriyorum

Turkish('ver').present_continuous_alternative(person=1).to_string()
> vermekteyim

Turkish('ver').must(person=2).to_string()
> vermelisin

Turkish('anlat').wish_condition(person=3).to_string()
> anlatsa

Turkish('sakla').wish(person=3, plural=True).to_string()
> saklayalar

Turkish('anla').learned_past(person=3, question=True).to_string()
> anlamış mı

Turkish('sat').past_learned_past(person=2, negative=True).to_string()
> satmamıştın

Turkish('kork').learned_past_learned_past(person=3).to_string()
> korkmuşmuş

Turkish('oyna').learned_past_future(person=2, negative=True).to_string()
> oynamayacakmışsın

Turkish('oyna').past_future(person=2, negative=True, question=True).to_string()
> oynamayacak mıydın

Turkish('oyna').past_past(person=2, negative=True).to_string()
> oynamadıydın

Turkish('gül').past_condition(person=2).to_string()
> 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.

  • More Info

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


Download files

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

Source Distribution

turkish-suffix-library-0.4.0.tar.gz (14.1 kB view details)

Uploaded Source

File details

Details for the file turkish-suffix-library-0.4.0.tar.gz.

File metadata

  • Download URL: turkish-suffix-library-0.4.0.tar.gz
  • Upload date:
  • Size: 14.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.8.6

File hashes

Hashes for turkish-suffix-library-0.4.0.tar.gz
Algorithm Hash digest
SHA256 9bed867e9e9169335c846c3fc4f569c6407bcca90ba3a7f75a44b340fcb2c050
MD5 917470b2616844149a823baa21ce1c5e
BLAKE2b-256 2fcdd6288200e3b1885ae518538e64cd2ad61ff020877915daa89bc959cc8c9f

See more details on using hashes here.

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