Skip to content

Latest commit

 

History

History
19 lines (15 loc) · 549 Bytes

README.md

File metadata and controls

19 lines (15 loc) · 549 Bytes

GermanNumerus

Inflect plural and singular of nouns in German Language.

PHP port of pluralize and singularize part from the NLP library https://github.com/clips/pattern/blob/master/pattern/text/de/inflect.py

Usage

See example.php

Include

require_once('GermanNumerus.php');

use \ulrischa\GermanNumerus;

Generate plural for German word

echo GermanNumerus::pluralize("Kopf");

Generate singular for german word

echo GermanNumerus::singularize("Bodenverunreinigungen");

Accuracy

ca. 72% for pluralize() ca. 84% for singularize()