phpwndb/phpwndb

PHP API for WordNet (https://wordnet.princeton.edu/)

v0.1 2023-02-26 18:46 UTC

This package is auto-updated.

Last update: 2024-04-05 21:18:29 UTC


README

WordNet database provides kind of semantic of words stored in files. This project is PHP API for easy reading of these files. See examples/wordNet.php.

Getting Started

Prerequisites

The code needs PHP 8.1 or greater.

Installing

composer require phpwndb/phpwndb

Basic usage

$wordNet = (new PhpWndb\Dataset\WordNetProvider())->getWordNet();
$synsets = $wordNet->search('word');

foreach ($synsets as $synset) {
    echo $synset->getGloss() . "\n";
}

Running the tests

composer install
composer phpstan
composer tests

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.