Proof-reading tool (spell checker, grammar fixer, etc.). Works for English, French, German, Polish, and more than 20 other languages, thanks to LanguageTool. Install via composer, works with any of your favorite framework: Laravel, Slim, Symfony, etc.
Install via composer
composer require rap2hpoutre/voltaire
// Initialize Voltaire with your language.
$voltaire = new Rap2hpoutre\Voltaire\Voltaire('fr');
// Process text and get the response.
$response = $voltaire->process('Bojnour tout le monde.');
// Display all errors
foreach($response->errors as $error) {
echo $error->msg . "\n";
}
According to LanguageTool Wiki, you should not use the public API of LanguageTool to send automated requests. Oops, that's what we have done in quick start 😇
Access is currently limited to 20 requests per IP per minute.
So, in production environment, you should use your own instance of LanguageTool, like this:
// Initialize Voltaire with your language and your own instance
$voltaire = new Rap2hpoutre\Voltaire\Voltaire('fr', 'http://localhost:8081');
François-Marie Arouet (French: [fʁɑ̃.swa ma.ʁi aʁ.wɛ]; 21 November 1694 – 30 May 1778), known by his nom de plume Voltaire (/voʊlˈtɛər/;[1] French: [vɔl.tɛːʁ]), was a French Enlightenment writer, historian, and philosopher famous for his wit, his attacks on the established Catholic Church, and his advocacy of freedom of religion, freedom of expression, and separation of church and state.
source: Wikipedia