codeblog.pro / laravel-yandex-speller
The package includes a tool for correcting typos of user-entered information using the Yandex.Speller service.
v0.1
2020-10-06 13:07 UTC
Requires
- illuminate/routing: ^7.9
- illuminate/support: ^7.9
Requires (Dev)
- nunomaduro/phpinsights: ^1.14
- phpstan/phpstan: ^0.12.36
- phpunit/php-code-coverage: ^8.0
- phpunit/phpunit: ^9.0.0
- squizlabs/php_codesniffer: ^3.0
This package is auto-updated.
Last update: 2024-10-30 01:21:32 UTC
README
The package includes a tool for correcting typos of user-entered information using the Yandex.Speller service.
The package contains ready-made integration with the Laravel framework. However, this package can be used with any framework or without it at all.
Install
Via Composer
$ composer require codeblog.pro/laravel-yandex-speller-package
Usage
// Consider the example of a typo in the word "temperature" (tempirature). // First way: using a GET request at http://<our-domain>/api/yandex-speller/tempirature // Result: {"source_string":"tempirature","corrected_array":["temperature"]} // Second way: $sourceString = 'tempirature'; $yandexSpellerService = new YandexSpellerService(); $yandexSpellerAnswer = $yandexSpellerService->getAnswerByString($sourceString); var_dump($yandexSpellerAnswer);
Testing
$ composer test
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email panov@codeblog.pro instead of using the issue tracker.
Credits
License
The Apache License License. Please see License File for more information.