File: /var/www/vhosts/uyarreklam.com.tr/httpdocs/demo.php.tar
plugins/google-analytics-for-wordpress/includes/gutenberg/headline-tool/phpinsight/examples/demo.php0000644 00000001575 15155371767 0042463 0 ustar 00 var/www/vhosts/uyarreklam.com.tr/httpdocs/wp-content <?php
if ( PHP_SAPI != 'cli' ) {
echo "<pre>";
}
$strings = array(
1 => 'Weather today is rubbish',
2 => 'This cake looks amazing',
3 => 'His skills are mediocre',
4 => 'He is very talented',
5 => 'She is seemingly very agressive',
6 => 'Marie was enthusiastic about the upcoming trip. Her brother was also passionate about her leaving - he would finally have the house for himself.',
7 => 'To be or not to be?',
);
require_once __DIR__ . '/../autoload.php';
$sentiment = new \PHPInsight\Sentiment();
foreach ( $strings as $string ) {
// calculations:
$scores = $sentiment->score( $string );
$class = $sentiment->categorise( $string );
// output:
echo "String: $string\n"; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
echo "Dominant: $class, scores: "; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
print_r( $scores );
echo "\n";
}
httpdocs/wp-content/plugins/all-in-one-seo-pack/vendor/jwhennessey/phpinsight/examples/demo.php 0000644 00000001362 15155565354 0035355 0 ustar 00 var/www/vhosts/uyarreklam.com.tr <?php
if (PHP_SAPI != 'cli') {
echo "<pre>";
}
$strings = array(
1 => 'Weather today is rubbish',
2 => 'This cake looks amazing',
3 => 'His skills are mediocre',
4 => 'He is very talented',
5 => 'She is seemingly very agressive',
6 => 'Marie was enthusiastic about the upcoming trip. Her brother was also passionate about her leaving - he would finally have the house for himself.',
7 => 'To be or not to be?',
);
require_once __DIR__ . '/../autoload.php';
$sentiment = new \PHPInsight\Sentiment();
foreach ($strings as $string) {
// calculations:
$scores = $sentiment->score($string);
$class = $sentiment->categorise($string);
// output:
echo "String: $string\n";
echo "Dominant: $class, scores: ";
print_r($scores);
echo "\n";
}