Skip to content

Proof-reading tool for PHP (spell checker, grammar fixer using LanguageTool)

License

Notifications You must be signed in to change notification settings

rap2hpoutre/voltaire

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Voltaire

TL;DR

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

Install via composer

composer require rap2hpoutre/voltaire

Usage

Quick start

// 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";
}

Production

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');

About

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.

Drawing

source: Wikipedia

About

Proof-reading tool for PHP (spell checker, grammar fixer using LanguageTool)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages