Download the PHP package phil/search-synonyms without Composer

On this page you can find all versions of the php package phil/search-synonyms. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package search-synonyms

phil/search-synonyms

Search synonyms per language: equivalent and one-way rules, validated, read and written in the Solr synonyms format or JSON, kept in files or in the application's own store.

phil/search-synonyms is a plain PHP library. It holds the synonyms a site's search reads in each language: equivalent phrases, any of which finds the others — jdr, jeu de rôle —, and one-way rules, whose left side is searched as their right side — donjon => donjon, dungeon. Each phrase is kept as a search compares words, in lower case with one space between words, and every rule is checked as it is built: a phrase too long, a rule with an empty side, a rule that changes nothing are refused.

The rules of a language are read from, and written to, the Solr synonyms format — the text file many engines load — or a JSON document fit for an export or an administration form; a file that is no list of rules is refused with the number of its line. A validator notices what is allowed but likely a mistake before an administrator saves a list: a phrase on the left of two rules, or a one-way rule leading to a phrase another rule rewrites.

The lists are kept behind the SynonymStore port: a directory of files, one per language, written atomically; memory; or a table of the application's. phil/search-bundle reads a store through its synonyms port, so that a search for jdr also finds jeu de rôle.

Status

Part State
SynonymSet, SynonymList, InvalidSynonyms Implemented and tested
SolrSynonymsReader, SolrSynonymsWriter, JsonSynonyms Implemented, tested and fuzzed
SynonymValidator, Violation Implemented and tested
SynonymStore, FileSynonymStore, InMemorySynonymStore Implemented and tested

Documentation

Document What it covers
Installation Requirements and installing.
Rules Equivalent and one-way rules, phrases, limits, the validator.
Formats The Solr synonyms format and the JSON document, read and written.
Stores Files, memory, a store of the application's; with phil/search-bundle.
Extension points What an application may replace or add, and when it is stable.
Testing The package's tests and fuzz targets.
Reference Every public type, with its role.

Quick start

Requirements

PHP 8.5 or later with ext-mbstring.

Contributing

Contributions are welcome on the PHIL monorepo: read the contribution guide and the security policy explains, never in a public issue.

License

MIT, © Philippe Gamache, doing business as Le Gnome Archiviste; a Parler Haut Interagir Librement project. See LICENSE.


All versions of search-synonyms with dependencies

PHP Build Version
Package Version
Requires php Version >=8.5
ext-mbstring Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package phil/search-synonyms contains the following files

Loading the files please wait ...