Skip to content

siiptuo/voikko-php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

voikko-php

PHP bindings for libvoikko based on PHP FFI.

Requirements

  • PHP 7.4 or newer with FFI and Multibyte String extensions enabled
  • libvoikko (libvoikko1 package in Ubuntu)
  • Voikko dictionary (voikko-fi package in Ubuntu)

Installation

Install via Composer:

composer require siiptuo/voikko

Example

Running:

$voikko = new \Siiptuo\Voikko\Voikko();
$word = "kissammeko";
echo "       word: " . $word . PHP_EOL;
echo "hyphenation: " . $voikko->hyphenate($word) . PHP_EOL;
foreach ($voikko->analyzeWord($word) as $analysis) {
    echo "  base form: " . $analysis->baseForm . PHP_EOL;
}

outputs:

       word: kissammeko
hyphenation: kis-sam-me-ko
  base form: kissa

Check out API documentation for all available functionality.

License

Like libvoikko, these bindings can be used under one of the following licenses:

  • Mozilla Public License, version 1.1
  • GNU General Public License, version 2 or later
  • GNU Lesser General Public License, version 2.1 or later
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy