2017 © Pedro Peláez
 

library stemming

Stemming by Language

image

nadar/stemming

Stemming by Language

  • Tuesday, August 15, 2017
  • by nadar
  • Repository
  • 1 Watchers
  • 1 Stars
  • 2,992 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 4 Versions
  • 9 % Grown

The README.md

PHP Stemming Collection

Tests Latest Stable Version Total Downloads, (*1)

The main purpose of this repo is to unify different stemming components based on its language., (*2)

Installation

This package is distributed over the packagist service for composer. In order to use this package composer must be installed., (*3)

composer require nadar/stemming

Usage

Using the stemmer for your desired language:, (*4)

<?php
include 'vendor/autoload.php';

$stemmed = \Nadar\Stemming\Stemm::stem('drinking', 'en');

echo $stemmed; // output: "drink"

If your provided language could not be found, the original word will be returned., (*5)

You can also stem a whole phrase:, (*6)

echo \Nadar\Stemming\Stemm::stemPhrase('I am playing drums', 'en');

Ignore

Certain words are on the ignore list, valid for all languages, see Stemm::$ignore. You can adjust that list with Stemm::$ignore = ['foo', 'bar']., (*7)

Librarys Used:

  • German Stemming: https://github.com/arisro/german-stemmer (Copyright (c) 2013 Aris Buzachis (buzachis.aris@gmail.com))
  • English Stemming: https://tartarus.org/martin/PorterStemmer/php.txt (Copyright (c) 2005 Richard Heyes (http://www.phpguru.org/))

Testing and PR

In order to test the libray run:, (*8)

./vendor/bin/phpunit tests

in order to psr2 fix your code run:, (*9)

./vendor/bin/php-cs-fixer fix src/

The Versions

15/08 2017

dev-master

9999999-dev https://github.com/nadar/stemming

Stemming by Language

  Sources   Download

MIT

The Development Requires

php stemmer stemming

26/03 2017

1.0.2

1.0.2.0 https://github.com/nadar/stemming

Stemming by Language

  Sources   Download

MIT

The Development Requires

php stemmer stemming

20/03 2017

1.0.1

1.0.1.0 https://github.com/nadar/stemming

Stemming by Language

  Sources   Download

MIT

The Development Requires

php stemmer stemming

20/03 2017

1.0.0

1.0.0.0 https://github.com/nadar/stemming

Stemming by Language

  Sources   Download

The Development Requires

php stemmer stemming