PHP code example of wdmg / lingua-stem

1. Go to this page and download the library: Download wdmg/lingua-stem library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

wdmg / lingua-stem example snippets


    
        $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);