|  Download Laravel Grammar                
 Laravel Grammar allows you detect the part of speech of a word. It returns an array of parts of speech a word belong to. InstallationStep 1You can install the package via composer: composer require djunehor/laravel-grammar
 Laravel 5.5 and aboveThe package will automatically register itself, so you can start using it immediately. Laravel 5.4 and olderIn Laravel version 5.4 and older, you have to add the service provider in config/app.phpfile manually: 'providers' => [
    // ...
    Djunehor\Grammar\GrammarServiceProvider::class,
];
 LumenAfter installing the package, you will have to register it in bootstrap/app.phpfile manually: // Register Service Providers
    // ...
    $app->register(Djunehor\Grammar\GrammarServiceProvider::class);
];
 Step 2 - Publishing filesRun:
php artisan vendor:publish --tag=laravel-grammarThis will move the migration file, seeder file and config file to your app. You can change the entries table name in config/laravel-grammar.php Step 3 - Publishing files
Run`php artisan migrate` to create the table.
Run `php artisan db:seed --class=LaravelGrammarSeeder` to seed table
 Usageuse Djunehor\Grammar\Word;`
$grammar = new Word();
 Get All Parts of Speech$partsOfSpeech = $grammar->getPartsOfSpeech();
// ['Preposition', 'Noun', 'Pronoun', 'Adverb', 'Adjective', 'Verb', 'Interjection', 'Conjunction']
 Get Word part of Speech$word = 'boy';
$partsOfSpeech = $grammar->getWordPartOfSpeech($word);
// ['Noun']
 Check if is noun$word = 'boy';
$grammar = new Word($string);
$isNoun = $grammar->isNoun();
// true
 Using FacadeIn order to use the Grammar facade:
- First add 'Grammar' => GrammarFacade::class,to aliases inconfig/app.php- Then use like\Grammar::getPartsOfSpeech(); Contributing
Fork this project
Clone to your repo
Make your changes and run tests `composer test`
Push and create Pull request
 |