Skip to content

Commit

Permalink
sentiment language
Browse files Browse the repository at this point in the history
  • Loading branch information
web64 committed Jan 16, 2019
1 parent bff9c53 commit f50d69e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/NlpClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,9 @@ public function readability_html( $html )
/**
* Sentiment Analysis by Polyglot
*/
public function sentiment( $text )
public function sentiment( $text, $language = null )
{
$data = $this->post_call('/polyglot/sentiment', ['text' => $text ] );
$data = $this->post_call('/polyglot/sentiment', ['text' => $text, 'lang' => $language ] );

return ( isset($data['sentiment']) ) ? $data['sentiment'] : null;
}
Expand Down

0 comments on commit f50d69e

Please sign in to comment.