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(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

Adverbs

Turkish('vur').adverb_repeatedly()
> vurdukça

Turkish('ara').adverb_since_action()
> arayalı

etc.

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.

  • More Info

User Interface

The most of the methods are not supported yet, under development

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.6.2.tar.gz (16.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

turkish_suffix_library-0.6.2-py3-none-any.whl (658.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: turkish-suffix-library-0.6.2.tar.gz
  • Upload date:
  • Size: 16.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.1.2 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.6.12

File hashes

Hashes for turkish-suffix-library-0.6.2.tar.gz
Algorithm Hash digest
SHA256 ae5546b7b8d9af8fcfedb4d1b1f4d891658b60aa2b91c12bfc98d0a9a9365092
MD5 5ecfdbdbf871c45f0273dca269ea8c33
BLAKE2b-256 be35ecf9a2c948ebf6576941e8109081ba3da77f5f0f1705d6deb67d977511b8

See more details on using hashes here.

File details

Details for the file turkish_suffix_library-0.6.2-py3-none-any.whl.

File metadata

  • Download URL: turkish_suffix_library-0.6.2-py3-none-any.whl
  • Upload date:
  • Size: 658.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.1.2 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.6.12

File hashes

Hashes for turkish_suffix_library-0.6.2-py3-none-any.whl
Algorithm Hash digest
SHA256 db89bcd0d77b4ad771745a44ce7af3b021f1974f2886363c2eab7bbddce886a4
MD5 246608592d9aee4da4b6384f99aa1fc4
BLAKE2b-256 b3a7330fad4c6183b1ea61e7fbeae6ba40f89d03204d94af7effa06a4cbcfca3

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