kefir

by yogurt-cultures

yogurt-cultures / kefir

turkic morphology project

440 Stars 29 Forks Last release: Not found Other 59 Commits 0 Releases

Available items

No Items, yet!

The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:

kefir

Kefir

Logo

Yogurt is a free software community established at Mustafa Akg羹l Free Software Camp of 2018.

Kefir is a natural language processing kit for Turkic languages, and maybe Finnish and Hungarian in phonology.

Usage

There are two competing notions of the predicate in theories of grammar. The competition between these two concepts has generated confusion concerning the use of the term predicate in theories of grammar.

Kefir is designed to construct sentences by using predicate-logic.

>>> ayni = subject('ayn覺')
>>> havuc = subject('havu癟')
>>> gel = predicate('gel', 'third', 'perfective')
>>> yap = predicate('yap', 'third', 'perfective')
>>> dal = predicate('dal', 'third', 'progressive')
>>> dal = predicate(dal, 'third', 'perfective')

>>> birisi = subject('yakup')
>>> [sentence(birisi, eylem) for eylem in (yap, dal,)]
['yakup yapt覺', 'yakup dalmaktayd覺']

>>> [sentence(havuc, eylem) for eylem in (gel, yap, dal)]
['havu癟 geldi', 'havu癟 yapt覺', 'havu癟 dalmaktayd覺']

>>> sebze = predicate(locative('marul'), 'first', 'perfective', True)
>>> dal = predicate(locative('dal'), 'first', 'perfective', True)
>>> [sentence(ayni, eylem) for eylem in (sebze, dal)]
['ayn覺 maruldayd覺k', 'ayn覺 daldayd覺k']

Cases

  • nominative
  • genitive
  • dative
  • accusative
  • ablative
  • locative

Copulas

  • negative
  • zero
  • tobe
  • personal
  • perfective
  • imperfective
  • progressive
  • necessitative
  • future
  • impotential
  • conditional
kefir.case

Grammatical Cases

Implemented 6 grammatical cases:

  • Nominative
  • Genitive
  • Dative
  • Accusative
  • Ablative
  • Locative

Turkish has 9 more:

  • Essive
  • Instrumental
  • Inclusive
  • Abessive
  • Likeness
  • Coverage
  • Qualitative
  • Conditional
  • Possesive

Read more on: Turkish Cases.

TODO: Enum'lardaki rakamlar yerine auto() kullan覺lmal覺.

Nominative Case ('Yal覺n' in Turkish)

The simplest grammatical case, there's no suffix to affix in that case.

Nominative comes from Latin csus nomint蘋vus means case for naming.

Ablative Case ('Ayr覺lma' in Turkish)

A grammatical case for nouns, pronouns and adjectives in the grammar of various languages; it is sometimes used to express motion away from something, among other uses.

儭 Examples:

adalar[dan] geldim
merkez[den] ge癟tim
teyit[ten] ge癟tim
a癟l覺k[tan] 繹ld羹m

Accusative ('襤lgi' in Turkish)

The accusative case (abbreviated acc) of a noun is the grammatical case used to mark the direct object of a transitive verb. The same case is used in many languages for the objects of (some or all) prepositions.

儭 Examples:

aday[覺] yedim
evim[i] yapt覺m
羹z羹m[羹] piirdim

Genitive Case ('Genitifler' in Turkish)

In grammar, the genitive is the grammatical case that marks a word, usually a noun, as modifying another word, also usually a noun.

儭 Examples:

han覺melinin 癟i癟ei (flower of a plant called han覺meli)
kad覺n覺n ayakkab覺s覺 (shoes of the woman)
堥塈堥 堥堛 bbu baytin (the door of a house)
mari[i] nie ma w domu (maria is not at home)

Dative Case ('Y繹nelme' in Turkish)

In some languages, the dative is used to mark the indirect object of a sentence.

儭 Examples:

marya yakup'a bir drink verdi (maria gave jacob a drink)
maria jacob蘋 potum dedit (maria gave jacob a drink)

Locative Case ('Bulunma' in Turkish)

Locative is a grammatical case which indicates a location. It corresponds vaguely to the English prepositions "in", "on", "at", and "by".

儭 Examples:

bah癟e[de] han覺meli var.
yorum[da] iyi beatler var.
kalem[de] g羹zel u癟 var.
kefir.phonology

Turkish Phonology

In Hungarian, Finnish, and Turkic languages vowel sounds are organized in a concept called vowel harmony. Vowels may be classified as Back or Front vowels, based on the placement of the sound in the mouth.

 Front Vowels
+----------------+
 Unrounded  牠 甬
 Rounded    並潑 並嗯

 Back Vowels
+----------------+
 Unrounded  災 乖晦
 Rounded    罕 矣

TODO: Document consonant harmony.

#swap_front_and_back

Swaps front sounds to back, and vice versa.

>>> swap_front_and_back('acak')
'ecek'

>>> swap_front_and_back('ocok')
'繹c繹k'

>>> swap_front_and_back('繹c繹k')
'ocok'

>>> swap_front_and_back('acak')
'ecek'

Voicing or Sonorization ('Yumuama' in Turkish)

To make pronouncation easier, nouns ending with these sounds:

私 並把 系 男

May be softened by replacing them in order:

灸 牢 牡 乖

儭 Examples:

癟o私季n  癟o灸季n
aa並把怯彫  aa牢姊
ka覺系怯彫  ka覺牡怯彫
ren男姆n  ren狂姆n

儭 Examples in other languages:

li狄委  li肖委
stri狄委  stri肖委
proo狄  pro肖委

Devoicing or Desonorization ('Sertleme' in Turkish)

To make pronouncation easier, nouns ending with these sounds:

私 並把 系 男

May be hardened by replacing them in order:

灸 牢 牡 乖

儭 Examples:

癟o私季n  癟o灸季n
aa並把怯彫  aa牢姊
ka覺系怯彫  ka覺牡怯彫
ren男姆n  ren狂姆n

儭 Examples in Other Languages:

dogs  dogs ([氶z])
missed  missed ([st])
whizzed  whizzed ([zd])
proba  prba
郈郋訇訄  proz妦b
kefir.predication

Turkish Predication and Copula

Turkish language copulas, called 'ek-eylem' (literally 'suffix-verb'), are one of the most distinct features of Turkish grammar.

TODO: Remove unused imports.

Zero Copula

Zero copula is the rule for third person, as in Hungarian and Russian. That means two nouns, or a noun and an adjective can be juxtaposed to make a sentence without using any copula. Third person plural might be indicated with the use of plural suffix "-lar/-ler".

儭 Examples:

yogurt k羹lt羹r (yogurt [is-a] culture)
abbas yolcu (abbas [is-a] traveller)
evlerinin 繹n羹 yonca (the front of their home [is-a] plant called yonca)

儭 Tests:

>>> zero('yolcu')
'yolcu'

Negative

Negation is indicated by the negative copula 'deil'. 'Deil' is never used as a suffix, but it takes suffixes according to context.

儭 Examples:

yogurt k羹lt羹r deildir (yogurt [is-not-a] culture)
abbas yolcu deildir (abbas [is-not-a] traveller)
evlerinin 繹n羹 yonca deildir (the front of their home [is-not-a] yonca)

儭 Tests:

>>> negative('yolcu')
'yolcu deil'

To Be

Turkish "to be" as regular/auxiliary verb ('olmak').

儭 Examples:

yogurt k羹lt羹rd羹r (yogurt [is] culture)
abbas yolcudur (abbas [is] traveller)
evlerinin 繹n羹 yoncad覺r (the front of their home [is] plant called yonca)

儭 Tests:

>>> tobe('yolcu')
'yolcudur'
>>> tobe('羹z羹m')
'羹z羹md羹r'
>>> tobe('yonca')
'yoncad覺r'

Personification Copula

儭 Examples:

ben bural覺y覺m (i'm from here)
sen oral覺s覺n (you're from over there)
ayn覺 gezegenliyiz (we're from same planet)

儭 Tests:

>>> personal('u癟ak', Person.FIRST, is_plural=False)
'u癟a覺m'

>>> personal('oral覺', Person.SECOND, is_plural=False)
'oral覺s覺n'

>>> personal('gezegenli', Person.FIRST, is_plural=True)
'gezegenliyiz'

Inferential Mood ('-mi' in Turkish)

Inferential mood is used to convey information about events which were not directly observed or were inferred by the speaker.

儭 Examples:

elmaym覺覺m (i was an apple as i've heard)
羹z羹lm羹s羹n (you were sad as i've heard)
doktormu (he/she/it was a doctor as i've heard)
羹z羹mm羹s羹n (you were a grape as i've heard)

儭 Tests:

>>> inferential('繹retmen', Person.SECOND, is_plural=False)
'繹retmenmisin'

>>> inferential('羹z羹l', Person.SECOND, is_plural=False)
'羹z羹lm羹s羹n'

>>> inferential('robot', Person.FIRST, is_plural=False)
'robotmuum'

>>> inferential('robot', Person.THIRD, is_plural=False)
'robotmu'

>>> inferential('ada', Person.THIRD, is_plural=False)
'adaym覺'

Inferential Mood ('-isem' in Turkish)

Inferential mood is a grammatical mood used to express a proposition whose validity is dependent on some condition, possibly counterfactual.

儭 Examples:

elmaysam (if i am an apple)
羹z羹msen (if you are a grape)
b覺癟aklarsa (if they are a knife)

儭 Tests:

>>> conditional('elma', Person.FIRST, is_plural=False)
'elmaysam'
>>> conditional('羹z羹m', Person.SECOND, is_plural=False)
'羹z羹msen'
>>> conditional('b覺癟ak', Person.THIRD, is_plural=True)
'b覺癟aklarsa'

Alethic Modality ('-idi' in Turkish)

Linguistic modality that indicates modalities of truth, in particular the modalities of logical necessity, possibility or impossibility.

儭 Examples:

elmayd覺m (i was an apple)
羹z羹md羹n (you were a grape)
doktordu (he/she/it was a doctor)

儭 Tests:

>>> perfective('a癟覺k', Person.FIRST, is_plural=False)
'a癟覺kt覺m'

>>> perfective('oral覺', Person.SECOND, is_plural=False)
'oral覺yd覺n'

>>> perfective('dalda', Person.FIRST, is_plural=False)
'daldayd覺m'

>>> perfective('dalda', Person.THIRD, is_plural=False)
'daldayd覺'

>>> perfective('dalda', Person.FIRST, is_plural=True)
'daldayd覺k'

>>> perfective('dalda', Person.SECOND, is_plural=True)
'daldayd覺n覺z'

>>> perfective('dalda', Person.THIRD, is_plural=True)
'daldayd覺lar'

>>> perfective('gezegende', Person.THIRD, is_plural=True)
'gezegendeydiler'

The Imperfective ('-iyor' in Turkish)

Grammatical aspect used to describe a situation viewed with interior composition. It describes ongoing, habitual, repeated, or similar semantic roles, whether that situation occurs in the past, present, or future.

儭 Examples:

gidiyorum (i'm going)
kay覺yor (he's skating)
羹z羹ml羹yor (he's graping)

儭 Tests:

>>> imperfective('a癟覺', Person.FIRST, is_plural=False)
'a癟覺yorum'

>>> imperfective('a癟覺k', Person.FIRST, is_plural=False)
'a癟覺k覺yorum'

>>> imperfective('oral覺', Person.SECOND, is_plural=False)
'oral覺yorsun'

>>> imperfective('dal', Person.THIRD, is_plural=False)
'dal覺yor'

>>> imperfective('dal', Person.FIRST, is_plural=True)
'dal覺yoruz'

>>> imperfective('dal', Person.FIRST, is_plural=True)
'dal覺yoruz'

>>> imperfective('dal', Person.SECOND, is_plural=True)
'dal覺yorsunuz'

>>> imperfective('dal', Person.THIRD, is_plural=True)
'dal覺yorlar'

The Future Tense ('-iyor' in Turkish)

The future tense is a verb form that generally marks the event described by the verb as not having happened yet, but expected to happen in the future.

儭 Examples:

gidecek (he'll go)
繹lecek (he'll die)
can alacak (he'll kill someone)

儭 Tests:

>>> future('gel', Person.FIRST, is_plural=False)
'geleceim'

>>> future('a癟覺k', Person.FIRST, is_plural=False)
'a癟覺kaca覺m'

>>> future('gel', Person.FIRST, is_plural=True)
'geleceiz'

Progressive Tense

儭 Examples: g羹lmekteyim (i am in the process of laughing) 繹lmekteler (they are in the process of dying )

儭 Tests:

>>> progressive('gel', Person.FIRST, is_plural=False)
'gelmekteyim'

>>> progressive('a癟覺k', Person.FIRST, is_plural=False)
'a癟覺kmaktay覺m'

>>> progressive('gel', Person.FIRST, is_plural=True)
'gelmekteyiz'

Necessitative Copula

儭 Examples:

gitmeliyim (i must go)
ka癟mal覺y覺m (i must run away)

儭 Tests:

>>> necessitative('git', Person.FIRST, is_plural=False)
'gitmeliyim'

>>> necessitative('a癟覺k', Person.FIRST, is_plural=False)
'a癟覺kmal覺y覺m'

>>> necessitative('uza', Person.FIRST, is_plural=True)
'uzamal覺y覺z'

Impotential Copula

儭 Examples:

gidemem (i cannot come)
ka癟amay覺z (we cannot run away)

儭 Tests:

>>> impotential('git', Person.FIRST, is_plural=False)
'gidemem'

>>> impotential('git', Person.SECOND, is_plural=False)
'gidemezsin'

>>> impotential('git', Person.THIRD, is_plural=False)
'gidemez'

>>> impotential('git', Person.FIRST, is_plural=True)
'gidemeyiz'

>>> impotential('git', Person.FIRST, is_plural=True)
'gidemeyiz'

>>> impotential('git', Person.SECOND, is_plural=True)
'gidemezsiniz'

>>> impotential('git', Person.THIRD, is_plural=True)
'gidemezler'

>>> impotential('al', Person.THIRD, is_plural=True)
'alamazlar'
kefir.meta

Contribution Guide

  • Don't load a fixture, code is our data.
  • Don't leave a comment! Docstrings are only for the context and test.
  • Be nice

Credits

  • Berk Buzcu (8-bit artwork)
  • Serdar A癟覺kyol (Illustration)
  • Fatih Erikli (Phonological Processes, Predicate Logic)
  • Armagan Amcalar (Javascript Port)
  • Umut Karc覺 (Packaging and Versioning)
  • Kerem Bozda (Editing)

License

This project is licensed under the terms of the MIT license.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.