wdmg/lingua-stem

支持英语、俄语和乌克兰语的Porter词干提取算法实现。

1.1.0 2023-06-21 09:05 UTC

This package is auto-updated.

Last update: 2024-09-21 11:36:36 UTC


README

Downloads Packagist Version Progress GitHub license

LinguaStem

支持英语、俄语和乌克兰语的Porter词干提取算法实现。基于PorterStemmer类 [https://tartarus.org/martin/PorterStemmer/php.txt] 和 [http://snowball.tartarus.org/algorithms/russian/stemmer.html]

要求

  • PHP 5.6或更高版本

安装

要安装此库,请在控制台运行以下命令

$ composer require "wdmg/lingua-stem"

使用方法

<?php

    $word = 'landmarks';
    $stem = new LinguaStem('en');
    print $stem::word($word);
    
    // or
    
    $text = 'Chicago has many historic places to visit. Keith found the Chicago Water Tower impressive as it is one of the few remaining landmarks to have survived the Great Chicago Fire of 1871.';
    $stem = new LinguaStem('en');
    print $stem->text($text);

?>

通用信息

http://snowball.tartarus.org/algorithms/porter/stemmer.html https://metacpan.org/release/Lingua-Stem https://en.wikipedia.org/wiki/Stemming https://ru.wikipedia.org/wiki/Стеммер_Портера

状态和版本 [可用]

  • v.1.1.0 - 更新版权信息
  • v.1.0.1 - 添加命名空间
  • v.1.0.0 - 添加LinguaStem()类代码和模式库

版权