-
Notifications
You must be signed in to change notification settings - Fork 17
NaturalLanguageUnderstanding
Michael edited this page Mar 21, 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 WatsonSDK\Services\NaturalLanguageUnderstanding\AnalyzeModel
.
public function analyze(AnalyzeModel $model);
List available custom models
public function listModels();
Delete a custom model
public function deleteModels($modelId);
$nlu = new NaturalLanguageUnderstanding(WatsonCredential::initWithCredentials('your_username', 'your_password'));
$model = new AnalyzeModel('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.