Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit f50d69e

Browse files
committed
sentiment language
1 parent bff9c53 commit f50d69e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎src/NlpClient.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,9 @@ public function readability_html( $html )
104104
/**
105105
* Sentiment Analysis by Polyglot
106106
*/
107-
public function sentiment( $text )
107+
public function sentiment( $text, $language = null )
108108
{
109-
$data = $this->post_call('/polyglot/sentiment', ['text' => $text ] );
109+
$data = $this->post_call('/polyglot/sentiment', ['text' => $text, 'lang' => $language ] );
110110

111111
return ( isset($data['sentiment']) ) ? $data['sentiment'] : null;
112112
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /