Следуйте инструкциям по установке, приведенным в репозитории: Анализ настроения Laravel: Установка
Как использовать:
use SentimentAnalysis;
$sentiment = new SentimentAnalysis();
// returns true or false
$sentiment->isPositive('your sentence string here');
// returns string: 'positive', 'neutral', 'negative'
$sentiment->decision('your sentence string here');
Дополнительные примеры в тестовой реализации можно посмотреть в SentimentAnalysisTest.php