2017 © Pedro Peláez
 

library php-lemmatizer

PHP Lemmatizer is a lemmatization library to retrieve a base form from an English inflected word.

image

skyeng/php-lemmatizer

PHP Lemmatizer is a lemmatization library to retrieve a base form from an English inflected word.

  • Tuesday, June 27, 2017
  • by Markard
  • Repository
  • 7 Watchers
  • 11 Stars
  • 2,444 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 1 Open issues
  • 9 Versions
  • 4 % Grown

The README.md

Лемматизатор

Краткое описание

Занимается лемматизацией английских слов., (*1)

Ответственные

PHP Lemmatizer is a lemmatization library for PHP to retrieve a base form from an inflected form word in English., (*2)

Inspired by JavaScript Lemmatizer but the returned values are different from it., (*3)

Installation

With Composer

$ composer require skyeng/php-lemmatizer
{
    "require": {
        "skyeng/php-lemmatizer": "^1.0"
    }
}

Usage

<?php

use Skyeng\Lemmatizer;
use Skyeng\Lemma;

// Require Composer's autoloader
require_once __DIR__ . "/vendor/autoload.php";

$lemmatizer = new Lemmatizer();

// retrieve a lemma with a part of speech.
// you can assign Lemma::POS_VERB or Lemma::POS_NOUN or Lemma::POS_ADJECTIVE or
// POS_ADVERB as a part of speech.
$lemmas = $lemmatizer->getLemmas('desks', Lemma::POS_NOUN); // => [ new Lemma('desk', Lemma::POS_NOUN) ]

// of course, available for irregular inflected form words.
$lemmas = $lemmatizer->getLemmas('went', Lemma::POS_VERB); // => [ new Lemma('go', Lemma::POS_VERB) ]
$lemmas = $lemmatizer->getLemmas('better', Lemma::POS_ADJECTIVE); // => [ new Lemma('better', Lemma::POS_ADJECTIVE), new Lemma('good', Lemma::POS_ADJECTIVE) ]

// when multiple base forms are found, return all of them.
$lemmas = $lemmatizer->getLemmas('leaves', Lemma::POS_NOUN); // => [ new Lemma('leave', Lemma::POS_NOUN), new Lemma('leaf', Lemma::POS_NOUN) ]

// retrieve a lemma without a part of speech.
$lemmas = $lemmatizer->getLemmas('sitting'); // => [ new Lemma('sit', Lemma::POS_VERB), new Lemma('sitting', Lemma::POS_ADJECTIVE) ]

// retrieve only lemmas not including part of speeches in the returned value.
$lemmas = $lemmatizer->getOnlyLemmas('desks', Lemma::POS_NOUN); // => [ 'desk' ]
$lemmas = $lemmatizer->getOnlyLemmas('coded', Lemma::POS_VERB); // => [ 'code' ]
$lemmas = $lemmatizer->getOnlyLemmas('leaves'); // => [ 'leave', 'leaf' ]

Limitations

// Lemmatizer leaves alone a word not included in it's dictionary index.
$lemmas = $lemmatizer->getLemmas('MacBooks'); // => [ new Lemma('MacBooks', Lemma::POS_NOUN) ]

Contribution

  1. Fork it ( https://github.com/skyeng/php-lemmatizer )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Licence

MIT License, (*4)

The Versions

27/06 2017

dev-master

9999999-dev

PHP Lemmatizer is a lemmatization library to retrieve a base form from an English inflected word.

  Sources   Download

MIT

The Requires

  • php >=5.6

 

The Development Requires

php word english lemmatizer lemmatization

27/06 2017

v1.0.3

1.0.3.0

PHP Lemmatizer is a lemmatization library to retrieve a base form from an English inflected word.

  Sources   Download

MIT

The Requires

  • php >=5.6

 

The Development Requires

php word english lemmatizer lemmatization

27/06 2017

dev-feature/refactoring

dev-feature/refactoring

PHP Lemmatizer is a lemmatization library to retrieve a base form from an English inflected word.

  Sources   Download

MIT

The Requires

  • php >=5.6

 

The Development Requires

php word english lemmatizer lemmatization

15/02 2017

v1.0.2

1.0.2.0

PHP Lemmatizer is a lemmatization library to retrieve a base form from an English inflected word.

  Sources   Download

MIT

The Requires

  • php >=5.6

 

The Development Requires

php word english lemmatizer lemmatization

15/02 2017

dev-feature/php7_support

dev-feature/php7_support

PHP Lemmatizer is a lemmatization library to retrieve a base form from an English inflected word.

  Sources   Download

MIT

The Requires

  • php >=5.6

 

The Development Requires

php word english lemmatizer lemmatization

14/02 2017

v1.0.1

1.0.1.0

PHP Lemmatizer is a lemmatization library to retrieve a base form from an English inflected word.

  Sources   Download

MIT

The Requires

  • php ^5.6

 

The Development Requires

php word english lemmatizer lemmatization

14/02 2017

dev-feature/only-lemmas

dev-feature/only-lemmas

PHP Lemmatizer is a lemmatization library to retrieve a base form from an English inflected word.

  Sources   Download

MIT

The Requires

  • php ^5.6

 

The Development Requires

php word english lemmatizer lemmatization

14/02 2017

v1.0.0

1.0.0.0

PHP Lemmatizer is a lemmatization library to retrieve a base form from an English inflected word.

  Sources   Download

MIT

The Requires

  • php ^5.6

 

The Development Requires

php word english lemmatizer lemmatization

14/02 2017

dev-feature/wor-1611

dev-feature/wor-1611

PHP Lemmatizer is a lemmatization library to retrieve a base form from an English inflected word.

  Sources   Download

MIT

The Requires

  • php ^5.6

 

The Development Requires

php word english lemmatizer lemmatization