This is a neural network for text mood classification trained on 25,000 movie reviews.
Add the provider in app/Providers/AppServiceProvider.php
public function register()
{
$this->app->register('asdrenxhafa\mooddetection\Providers\MoodDetectionCommandServiceProvider');
}
Training the Model
$ php artisan train:model
or run programmaticly
$moodDetection = new MoodDetection();
$moodDetection->train();
Validating the Model
$ php artisan validate:model
or run programmaticly
$moodDetection = new MoodDetection();
$moodDetection->validate();
To run a prediction
$moodDetection = new MoodDetection();
$message = 'I am very happy today';
$prediction = $moodDetection->predict($message);