Download the PHP package kudashevs/keywords-extractor without Composer

On this page you can find all versions of the php package kudashevs/keywords-extractor. 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 keywords-extractor

Keywords Extractor

Latest Version on Packagist Run Tests

The keywords-extractor is a flexible and customizable PHP library that extracts relevant keywords from text.

Installation

You can install the package via composer:

Usage

The key feature of the keywords-extractor library is the possibility to extract not only individual nouns, but meaningful sequences of words that make more sense in some contexts. This possibility is provided by the RAKE PHP library that is used as the default extraction algorithm. If this library doesn't suit your needs, it can be easily substituted with something more appropriate or relevant.

The usage of the KeywordsExtractor class is pretty straightforward. To extract keywords call the extract method:

To make this library even more convenient to use in some specific cases, it provides a fluent interface.

Words collections

Sometimes, there may be a necessity to provide a big number of words to be excluded or included. It can be done with the add_words and remove_words options. In some cases, the options are not convenient to use. For these cases the library introduces a concept of words collections and correspondent asset files. To start using them, provide an assets_path option to the KeywordsExtractor class. The instantiation process is going to create two different folders in the provided assets folder (once created, these files won't be modified):

If you want to include some words to the generated keywords, update the rake_exclude.txt file. If you want to exclude some words from the generated keywords, update the rake_include.txt file. The naming logic may seem wierd, but it is because the words are included to a list of stop words and excluded from a list of stop words.

Result length

By default, the returning result is limitless, meaning that the length of the result is not limited. However, in some cases the length of the result does matter. For these cases the package introduces the concept of a Limiter.

The library provides two possibilities to limit the result:

Options

The KeywordsExtractor class accepts some configuration options:

Note: At the moment of instantiation, the KeywordsExtractor class can throw a few exceptions: InvalidOptionType, InvalidOptionValue. These exceptions extend a built-in InvalidArgumentException class, so they are easy to deal with.

Testing

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Note: Please make sure to update tests as appropriate.

License

The MIT License (MIT). Please see the License file for more information


All versions of keywords-extractor with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
ext-mbstring Version *
kudashevs/rake-php Version ^2.4
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 kudashevs/keywords-extractor contains the following files

Loading the files please wait ....