Skip to content

Instantly share code, notes, and snippets.

Created Apr 27, 2020
What would you like to do?
Turkish Stemmer PHP Test

Sample Usage For the PHP Turkish Stemmer Project

You can download the gist as zip and open it. After open it, run the below command:

composer install

Then our environment ready. Just run the file :

php example.php
"name": "sample_project/test",
"authors": [
"name": "Haydar KULEKCI",
"email": ""
"require": {
"hkulekci/turkish-stemmer-php": "dev-master"
include_once 'vendor/autoload.php';
use TurkishStemmer\Stemmer;
$stemmer = new Stemmer();
// Amasya
echo $stemmer->stem('Amasyalılar') . PHP_EOL;
// Köy
echo $stemmer->stem('köylülerimiz') . PHP_EOL;
// Köyl => burada hatalı sonuç veriyor örneğin
echo $stemmer->stem('köylü') . PHP_EOL;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment