-
Notifications
You must be signed in to change notification settings - Fork 17
NaturalLanguageUnderstanding
Michael edited this page Mar 11, 2017
·
4 revisions
namespace WatsonSDK\Services;
Analyze text to extract meta-data from content such as concepts, entities, keywords, categories, sentiment, emotion, relations, semantic roles, using natural language understanding. With custom annotation models developed using Watson Knowledge Studio, identify industry/domain specific entities and relations in unstructured text.
public class NaturalLanguageUnderstanding extends WatsonService
Used to initialize a NaturalLanguageUnderstanding instance from the instance of WatsonCredential.
function __construct(WatsonCredential $credential);
Perform the analyze
of the given instance of NaturalLanguageUnderstandingModel
.
public function Analyze(NaturalLanguageUnderstandingModel $model);
List available custom models
```php
public function ListModels();
Delete a custom model
public function DeleteModels($modelId);
$nlu = new NaturalLanguageUnderstanding(WatsonCredential::initWithCredentials('your_username', 'your_password'));
$model = new NaturalLanguageUnderstandingModel('Watson PHP SDK for IBM Watson Developer Cloud.', [ 'keywords' => [ 'limit' => 5 ] ]);
$result = $nlu->Analyze($model);
Copyright 2017 GCG GBS CTO Office under the Apache 2.0 license.