Summarizer provides an elegant interface to summarize text using a variety of third-party providers.
Supported Providers:
- DayRev (local)
- Smmry
Run the following composer command to add the package to your project:
composer require dayrev/summarizer
Alternatively, add "dayrev/summarizer": "^1.0"
to your composer.json file.
$summarizer = DayRev\Summarizer\Provider::instance('smmry', ['api_key' => 'YOURKEYHERE']);
$content = $summarizer->summarize($text);
To run the test suite, run the following commands from the root directory:
composer install
vendor/bin/phpunit -d smmry_api_key=YOUR_SMMRY_API_KEY
Note: A valid Smmry API key is required when running the integration tests.