muchmhaliq/phpinsight

Sentiment analysis tool for PHP (Indonesia Language)

Installs: 8

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Language:Hack

pkg:composer/muchmhaliq/phpinsight

1.0.0 2023-09-21 09:18 UTC

This package is auto-updated.

Last update: 2025-12-29 03:54:48 UTC


README

Sentiment analysis is the process of analyzing digital text to determine whether the emotional tone of the message is positive, negative, or neutral. Sentiment analysis tools can scan this text to automatically determine the author's attitude toward a topic.

Installation

composer require mashmhaliq/php-insight

How to Usage

use PHPInsight\Sentiment;
#....
$analyzer = new Sentiment();
$analyzer->categorise($string); #return text category, positive, negative or neutral
$scores = $analyzer->score($string);

#Returns text scores, for example
#(
#    [neg] => 0.865
#    [neu] => 0.108
#    [pos] => 0.027
#)