Skip to content

Commit 2551dd3

Browse files
committed
upgrade to php-nlp v0.40
1 parent 5e7672d commit 2551dd3

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"description": "Laravel package for accessing NLP tools",
44
"type": "library",
55
"require": {
6-
"web64/php-nlp-client": "^0.30",
6+
"web64/php-nlp-client": "^0.40",
77
"lsmonki/php-open-calais": "^2.1",
88
"stichoza/google-translate-php": "~3.2"
99
},

src/LaravelNlp/LaravelNlp.php

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,17 +39,18 @@ public function translate($text, $source_lang = null, $target_lang = null)
3939
return $translator->translate( $text );
4040
}
4141

42-
public function sentiment( $text, $language = 'en' )
43-
{
44-
$response = $this->polyglot($text, $language);
42+
// public function sentiment( $text, $language = 'en' )
43+
// {
44+
// $response = $this->sentiment($text, $language);
4545

46-
if ( $response )
47-
return $response->getSentiment();
46+
// if ( $response )
47+
// return $response->getSentiment();
4848

49-
}
49+
// }
50+
5051
public function entities( $text, $language = 'en' )
5152
{
52-
$response = $this->polyglot($text, $language);
53+
$response = $this->polyglot_entities($text, $language);
5354

5455
if ( $response )
5556
return $response->getEntities();

0 commit comments

Comments
 (0)