Class: NaturalLanguageUnderstandingV1

NaturalLanguageUnderstandingV1

new NaturalLanguageUnderstandingV1(options)

NaturalLanguageUnderstanding

Parameters:
Name Type Description
options Object
Source:

Methods

analyze() → {void}

Analyze the query.

Parameters:
Name Type Attributes Description
params.headers object <optional>

The headers added

params.text string <optional>

The text to analyze.

params.html string <optional>

The html to analyze.

params.url string <optional>

The url to fetch and analyze.

params.features object <optional>

The features to retrieve (need at least one)

Properties
Name Type Attributes Description
categories object <optional>

categories feature

concepts object <optional>

concepts feature

emotion object <optional>

emotion feature

entities object <optional>

entities feature

keywords object <optional>

keywords feature

metadata object <optional>

metadata feature

relations object <optional>

relations feature

semantic_roles object <optional>

semantic roles feature

sentiment object <optional>

sentiment feature

Source:
Returns:
Type
void
Example
```
const options = {
  'text': 'Natural Language Understanding analyzes unstructured text to return structured insights',
  'features': {
    'concepts': {
      'limit': 3
    },
    'emotion': {},
  },
};
nlu.analyze(options, myCallbackFunction);
```

deleteModel() → {void}

Delete a custom model that is deployed to your service instance.

Parameters:
Name Type Attributes Description
params.headers object <optional>

The headers added

params.model_id string <optional>

ID of the custom model to delete

Source:
Returns:
Type
void
Example
```
const options = {
  'model_id': 'myModel123'
};
nlu.deleteModel(options, myCallbackFunction);
```

listModels() → {void}

List custom models deployed to your service instance.

Parameters:
Name Type Attributes Description
params.headers object <optional>

The headers added

Source:
Returns:
Type
void
Example
```
nlu.listModels({}, myCallbackFunction);
```