Skip to content

Php extension for Czech inclension (declension), české skloňování

License

Notifications You must be signed in to change notification settings

Mikulas/inflection-ext

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Czech inclension (declension), české skloňování

This extension should provide same functionality and API as this PHP implementation. Do note however that c extension performs way better.

PHP Extension

Installation

Download this extension from Releases. OR Build it on your own.

Dependencies: - phpcpp - pcre-8.36, build with --enable-jit --enable-utf8 --enable-unicode-properties

After installing deps, build extension with

make

Move the built library into your php extension_dir (e.g. /usr/local/php5/lib/php/extensions/no-debug-non-zts-20131226)

Finally, enable the extension by copying inflection.ini to appropriate ini location.

Usage

<?php

$inflection = new Inflection();
$inflected = $inflection->inflect('kožená bunda');

echo "Natrhnul jsem si $inflected[4]";
// Natrhnul jsem si koženou bundu

echo "$inflected[11] jsou nejlepší";
// kožené bundy jsou nejlepší

Based on original work by Pavel Sedlák, Tomáš Režnar and Heureka.

This library is about 23 times faster than my implementation in php.

Links

License

GPL 2.1

About

Php extension for Czech inclension (declension), české skloňování

Resources

License

Stars

Watchers

Forks

Packages

No packages published