We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bff9c53 commit f50d69eCopy full SHA for f50d69e
src/NlpClient.php
@@ -104,9 +104,9 @@ public function readability_html( $html )
104
/**
105
* Sentiment Analysis by Polyglot
106
*/
107
- public function sentiment( $text )
+ public function sentiment( $text, $language = null )
108
{
109
- $data = $this->post_call('/polyglot/sentiment', ['text' => $text ] );
+ $data = $this->post_call('/polyglot/sentiment', ['text' => $text, 'lang' => $language ] );
110
111
return ( isset($data['sentiment']) ) ? $data['sentiment'] : null;
112
}
0 commit comments