Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yasinkuyu/turkish.php
Turkish Suffix Library for PHP - Türkçe Çekim ve Yapım Ekleri
https://github.com/yasinkuyu/turkish.php
nlp php stem vowel
Last synced: 7 days ago
JSON representation
Turkish Suffix Library for PHP - Türkçe Çekim ve Yapım Ekleri
- Host: GitHub
- URL: https://github.com/yasinkuyu/turkish.php
- Owner: yasinkuyu
- Created: 2016-02-29T13:39:30.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2024-06-14T20:24:10.000Z (5 months ago)
- Last Synced: 2024-08-16T00:09:11.793Z (3 months ago)
- Topics: nlp, php, stem, vowel
- Language: PHP
- Size: 9.77 KB
- Stars: 61
- Watchers: 5
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Turkish.php
==========### Turkish Suffix Library for PHP
[@yasinkuyu](https://twitter.com/yasinkuyu)
## Composer Install
composer require yasinkuyu/turkish
require_once __DIR__ . '/vendor/autoload.php';
## Manual installation
require 'Turkish.php';## Using
$tr = new Turkish;echo $tr->makeGenitive("Öykü", array ( "proper_noun" => true ) ), PHP_EOL;
echo $tr->makeDative("Fatma", array ( "proper_noun" => true ) ), PHP_EOL;echo $tr->makeDative("Yasin", array ( "proper_noun" => true ) ), PHP_EOL;
echo $tr->makeDative("ALİ", array ( "proper_noun" => true ) ), PHP_EOL;
echo $tr->makeAblative("Ali", array ( "proper_noun" => true ) ), PHP_EOL;
echo $tr->makeAccusative("Kaliningrad", array ( "proper_noun" => true ) ), PHP_EOL;echo $tr->makeDerivative("güneş", array ( "proper_noun" => false ) ), PHP_EOL;
echo $tr->makeGenitive("ağaç", array ( "proper_noun" => false ) ), PHP_EOL;
echo $tr->makeAccusative("erik", array ( "proper_noun" => false ) ), PHP_EOL;
echo $tr->makeAccusative("Erik", array ( "proper_noun" => true ) ), PHP_EOL;echo $tr->possessiveAffix("kavanoz", array ( "person" => "1", "quantity" => "singular" ) ), PHP_EOL;
echo $tr->possessiveAffix("kavanoz", array ( "person" => "2", "quantity" => "singular") ), PHP_EOL;
echo $tr->possessiveAffix("kavanoz", array ( "person" => "3", "quantity" => "singular") ), PHP_EOL;echo $tr->possessiveAffix("halter", array ( "person" => "1", "quantity" => "plural") ), PHP_EOL;
echo $tr->possessiveAffix("halter", array ( "person" => "2", "quantity" => "plural") ), PHP_EOL;
echo $tr->possessiveAffix("halter", array ( "person" => "3", "quantity" => "plural") ), PHP_EOL;echo $tr->possessiveAffix("Kenya", array ( "person" => "3", "quantity" => "plural") ), PHP_EOL;
# Output
Öykü'nün
Fatma'ya
Yasin'e
ALİ'YE
Ali'den
Kaliningrad'ı
güneşli
ağacın
eriği
Erik'i
kavanozum
kavanozun
kavanozu
halterimiz
halteriniz
halterleri
Kenyaları## 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.
* [More Info](http://en.wikipedia.org/wiki/Turkish_grammar)## Author
* Yasin Kuyu
* [Follow me at Twitter](http://twitter.com/yasinkuyu)
C# Version
https://github.com/yasinkuyu/Turkish.cs
JavaScript Version
https://github.com/yasinkuyu/Turkish.js
Python Version
https://github.com/miklagard/Turkish-Suffix-Library