PHPackages                             netovd/php-lemmatizer - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. netovd/php-lemmatizer

ActiveLibrary

netovd/php-lemmatizer
=====================

fork of mbeurel/php-lemmatizer

02PHP

Since Apr 3Pushed 1y agoCompare

[ Source](https://github.com/netovd/php-lemmatizer)[ Packagist](https://packagist.org/packages/netovd/php-lemmatizer)[ RSS](/packages/netovd-php-lemmatizer/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)DependenciesVersions (1)Used By (0)

php-lemmatizer
==============

[](#php-lemmatizer)

[![Minimum PHP Version](https://camo.githubusercontent.com/4c62148864d567c4ee794ffab09c1dd4a3f45e41064bbb016440beddaae71a4d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344253230372e322d3838393242462e737667)](https://php.net/)[![Latest Stable Version](https://camo.githubusercontent.com/1d1b0dc328580f8c104e7218c96e64a4501a18133af4a6574d2215285d37dd28/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d62657572656c2f7068702d6c656d6d6174697a65722e737667)](https://packagist.org/packages/mbeurel/php-lemmatizer)[![Total Downloads](https://camo.githubusercontent.com/8101cbeca91e30f684c23f1cc3d7844dfaa8a8946de2708d686139a0e8bba4cc/68747470733a2f2f706f7365722e707567782e6f72672f6d62657572656c2f7068702d6c656d6d6174697a65722f646f776e6c6f6164732e737667)](https://packagist.org/packages/mbeurel/php-lemmatizer)[![License](https://camo.githubusercontent.com/74743cfc834291ad3a890d5eb7208f025f148b1a03249ecaf4a93bdcde48473d/68747470733a2f2f706f7365722e707567782e6f72672f6d62657572656c2f7068702d6c656d6d6174697a65722f6c6963656e73652e737667)](https://packagist.org/packages/mbeurel/php-lemmatizer)

A simple lemmatizer tool based on [TreeTagger](https://www.cis.uni-muenchen.de/~schmid/tools/TreeTagger/) for PHP.

Installation TreeTagger library
-------------------------------

[](#installation-treetagger-library)

View TreeTagger [WebSite](https://www.cis.uni-muenchen.de/~schmid/tools/TreeTagger/)

Install php-lemmatizer
----------------------

[](#install-php-lemmatizer)

You can install it with Composer:

```
composer require mbeurel/php-lemmatizer

```

Examples
--------

[](#examples)

Example scripts are available ina separate repository [php-lemmatizer/example](https://github.com/mbeurel/php-lemmatizer/tree/master/exemple).

Sample Code
-----------

[](#sample-code)

```
include "vendor/autoload.php";
use PhpTreeTagger\TreeTagger;
$treeTaggerPath = __DIR__."/treeTagger"; // Library TreeTagger path

try {

  // Init library
  $treeTagger = new TreeTagger("french", array(
      "treeTaggerPath"        =>  $treeTaggerPath,      // Path to TreeTagger Library
      "debug"                 =>  false,                // View Debug
      "wordUnique"            =>  true,                 // Keep only one occurrence of the word
      "wordRemoveAccent"      =>  true,                 // Remove all accent in word
      "nbProcess"             =>  $nbProcess            // Number of processes executed at the same time
    )
  );

  // Remove type in words
  $treeTagger->setCleanTypeWords(
    array(
      "PRO:PER",
      "DET:ART",
      "DET:POS",
      "SENT",
      "PRP"
    )
  );

  // Lemmatizer String or Array parameters, to array => ["La lemmatisation désigne un traitement lexical", "apporté à un texte en vue de son analyse"]
  $result = $treeTagger->lemmatizer("La lemmatisation désigne un traitement lexical apporté à un texte en vue de son analyse.");

  // View result :
  var_dump($result);

  //  $result = array(
  //    0  =>  array(
  //      "value"     =>  "lemmatisation designer traitement lexical apporter texte vue analyse",
  //      "detail"    =>  array(
  //        1           =>  array(
  //          "source"    =>  "lemmatisation",
  //          "type"      =>  "NOM",
  //          "dest"      =>  "lemmatisation"
  //        ),
  //        2           =>  array(
  //          "source"    =>  "désigne",
  //          "type"      =>  "VER:pres",
  //          "dest"      =>  "désigner"
  //        ),
  //        4           =>  array(
  //          "source"    =>  "traitement",
  //          "type"      =>  "NOM",
  //          "dest"      =>  "traitement"
  //        ),
  //        6           =>  array(
  //          "source"    =>  "apporté",
  //          "type"      =>  "VER:pper",
  //          "dest"      =>  "apporter"
  //        ),
  //        7           =>  array(
  //          "source"    =>  "à",
  //          "type"      =>  "PRP",
  //          "dest"      =>  "à"
  //        ),
  //        9           =>  array(
  //          "source"    =>  "texte",
  //          "type"      =>  "NOM",
  //          "dest"      =>  "texte"
  //        ),
  //        10          =>  array(
  //          "source"    =>  "en",
  //          "type"      =>  "PRP",
  //          "dest"      =>  "en"
  //        ),
  //        11          =>  array(
  //          "source"    =>  "vue",
  //          "type"      =>  "NOM",
  //          "dest"      =>  "vue"
  //        ),
  //        12          =>  array(
  //          "source"    =>  "de",
  //          "type"      =>  "PRP",
  //          "dest"      =>  "de"
  //        ),
  //        13          =>  array(
  //          "source"    =>  "son",
  //          "type"      =>  "DET:POS",
  //          "dest"      =>  "son"
  //        ),
  //        14          =>  array(
  //          "source"    =>  "analyse",
  //          "type"      =>  "NOM",
  //          "dest"      =>  "analyse"
  //        ),
  //        15          =>  array(
  //          "source"    =>  ".",
  //          "type"      =>  "SENT",
  //          "dest"      =>  "."
  //        )
  //      }
  //    }
  //  }
} catch(\Exception $e) {
  echo $e;
}
```

Credits
-------

[](#credits)

Created by [Matthieu Beurel](https://www.mbeurel.com). Sponsored by [Yipikai](https://yipikai.studio).

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance35

Infrequent updates — may be unmaintained

Popularity2

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity15

Early-stage or recently created project

 Bus Factor1

Top contributor holds 80% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/8854b77708b979bdc44cdecd06c7c4d2d03cfaafc6c5ff8a0768058427f41bbc?d=identicon)[netovd](/maintainers/netovd)

---

Top Contributors

[![mbeurel](https://avatars.githubusercontent.com/u/439066?v=4)](https://github.com/mbeurel "mbeurel (12 commits)")[![netovd](https://avatars.githubusercontent.com/u/25816743?v=4)](https://github.com/netovd "netovd (3 commits)")

### Embed Badge

![Health badge](/badges/netovd-php-lemmatizer/health.svg)

```
[![Health](https://phpackages.com/badges/netovd-php-lemmatizer/health.svg)](https://phpackages.com/packages/netovd-php-lemmatizer)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
