{
  "openapi": "3.0.0",
  "info": {
    "title": "Natural Language Understanding",
    "version": "1.0",
    "description": "## Introduction\n\nAnalyze various features of text content at scale using Machine Learning and AI. Provide text, raw HTML, or a public URL and IBM Watson Natural Language Understanding will give you results for the features you request. The service cleans HTML content before analysis by default, so the results can ignore most advertisements and other unwanted content.\n\nYou can create [custom models](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-customizing) with Watson Knowledge Studio to detect custom entities and relations in Natural Language Understanding.\n\nThis documentation describes Java SDK major version 9. For more information about how to update your code from the previous version, see the [migration guide](https://github.com/watson-developer-cloud/java-sdk/blob/master/MIGRATION-V9.md).\n\nThis documentation describes Node SDK major version 6. For more information about how to update your code from the previous version, see the [migration guide](https://github.com/watson-developer-cloud/node-sdk/blob/master/MIGRATION-V6.md).\n\nThis documentation describes Python SDK major version 5. For more information about how to update your code from the previous version, see the [migration guide](https://github.com/watson-developer-cloud/python-sdk/blob/master/MIGRATION-V5.md).\n\nThis documentation describes Ruby SDK major version 2. For more information about how to update your code from the previous version, see the [migration guide](https://github.com/watson-developer-cloud/ruby-sdk/blob/master/MIGRATION-V2.md).\n\nThis documentation describes .NET Standard SDK major version 5. For more information about how to update your code from the previous version, see the [migration guide](https://github.com/watson-developer-cloud/dotnet-standard-sdk/blob/master/MIGRATION-V5.md).\n\nThis documentation describes Go SDK major version 2. For more information about how to update your code from the previous version, see the [migration guide](https://github.com/watson-developer-cloud/go-sdk/blob/master/MIGRATION-V2.md).\n\nThis documentation describes Swift SDK major version 4. For more information about how to update your code from the previous version, see the [migration guide](https://github.com/watson-developer-cloud/swift-sdk/blob/master/MIGRATION-V4.md).\n\nThis documentation describes Unity SDK major version 5. For more information about how to update your code from the previous version, see the [migration guide](https://github.com/watson-developer-cloud/unity-sdk/blob/master/MIGRATION-v5.md).\n\nThe code examples on this tab use the client library that is provided for Java.\n\nMaven\n\n```xml\n<dependency>\n  <groupId>com.ibm.watson</groupId>\n  <artifactId>ibm-watson</artifactId>\n  <version>12.0.1</version>\n</dependency>\n```\n\nGradle\n\n```sh\ncompile 'com.ibm.watson:ibm-watson:12.0.1'\n```\n\nGitHub\n\n[`https://github.com/watson-developer-cloud/java-sdk`](https://github.com/watson-developer-cloud/java-sdk)\n\nThe code examples on this tab use the client library that is provided for Node.js.\n\nInstallation\n\n```sh\nnpm install ibm-watson@^9.0.1\n```\n\nGitHub\n\n[`https://github.com/watson-developer-cloud/node-sdk`](https://github.com/watson-developer-cloud/node-sdk)\n\nThe code examples on this tab use the client library that is provided for Python.\n\nInstallation\n\n```sh\npip install --upgrade \"ibm-watson>=8.0.0\"\n```\n\nGitHub\n\n[`https://github.com/watson-developer-cloud/python-sdk`](https://github.com/watson-developer-cloud/python-sdk)\n\nThe code examples on this tab use the client library that is provided for Ruby.\n\nInstallation\n\n```sh\ngem install ibm_watson\n```\n\nGitHub\n\n[`https://github.com/watson-developer-cloud/ruby-sdk`](https://github.com/watson-developer-cloud/ruby-sdk)\n\nThe code examples on this tab use the client library that is provided for Go.\n\n```sh\ngo get -u github.com/watson-developer-cloud/go-sdk/v2@v3.0.0\n```\n\nGitHub\n\n[`https://github.com/watson-developer-cloud/go-sdk`](https://github.com/watson-developer-cloud/go-sdk)\n\nThe code examples on this tab use the client library that is provided for Swift.\n\nCocoapods\n\n```ruby\npod 'IBMWatsonNaturalLanguageUnderstandingV1', '~> 5.0.0'\n```\n\nCarthage\n\n```bash\ngithub \"watson-developer-cloud/swift-sdk\" ~> 5.0.0\n```\n\nSwift Package Manager\n\n```swift\n.package(url: \"https://github.com/watson-developer-cloud/swift-sdk\", from: \"5.0.0\")\n```\n\nGitHub\n\n[`https://github.com/watson-developer-cloud/swift-sdk`](https://github.com/watson-developer-cloud/swift-sdk)\n\nThe code examples on this tab use the client library that is provided for .NET Standard.\n\nPackage Manager\n\n```sh\nInstall-Package IBM.Watson.NaturalLanguageUnderstanding.v1 -Version 7.0.0\n```\n\n.NET CLI\n\n```sh\ndotnet add package IBM.Watson.NaturalLanguageUnderstanding.v1 --version 7.0.0\n```\n\nPackageReference\n\n```xml\n<PackageReference Include=\"IBM.Watson.NaturalLanguageUnderstanding.v1\" Version=\"7.0.0\" />\n```\n\nGitHub\n\n[`href=\"https://github.com/watson-developer-cloud/dotnet-standard-sdk`](https://github.com/watson-developer-cloud/dotnet-standard-sdk)\n\nThe IBM Watson Unity SDK has the following requirements.\n\n- The SDK requires Unity version 2018.2 or later to support Transport Layer Security (TLS) 1.2.\n    - Set the project settings for both the **Scripting Runtime Version** and the **Api Compatibility Level** to `.NET 4.x Equivalent`.\n    - For more information, see [TLS 1.0 support](https://github.com/watson-developer-cloud/unity-sdk/#tls-10-support).\n- The SDK doesn't support the WebGL projects. Change your build settings to any platform except `WebGL`.\n\nFor more information about how to install and configure the SDK and SDK Core, see https://github.com/watson-developer-cloud/unity-sdk.\n\nThe code examples on this tab use the client library that is provided for Unity.\n\nGitHub\n\n[`https://github.com/watson-developer-cloud/unity-sdk`](https://github.com/watson-developer-cloud/unity-sdk)\n\n[`https://github.com/IBM/unity-sdk-core`](https://github.com/IBM/unity-sdk-core)\n\n<!-- Link definitions -->\n\n[analyze_link]: #analyze\n\n## Text analytics features\n\nNatural Language Understanding includes a set of text analytics features that you can use to extract meaning from unstructured data.\n\nThese examples can help you get started. For the request options and response body for all features, see the [Analyze text][analyze_link] method.\n\n### Categories\n\nExample Categories feature request\n\n```sh\ncurl -X POST \\\n-H \"Content-Type: application/json\" \\\n-u \"apikey:{apikey}\" \\\n-d @parameters.json \\\n\"{url}/v1/analyze?version=2022-04-07\"\n```\n\nExample parameters\n\n```json\n{\n  \"url\": \"www.ibm.com\",\n  \"features\": {\n    \"categories\": {\n      \"limit\": 3\n    }\n  }\n}\n```\n\nExample Categories feature request\n\n```go\npackage main\n\nimport (\n  \"encoding/json\"\n  \"fmt\"\n  \"github.com/IBM/go-sdk-core/core\"\n  \"github.com/watson-developer-cloud/go-sdk/naturallanguageunderstandingv1\"\n)\n\nfunc main() {\n  authenticator := &core.IamAuthenticator{\n    ApiKey:     \"{apikey}\",\n  }\n\n  options := &naturallanguageunderstandingv1.NaturalLanguageUnderstandingV1Options{\n    Version: \"2022-04-07\",\n    Authenticator: authenticator,\n  }\n\n  naturalLanguageUnderstanding, naturalLanguageUnderstandingErr := naturallanguageunderstandingv1.NewNaturalLanguageUnderstandingV1(options)\n\n  if naturalLanguageUnderstandingErr != nil {\n    panic(naturalLanguageUnderstandingErr)\n  }\n\n  naturalLanguageUnderstanding.SetServiceURL(\"{url}\")\n\n  url := \"www.ibm.com\"\n  limit := int64(3)\n\n  response, responseErr := naturalLanguageUnderstanding.Analyze(\n    &naturallanguageunderstandingv1.AnalyzeOptions{\n      URL: &url,\n      Features: &naturallanguageunderstandingv1.Features{\n        Categories: &naturallanguageunderstandingv1.CategoriesOptions{\n          Limit: &limit,\n        },\n      },\n    },\n  )\n  if responseErr != nil {\n    panic(responseErr)\n  }\n  b, _ := json.MarshalIndent(result, \"\", \"   \")\n  fmt.Println(string(b))\n}\n```\n\nExample Categories feature request\n\n```java\nIamAuthenticator authenticator = new IamAuthenticator(\"{apikey}\");\nNaturalLanguageUnderstanding naturalLanguageUnderstanding = new NaturalLanguageUnderstanding(\"2022-04-07\", authenticator);\nnaturalLanguageUnderstanding.setServiceUrl(\"{url}\");\n\nString url = \"www.ibm.com\";\n\nCategoriesOptions categories= new CategoriesOptions.Builder()\n  .limit(3)\n  .build();\n\nFeatures features = new Features.Builder()\n  .categories(categories)\n  .build();\n\nAnalyzeOptions parameters = new AnalyzeOptions.Builder()\n  .url(url)\n  .features(features)\n  .build();\n\nAnalysisResults response = naturalLanguageUnderstanding\n  .analyze(parameters)\n  .execute()\n  .getResult();\nSystem.out.println(response);\n```\n\nExample Categories feature request\n\n```javascript\nconst NaturalLanguageUnderstandingV1 = require('ibm-watson/natural-language-understanding/v1');\nconst { IamAuthenticator } = require('ibm-watson/auth');\n\nconst naturalLanguageUnderstanding = new NaturalLanguageUnderstandingV1({\n  version: '2022-04-07',\n  authenticator: new IamAuthenticator({\n    apikey: '{apikey}',\n  }),\n  serviceUrl: '{url}',\n});\n\nconst analyzeParams = {\n  'url': 'www.ibm.com',\n  'features': {\n    'categories': {\n      'limit': 3\n    }\n  }\n};\n\nnaturalLanguageUnderstanding.analyze(analyzeParams)\n  .then(analysisResults => {\n    console.log(JSON.stringify(analysisResults, null, 2));\n  })\n  .catch(err => {\n    console.log('error:', err);\n  });\n```\n\nExample Categories feature request\n\n```python\nimport json\nfrom ibm_watson import NaturalLanguageUnderstandingV1\nfrom ibm_cloud_sdk_core.authenticators import IAMAuthenticator\nfrom ibm_watson.natural_language_understanding_v1 \\\n    import Features, CategoriesOptions\n\nauthenticator = IAMAuthenticator('{apikey}')\nnatural_language_understanding = NaturalLanguageUnderstandingV1(\n    version='2022-04-07',\n    authenticator=authenticator\n)\n\nnatural_language_understanding.set_service_url('{url}')\n\nresponse = natural_language_understanding.analyze(\n    url='www.ibm.com',\n    features=Features(categories=CategoriesOptions(limit=3))).get_result()\n\nprint(json.dumps(response, indent=2))\n```\n\nExample Categories feature request\n\n```ruby\nrequire \"json\"\nrequire \"ibm_watson/authenticators\"\nrequire \"ibm_watson/natural_language_understanding_v1\"\ninclude IBMWatson\n\nauthenticator = Authenticators::IamAuthenticator.new(\n  apikey: \"{apikey}\"\n)\n\nnatural_language_understanding = NaturalLanguageUnderstandingV1.new(\n  version: \"2022-04-07\",\n  authenticator: authenticator\n)\nnatural_language_understanding.service_url = \"{url}\"\n\nresponse = natural_language_understanding.analyze(\n  url: \"www.ibm.com\",\n  features: {categories: {limit:3}}\n)\n\nputs JSON.pretty_generate(response.result)\n\n```\n\nExample Categories feature request\n\n```swift\nlet authenticator = WatsonIAMAuthenticator(apiKey: \"{apikey}\")\nlet naturalLanguageUnderstanding = NaturalLanguageUnderstanding(version: \"2022-04-07\", authenticator: authenticator)\nnaturalLanguageUnderstanding.serviceURL = \"{url}\"\n\nlet categories = CategoriesOptions(limit: 3)\nlet features = Features(categories: categories)\nnaturalLanguageUnderstanding.analyze(features: features, url: \"www.ibm.com\") {\n  response, error in\n\n  guard let analysis = response?.result else {\n    print(error?.localizedDescription ?? \"unknown error\")\n    return\n  }\n\n  print(analysis)\n}\n\n```\n\nExample Categories feature request\n\n```cs\nIamAuthenticator authenticator = new IamAuthenticator(\n    apikey: \"{apikey}\"\n    );\n\nNaturalLanguageUnderstandingService naturalLanguageUnderstanding = new NaturalLanguageUnderstandingService(\"2022-04-07\", authenticator);\nnaturalLanguageUnderstanding.SetServiceUrl(\"{url}\");\n\nvar result = naturalLanguageUnderstanding.Analyze(\n    url: \"www.ibm.com\",\n    features: new Features()\n    {\n        Categories = new CategoriesOptions()\n        {\n            Limit = 3\n        }\n    }\n    );\n\nConsole.WriteLine(result.Response);\n```\n\nExample Categories feature request\n\n```cs\nIamAuthenticator authenticator = new IamAuthenticator(\n    Apikey: \"{apikey}\"\n);\n\nwhile (!authenticator.CanAuthenticate())\n    yield return null;\nNaturalLanguageUnderstandingService service = new NaturalLanguageUnderstandingService(\"2022-04-07\", authenticator);\n\nFeatures features = new Features()\n{\n    Categories = new CategoriesOptions()\n    {\n        Limit = 3\n    }\n};\n\nnaturalLanguageUnderstanding.Analyze(\n    callback: (DetailedResponse<AnalysisResults> response, IBMError error) =>\n    {\n        Log.Debug(\"NaturalLanguageUnderstandingServiceV1\", \"Analyze result: {0}\", response.Response);\n    },\n    url: \"www.ibm.com\",\n    features: features\n);\n```\n\nReturns a hierarchical [taxonomy](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-categories-hierarchy) of the content. For example, a news website may return categories like `/international news` or `/arts and entertainment`. The top three categories are returned by default.\n\n#### Categories request options\n\n<div class=\"endpoint-details__description parameter-details\">\n  <div class=\"parameter-details__heading\">\n    <div class=\"parameter-list__parameter-metadata\">\n      <h4 class=\"parameter-list__parameter-name\" data-is-required=\"false\">Request options</h4>\n      <span class=\"parameter-list__parameter-type\">CategoriesOptions</span>\n    </div>\n    <div class=\"parameter-list__parameter-description\">\n      <div>\n        <p>For more information, see the request body for the <a href=\"#analyze\">Analyze text</a> method.</p>\n      </div>\n    </div>\n  </div>\n  <ul class=\"parameter-details__parameter-list parameter-list\">\n    <li class=\"parameter-list__parameter\">\n      <div class=\"parameter-list__parameter-metadata\">\n        <h5 class=\"parameter-list__parameter-name\" data-is-required=\"false\">categories.explanation</h5>\n        <span class=\"parameter-list__parameter-type\" data-hd-programlang=\"curl node ruby java\">boolean</span>\n        <span class=\"parameter-list__parameter-type\" data-hd-programlang=\"python swift\">bool</span>\n      </div>\n      <div class=\"parameter-list__parameter-description\">\n        <p>Set this option to <code>true</code> to return explanations for each categorization. <strong>This option is available only for English categories.</strong></p>\n        <p class=\"default-value\">\n          <span class=\"default-value__desc\">Default: </span>\n          <code>false</code>\n        </p>\n      </div>\n    </li>\n    <li class=\"parameter-list__parameter\">\n      <div class=\"parameter-list__parameter-metadata\">\n        <h5 class=\"parameter-list__parameter-name\" data-is-required=\"false\">categories.model</h5>\n        <span class=\"parameter-list__parameter-type\" data-hd-programlang=\"curl java node ruby swift\">string</span>\n        <span class=\"parameter-list__parameter-type\" data-hd-programlang=\"python\">str</span>\n      </div>\n      <div class=\"parameter-list__parameter-description\">\n        <p>(Beta) Enter a <a href=\"/docs/natural-language-understanding?topic=natural-language-understanding-customizing\">custom model</a> ID to override the standard categories model for all categories analysis operations in the request. <strong>This option is available only for English categories.</strong></p>\n      </div>\n    </li>\n    <li class=\"parameter-list__parameter\">\n      <div class=\"parameter-list__parameter-metadata\">\n        <h5 class=\"parameter-list__parameter-name\" data-is-required=\"false\">categories.limit</h5>\n        <span class=\"parameter-list__parameter-type\" data-hd-programlang=\"curl node ruby\">integer</span>\n        <span class=\"parameter-list__parameter-type\" data-hd-programlang=\"python swift\">int</span>\n        <span class=\"parameter-list__parameter-type\" data-hd-programlang=\"java\">long</span>\n      </div>\n      <div class=\"parameter-list__parameter-description\">\n        <p>Maximum number of categories to return</p>\n        <p class=\"default-value\">\n          <span class=\"default-value__desc\">Default: </span>\n          <code>3</code>\n        </p>\n      </div>\n    </li>\n  </ul>\n</div>\n\n#### Categories response\n\nSee the `CategoriesResult[]` object in the [Analyze text][analyze_link] method.\n\nExample Categories feature response\n\n```json\n{\n    \"usage\": {\n        \"text_units\": 1,\n        \"text_characters\": 1536,\n        \"features\": 1\n    },\n    \"retrieved_url\": \"https://www.ibm.com/us-en\",\n    \"language\": \"en\",\n    \"categories\": [\n        {\n            \"score\": 0.997152,\n            \"label\": \"/technology & computing/computing/internet/cloud computing\"\n        },\n        {\n            \"score\": 0.984064,\n            \"label\": \"/technology & computing/computing/computer software and applications\"\n        },\n        {\n            \"score\": 0.962747,\n            \"label\": \"/technology & computing/computing/data storage and warehousing\"\n        }\n    ]\n}\n```\n\n### Classifications\n\nExample Classifications feature request\n\n```bash\ncurl -X POST \\\n-H \"Content-Type: application/json\" \\\n-u \"apikey:{apikey}\" \\\n-d @parameters.json \\\n\"{url}/v1/analyze?version=2022-04-07\"\n```\n\nExample parameters\n\n```json\n{\n  \"url\": \"www.ibm.com\",\n  \"features\": {\n    \"classifications\": {\n      \"model\": \"your-model-id\"\n    }\n  }\n}\n```\n\nExample Classifications feature request\n\n```go\npackage main\n\nimport (\n  \"encoding/json\"\n  \"fmt\"\n  \"github.com/IBM/go-sdk-core/core\"\n  \"github.com/watson-developer-cloud/go-sdk/naturallanguageunderstandingv1\"\n)\n\nfunc main() {\n  authenticator := &core.IamAuthenticator{\n    ApiKey:     \"{apikey}\",\n  }\n\n  options := &naturallanguageunderstandingv1.NaturalLanguageUnderstandingV1Options{\n    Version: \"2022-04-07\",\n    Authenticator: authenticator,\n  }\n\n  naturalLanguageUnderstanding, naturalLanguageUnderstandingErr := naturallanguageunderstandingv1.NewNaturalLanguageUnderstandingV1(options)\n\n  if naturalLanguageUnderstandingErr != nil {\n    panic(naturalLanguageUnderstandingErr)\n  }\n\n  naturalLanguageUnderstanding.SetServiceURL(\"{url}\")\n\n  url := \"www.ibm.com\"\n  model := \"your-model-id\"\n\n  response, responseErr := naturalLanguageUnderstanding.Analyze(\n    &naturallanguageunderstandingv1.AnalyzeOptions{\n      URL: &url,\n      Features: &naturallanguageunderstandingv1.Features{\n        Classifications: &naturallanguageunderstandingv1.ClassificationsOptions{\n          Model: &model,\n        },\n      },\n    },\n  )\n  if responseErr != nil {\n    panic(responseErr)\n  }\n  b, _ := json.MarshalIndent(result, \"\", \"   \")\n  fmt.Println(string(b))\n}\n```\n\nExample Classifications feature request\n\n```java\nIamAuthenticator authenticator = new IamAuthenticator(\"{apikey}\");\nNaturalLanguageUnderstanding naturalLanguageUnderstanding = new NaturalLanguageUnderstanding(\"2022-04-07\", authenticator);\nnaturalLanguageUnderstanding.setServiceUrl(\"{url}\");\n\nString url = \"www.ibm.com\";\n\nClassificationsOptions classifications = new ClassificationsOptions.Builder()\n  .model(your-model-id)\n  .build();\n\nFeatures features = new Features.Builder()\n  .classifications(classifications)\n  .build();\n\nAnalyzeOptions parameters = new AnalyzeOptions.Builder()\n  .url(url)\n  .features(features)\n  .build();\n\nAnalysisResults response = naturalLanguageUnderstanding\n  .analyze(parameters)\n  .execute()\n  .getResult();\nSystem.out.println(response);\n```\n\nExample Classifications feature request\n\n```javascript\nconst NaturalLanguageUnderstandingV1 = require('ibm-watson/natural-language-understanding/v1');\nconst { IamAuthenticator } = require('ibm-watson/auth');\n\nconst naturalLanguageUnderstanding = new NaturalLanguageUnderstandingV1({\n  version: '2022-04-07',\n  authenticator: new IamAuthenticator({\n    apikey: '{apikey}',\n  }),\n  serviceUrl: '{url}',\n});\n\nconst analyzeParams = {\n  'url': 'www.ibm.com',\n  'features': {\n    'classifications': {\n      'model': 'your-model-id'\n    }\n  }\n};\n\nnaturalLanguageUnderstanding.analyze(analyzeParams)\n  .then(analysisResults => {\n    console.log(JSON.stringify(analysisResults, null, 2));\n  })\n  .catch(err => {\n    console.log('error:', err);\n  });\n```\n\nExample Classifications feature request\n\n```python\nimport json\nfrom ibm_watson import NaturalLanguageUnderstandingV1\nfrom ibm_cloud_sdk_core.authenticators import IAMAuthenticator\nfrom ibm_watson.natural_language_understanding_v1 \\\n    import Features, ClassificationsOptions\n\nauthenticator = IAMAuthenticator('{apikey}')\nnatural_language_understanding = NaturalLanguageUnderstandingV1(\n    version='2022-04-07',\n    authenticator=authenticator\n)\n\nnatural_language_understanding.set_service_url('{url}')\n\nresponse = natural_language_understanding.analyze(\n    url='www.ibm.com',\n    features=Features(classifications=ClassificationsOptions(model='your-model-id'))).get_result()\n\nprint(json.dumps(response, indent=2))\n```\n\nExample Classifications feature request\n\n```ruby\nrequire \"json\"\nrequire \"ibm_watson/authenticators\"\nrequire \"ibm_watson/natural_language_understanding_v1\"\ninclude IBMWatson\n\nauthenticator = Authenticators::IamAuthenticator.new(\n  apikey: \"{apikey}\"\n)\n\nnatural_language_understanding = NaturalLanguageUnderstandingV1.new(\n  version: \"2022-04-07\",\n  authenticator: authenticator\n)\nnatural_language_understanding.service_url = \"{url}\"\n\nresponse = natural_language_understanding.analyze(\n  url: \"www.ibm.com\",\n  features: {classifications: {model: \"your-model-id\"}}\n)\n\nputs JSON.pretty_generate(response.result)\n\n```\n\nExample Classifications feature request\n\n```swift\nlet authenticator = WatsonIAMAuthenticator(apiKey: \"{apikey}\")\nlet naturalLanguageUnderstanding = NaturalLanguageUnderstanding(version: \"2022-04-07\", authenticator: authenticator)\nnaturalLanguageUnderstanding.serviceURL = \"{url}\"\n\nlet classifications = ClassificationsOptions(model: \"your-model-id\")\nlet features = Features(classifications: classifications)\nnaturalLanguageUnderstanding.analyze(features: features, url: \"www.ibm.com\") {\n  response, error in\n\n  guard let analysis = response?.result else {\n    print(error?.localizedDescription ?? \"unknown error\")\n    return\n  }\n\n  print(analysis)\n}\n\n```\n\nExample Classifications feature request\n\n```cs\nIamAuthenticator authenticator = new IamAuthenticator(\n    apikey: \"{apikey}\"\n    );\n\nNaturalLanguageUnderstandingService naturalLanguageUnderstanding = new NaturalLanguageUnderstandingService(\"2022-04-07\", authenticator);\nnaturalLanguageUnderstanding.SetServiceUrl(\"{url}\");\n\nvar result = naturalLanguageUnderstanding.Analyze(\n    url: \"www.ibm.com\",\n    features: new Features()\n    {\n        Classifications = new ClassificationsOptions()\n        {\n            Model = \"your-model-id\"\n        }\n    }\n    );\n\nConsole.WriteLine(result.Response);\n```\n\nExample Classifications feature request\n\n```cs\nIamAuthenticator authenticator = new IamAuthenticator(\n    Apikey: \"{apikey}\"\n);\n\nwhile (!authenticator.CanAuthenticate())\n    yield return null;\nNaturalLanguageUnderstandingService service = new NaturalLanguageUnderstandingService(\"2022-04-07\", authenticator);\n\nFeatures features = new Features()\n{\n    Classifications = new ClassificationsOptions()\n    {\n        Model = \"your-model-id\"\n    }\n};\n\nnaturalLanguageUnderstanding.Analyze(\n    callback: (DetailedResponse<AnalysisResults> response, IBMError error) =>\n    {\n        Log.Debug(\"NaturalLanguageUnderstandingServiceV1\", \"Analyze result: {0}\", response.Response);\n    },\n    url: \"www.ibm.com\",\n    features: features\n);\n```\n\nClassifies input using custom multi-label text classifier. For example, a custom weather classifier may return classifications such as \"temperature\" or \"condition\".\n\n#### Classifications request options\n\n<div class=\"endpoint-details__description parameter-details\">\n  <div class=\"parameter-details__heading\">\n    <div class=\"parameter-list__parameter-metadata\">\n      <h4 class=\"parameter-list__parameter-name\" data-is-required=\"false\">Request options</h4>\n      <span class=\"parameter-list__parameter-type\">ClassificationsOptions</span>\n    </div>\n    <div class=\"parameter-list__parameter-description\">\n      <div>\n      <p>For more information, see the request body for the <a href=\"#analyze\">Analyze text</a> method. <strong>Note:</strong> This feature considers only the first 2000 <a href=\"https://en.wikipedia.org/wiki/Code_point\">codepoints</a> of text.</p>\n      </div>\n    </div>\n  </div>\n  <ul class=\"parameter-details__parameter-list parameter-list\">\n    <li class=\"parameter-list__parameter\">\n      <div class=\"parameter-list__parameter-metadata\">\n        <h5 class=\"parameter-list__parameter-name\" data-is-required=\"false\">classifications.model</h5>\n        <span class=\"parameter-list__parameter-type\" data-hd-programlang=\"curl java node ruby swift\">string</span>\n        <span class=\"parameter-list__parameter-type\" data-hd-programlang=\"python\">str</span>\n      </div>\n      <div class=\"parameter-list__parameter-description\">\n        <p>Model ID of the classifications model to be used.</p>\n        <p><strong>Note:</strong> You can analyze tone for text by using a language-specific model ID; see <a href=\"/docs/natural-language-understanding?topic=natural-language-understanding-tone_analytics\">Tone analytics (Classifications)</a> for more information.</p>\n      </div>\n    </li>\n  </ul>\n</div>\n\n#### Classifications response\n\nSee the `ClassificationsResult` object in the [Analyze text][analyze_link] method.\n\nExample Classifications feature response\n\n```json\n{\n    \"classifications\": [\n        {\n            \"class_name\": \"temperature\",\n            \"confidence\": 0.562519\n        },\n        {\n            \"class_name\": \"conditions\",\n            \"confidence\": 0.433996\n        },\n        {\n            \"class_name\": \"satisfied\",\n            \"confidence\": 0.355816\n        }\n    ],\n    \"language\": \"en\",\n    \"usage\": {\n        \"features\": 0,\n        \"text_characters\": 36,\n        \"text_units\": 1\n    }\n}\n```\n\n### Concepts\n\nExample Concepts feature request\n\n```sh\ncurl -X POST \\\n-H \"Content-Type: application/json\" \\\n-u \"apikey:{apikey}\" \\\n-d @parameters.json \\\n\"{url}/v1/analyze?version=2022-04-07\"\n```\n\nExample parameters\n\n```json\n{\n  \"url\": \"www.ibm.com\",\n  \"features\": {\n    \"concepts\": {\n      \"limit\": 3\n    }\n  }\n}\n```\n\nExample Concepts feature request\n\n```go\npackage main\n\nimport (\n  \"encoding/json\"\n  \"fmt\"\n  \"github.com/IBM/go-sdk-core/core\"\n  \"github.com/watson-developer-cloud/go-sdk/naturallanguageunderstandingv1\"\n)\n\nfunc main() {\n  authenticator := &core.IamAuthenticator{\n    ApiKey:     \"{apikey}\",\n  }\n\n  options := &naturallanguageunderstandingv1.NaturalLanguageUnderstandingV1Options{\n    Version: \"2022-04-07\",\n    Authenticator: authenticator,\n  }\n\n  naturalLanguageUnderstanding, naturalLanguageUnderstandingErr := naturallanguageunderstandingv1.NewNaturalLanguageUnderstandingV1(options)\n\n  if naturalLanguageUnderstandingErr != nil {\n    panic(naturalLanguageUnderstandingErr)\n  }\n\n  naturalLanguageUnderstanding.SetServiceURL(\"{url}\")\n\n  url := \"www.ibm.com\"\n  limit := int64(3)\n\n  response, responseErr := naturalLanguageUnderstanding.Analyze(\n    &naturallanguageunderstandingv1.AnalyzeOptions{\n      URL: &url,\n      Features: &naturallanguageunderstandingv1.Features{\n        Concepts: &naturallanguageunderstandingv1.ConceptsOptions{\n          Limit: &limit,\n        },\n      },\n    },\n  )\n  if responseErr != nil {\n    panic(responseErr)\n  }\n  b, _ := json.MarshalIndent(result, \"\", \"   \")\n  fmt.Println(string(b))\n}\n```\n\nExample Concepts feature request\n\n```java\nIamAuthenticator authenticator = new IamAuthenticator(\"{apikey}\");\nNaturalLanguageUnderstanding naturalLanguageUnderstanding = new NaturalLanguageUnderstanding(\"2022-04-07\", authenticator);\nnaturalLanguageUnderstanding.setServiceUrl(\"{url}\");\n\nString url = \"www.ibm.com\";\n\nConceptsOptions concepts= new ConceptsOptions.Builder()\n  .limit(3)\n  .build();\n\nFeatures features = new Features.Builder()\n  .concepts(concepts)\n  .build();\n\nAnalyzeOptions parameters = new AnalyzeOptions.Builder()\n  .url(url)\n  .features(features)\n  .build();\n\nAnalysisResults response = naturalLanguageUnderstanding\n  .analyze(parameters)\n  .execute()\n  .getResult();\nSystem.out.println(response);\n```\n\nExample Concepts feature request\n\n```javascript\nconst NaturalLanguageUnderstandingV1 = require('ibm-watson/natural-language-understanding/v1');\nconst { IamAuthenticator } = require('ibm-watson/auth');\n\nconst naturalLanguageUnderstanding = new NaturalLanguageUnderstandingV1({\n  version: '2022-04-07',\n  authenticator: new IamAuthenticator({\n    apikey: '{apikey}',\n  }),\n  serviceUrl: '{url}',\n});\n\nconst analyzeParams = {\n  'url': 'www.ibm.com',\n  'features': {\n    'concepts': {\n      'limit': 3\n    }\n  }\n};\n\nnaturalLanguageUnderstanding.analyze(analyzeParams)\n  .then(analysisResults => {\n    console.log(JSON.stringify(analysisResults, null, 2));\n  })\n  .catch(err => {\n    console.log('error:', err);\n  });\n```\n\nExample Concepts feature request\n\n```python\nimport json\nfrom ibm_watson import NaturalLanguageUnderstandingV1\nfrom ibm_cloud_sdk_core.authenticators import IAMAuthenticator\nfrom ibm_watson.natural_language_understanding_v1 \\\n    import Features, ConceptsOptions\n\nauthenticator = IAMAuthenticator('{apikey}')\nnatural_language_understanding = NaturalLanguageUnderstandingV1(\n    version='2022-04-07',\n    authenticator=authenticator\n)\n\nnatural_language_understanding.set_service_url('{url}')\n\nresponse = natural_language_understanding.analyze(\n    url='www.ibm.com',\n    features=Features(concepts=ConceptsOptions(limit=3))).get_result()\n\nprint(json.dumps(response, indent=2))\n```\n\nExample Concepts feature request\n\n```ruby\nrequire \"json\"\nrequire \"ibm_watson/authenticators\"\nrequire \"ibm_watson/natural_language_understanding_v1\"\ninclude IBMWatson\n\nauthenticator = Authenticators::IamAuthenticator.new(\n  apikey: \"{apikey}\"\n)\n\nnatural_language_understanding = NaturalLanguageUnderstandingV1.new(\n  version: \"2022-04-07\",\n  authenticator: authenticator\n)\nnatural_language_understanding.service_url = \"{url}\"\n\nresponse = natural_language_understanding.analyze(\n  url: \"www.ibm.com\",\n  features: {concepts: {limit:3}}\n)\n\nputs JSON.pretty_generate(response.result)\n\n```\n\nExample Concepts feature request\n\n```swift\nlet authenticator = WatsonIAMAuthenticator(apiKey: \"{apikey}\")\nlet naturalLanguageUnderstanding = NaturalLanguageUnderstanding(version: \"2022-04-07\", authenticator: authenticator)\nnaturalLanguageUnderstanding.serviceURL = \"{url}\"\n\nlet concepts = ConceptsOptions(limit: 3)\nlet features = Features(concepts: concepts)\nnaturalLanguageUnderstanding.analyze(features: features, url: \"www.ibm.com\") {\n  response, error in\n\n  guard let analysis = response?.result else {\n    print(error?.localizedDescription ?? \"unknown error\")\n    return\n  }\n\n  print(analysis)\n}\n```\n\nExample Concepts feature request\n\n```cs\nIamAuthenticator authenticator = new IamAuthenticator(\n    apikey: \"{apikey}\"\n    );\n\nNaturalLanguageUnderstandingService naturalLanguageUnderstanding = new NaturalLanguageUnderstandingService(\"2022-04-07\", authenticator);\nnaturalLanguageUnderstanding.SetServiceUrl(\"{url}\");\n\nvar result = naturalLanguageUnderstanding.Analyze(\n    url: \"www.ibm.com\",\n    features: new Features()\n    {\n        Concepts = new ConceptsOptions()\n        {\n            Limit = 3\n        }\n    }\n    );\n\nConsole.WriteLine(result.Response);\n```\n\nExample Concepts feature request\n\n```cs\nIamAuthenticator authenticator = new IamAuthenticator(\n    Apikey: \"{apikey}\"\n);\n\nwhile (!authenticator.CanAuthenticate())\n    yield return null;\n\nNaturalLanguageUnderstandingService service = new NaturalLanguageUnderstandingService(\"2022-04-07\", authenticator);\n\nFeatures features = new Features()\n{\n    Concepts = new ConceptsOptions()\n    {\n        Limit = 3\n    }\n};\n\nnaturalLanguageUnderstanding.Analyze(\n    callback: (DetailedResponse<AnalysisResults> response, IBMError error) =>\n    {\n        Log.Debug(\"NaturalLanguageUnderstandingServiceV1\", \"Analyze result: {0}\", response.Response);\n    },\n    url: \"www.ibm.com\",\n    features: features\n);\n```\n\nReturns high-level concepts in the content. For example, a research paper about deep learning might return the concept, \"Artificial Intelligence\" although the term is not mentioned.\n\n#### Concepts request options\n\n<div class=\"endpoint-details__description parameter-details\">\n  <div class=\"parameter-details__heading\">\n    <div class=\"parameter-list__parameter-metadata\">\n      <h4 class=\"parameter-list__parameter-name\" data-is-required=\"false\">Request options</h4>\n      <span class=\"parameter-list__parameter-type\">ConceptsOptions</span>\n    </div>\n    <div class=\"parameter-list__parameter-description\">\n      <div>\n        <p>For more information, see the request body for the <a href=\"#analyze\">Analyze text</a> method.</p>\n      </div>\n    </div>\n  </div>\n  <ul class=\"parameter-details__parameter-list parameter-list\">\n    <li class=\"parameter-list__parameter\">\n      <div class=\"parameter-list__parameter-metadata\">\n        <h5 class=\"parameter-list__parameter-name\" data-is-required=\"false\">concepts.limit</h5>\n        <span class=\"parameter-list__parameter-type\" data-hd-programlang=\"curl node ruby\">integer</span>\n        <span class=\"parameter-list__parameter-type\" data-hd-programlang=\"python swift\">int</span>\n        <span class=\"parameter-list__parameter-type\" data-hd-programlang=\"java\">long</span>\n      </div>\n      <div class=\"parameter-list__parameter-description\">\n        <p>Maximum number of concepts to return</p>\n        <p class=\"default-value\">\n          <span class=\"default-value__desc\">Default: </span>\n          <code>50</code>\n        </p>\n      </div>\n    </li>\n  </ul>\n</div>\n\n#### Concepts response\n\nSee the `ConceptsResult[]` object in the [Analyze text][analyze_link] method.\n\nExample Concepts feature response\n\n```json\n{\n  \"usage\": {\n    \"text_units\": 1,\n    \"text_characters\": 1536,\n    \"features\": 1\n  },\n  \"retrieved_url\": \"http://www.ibm.com/us-en/\",\n  \"concepts\": [\n    {\n      \"text\": \"Social network service\",\n      \"relevance\": 0.92186,\n      \"dbpedia_resource\": \"http://dbpedia.org/resource/Social_network_service\"\n    },\n    {\n      \"text\": \"Thomas J. Watson\",\n      \"relevance\": 0.871908,\n      \"dbpedia_resource\": \"http://dbpedia.org/resource/Thomas_J._Watson\"\n    },\n    {\n      \"text\": \"Lotus Software\",\n      \"relevance\": 0.839578,\n      \"dbpedia_resource\": \"http://dbpedia.org/resource/Lotus_Software\"\n    }\n  ],\n  \"language\": \"en\"\n}\n```\n\n### Emotion\n\nExample Emotion feature request\n\n```sh\ncurl -X POST \\\n-H \"Content-Type: application/json\" \\\n-u \"apikey:{apikey}\" \\\n-d @parameters.json \\\n\"{url}/v1/analyze?version=2022-04-07\"\n```\n\nExample parameters\n\n```json\n{\n  \"html\": \"<html><head><title>Fruits</title></head><body><h1>Apples and Oranges</h1><p>I love apples! I don't like oranges.</p></body></html>\",\n  \"features\": {\n    \"emotion\": {\n      \"targets\": [\n        \"apples\",\n        \"oranges\"\n      ]\n    }\n  }\n}\n```\n\n```go\npackage main\n\nimport (\n  \"encoding/json\"\n  \"fmt\"\n  \"github.com/IBM/go-sdk-core/core\"\n  \"github.com/watson-developer-cloud/go-sdk/naturallanguageunderstandingv1\"\n)\n\nfunc main() {\n  authenticator := &core.IamAuthenticator{\n    ApiKey:     \"{apikey}\",\n  }\n\n  options := &naturallanguageunderstandingv1.NaturalLanguageUnderstandingV1Options{\n    Version: \"2022-04-07\",\n    Authenticator: authenticator,\n  }\n\n  naturalLanguageUnderstanding, naturalLanguageUnderstandingErr := naturallanguageunderstandingv1.NewNaturalLanguageUnderstandingV1(options)\n\n  if naturalLanguageUnderstandingErr != nil {\n    panic(naturalLanguageUnderstandingErr)\n  }\n\n  naturalLanguageUnderstanding.SetServiceURL(\"{url}\")\n\n  html := \"<html><head><title>Fruits</title></head><body><h1>Apples and Oranges</h1><p>I love apples! I don't like oranges.</p></body></html>\"\n  targets := []string{\"apples\", \"oranges\"}\n\n  response, responseErr := naturalLanguageUnderstanding.Analyze(\n    &naturallanguageunderstandingv1.AnalyzeOptions{\n      HTML: &html,\n      Features: &naturallanguageunderstandingv1.Features{\n        Emotion: &naturallanguageunderstandingv1.EmotionOptions{\n          Targets: targets,\n        },\n      },\n    },\n  )\n  if responseErr != nil {\n    panic(responseErr)\n  }\n  b, _ := json.MarshalIndent(result, \"\", \"   \")\n  fmt.Println(string(b))\n}\n```\n\nExample Emotion feature request\n\n```java\nIamAuthenticator authenticator = new IamAuthenticator(\"{apikey}\");\nNaturalLanguageUnderstanding naturalLanguageUnderstanding = new NaturalLanguageUnderstanding(\"2022-04-07\", authenticator);\nnaturalLanguageUnderstanding.setServiceUrl(\"{url}\");\n\nString html = \"<html><head><title>Fruits</title></head>\" +\n  \"<body><h1>Apples and Oranges</h1>\" +\n  \"<p>I love apples! I don't like oranges.</p>\" +\n  \"</body></html>\";\n\nList<String> targets = new ArrayList<>();\ntargets.add(\"apples\");\ntargets.add(\"oranges\");\n\nEmotionOptions emotion= new EmotionOptions.Builder()\n  .targets(targets)\n  .build();\n\nFeatures features = new Features.Builder()\n  .emotion(emotion)\n  .build();\n\nAnalyzeOptions parameters = new AnalyzeOptions.Builder()\n  .html(html)\n  .features(features)\n  .build();\n\nAnalysisResults response = naturalLanguageUnderstanding\n  .analyze(parameters)\n  .execute()\n  .getResult();\nSystem.out.println(response);\n```\n\nExample Emotion feature request\n\n```javascript\nconst NaturalLanguageUnderstandingV1 = require('ibm-watson/natural-language-understanding/v1');\nconst { IamAuthenticator } = require('ibm-watson/auth');\n\nconst naturalLanguageUnderstanding = new NaturalLanguageUnderstandingV1({\n  version: '2022-04-07',\n  authenticator: new IamAuthenticator({\n    apikey: '{apikey}',\n  }),\n  serviceUrl: '{url}',\n});\n\nconst analyzeParams = {\n  'html': '<html><head><title>Fruits</title></head><body><h1>Apples and Oranges</h1><p>I love apples! I don\\'t like oranges.</p></body></html>',\n  'features': {\n    'emotion': {\n      'targets': [\n        'apples',\n        'oranges'\n      ]\n    }\n  }\n};\n\nnaturalLanguageUnderstanding.analyze(analyzeParams)\n  .then(analysisResults => {\n    console.log(JSON.stringify(analysisResults, null, 2));\n  })\n  .catch(err => {\n    console.log('error:', err);\n  });\n```\n\nExample Emotion feature request\n\n```python\nimport json\nfrom ibm_watson import NaturalLanguageUnderstandingV1\nfrom ibm_cloud_sdk_core.authenticators import IAMAuthenticator\nfrom ibm_watson.natural_language_understanding_v1 \\\n    import Features, EmotionOptions\n\nauthenticator = IAMAuthenticator('{apikey}')\nnatural_language_understanding = NaturalLanguageUnderstandingV1(\n    version='2022-04-07',\n    authenticator=authenticator\n)\n\nnatural_language_understanding.set_service_url('{url}')\n\nresponse = natural_language_understanding.analyze(\n    html=\"<html><head><title>Fruits</title></head><body><h1>Apples and Oranges</h1><p>I love apples! I don't like oranges.</p></body></html>\",\n    features=Features(emotion=EmotionOptions(targets=['apples','oranges']))).get_result()\n\nprint(json.dumps(response, indent=2))\n```\n\nExample Emotion feature request\n\n```ruby\nrequire \"json\"\nrequire \"ibm_watson/authenticators\"\nrequire \"ibm_watson/natural_language_understanding_v1\"\ninclude IBMWatson\n\nauthenticator = Authenticators::IamAuthenticator.new(\n  apikey: \"{apikey}\"\n)\n\nnatural_language_understanding = NaturalLanguageUnderstandingV1.new(\n  version: \"2022-04-07\",\n  authenticator: authenticator\n)\nnatural_language_understanding.service_url = \"{url}\"\n\nresponse = natural_language_understanding.analyze(\n  html: \"<html><head><title>Fruits</title></head><body><h1>Apples and Oranges</h1><p>I love apples! I don't like oranges.</p></body></html>\",\n  features: {emotion: {targets: ['apples','oranges']}}\n)\n\nputs JSON.pretty_generate(response.result)\n```\n\nExample Emotion feature request\n\n```swift\nlet authenticator = WatsonIAMAuthenticator(apiKey: \"{apikey}\")\nlet naturalLanguageUnderstanding = NaturalLanguageUnderstanding(version: \"2022-04-07\", authenticator: authenticator)\nnaturalLanguageUnderstanding.serviceURL = \"{url}\"\n\nlet html = \"<html><head><title>Fruits</title></head>\" +\n  \"<body><h1>Apples and Oranges</h1>\" +\n  \"<p>I love apples! I don't like oranges.</p>\" +\n  \"</body></html>\"\nlet emotion = EmotionOptions(targets: [\"apples\", \"oranges\"])\nlet features = Features(emotion: emotion)\nnaturalLanguageUnderstanding.analyze(features: features, html: html) {\n  response, error in\n\n  guard let analysis = response?.result else {\n    print(error?.localizedDescription ?? \"unknown error\")\n    return\n  }\n\n  print(analysis)\n}\n```\n\nExample Emotion feature request\n\n```cs\nIamAuthenticator authenticator = new IamAuthenticator(\n    apikey: \"{apikey}\"\n    );\n\nNaturalLanguageUnderstandingService naturalLanguageUnderstanding = new NaturalLanguageUnderstandingService(\"2022-04-07\", authenticator);\nnaturalLanguageUnderstanding.SetServiceUrl(\"{url}\");\n\nvar result = naturalLanguageUnderstanding.Analyze(\n    html: \"<html><head><title>Fruits</title></head><body><h1>Apples and Oranges</h1><p>I love apples! I don't like oranges.</p></body></html>\",\n    features: new Features()\n    {\n        Emotion = new EmotionOptions()\n        {\n            Targets = new List<string> { \"apples\", \"oranges\" }\n        }\n    }\n    );\n\nConsole.WriteLine(result.Response);\n```\n\nExample Emotion feature request\n\n```cs\nIamAuthenticator authenticator = new IamAuthenticator(\n    Apikey: \"{apikey}\"\n);\n\nwhile (!authenticator.CanAuthenticate())\n    yield return null;\nNaturalLanguageUnderstandingService service = new NaturalLanguageUnderstandingService(\"2022-04-07\", authenticator);\n\nFeatures features = new Features()\n{\n    Emotion = new EmotionOptions()\n    {\n        Targets = {\"apples\",\"oranges\"}\n    }\n};\n\nnaturalLanguageUnderstanding.Analyze(\n    callback: (DetailedResponse<AnalysisResults> response, IBMError error) =>\n    {\n        Log.Debug(\"NaturalLanguageUnderstandingServiceV1\", \"Analyze result: {0}\", response.Response);\n    },\n    html: \"<html><head><title>Fruits</title></head><body><h1>Apples and Oranges</h1><p>I love apples! I don't like oranges.</p></body></html>\",\n    features: features\n);\n```\n\nDetects anger, disgust, fear, joy, or sadness that is conveyed in the content or by the context around target phrases specified in the targets parameter. You can analyze emotion for detected entities with `entities.emotion` and for keywords with `keywords.emotion`.\n\n#### Emotion request options\n\n<div class=\"endpoint-details__description parameter-details\">\n  <div class=\"parameter-details__heading\">\n    <div class=\"parameter-list__parameter-metadata\">\n      <h4 class=\"parameter-list__parameter-name\" data-is-required=\"false\">Request options</h4>\n      <span class=\"parameter-list__parameter-type\">EmotionOptions</span>\n    </div>\n    <div class=\"parameter-list__parameter-description\">\n      <div>\n        <p>For more information, see the request body for the <a href=\"#analyze\">Analyze text</a> method.</p>\n      </div>\n    </div>\n  </div>\n  <ul class=\"parameter-details__parameter-list parameter-list\">\n    <li class=\"parameter-list__parameter\">\n      <div class=\"parameter-list__parameter-metadata\">\n        <h5 class=\"parameter-list__parameter-name\" data-is-required=\"false\">emotion.document</h5>\n        <span class=\"parameter-list__parameter-type\" data-hd-programlang=\"curl java node ruby\">boolean</span>\n        <span class=\"parameter-list__parameter-type\" data-hd-programlang=\"python swift\">bool</span>\n      </div>\n      <div class=\"parameter-list__parameter-description\">\n        <p>Whether to hide document-level emotion results.</p>\n        <p class=\"default-value\">\n          <span class=\"default-value__desc\">Default: </span>\n          <code>true</code>\n        </p>\n      </div>\n    </li>\n    <li class=\"parameter-list__parameter\">\n      <div class=\"parameter-list__parameter-metadata\">\n        <h5 class=\"parameter-list__parameter-name\" data-is-required=\"false\">emotion.targets</h5>\n        <span class=\"parameter-list__parameter-type\" data-hd-programlang=\"curl node\">string[]</span>\n        <span class=\"parameter-list__parameter-type\" data-hd-programlang=\"java\">List[string]</span>\n        <span class=\"parameter-list__parameter-type\" data-hd-programlang=\"swift\">[String]</span>\n        <span class=\"parameter-list__parameter-type\" data-hd-programlang=\"python\">list[str]</span>\n        <span class=\"parameter-list__parameter-type\" data-hd-programlang=\"ruby\">Array&lt;String&gt;</span>\n      </div>\n      <div class=\"parameter-list__parameter-description\">\n          <p>Target strings, separated by commas. Emotion results are returned for each target string that is found in the document.</p>\n      </div>\n    </li>\n  </ul>\n</div>\n\n#### Emotion response\n\nSee the `EmotionResult` object in the [Analyze text][analyze_link] method.\n\nExample Emotion feature response\n\n```json\n{\n  \"usage\": {\n    \"text_units\": 1,\n    \"text_characters\": 37,\n    \"features\": 1\n  },\n  \"language\": \"en\",\n  \"emotion\": {\n    \"targets\": [\n      {\n        \"text\": \"apples\",\n        \"emotion\": {\n          \"sadness\": 0.028574,\n          \"joy\": 0.859042,\n          \"fear\": 0.02752,\n          \"disgust\": 0.017519,\n          \"anger\": 0.012855\n        }\n      },\n      {\n        \"text\": \"oranges\",\n        \"emotion\": {\n          \"sadness\": 0.514253,\n          \"joy\": 0.078317,\n          \"fear\": 0.074223,\n          \"disgust\": 0.058103,\n          \"anger\": 0.126859\n        }\n      }\n    ],\n    \"document\": {\n      \"emotion\": {\n        \"sadness\": 0.32665,\n        \"joy\": 0.563273,\n        \"fear\": 0.033387,\n        \"disgust\": 0.022637,\n        \"anger\": 0.041796\n      }\n    }\n  }\n}\n```\n\n### Entities\n\nExample Entities feature request\n\n```sh\ncurl -X POST \\\n-H \"Content-Type: application/json\" \\\n-u \"apikey:{apikey}\" \\\n-d @parameters.json \\\n\"{url}/v1/analyze?version=2022-04-07\"\n```\n\nExample parameters\n\n```json\n{\n  \"url\": \"www.cnn.com\",\n  \"features\": {\n    \"entities\": {\n      \"sentiment\": true,\n      \"limit\": 1\n    }\n  }\n}\n```\n\n```go\npackage main\n\nimport (\n  \"encoding/json\"\n  \"fmt\"\n  \"github.com/IBM/go-sdk-core/core\"\n  \"github.com/watson-developer-cloud/go-sdk/naturallanguageunderstandingv1\"\n)\n\nfunc main() {\n  authenticator := &core.IamAuthenticator{\n    ApiKey:     \"{apikey}\",\n  }\n\n  options := &naturallanguageunderstandingv1.NaturalLanguageUnderstandingV1Options{\n    Version: \"2022-04-07\",\n    Authenticator: authenticator,\n  }\n\n  naturalLanguageUnderstanding, naturalLanguageUnderstandingErr := naturallanguageunderstandingv1.NewNaturalLanguageUnderstandingV1(options)\n\n  if naturalLanguageUnderstandingErr != nil {\n    panic(naturalLanguageUnderstandingErr)\n  }\n\n  naturalLanguageUnderstanding.SetServiceURL(\"{url}\")\n\n  url := \"www.cnn.com\"\n  sentiment := true\n  limit := int64(1)\n\n  response, responseErr := naturalLanguageUnderstanding.Analyze(\n    &naturallanguageunderstandingv1.AnalyzeOptions{\n      URL: &url,\n      Features: &naturallanguageunderstandingv1.Features{\n        Entities: &naturallanguageunderstandingv1.EntitiesOptions{\n          Sentiment: &sentiment,\n          Limit: &limit,\n        },\n      },\n    },\n  )\n  if responseErr != nil {\n    panic(responseErr)\n  }\n  b, _ := json.MarshalIndent(result, \"\", \"   \")\n  fmt.Println(string(b))\n}\n```\n\nExample Entities feature request\n\n```java\nIamAuthenticator authenticator = new IamAuthenticator(\"{apikey}\");\nNaturalLanguageUnderstanding naturalLanguageUnderstanding = new NaturalLanguageUnderstanding(\"2022-04-07\", authenticator);\nnaturalLanguageUnderstanding.setServiceUrl(\"{url}\");\n\nString url = \"www.cnn.com\";\n\nEntitiesOptions entities= new EntitiesOptions.Builder()\n  .sentiment(true)\n  .limit(1)\n  .build();\n\nFeatures features = new Features.Builder()\n  .entities(entities)\n  .build();\n\nAnalyzeOptions parameters = new AnalyzeOptions.Builder()\n  .url(url)\n  .features(features)\n  .build();\n\nAnalysisResults response = naturalLanguageUnderstanding\n  .analyze(parameters)\n  .execute()\n  .getResult();\nSystem.out.println(response);\n```\n\nExample Entities feature request\n\n```javascript\nconst NaturalLanguageUnderstandingV1 = require('ibm-watson/natural-language-understanding/v1');\nconst { IamAuthenticator } = require('ibm-watson/auth');\n\nconst naturalLanguageUnderstanding = new NaturalLanguageUnderstandingV1({\n  version: '2022-04-07',\n  authenticator: new IamAuthenticator({\n    apikey: '{apikey}',\n  }),\n  serviceUrl: '{url}',\n});\n\nconst analyzeParams = {\n  'url': 'www.cnn.com',\n  'features': {\n    'entities': {\n      'sentiment': true,\n      'limit': 1\n    }\n  }\n};\n\nnaturalLanguageUnderstanding.analyze(analyzeParams)\n  .then(analysisResults => {\n    console.log(JSON.stringify(analysisResults, null, 2));\n  })\n  .catch(err => {\n    console.log('error:', err);\n  });\n```\n\nExample Entities feature request\n\n```python\n\nimport json\nfrom ibm_watson import NaturalLanguageUnderstandingV1\nfrom ibm_cloud_sdk_core.authenticators import IAMAuthenticator\nfrom ibm_watson.natural_language_understanding_v1 \\\n    import Features, EntitiesOptions\n\nauthenticator = IAMAuthenticator('{apikey}')\nnatural_language_understanding = NaturalLanguageUnderstandingV1(\n    version='2022-04-07',\n    authenticator=authenticator\n)\n\nnatural_language_understanding.set_service_url('{url}')\n\nresponse = natural_language_understanding.analyze(\n    url='www.cnn.com',\n    features=Features(entities=EntitiesOptions(sentiment=True,limit=1))).get_result()\n\nprint(json.dumps(response, indent=2))\n```\n\nExample Entities feature request\n\n```ruby\nrequire \"json\"\nrequire \"ibm_watson/authenticators\"\nrequire \"ibm_watson/natural_language_understanding_v1\"\ninclude IBMWatson\n\nauthenticator = Authenticators::IamAuthenticator.new(\n  apikey: \"{apikey}\"\n)\n\nnatural_language_understanding = NaturalLanguageUnderstandingV1.new(\n  version: \"2022-04-07\",\n  authenticator: authenticator\n)\nnatural_language_understanding.service_url = \"{url}\"\n\nresponse = natural_language_understanding.analyze(\n  url: \"www.cnn.com\",\n  features: {entities: {sentiment: true, limit: 1}\n  }\n)\n\nputs JSON.pretty_generate(response.result)\n```\n\nExample Entities feature request\n\n```swift\nlet authenticator = WatsonIAMAuthenticator(apiKey: \"{apikey}\")\nlet naturalLanguageUnderstanding = NaturalLanguageUnderstanding(version: \"2022-04-07\", authenticator: authenticator)\nnaturalLanguageUnderstanding.serviceURL = \"{url}\"\n\nlet entities = EntitiesOptions(limit: 1, sentiment: true)\nlet features = Features(entities: entities)\nnaturalLanguageUnderstanding.analyze(features: features, url: \"www.cnn.com\") {\n  response, error in\n\n  guard let analysis = response?.result else {\n    print(error?.localizedDescription ?? \"unknown error\")\n    return\n  }\n\n  print(analysis)\n}\n```\n\nExample Entities feature request\n\n```cs\nIamAuthenticator authenticator = new IamAuthenticator(\n    apikey: \"{apikey}\"\n    );\n\nNaturalLanguageUnderstandingService naturalLanguageUnderstanding = new NaturalLanguageUnderstandingService(\"2022-04-07\", authenticator);\nnaturalLanguageUnderstanding.SetServiceUrl(\"{url}\");\n\nvar result = naturalLanguageUnderstanding.Analyze(\n    url: \"www.cnn.com\",\n    features: new Features()\n    {\n        Entities = new EntitiesOptions()\n        {\n            Sentiment = true,\n            Limit = 1\n        }\n    }\n    );\n\nConsole.WriteLine(result.Response);\n```\n\nExample Entities feature request\n\n```cs\nIamAuthenticator authenticator = new IamAuthenticator(\n    Apikey: \"{apikey}\"\n);\n\nwhile (!authenticator.CanAuthenticate())\n    yield return null;\n\nNaturalLanguageUnderstandingService service = new NaturalLanguageUnderstandingService(\"2022-04-07\", authenticator);\n\nFeatures features = new Features()\n{\n    Entities = new EntitiesOptions()\n    {\n        Limit = 1,\n        Sentiment = true\n    }\n};\n\nnaturalLanguageUnderstanding.Analyze(\n    callback: (DetailedResponse<AnalysisResults> response, IBMError error) =>\n    {\n        Log.Debug(\"NaturalLanguageUnderstandingServiceV1\", \"Analyze result: {0}\", response.Response);\n    },\n    url: \"www.cnn.com\",\n    features: features\n);\n```\n\nIdentifies people, cities, organizations, and other entities in the content. See [Entity type systems](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-entity-type-systems).\n\n#### Entities request options\n\n<div class=\"endpoint-details__description parameter-details\">\n  <div class=\"parameter-details__heading\">\n    <div class=\"parameter-list__parameter-metadata\">\n      <h4 class=\"parameter-list__parameter-name\" data-is-required=\"false\">Request options</h4>\n      <span class=\"parameter-list__parameter-type\">EntitiesOptions</span>\n    </div>\n    <div class=\"parameter-list__parameter-description\">\n      <div>\n        <p>For more information, see the request body for the <a href=\"#analyze\">Analyze text</a> method.</p>\n      </div>\n    </div>\n  </div>\n  <ul class=\"parameter-details__parameter-list parameter-list\">\n    <li class=\"parameter-list__parameter\">\n      <div class=\"parameter-list__parameter-metadata\">\n        <h5 class=\"parameter-list__parameter-name\" data-is-required=\"false\">entities.limit</h5>\n        <span class=\"parameter-list__parameter-type\" data-hd-programlang=\"curl node ruby\">integer</span>\n        <span class=\"parameter-list__parameter-type\" data-hd-programlang=\"python swift\">int</span>\n        <span class=\"parameter-list__parameter-type\" data-hd-programlang=\"java\">long</span>\n      </div>\n      <div class=\"parameter-list__parameter-description\">\n        <p>Maximum number of entities to return.</p>\n        <p class=\"default-value\">\n          <span class=\"default-value__desc\">Default: </span>\n          <code>50</code>\n        </p>\n      </div>\n    </li>\n    <li class=\"parameter-list__parameter\">\n      <div class=\"parameter-list__parameter-metadata\">\n        <h5 class=\"parameter-list__parameter-name\" data-is-required=\"false\">entities.mentions</h5>\n        <span class=\"parameter-list__parameter-type\" data-hd-programlang=\"curl java node ruby\">boolean</span>\n        <span class=\"parameter-list__parameter-type\" data-hd-programlang=\"python swift\">bool</span>\n      </div>\n      <div class=\"parameter-list__parameter-description\">\n        <p>Whether to return locations of entity mentions.</p>\n        <p class=\"default-value\">\n          <span class=\"default-value__desc\">Default: </span>\n          <code>false</code>\n        </p>\n      </div>\n    </li>\n    <li class=\"parameter-list__parameter\">\n      <div class=\"parameter-list__parameter-metadata\">\n        <h5 class=\"parameter-list__parameter-name\" data-is-required=\"false\">entities.model</h5>\n        <span class=\"parameter-list__parameter-type\" data-hd-programlang=\"curl java node ruby swift\">string</span>\n        <span class=\"parameter-list__parameter-type\" data-hd-programlang=\"python\">str</span>\n      </div>\n      <div class=\"parameter-list__parameter-description\">\n        <p>A custom model ID. For more information about how to override the standard entity detection model, see <a href=\"/docs/natural-language-understanding?topic=natural-language-understanding-customizing\">Customizing</a>\n        </p>\n      </div>\n    </li>\n    <li class=\"parameter-list__parameter\">\n      <div class=\"parameter-list__parameter-metadata\">\n        <h5 class=\"parameter-list__parameter-name\" data-is-required=\"false\">entities.sentiment</h5>\n        <span class=\"parameter-list__parameter-type\" data-hd-programlang=\"curl java node ruby\">boolean</span>\n        <span class=\"parameter-list__parameter-type\" data-hd-programlang=\"python swift\">bool</span>\n      </div>\n      <div class=\"parameter-list__parameter-description\">\n        <p>Whether to return sentiment information for detected entities.</p>\n        <p class=\"default-value\">\n          <span class=\"default-value__desc\">Default: </span>\n          <code>false</code>\n        </p>\n      </div>\n    </li>\n    <li class=\"parameter-list__parameter\">\n      <div class=\"parameter-list__parameter-metadata\">\n        <h5 class=\"parameter-list__parameter-name\" data-is-required=\"false\">entities.emotion</h5>\n        <span class=\"parameter-list__parameter-type\" data-hd-programlang=\"curl java node ruby\">boolean</span>\n        <span class=\"parameter-list__parameter-type\" data-hd-programlang=\"python swift\">bool</span>\n      </div>\n      <div class=\"parameter-list__parameter-description\">\n        <p>Whether to return emotion information for detected entities.</p>\n        <p class=\"default-value\">\n          <span class=\"default-value__desc\">Default: </span>\n          <code>false</code>\n        </p>\n      </div>\n    </li>\n  </ul>\n</div>\n\n#### Entities response\n\nSee the `EntitiesResult[]` object in the [Analyze text][analyze_link] method.\n\nExample Entities feature response\n\n```json\n{\n  \"usage\": {\n    \"text_units\": 1,\n    \"text_characters\": 2708,\n    \"features\": 1\n  },\n  \"retrieved_url\": \"http://www.cnn.com/\",\n  \"language\": \"en\",\n  \"entities\": [\n    {\n      \"type\": \"Company\",\n      \"text\": \"CNN\",\n      \"sentiment\": {\n        \"score\": 0.0,\n        \"label\": \"neutral\"\n      },\n      \"relevance\": 0.784947,\n      \"disambiguation\": {\n        \"subtype\": [\n          \"Broadcast\",\n          \"AwardWinner\",\n          \"RadioNetwork\",\n          \"TVNetwork\"\n        ],\n        \"name\": \"CNN\",\n        \"dbpedia_resource\": \"http://dbpedia.org/resource/CNN\"\n      },\n      \"count\": 9\n    }\n  ]\n}\n```\n\n### Keywords\n\nExample Keywords feature request\n\n```sh\ncurl -X POST \\\n-H \"Content-Type: application/json\" \\\n-u \"apikey:{apikey}\" \\\n-d @parameters.json \\\n\"{url}/v1/analyze?version=2022-04-07\"\n```\n\nExample parameters\n\n```json\n{\n  \"url\": \"www.ibm.com\",\n  \"features\": {\n    \"keywords\": {\n      \"sentiment\": true,\n      \"emotion\": true,\n      \"limit\": 3\n    }\n  }\n}\n```\n\n```go\npackage main\n\nimport (\n  \"encoding/json\"\n  \"fmt\"\n  \"github.com/IBM/go-sdk-core/core\"\n  \"github.com/watson-developer-cloud/go-sdk/naturallanguageunderstandingv1\"\n)\n\nfunc main() {\n  authenticator := &core.IamAuthenticator{\n    ApiKey:     \"{apikey}\",\n  }\n\n  options := &naturallanguageunderstandingv1.NaturalLanguageUnderstandingV1Options{\n    Version: \"2022-04-07\",\n    Authenticator: authenticator,\n  }\n\n  naturalLanguageUnderstanding, naturalLanguageUnderstandingErr := naturallanguageunderstandingv1.NewNaturalLanguageUnderstandingV1(options)\n\n  if naturalLanguageUnderstandingErr != nil {\n    panic(naturalLanguageUnderstandingErr)\n  }\n\n  naturalLanguageUnderstanding.SetServiceURL(\"{url}\")\n\n  url := \"www.ibm.com\"\n  sentiment := true\n  emotion := true\n  limit := int64(3)\n\n  response, responseErr := naturalLanguageUnderstanding.Analyze(\n    &naturallanguageunderstandingv1.AnalyzeOptions{\n      URL: &url,\n      Features: &naturallanguageunderstandingv1.Features{\n        Keywords: &naturallanguageunderstandingv1.KeywordsOptions{\n          Sentiment: &sentiment,\n          Emotion: &emotion,\n          Limit: &limit,\n        },\n      },\n    },\n  )\n  if responseErr != nil {\n    panic(responseErr)\n  }\n  b, _ := json.MarshalIndent(result, \"\", \"   \")\n  fmt.Println(string(b))\n}\n```\n\nExample Keywords feature request\n\n```java\nIamAuthenticator authenticator = new IamAuthenticator(\"{apikey}\");\nNaturalLanguageUnderstanding naturalLanguageUnderstanding = new NaturalLanguageUnderstanding(\"2022-04-07\", authenticator);\nnaturalLanguageUnderstanding.setServiceUrl(\"{url}\");\n\nString url = \"www.ibm.com\";\n\nKeywordsOptions keywords= new KeywordsOptions.Builder()\n  .sentiment(true)\n  .emotion(true)\n  .limit(3)\n  .build();\n\nFeatures features = new Features.Builder()\n  .keywords(keywords)\n  .build();\n\nAnalyzeOptions parameters = new AnalyzeOptions.Builder()\n  .url(url)\n  .features(features)\n  .build();\n\nAnalysisResults response = naturalLanguageUnderstanding\n  .analyze(parameters)\n  .execute()\n  .getResult();\nSystem.out.println(response);\n```\n\n```javascript\nconst NaturalLanguageUnderstandingV1 = require('ibm-watson/natural-language-understanding/v1');\nconst { IamAuthenticator } = require('ibm-watson/auth');\n\nconst naturalLanguageUnderstanding = new NaturalLanguageUnderstandingV1({\n  version: '2022-04-07',\n  authenticator: new IamAuthenticator({\n    apikey: '{apikey}',\n  }),\n  serviceUrl: '{url}',\n});\n\nconst analyzeParams = {\n  'url': 'www.ibm.com',\n  'features': {\n    'keywords': {\n      'sentiment': true,\n      'emotion': true,\n      'limit': 3\n    }\n  }\n};\n\nnaturalLanguageUnderstanding.analyze(analyzeParams)\n  .then(analysisResults => {\n    console.log(JSON.stringify(analysisResults, null, 2));\n  })\n  .catch(err => {\n    console.log('error:', err);\n  });\n```\n\nExample Keywords feature request\n\n```python\nimport json\nfrom ibm_watson import NaturalLanguageUnderstandingV1\nfrom ibm_cloud_sdk_core.authenticators import IAMAuthenticator\nfrom ibm_watson.natural_language_understanding_v1 \\\n    import Features, KeywordsOptions\n\nauthenticator = IAMAuthenticator('{apikey}')\nnatural_language_understanding = NaturalLanguageUnderstandingV1(\n    version='2022-04-07',\n    authenticator=authenticator\n)\n\nnatural_language_understanding.set_service_url('{url}')\n\nresponse = natural_language_understanding.analyze(\n    url='www.ibm.com',\n    features=Features(keywords=KeywordsOptions(sentiment=True,emotion=True,limit=2))).get_result()\n\nprint(json.dumps(response, indent=2))\n```\n\nExample Keywords feature request\n\n```ruby\nrequire \"json\"\nrequire \"ibm_watson/authenticators\"\nrequire \"ibm_watson/natural_language_understanding_v1\"\ninclude IBMWatson\n\nauthenticator = Authenticators::IamAuthenticator.new(\n  apikey: \"{apikey}\"\n)\n\nnatural_language_understanding = NaturalLanguageUnderstandingV1.new(\n  version: \"2022-04-07\",\n  authenticator: authenticator\n)\nnatural_language_understanding.service_url = \"{url}\"\n\nresponse = natural_language_understanding.analyze(\n  url: \"www.ibm.com\",\n  features: {keywords: {sentiment: true, emotion: true, limit: 3}\n  }\n)\n\nputs JSON.pretty_generate(response.result)\n```\n\nExample Keywords feature request\n\n```swift\nlet authenticator = WatsonIAMAuthenticator(apiKey: \"{apikey}\")\nlet naturalLanguageUnderstanding = NaturalLanguageUnderstanding(version: \"2022-04-07\", authenticator: authenticator)\nnaturalLanguageUnderstanding.serviceURL = \"{url}\"\n\nlet keywords = KeywordsOptions(limit: 3, sentiment: true, emotion: true)\nlet features = Features(keywords: keywords)\nnaturalLanguageUnderstanding.analyze(features: features, url: \"www.ibm.com\") {\n  response, error in\n\n  guard let analysis = response?.result else {\n    print(error?.localizedDescription ?? \"unknown error\")\n    return\n  }\n\n  print(analysis)\n}\n```\n\nExample Keywords feature request\n\n```cs\nIamAuthenticator authenticator = new IamAuthenticator(\n    apikey: \"{apikey}\"\n    );\n\nNaturalLanguageUnderstandingService naturalLanguageUnderstanding = new NaturalLanguageUnderstandingService(\"2022-04-07\", authenticator);\nnaturalLanguageUnderstanding.SetServiceUrl(\"{url}\");\n\nvar result = naturalLanguageUnderstanding.Analyze(\n    url: \"www.ibm.com\",\n    features: new Features()\n    {\n        Keywords = new KeywordsOptions()\n        {\n            Sentiment = true,\n            Emotion = true,\n            Limit = 2\n        }\n    }\n    );\n\nConsole.WriteLine(result.Response);\n```\n\nExample Keywords feature request\n\n```cs\nIamAuthenticator authenticator = new IamAuthenticator(\n    Apikey: \"{apikey}\"\n);\n\nwhile (!authenticator.CanAuthenticate())\n    yield return null;\n\nNaturalLanguageUnderstandingService service = new NaturalLanguageUnderstandingService(\"2022-04-07\", authenticator);\n\nFeatures features = new Features()\n{\n    Keywords = new KeywordsOptions()\n    {\n        Limit = 3,\n        Sentiment = true,\n        Emotion = true\n    }\n};\n\nnaturalLanguageUnderstanding.Analyze(\n    callback: (DetailedResponse<AnalysisResults> response, IBMError error) =>\n    {\n        Log.Debug(\"NaturalLanguageUnderstandingServiceV1\", \"Analyze result: {0}\", response.Response);\n    },\n    url: \"www.ibm.com\",\n    features: features\n);\n```\n\nReturns important keywords in the content. For example, analyzing a company's press release could return keywords such as \"sustainability\", \"hybrid cloud\", or \"IBM\".\n\n#### Keywords request options\n\n<div class=\"endpoint-details__description parameter-details\">\n  <div class=\"parameter-details__heading\">\n    <div class=\"parameter-list__parameter-metadata\">\n      <h4 class=\"parameter-list__parameter-name\" data-is-required=\"false\">Request options</h4>\n      <span class=\"parameter-list__parameter-type\">KeywordsOptions</span>\n    </div>\n    <div class=\"parameter-list__parameter-description\">\n      <div>\n      <p>For more information, see the request body for the <a href=\"#analyze\">Analyze text</a> method.</p>\n      </div>\n    </div>\n  </div>\n  <ul class=\"parameter-details__parameter-list parameter-list\">\n    <li class=\"parameter-list__parameter\">\n      <div class=\"parameter-list__parameter-metadata\">\n        <h5 class=\"parameter-list__parameter-name\" data-is-required=\"false\">keywords.limit</h5>\n        <span class=\"parameter-list__parameter-type\" data-hd-programlang=\"curl node ruby\">integer</span>\n        <span class=\"parameter-list__parameter-type\" data-hd-programlang=\"python swift\">int</span>\n        <span class=\"parameter-list__parameter-type\" data-hd-programlang=\"java\">long</span>\n      </div>\n      <div class=\"parameter-list__parameter-description\">\n        <p>Maximum number of keywords to return.</p>\n        <p class=\"default-value\">\n          <span class=\"default-value__desc\">Default: </span>\n          <code>50</code>\n        </p>\n      </div>\n    </li>\n    <li class=\"parameter-list__parameter\">\n      <div class=\"parameter-list__parameter-metadata\">\n        <h5 class=\"parameter-list__parameter-name\" data-is-required=\"false\">keyword.sentiment</h5>\n        <span class=\"parameter-list__parameter-type\" data-hd-programlang=\"curl java node ruby\">boolean</span>\n        <span class=\"parameter-list__parameter-type\" data-hd-programlang=\"python swift\">bool</span>\n      </div>\n      <div class=\"parameter-list__parameter-description\">\n        <p>Whether to return sentiment information for detected keywords.</p>\n        <p class=\"default-value\">\n          <span class=\"default-value__desc\">Default: </span>\n          <code>false</code>\n        </p>\n        </p>\n      </div>\n    </li>\n    <li class=\"parameter-list__parameter\">\n      <div class=\"parameter-list__parameter-metadata\">\n        <h5 class=\"parameter-list__parameter-name\" data-is-required=\"false\">keyword.emotion</h5>\n        <span class=\"parameter-list__parameter-type\" data-hd-programlang=\"curl java node ruby\">boolean</span>\n        <span class=\"parameter-list__parameter-type\" data-hd-programlang=\"python swift\">bool</span>\n      </div>\n      <div class=\"parameter-list__parameter-description\">\n        <p>Whether to return emotion information for detected keywords.</p>\n        <p class=\"default-value\">\n          <span class=\"default-value__desc\">Default: </span>\n          <code>false</code>\n        </p>\n      </div>\n    </li>\n  </ul>\n</div>\n\n#### Keywords response\n\nSee the `KeywordsResult[]` object in the [Analyze text][analyze_link] method.\n\nExample Keywords feature response\n\n```json\n{\n  \"usage\": {\n    \"text_units\": 1,\n    \"text_characters\": 1536,\n    \"features\": 1\n  },\n  \"keywords\": [\n    {\n      \"text\": \"curated online courses\",\n      \"sentiment\": {\n        \"score\": 0.792454\n      },\n      \"relevance\": 0.864624,\n      \"emotions\": {\n        \"sadness\": 0.188625,\n        \"joy\": 0.522781,\n        \"fear\": 0.12012,\n        \"disgust\": 0.103212,\n        \"anger\": 0.106669\n      }\n    },\n    {\n      \"text\": \"free virtual server\",\n      \"sentiment\": {\n        \"score\": 0.664726\n      },\n      \"relevance\": 0.864593,\n      \"emotions\": {\n        \"sadness\": 0.265225,\n        \"joy\": 0.532354,\n        \"fear\": 0.07773,\n        \"disgust\": 0.090112,\n        \"anger\": 0.102242\n      }\n    }\n  ],\n  \"language\": \"en\",\n  \"retrieved_url\": \"https://www.ibm.com/us-en/\"\n}\n```\n\n### Metadata\n\nExample Metadata feature request\n\n```sh\ncurl -X POST \\\n-H \"Content-Type: application/json\" \\\n-u \"apikey:{apikey}\" \\\n-d @parameters.json \\\n\"{url}/v1/analyze?version=2022-04-07\"\n```\n\nExample parameters\n\n```json\n{\n  \"url\": \"www.ibm.com\",\n  \"features\": {\n    \"metadata\": {}\n  }\n}\n```\n\n```go\npackage main\n\nimport (\n  \"encoding/json\"\n  \"fmt\"\n  \"github.com/IBM/go-sdk-core/core\"\n  \"github.com/watson-developer-cloud/go-sdk/naturallanguageunderstandingv1\"\n)\n\nfunc main() {\n  authenticator := &core.IamAuthenticator{\n    ApiKey:     \"{apikey}\",\n  }\n\n  options := &naturallanguageunderstandingv1.NaturalLanguageUnderstandingV1Options{\n    Version: \"2022-04-07\",\n    Authenticator: authenticator,\n  }\n\n  naturalLanguageUnderstanding, naturalLanguageUnderstandingErr := naturallanguageunderstandingv1.NewNaturalLanguageUnderstandingV1(options)\n\n  if naturalLanguageUnderstandingErr != nil {\n    panic(naturalLanguageUnderstandingErr)\n  }\n\n  naturalLanguageUnderstanding.SetServiceURL(\"{url}\")\n\n  url := \"www.ibm.com\"\n\n  response, responseErr := naturalLanguageUnderstanding.Analyze(\n    &naturallanguageunderstandingv1.AnalyzeOptions{\n      URL: &url,\n      Features: &naturallanguageunderstandingv1.Features{\n        Metadata: make(map[string]string{}),\n      },\n    },\n  )\n  if responseErr != nil {\n    panic(responseErr)\n  }\n  b, _ := json.MarshalIndent(result, \"\", \"   \")\n  fmt.Println(string(b))\n}\n```\n\nExample Metadata feature request\n\n```java\nIamAuthenticator authenticator = new IamAuthenticator(\"{apikey}\");\nNaturalLanguageUnderstanding naturalLanguageUnderstanding = new NaturalLanguageUnderstanding(\"2022-04-07\", authenticator);\nnaturalLanguageUnderstanding.setServiceUrl(\"{url}\");\n\nString url = \"www.ibm.com\";\n\nMap<String, Object> metadata= new HashMap<String, Object>();\n\nFeatures features = new Features.Builder()\n  .metadata(metadata)\n  .build();\n\nAnalyzeOptions parameters = new AnalyzeOptions.Builder()\n  .url(url)\n  .features(features)\n  .build();\n\nAnalysisResults response = naturalLanguageUnderstanding\n  .analyze(parameters)\n  .execute()\n  .getResult();\nSystem.out.println(response);\n```\n\nExample Metadata feature request\n\n```javascript\nconst NaturalLanguageUnderstandingV1 = require('ibm-watson/natural-language-understanding/v1');\nconst { IamAuthenticator } = require('ibm-watson/auth');\n\nconst naturalLanguageUnderstanding = new NaturalLanguageUnderstandingV1({\n  version: '2022-04-07',\n  authenticator: new IamAuthenticator({\n    apikey: '{apikey}',\n  }),\n  serviceUrl: '{url}',\n});\n\nconst analyzeParams = {\n  'url': 'www.ibm.com',\n  'features': {\n    'metadata': {}\n  }\n};\n\nnaturalLanguageUnderstanding.analyze(analyzeParams)\n  .then(analysisResults => {\n    console.log(JSON.stringify(analysisResults, null, 2));\n  })\n  .catch(err => {\n    console.log('error:', err);\n  });\n```\n\nExample Metadata feature request\n\n```python\nimport json\nfrom ibm_watson import NaturalLanguageUnderstandingV1\nfrom ibm_cloud_sdk_core.authenticators import IAMAuthenticator\nfrom ibm_watson.natural_language_understanding_v1 \\\n    import Features\n\nauthenticator = IAMAuthenticator('{apikey}')\nnatural_language_understanding = NaturalLanguageUnderstandingV1(\n    version='2022-04-07',\n    authenticator=authenticator\n)\n\nnatural_language_understanding.set_service_url('{url}')\n\nresponse = natural_language_understanding.analyze(\n    url='www.ibm.com',\n    features=Features(metadata=())).get_result()\n\nprint(json.dumps(response, indent=2))\n```\n\nExample Metadata feature request\n\n```ruby\nrequire \"json\"\nrequire \"ibm_watson/authenticators\"\nrequire \"ibm_watson/natural_language_understanding_v1\"\ninclude IBMWatson\n\nauthenticator = Authenticators::IamAuthenticator.new(\n  apikey: \"{apikey}\"\n)\n\nnatural_language_understanding = NaturalLanguageUnderstandingV1.new(\n  version: \"2022-04-07\",\n  authenticator: authenticator\n)\nnatural_language_understanding.service_url = \"{url}\"\n\nresponse = natural_language_understanding.analyze(\n  url: \"www.ibm.com\",\n  features: {metadata: {}\n  }\n)\n\nputs JSON.pretty_generate(response.result)\n```\n\nExample Metadata feature request\n\n```swift\nlet authenticator = WatsonIAMAuthenticator(apiKey: \"{apikey}\")\nlet naturalLanguageUnderstanding = NaturalLanguageUnderstanding(version: \"2022-04-07\", authenticator: authenticator)\nnaturalLanguageUnderstanding.serviceURL = \"{url}\"\n\nlet features = Features(metadata: [\"\": .string(\"\")])\nnaturalLanguageUnderstanding.analyze(features: features, url: \"www.ibm.com\") {\n  response, error in\n\n  guard let analysis = response?.result else {\n    print(error?.localizedDescription ?? \"unknown error\")\n    return\n  }\n\n  print(analysis)\n}\n```\n\nExample Metadata feature request\n\n```cs\nIamAuthenticator authenticator = new IamAuthenticator(\n    apikey: \"{apikey}\"\n    );\n\nNaturalLanguageUnderstandingService naturalLanguageUnderstanding = new NaturalLanguageUnderstandingService(\"2022-04-07\", authenticator);\nnaturalLanguageUnderstanding.SetServiceUrl(\"{url}\");\n\nDictionary<string, object> metadata = new Dictionary<string, object>();\n\nvar result = naturalLanguageUnderstanding.Analyze(\n    url: \"www.ibm.com\",\n    features: new Features()\n    {\n        Metadata = metadata\n    }\n    );\n\nConsole.WriteLine(result.Response);\n```\n\nExample Metadata feature request\n\n```cs\nIamAuthenticator authenticator = new IamAuthenticator(\n    Apikey: \"{apikey}\"\n);\n\nwhile (!authenticator.CanAuthenticate())\n    yield return null;\n\nNaturalLanguageUnderstandingService service = new NaturalLanguageUnderstandingService(\"2022-04-07\", authenticator);\n\nDictionary<string, object> metadata = new Dictionary<string, object>();\n\nFeatures features = new Features()\n{\n    Metadata = metadata\n};\n\nnaturalLanguageUnderstanding.Analyze(\n    callback: (DetailedResponse<AnalysisResults> response, IBMError error) =>\n    {\n        Log.Debug(\"NaturalLanguageUnderstandingServiceV1\", \"Analyze result: {0}\", response.Response);\n    },\n    url: \"www.ibm.com\",\n    features: features\n);\n```\n\nReturns information from the document, including author name, title, RSS/ATOM feeds, prominent page image, and publication date. Supports URL and HTML input types only.\n\n#### Metadata request options\n\n<div class=\"endpoint-details__description parameter-details\">\n  <h4 class=\"parameter-details__heading\">No request parameters</h4>\n  <p class=\"parameter-details__empty-message\">This feature does not accept any request options.</p>\n</div>\n\n#### Metadata response\n\nSee the `MetadataResult` object in the [Analyze text][analyze_link] method.\n\nExample Metadata feature response\n\n```json\n{\n  \"usage\": {\n    \"text_units\": 1,\n    \"text_characters\": 1536,\n    \"features\": 1\n  },\n  \"retrieved_url\": \"https://www.ibm.com/us-en/\",\n  \"metadata\": {\n    \"title\": \"IBM - United States\",\n    \"publication_date\": \"2015-10-01T00:00:00\",\n    \"image\": \"\",\n    \"feeds\": [],\n    \"authors\": []\n  },\n  \"language\": \"en\"\n}\n```\n\n### Relations\n\nExample Relations feature request\n\n```sh\ncurl -X POST \\\n-H \"Content-Type: application/json\" \\\n-u \"apikey:{apikey}\" \\\n-d @parameters.json \\\n\"{url}/v1/analyze?version=2022-04-07\"\n```\n\nExample parameters\n\n```json\n{\n  \"features\": {\n    \"relations\": {}\n  },\n  \"text\": \"Leonardo DiCaprio won Best Actor in a Leading Role for his performance.\"\n}\n```\n\n```go\npackage main\n\nimport (\n  \"encoding/json\"\n  \"fmt\"\n  \"github.com/IBM/go-sdk-core/core\"\n  \"github.com/watson-developer-cloud/go-sdk/naturallanguageunderstandingv1\"\n)\n\nfunc main() {\n  authenticator := &core.IamAuthenticator{\n    ApiKey:     \"{apikey}\",\n  }\n\n  options := &naturallanguageunderstandingv1.NaturalLanguageUnderstandingV1Options{\n    Version: \"2022-04-07\",\n    Authenticator: authenticator,\n  }\n\n  naturalLanguageUnderstanding, naturalLanguageUnderstandingErr := naturallanguageunderstandingv1.NewNaturalLanguageUnderstandingV1(options)\n\n  if naturalLanguageUnderstandingErr != nil {\n    panic(naturalLanguageUnderstandingErr)\n  }\n\n  naturalLanguageUnderstanding.SetServiceURL(\"{url}\")\n\n  text := \"Leonardo DiCaprio won Best Actor in a Leading Role for his performance.\"\n\n  response, responseErr := naturalLanguageUnderstanding.Analyze(\n    &naturallanguageunderstandingv1.AnalyzeOptions{\n      Text: &text,\n      Features: &naturallanguageunderstandingv1.Features{\n        Relations: &naturallanguageunderstandingv1.RelationsOptions{},\n      },\n    },\n  )\n  if responseErr != nil {\n    panic(responseErr)\n  }\n  b, _ := json.MarshalIndent(result, \"\", \"   \")\n  fmt.Println(string(b))\n}\n```\n\nExample Relations feature request\n\n```java\nIamAuthenticator authenticator = new IamAuthenticator(\"{apikey}\");\nNaturalLanguageUnderstanding naturalLanguageUnderstanding = new NaturalLanguageUnderstanding(\"2022-04-07\", authenticator);\nnaturalLanguageUnderstanding.setServiceUrl(\"{url}\");\n\nString text = \"Leonardo DiCaprio won Best Actor\" +\n  \" in a Leading Role for his performance.\";\n\nRelationsOptions relations = new RelationsOptions.Builder()\n  .build();\n\nFeatures features = new Features.Builder()\n  .relations(relations)\n  .build();\n\nAnalyzeOptions parameters = new AnalyzeOptions.Builder()\n  .text(text)\n  .features(features)\n  .build();\n\nAnalysisResults response = naturalLanguageUnderstanding\n  .analyze(parameters)\n  .execute()\n  .getResult();\nSystem.out.println(response);\n```\n\nExample Relations feature request\n\n```javascript\nconst NaturalLanguageUnderstandingV1 = require('ibm-watson/natural-language-understanding/v1');\nconst { IamAuthenticator } = require('ibm-watson/auth');\n\nconst naturalLanguageUnderstanding = new NaturalLanguageUnderstandingV1({\n  version: '2022-04-07',\n  authenticator: new IamAuthenticator({\n    apikey: '{apikey}',\n  }),\n  serviceUrl: '{url}',\n});\n\nconst analyzeParams = {\n  'features': {\n    'relations': {}\n  },\n  'text': 'Leonardo DiCaprio won Best Actor in a Leading Role for his performance.'\n};\n\nnaturalLanguageUnderstanding.analyze(analyzeParams)\n  .then(analysisResults => {\n    console.log(JSON.stringify(analysisResults, null, 2));\n  })\n  .catch(err => {\n    console.log('error:', err);\n  });\n```\n\nExample Relations feature request\n\n```python\nimport json\nfrom ibm_watson import NaturalLanguageUnderstandingV1\nfrom ibm_cloud_sdk_core.authenticators import IAMAuthenticator\nfrom ibm_watson.natural_language_understanding_v1 \\\n    import Features, RelationsOptions\n\nauthenticator = IAMAuthenticator('{apikey}')\nnatural_language_understanding = NaturalLanguageUnderstandingV1(\n    version='2022-04-07',\n    authenticator=authenticator\n)\n\nnatural_language_understanding.set_service_url('{url}')\n\nresponse = natural_language_understanding.analyze(\n    text='Leonardo DiCaprio won Best Actor in a Leading Role for his performance.',\n    features=Features(relations=RelationsOptions())).get_result()\n\nprint(json.dumps(response, indent=2))\n```\n\nExample Relations feature request\n\n```ruby\nrequire \"json\"\nrequire \"ibm_watson/authenticators\"\nrequire \"ibm_watson/natural_language_understanding_v1\"\ninclude IBMWatson\n\nauthenticator = Authenticators::IamAuthenticator.new(\n  apikey: \"{apikey}\"\n)\n\nnatural_language_understanding = NaturalLanguageUnderstandingV1.new(\n  version: \"2022-04-07\",\n  authenticator: authenticator\n)\nnatural_language_understanding.service_url = \"{url}\"\n\nresponse = natural_language_understanding.analyze(\n  text: \"Leonardo DiCaprio won Best Actor in a Leading Role for his performance.\",\n  features: {relations: {}\n  }\n)\n\nputs JSON.pretty_generate(response.result)\n```\n\nExample Relations feature request\n\n```swift\nlet authenticator = WatsonIAMAuthenticator(apiKey: \"{apikey}\")\nlet naturalLanguageUnderstanding = NaturalLanguageUnderstanding(version: \"2022-04-07\", authenticator: authenticator)\nnaturalLanguageUnderstanding.serviceURL = \"{url}\"\n\nlet text = \"Leonardo DiCaprio won Best Actor\" +\n           \" in a Leading Role for his performance.\"\nlet features = Features(relations: RelationsOptions())\nnaturalLanguageUnderstanding.analyze(features: features, text: text) {\n  response, error in\n\n  guard let analysis = response?.result else {\n    print(error?.localizedDescription ?? \"unknown error\")\n    return\n  }\n\n  print(analysis)\n}\n```\n\nExample Relations feature request\n\n```cs\nIamAuthenticator authenticator = new IamAuthenticator(\n    apikey: \"{apikey}\"\n    );\n\nNaturalLanguageUnderstandingService naturalLanguageUnderstanding = new NaturalLanguageUnderstandingService(\"2022-04-07\", authenticator);\nnaturalLanguageUnderstanding.SetServiceUrl(\"{url}\");\n\nvar result = naturalLanguageUnderstanding.Analyze(\n    text: \"Leonardo DiCaprio won Best Actor in a Leading Role for his performance.\",\n    features: new Features()\n    {\n        Relations = new RelationsOptions()\n    }\n    );\n\nConsole.WriteLine(result.Response);\n```\n\nExample Relations feature request\n\n```cs\nIamAuthenticator authenticator = new IamAuthenticator(\n    Apikey: \"{apikey}\"\n);\n\nwhile (!authenticator.CanAuthenticate())\n    yield return null;\n\nNaturalLanguageUnderstandingService service = new NaturalLanguageUnderstandingService(\"2022-04-07\", authenticator);\n\nFeatures features = new Features()\n{\n    Relations = new RelationsOptions()\n};\n\nnaturalLanguageUnderstanding.Analyze(\n    callback: (DetailedResponse<AnalysisResults> response, IBMError error) =>\n    {\n        Log.Debug(\"NaturalLanguageUnderstandingServiceV1\", \"Analyze result: {0}\", response.Response);\n    },\n    text: \"Leonardo DiCaprio won Best Actor in a Leading Role for his performance.\",\n    features: features\n);\n```\n\nRecognizes when two entities are related and identifies the [type of relation](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-relation-type-systems). For example, an `awardedTo` relation might connect the entities \"Nobel Prize\" and \"Albert Einstein\".\n\n#### Relations request options\n\n<div class=\"endpoint-details__description parameter-details\">\n  <div class=\"parameter-details__heading\">\n    <div class=\"parameter-list__parameter-metadata\">\n      <h4 class=\"parameter-list__parameter-name\" data-is-required=\"false\">Request options</h4>\n      <span class=\"parameter-list__parameter-type\">RelationsOptions</span>\n    </div>\n    <div class=\"parameter-list__parameter-description\">\n      <div>\n      <p>For more information, see the request body for the <a href=\"#analyze\">Analyze text</a> method.</p>\n      </div>\n    </div>\n  </div>\n  <ul class=\"parameter-details__parameter-list parameter-list\">\n    <li class=\"parameter-list__parameter\">\n      <div class=\"parameter-list__parameter-metadata\">\n        <h5 class=\"parameter-list__parameter-name\" data-is-required=\"false\">relations.model</h5>\n        <span class=\"parameter-list__parameter-type\" data-hd-programlang=\"curl java node ruby swift\">string</span>\n        <span class=\"parameter-list__parameter-type\" data-hd-programlang=\"python\">str</span>\n      </div>\n      <div class=\"parameter-list__parameter-description\">\n        <p>A custom model ID. For more information about how to override the default relations model, see [Customizing](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-customizing).</p>\n        <p class=\"default-value\">\n          <span class=\"default-value__desc\">Default: </span>\n          <code>en-news</code>\n        </p>\n      </div>\n    </li>\n  </ul>\n</div>\n\n#### Relations response\n\nSee the `RelationsResult[]` object in the [Analyze text][analyze_link] method.\n\n Example Relations feature response\n\n```json\n{\n  \"usage\": {\n    \"text_units\": 1,\n    \"text_characters\": 79,\n    \"features\": 1\n  },\n  \"relations\": [\n    {\n      \"type\": \"awardedTo\",\n      \"sentence\": \"Leonardo DiCaprio won Best Actor in a Leading Role for his performance.\",\n      \"score\": 0.680715,\n      \"arguments\": [\n        {\n          \"text\": \"Best Actor\",\n          \"location\": [\n            22,\n            32\n          ],\n          \"entities\": [\n            {\n              \"type\": \"EntertainmentAward\",\n              \"text\": \"Best Actor\"\n            }\n          ]\n        },\n        {\n          \"text\": \"Leonardo DiCaprio\",\n          \"location\": [\n            0,\n            17\n          ],\n          \"entities\": [\n            {\n              \"type\": \"Person\",\n              \"text\": \"Leonardo DiCaprio\"\n            }\n          ]\n        }\n      ]\n    }\n  ],\n  \"language\": \"en\"\n}\n```\n\n### Semantic Roles\n\nExample Semantic Roles feature request\n\n```sh\ncurl -X POST \\\n-H \"Content-Type: application/json\" \\\n-u \"apikey:{apikey}\" \\\n-d @parameters.json \\\n\"{url}/v1/analyze?version=2022-04-07\"\n```\n\nExample parameters\n\n```json\n{\n  \"features\": {\n    \"semantic_roles\": {}\n  },\n  \"text\": \"IBM has one of the largest workforces in the world\"\n}\n```\n\n```go\npackage main\n\nimport (\n  \"encoding/json\"\n  \"fmt\"\n  \"github.com/IBM/go-sdk-core/core\"\n  \"github.com/watson-developer-cloud/go-sdk/naturallanguageunderstandingv1\"\n)\n\nfunc main() {\n  authenticator := &core.IamAuthenticator{\n    ApiKey:     \"{apikey}\",\n  }\n\n  options := &naturallanguageunderstandingv1.NaturalLanguageUnderstandingV1Options{\n    Version: \"2022-04-07\",\n    Authenticator: authenticator,\n  }\n\n  naturalLanguageUnderstanding, naturalLanguageUnderstandingErr := naturallanguageunderstandingv1.NewNaturalLanguageUnderstandingV1(options)\n\n  if naturalLanguageUnderstandingErr != nil {\n    panic(naturalLanguageUnderstandingErr)\n  }\n\n  naturalLanguageUnderstanding.SetServiceURL(\"{url}\")\n\n  text := \"IBM has one of the largest workforces in the world\"\n\n  response, responseErr := naturalLanguageUnderstanding.Analyze(\n    &naturallanguageunderstandingv1.AnalyzeOptions{\n      Text: &text,\n      Features: &naturallanguageunderstandingv1.Features{\n        SemanticRoles: &naturallanguageunderstandingv1.SemanticRolesOptions{},\n      },\n    },\n  )\n  if responseErr != nil {\n    panic(responseErr)\n  }\n  b, _ := json.MarshalIndent(result, \"\", \"   \")\n  fmt.Println(string(b))\n}\n```\n\nExample Semantic Roles feature request\n\n```java\nIamAuthenticator authenticator = new IamAuthenticator(\"{apikey}\");\nNaturalLanguageUnderstanding naturalLanguageUnderstanding = new NaturalLanguageUnderstanding(\"2022-04-07\", authenticator);\nnaturalLanguageUnderstanding.setServiceUrl(\"{url}\");\n\nString text = \"IBM has one of the largest\" +\n  \" workforces in the world\";\n\nSemanticRolesOptions semanticRoles = new SemanticRolesOptions.Builder()\n  .build();\n\nFeatures features = new Features.Builder()\n  .semanticRoles(semanticRoles)\n  .build();\n\nAnalyzeOptions parameters = new AnalyzeOptions.Builder()\n  .text(text)\n  .features(features)\n  .build();\n\nAnalysisResults response = naturalLanguageUnderstanding\n  .analyze(parameters)\n  .execute()\n  .getResult();\nSystem.out.println(response);\n```\n\nExample Semantic Roles feature request\n\n```javascript\nconst NaturalLanguageUnderstandingV1 = require('ibm-watson/natural-language-understanding/v1');\nconst { IamAuthenticator } = require('ibm-watson/auth');\n\nconst naturalLanguageUnderstanding = new NaturalLanguageUnderstandingV1({\n  version: '2022-04-07',\n  authenticator: new IamAuthenticator({\n    apikey: '{apikey}',\n  }),\n  serviceUrl: '{url}',\n});\n\nconst analyzeParams = {\n  'features': {\n    'semantic_roles': {}\n  },\n  'text': 'IBM has one of the largest workforces in the world'\n};\n\nnaturalLanguageUnderstanding.analyze(analyzeParams)\n  .then(analysisResults => {\n    console.log(JSON.stringify(analysisResults, null, 2));\n  })\n  .catch(err => {\n    console.log('error:', err);\n  });\n```\n\nExample Semantic Roles feature request\n\n```python\nimport json\nfrom ibm_watson import NaturalLanguageUnderstandingV1\nfrom ibm_cloud_sdk_core.authenticators import IAMAuthenticator\nfrom ibm_watson.natural_language_understanding_v1 \\\n    import Features, SemanticRolesOptions\n\nauthenticator = IAMAuthenticator('{apikey}')\nnatural_language_understanding = NaturalLanguageUnderstandingV1(\n    version='2022-04-07',\n    authenticator=authenticator\n)\n\nnatural_language_understanding.set_service_url('{url}')\n\nresponse = natural_language_understanding.analyze(\n    text='IBM has one of the largest workforces in the world',\n    features=Features(semantic_roles=SemanticRolesOptions())).get_result()\n\nprint(json.dumps(response, indent=2))\n```\n\nExample Semantic Roles feature request\n\n```ruby\nrequire \"json\"\nrequire \"ibm_watson/authenticators\"\nrequire \"ibm_watson/natural_language_understanding_v1\"\ninclude IBMWatson\n\nauthenticator = Authenticators::IamAuthenticator.new(\n  apikey: \"{apikey}\"\n)\n\nnatural_language_understanding = NaturalLanguageUnderstandingV1.new(\n  version: \"2022-04-07\",\n  authenticator: authenticator\n)\nnatural_language_understanding.service_url = \"{url}\"\n\nresponse = natural_language_understanding.analyze(\n  text: \"IBM has one of the largest workforces in the world\",\n  features: {semantic_roles: {}\n  }\n)\n\nputs JSON.pretty_generate(response.result)\n```\n\nExample Semantic Roles feature request\n\n```swift\nlet authenticator = WatsonIAMAuthenticator(apiKey: \"{apikey}\")\nlet naturalLanguageUnderstanding = NaturalLanguageUnderstanding(version: \"2022-04-07\", authenticator: authenticator)\nnaturalLanguageUnderstanding.serviceURL = \"{url}\"\n\nlet text = \"IBM has one of the largest\" +\n            \" workforces in the world\"\nlet semanticRoles = Features(semanticRoles: SemanticRolesOptions())\nnaturalLanguageUnderstanding.analyze(features: semanticRoles, text: text) {\n  response, error in\n\n  guard let analysis = response?.result else {\n    print(error?.localizedDescription ?? \"unknown error\")\n    return\n  }\n\n  print(analysis)\n}\n```\n\nExample Semantic Roles feature request\n\n```cs\nIamAuthenticator authenticator = new IamAuthenticator(\n    apikey: \"{apikey}\"\n    );\n\nNaturalLanguageUnderstandingService naturalLanguageUnderstanding = new NaturalLanguageUnderstandingService(\"2022-04-07\", authenticator);\nnaturalLanguageUnderstanding.SetServiceUrl(\"{url}\");\n\nvar result = naturalLanguageUnderstanding.Analyze(\n    text: \"IBM has one of the largest workforces in the world\",\n    features: new Features()\n    {\n        SemanticRoles = new SemanticRolesOptions()\n    }\n    );\n\nConsole.WriteLine(result.Response);\n```\n\nExample Semantic Roles feature request\n\n```cs\nIamAuthenticator authenticator = new IamAuthenticator(\n    Apikey: \"{apikey}\"\n);\n\nwhile (!authenticator.CanAuthenticate())\n    yield return null;\n\nNaturalLanguageUnderstandingService service = new NaturalLanguageUnderstandingService(\"2022-04-07\", authenticator);\n\nFeatures features = new Features()\n{\n    SemanticRoles = new SemanticRolesOptions()\n};\n\nnaturalLanguageUnderstanding.Analyze(\n    callback: (DetailedResponse<AnalysisResults> response, IBMError error) =>\n    {\n        Log.Debug(\"NaturalLanguageUnderstandingServiceV1\", \"Analyze result: {0}\", response.Response);\n    },\n    text: \"IBM has one of the largest workforces in the world\",\n    features: features\n);\n```\n\nParses sentences into subject, action, and object form.\n\n#### Semantic Roles request options\n\n<div class=\"endpoint-details__description parameter-details\">\n  <div class=\"parameter-details__heading\">\n    <div class=\"parameter-list__parameter-metadata\">\n      <h4 class=\"parameter-list__parameter-name\" data-is-required=\"false\">Request options</h4>\n      <span class=\"parameter-list__parameter-type\">SemanticRolesOptions</span>\n    </div>\n    <div class=\"parameter-list__parameter-description\">\n      <div>\n      <p>For more information, see the request body for the <a href=\"#analyze\">Analyze text</a> method.</p>\n      </div>\n    </div>\n  </div>\n  <ul class=\"parameter-details__parameter-list parameter-list\">\n    <li class=\"parameter-list__parameter\">\n      <div class=\"parameter-list__parameter-metadata\">\n        <h5 class=\"parameter-list__parameter-name\" data-is-required=\"false\">semantic_roles.limit</h5>\n        <span class=\"parameter-list__parameter-type\" data-hd-programlang=\"curl node ruby\">integer</span>\n        <span class=\"parameter-list__parameter-type\" data-hd-programlang=\"python swift\">int</span>\n        <span class=\"parameter-list__parameter-type\" data-hd-programlang=\"java\">long</span>\n      </div>\n      <div class=\"parameter-list__parameter-description\">\n        <p>Maximum number of semantic_roles results to return.</p>\n        <p class=\"default-value\">\n          <span class=\"default-value__desc\">Default: </span>\n          <code>50</code>\n        </p>\n      </div>\n    </li>\n    <li class=\"parameter-list__parameter\">\n      <div class=\"parameter-list__parameter-metadata\">\n        <h5 class=\"parameter-list__parameter-name\" data-is-required=\"false\">semantic_roles.keywords</h5>\n        <span class=\"parameter-list__parameter-type\" data-hd-programlang=\"curl java node ruby\">boolean</span>\n        <span class=\"parameter-list__parameter-type\" data-hd-programlang=\"python swift\">bool</span>\n      </div>\n      <div class=\"parameter-list__parameter-description\">\n        <p>Whether to return keyword information for subjects and objects.</p>\n        <p class=\"default-value\">\n          <span class=\"default-value__desc\">Default: </span>\n          <code>false</code>\n        </p>\n      </div>\n    </li>\n    <li class=\"parameter-list__parameter\">\n      <div class=\"parameter-list__parameter-metadata\">\n        <h5 class=\"parameter-list__parameter-name\" data-is-required=\"false\">semantic_roles.entities</h5>\n        <span class=\"parameter-list__parameter-type\" data-hd-programlang=\"curl java node ruby\">boolean</span>\n        <span class=\"parameter-list__parameter-type\" data-hd-programlang=\"python swift\">bool</span>\n      </div>\n      <div class=\"parameter-list__parameter-description\">\n        <p>Whether to return entity information for subjects and objects.</p>\n        <p class=\"default-value\">\n          <span class=\"default-value__desc\">Default: </span>\n          <code>false</code>\n        </p>\n      </div>\n    </li>\n  </ul>\n</div>\n\n#### Semantic roles response\n\nSee the `SemanticRolesResult[]` object in the [Analyze text][analyze_link] method.\n\nExample Semantic Roles feature response\n\n```json\n{\n  \"usage\": {\n    \"text_units\": 1,\n    \"text_characters\": 50,\n    \"features\": 1\n  },\n  \"semantic_roles\": [\n    {\n      \"subject\": {\n        \"text\": \"IBM\"\n      },\n      \"sentence\": \"IBM has one of the largest workforces in the world\",\n      \"object\": {\n        \"text\": \"one of the largest workforces in the world\"\n      },\n      \"action\": {\n        \"verb\": {\n          \"text\": \"have\",\n          \"tense\": \"present\"\n        },\n        \"text\": \"has\",\n        \"normalized\": \"have\"\n      }\n    }\n  ],\n  \"language\": \"en\"\n}\n```\n\n### Sentiment\n\nExample Sentiment feature request\n\n```sh\ncurl -X POST \\\n-H \"Content-Type: application/json\" \\\n-u \"apikey:{apikey}\" \\\n-d @parameters.json \\\n\"{url}/v1/analyze?version=2022-04-07\"\n```\n\nExample parameters\n\n```json\n{\n  \"url\": \"https://en.wikipedia.org/wiki/Emmanuel_Macron\",\n  \"features\": {\n    \"sentiment\": {\n      \"targets\": [\n        \"France\"\n      ]\n    }\n  }\n}\n```\n\n```go\npackage main\n\nimport (\n  \"encoding/json\"\n  \"fmt\"\n  \"github.com/IBM/go-sdk-core/core\"\n  \"github.com/watson-developer-cloud/go-sdk/naturallanguageunderstandingv1\"\n)\n\nfunc main() {\n  authenticator := &core.IamAuthenticator{\n    ApiKey:     \"{apikey}\",\n  }\n\n  options := &naturallanguageunderstandingv1.NaturalLanguageUnderstandingV1Options{\n    Version: \"2022-04-07\",\n    Authenticator: authenticator,\n  }\n\n  naturalLanguageUnderstanding, naturalLanguageUnderstandingErr := naturallanguageunderstandingv1.NewNaturalLanguageUnderstandingV1(options)\n\n  if naturalLanguageUnderstandingErr != nil {\n    panic(naturalLanguageUnderstandingErr)\n  }\n\n  naturalLanguageUnderstanding.SetServiceURL(\"{url}\")\n\n  url := \"https://en.wikipedia.org/wiki/Emmanuel_Macron\"\n  targets := []string{\"France\"}\n\n  response, responseErr := naturalLanguageUnderstanding.Analyze(\n    &naturallanguageunderstandingv1.AnalyzeOptions{\n      URL: &url,\n      Features: &naturallanguageunderstandingv1.Features{\n        Sentiment: &naturallanguageunderstandingv1.SentimentOptions{\n          Targets: targets,\n        },\n      },\n    },\n  )\n  if responseErr != nil {\n    panic(responseErr)\n  }\n  b, _ := json.MarshalIndent(result, \"\", \"   \")\n  fmt.Println(string(b))\n}\n```\n\nExample Sentiment feature request\n\n```java\nIamAuthenticator authenticator = new IamAuthenticator(\"{apikey}\");\nNaturalLanguageUnderstanding naturalLanguageUnderstanding = new NaturalLanguageUnderstanding(\"2022-04-07\", authenticator);\nnaturalLanguageUnderstanding.setServiceUrl(\"{url}\");\n\nString url = \"https://en.wikipedia.org/wiki/Emmanuel_Macron\";\n\nList<String> targets = new ArrayList<>();\ntargets.add(\"France\");\n\nSentimentOptions sentiment = new SentimentOptions.Builder()\n  .targets(targets)\n  .build();\n\nFeatures features = new Features.Builder()\n  .sentiment(sentiment)\n  .build();\n\nAnalyzeOptions parameters = new AnalyzeOptions.Builder()\n  .url(url)\n  .features(features)\n  .build();\n\nAnalysisResults response = naturalLanguageUnderstanding\n  .analyze(parameters)\n  .execute()\n  .getResult();\nSystem.out.println(response);\n```\n\nExample Sentiment feature request\n\n```javascript\nconst NaturalLanguageUnderstandingV1 = require('ibm-watson/natural-language-understanding/v1');\nconst { IamAuthenticator } = require('ibm-watson/auth');\n\nconst naturalLanguageUnderstanding = new NaturalLanguageUnderstandingV1({\n  version: '2022-04-07',\n  authenticator: new IamAuthenticator({\n    apikey: '{apikey}',\n  }),\n  serviceUrl: '{url}',\n});\n\nconst analyzeParams = {\n  'url': 'https://en.wikipedia.org/wiki/Emmanuel_Macron',\n  'features': {\n    'sentiment': {\n      'targets': [\n        'France'\n      ]\n    }\n  }\n};\n\nnaturalLanguageUnderstanding.analyze(analyzeParams)\n  .then(analysisResults => {\n    console.log(JSON.stringify(analysisResults, null, 2));\n  })\n  .catch(err => {\n    console.log('error:', err);\n  });\n```\n\nExample Sentiment feature request\n\n```python\nimport json\nfrom ibm_watson import NaturalLanguageUnderstandingV1\nfrom ibm_cloud_sdk_core.authenticators import IAMAuthenticator\nfrom ibm_watson.natural_language_understanding_v1 \\\n    import Features, SentimentOptions\n\nauthenticator = IAMAuthenticator('{apikey}')\nnatural_language_understanding = NaturalLanguageUnderstandingV1(\n    version='2022-04-07',\n    authenticator=authenticator\n)\n\nnatural_language_understanding.set_service_url('{url}')\n\nresponse = natural_language_understanding.analyze(\n    url='https://en.wikipedia.org/wiki/Emmanuel_Macron',\n    features=Features(sentiment=SentimentOptions(targets=['France']))).get_result()\n\nprint(json.dumps(response, indent=2))\n```\n\nExample Sentiment feature request\n\n```ruby\nrequire \"json\"\nrequire \"ibm_watson/authenticators\"\nrequire \"ibm_watson/natural_language_understanding_v1\"\ninclude IBMWatson\n\nauthenticator = Authenticators::IamAuthenticator.new(\n  apikey: \"{apikey}\"\n)\n\nnatural_language_understanding = NaturalLanguageUnderstandingV1.new(\n  version: \"2022-04-07\",\n  authenticator: authenticator\n)\nnatural_language_understanding.service_url = \"{url}\"\n\nresponse = natural_language_understanding.analyze(\n  url: \"https://en.wikipedia.org/wiki/Emmanuel_Macron\",\n  features: {sentiment: {targets=[\"France\"]}\n  }\n)\n\nputs JSON.pretty_generate(response.result)\n```\n\nExample Sentiment feature request\n\n```swift\nlet authenticator = WatsonIAMAuthenticator(apiKey: \"{apikey}\")\nlet naturalLanguageUnderstanding = NaturalLanguageUnderstanding(version: \"2022-04-07\", authenticator: authenticator)\nnaturalLanguageUnderstanding.serviceURL = \"{url}\"\n\nlet sentiment = SentimentOptions(targets: [\"France\"])\nlet features = Features(sentiment: sentiment)\nnaturalLanguageUnderstanding.analyze(features: features, url: \"https://en.wikipedia.org/wiki/Emmanuel_Macron\") {\n  response, error in\n\n  guard let analysis = response?.result else {\n    print(error?.localizedDescription ?? \"unknown error\")\n    return\n  }\n\n  print(analysis)\n}\n```\n\nExample Sentiment feature request\n\n```cs\nIamAuthenticator authenticator = new IamAuthenticator(\n    apikey: \"{apikey}\"\n    );\n\nNaturalLanguageUnderstandingService naturalLanguageUnderstanding = new NaturalLanguageUnderstandingService(\"2022-04-07\", authenticator);\nnaturalLanguageUnderstanding.SetServiceUrl(\"{url}\");\n\nvar result = naturalLanguageUnderstanding.Analyze(\n    url: \"https://en.wikipedia.org/wiki/Emmanuel_Macron\",\n    features: new Features()\n    {\n        Sentiment = new SentimentOptions()\n        {\n            Targets = new List<string>() { \"France\" }\n        }\n    }\n    );\n\nConsole.WriteLine(result.Response);\n```\n\nExample Sentiment feature request\n\n```cs\nIamAuthenticator authenticator = new IamAuthenticator(\n    Apikey: \"{apikey}\"\n);\n\nwhile (!authenticator.CanAuthenticate())\n    yield return null;\n\nNaturalLanguageUnderstandingService service = new NaturalLanguageUnderstandingService(\"2022-04-07\", authenticator);\n\nFeatures features = new Features()\n{\n    Sentiments = new SentimentOptions()\n    {\n      Targets = {\"France\"}\n    }\n};\n\nnaturalLanguageUnderstanding.Analyze(\n    callback: (DetailedResponse<AnalysisResults> response, IBMError error) =>\n    {\n        Log.Debug(\"NaturalLanguageUnderstandingServiceV1\", \"Analyze result: {0}\", response.Response);\n    },\n    url: \"https://en.wikipedia.org/wiki/Emmanuel_Macron\",\n    features: features\n);\n```\n\nAnalyzes the general sentiment of your content or the sentiment toward specific target phrases. As an example, the phrase \"Thank you and have a nice day!\" returns a positive sentiment (score .91). You can analyze sentiment for detected entities with `entities.sentiment` and for keywords with `keywords.sentiment` .\n\n#### Sentiment request options\n\n<div class=\"endpoint-details__description parameter-details\">\n  <div class=\"parameter-details__heading\">\n    <div class=\"parameter-list__parameter-metadata\">\n      <h4 class=\"parameter-list__parameter-name\" data-is-required=\"false\">Request options</h4>\n      <span class=\"parameter-list__parameter-type\">SentimentOptions</span>\n    </div>\n    <div class=\"parameter-list__parameter-description\">\n      <div>\n      <p>For more information, see the request body for the <a href=\"#analyze\">Analyze text</a> method.</p>\n      </div>\n    </div>\n  </div>\n  <ul class=\"parameter-details__parameter-list parameter-list\">\n    <li class=\"parameter-list__parameter\">\n      <div class=\"parameter-list__parameter-metadata\">\n        <h5 class=\"parameter-list__parameter-name\" data-is-required=\"false\">sentiment.document</h5>\n        <span class=\"parameter-list__parameter-type\" data-hd-programlang=\"curl java node ruby\">boolean</span>\n        <span class=\"parameter-list__parameter-type\" data-hd-programlang=\"python swift\">bool</span>\n      </div>\n      <div class=\"parameter-list__parameter-description\">\n        <p>Whether to return document-level sentiment analysis.</p>\n        <p class=\"default-value\">\n          <span class=\"default-value__desc\">Default: </span>\n          <code>true</code>\n        </p>\n      </div>\n    </li>\n    <li class=\"parameter-list__parameter\">\n      <div class=\"parameter-list__parameter-metadata\">\n        <h5 class=\"parameter-list__parameter-name\" data-is-required=\"false\">sentiment.targets</h5>\n        <span class=\"parameter-list__parameter-type\" data-hd-programlang=\"curl node\">string[]</span>\n        <span class=\"parameter-list__parameter-type\" data-hd-programlang=\"java\">List[string]</span>\n        <span class=\"parameter-list__parameter-type\" data-hd-programlang=\"swift\">[String]</span>\n        <span class=\"parameter-list__parameter-type\" data-hd-programlang=\"python\">list[str]</span>\n        <span class=\"parameter-list__parameter-type\" data-hd-programlang=\"ruby\">Array&lt;String&gt;</span>\n      </div>\n      <div class=\"parameter-list__parameter-description\">\n        <p>Target strings, separated by commas. Sentiment results are returned for each target string that is found in the document.</p>\n      </div>\n    </li>\n  </ul>\n</div>\n\n#### Sentiment response\n\nSee the `SentimentResult` object in the [Analyze text][analyze_link] method.\n\nExample Sentiment feature response\n\n```json\n{\n  \"usage\": {\n    \"text_units\": 1,\n    \"text_characters\": 1188,\n    \"features\": 1\n  },\n  \"sentiment\": {\n    \"targets\": [\n      {\n        \"text\": \"France\",\n        \"score\": 0.279964,\n        \"label\": \"positive\"\n      }\n    ],\n    \"document\": {\n      \"score\": 0.127034,\n      \"label\": \"positive\"\n    }\n  },\n  \"retrieved_url\": \"https://en.wikipedia.org/wiki/Emmanuel_Macron\",\n  \"language\": \"en\"\n}\n```\n\n### Syntax\n\nExample Syntax feature request\n\n```sh\ncurl -X POST \\\n-H \"Content-Type: application/json\" \\\n-u \"apikey:{apikey}\" \\\n-d @parameters.json \\\n\"{url}/v1/analyze?version=2022-04-07\"\n```\n\nExample parameters\n\n```json\n{\n  \"text\": \"With great power comes great responsibility\",\n  \"features\": {\n    \"syntax\": {\n      \"sentences\": true,\n      \"tokens\": {\n        \"lemma\": true,\n        \"part_of_speech\": true\n      }\n    }\n  }\n}\n```\n\n<!-- SDK examples -->\n\n```go\npackage main\n\nimport (\n  \"encoding/json\"\n  \"fmt\"\n  \"github.com/IBM/go-sdk-core/core\"\n  \"github.com/watson-developer-cloud/go-sdk/naturallanguageunderstandingv1\"\n)\n\nfunc main() {\n  authenticator := &core.IamAuthenticator{\n    ApiKey:     \"{apikey}\",\n  }\n\n  options := &naturallanguageunderstandingv1.NaturalLanguageUnderstandingV1Options{\n    Version: \"2022-04-07\",\n    Authenticator: authenticator,\n  }\n\n  naturalLanguageUnderstanding, naturalLanguageUnderstandingErr := naturallanguageunderstandingv1.NewNaturalLanguageUnderstandingV1(options)\n\n  if naturalLanguageUnderstandingErr != nil {\n    panic(naturalLanguageUnderstandingErr)\n  }\n\n  naturalLanguageUnderstanding.SetServiceURL(\"{url}\")\n\n  text := \"With great power comes great responsibility\"\n  sentences := true\n  lemma := true\n  partOfSpeech := true\n\n  response, responseErr := naturalLanguageUnderstanding.Analyze(\n    &naturallanguageunderstandingv1.AnalyzeOptions{\n      Text: &text,\n      Features: &naturallanguageunderstandingv1.Features{\n        Syntax: &naturallanguageunderstandingv1.SyntaxOptions{\n          Sentences: &sentences,\n          Tokens: &naturallanguageunderstandingv1.SyntaxOptionsTokens{\n            Lemma:        &lemma,\n            PartOfSpeech: &partOfSpeech,\n          },\n        },\n      },\n    },\n  )\n  if responseErr != nil {\n    panic(responseErr)\n  }\n  b, _ := json.MarshalIndent(result, \"\", \"   \")\n  fmt.Println(string(b))\n}\n```\n\nExample Syntax feature request\n\n```java\nIamAuthenticator authenticator = new IamAuthenticator(\"{apikey}\");\nNaturalLanguageUnderstanding naturalLanguageUnderstanding = new NaturalLanguageUnderstanding(\"2022-04-07\", authenticator);\nnaturalLanguageUnderstanding.setServiceUrl(\"{url}\");\n\nString text = \"With great power comes great responsibility\"\n\nSyntaxOptions syntax = new SyntaxOptions.Builder()\n  .sentences(true)\n  .build();\n\nFeatures features = new Features.Builder()\n  .syntax(syntax)\n  .build();\n\nAnalyzeOptions parameters = new AnalyzeOptions.Builder()\n  .text(text)\n  .features(features)\n  .build();\n\nAnalysisResults response = naturalLanguageUnderstanding\n  .analyze(parameters)\n  .execute()\n  .getResult();\nSystem.out.println(response);\n```\n\nExample Syntax feature request\n\n```javascript\nconst NaturalLanguageUnderstandingV1 = require('ibm-watson/natural-language-understanding/v1');\nconst { IamAuthenticator } = require('ibm-watson/auth');\n\nconst naturalLanguageUnderstanding = new NaturalLanguageUnderstandingV1({\n  version: '2022-04-07',\n  authenticator: new IamAuthenticator({\n    apikey: '{apikey}',\n  }),\n  serviceUrl: '{url}',\n});\n\nconst analyzeParams = {\n  'features': {\n    'syntax': {\n      'sentences': true,\n      'tokens': {\n        'lemma': true,\n        'part_of_speech': true\n      }\n    }\n  },\n  'text': 'With great power comes great responsibility'\n};\n\nnaturalLanguageUnderstanding.analyze(analyzeParams)\n  .then(analysisResults => {\n    console.log(JSON.stringify(analysisResults, null, 2));\n  })\n  .catch(err => {\n    console.log('error:', err);\n  });\n```\n\nExample Syntax feature request\n\n```python\nimport json\nfrom ibm_watson import NaturalLanguageUnderstandingV1\nfrom ibm_cloud_sdk_core.authenticators import IAMAuthenticator\nfrom ibm_watson.natural_language_understanding_v1 \\\n    import Features, SyntaxOptions, SyntaxOptionsTokens\n\nauthenticator = IAMAuthenticator('{apikey}')\nnatural_language_understanding = NaturalLanguageUnderstandingV1(\n    version='2022-04-07',\n    authenticator=authenticator\n)\n\nnatural_language_understanding.set_service_url('{url}')\n\nresponse = natural_language_understanding.analyze(\n    text='With great power comes great responsibility',\n    features=Features(\n      syntax=SyntaxOptions(\n        sentences=True,\n        tokens=SyntaxOptionsTokens(\n          lemma=True,\n          part_of_speech=True,\n        )))).get_result()\n\nprint(json.dumps(response, indent=2))\n```\n\nExample Syntax feature request\n\n```ruby\nrequire \"json\"\nrequire \"ibm_watson/authenticators\"\nrequire \"ibm_watson/natural_language_understanding_v1\"\ninclude IBMWatson\n\nauthenticator = Authenticators::IamAuthenticator.new(\n  apikey: \"{apikey}\"\n)\n\nnatural_language_understanding = NaturalLanguageUnderstandingV1.new(\n  version: \"2022-04-07\",\n  authenticator: authenticator\n)\nnatural_language_understanding.service_url = \"{url}\"\n\nresponse = natural_language_understanding.analyze(\n  text: \"With great power comes great responsibility\",\n  features: {\n    syntax: {\n      sentences: true,\n      tokens: {\n        lemma: true,\n        part_of_speech: true,\n      }\n    }\n  }\n)\n\nputs JSON.pretty_generate(response.result)\n```\n\nExample Syntax feature request\n\n```swift\nlet authenticator = WatsonIAMAuthenticator(apiKey: \"{apikey}\")\nlet naturalLanguageUnderstanding = NaturalLanguageUnderstanding(version: \"2022-04-07\", authenticator: authenticator)\nnaturalLanguageUnderstanding.serviceURL = \"{url}\"\n\nlet text = \"With great power comes great responsibility\"\nlet tokens = SyntaxOptionsTokens(lemma: true, partOfSpeech: true)\nlet syntax = SyntaxOptions(sentences: true, tokens: tokens)\nlet features = Features(syntax: syntax)\nnaturalLanguageUnderstanding.analyze(features: features, text: text) {\n  response, error in\n\n  guard let analysis = response?.result else {\n    print(error?.localizedDescription ?? \"unknown error\")\n    return\n  }\n\n  print(analysis)\n}\n```\n\nExample Syntax feature request\n\n```cs\nIamAuthenticator authenticator = new IamAuthenticator(\n    apikey: \"{apikey}\"\n    );\n\nNaturalLanguageUnderstandingService naturalLanguageUnderstanding = new NaturalLanguageUnderstandingService(\"2022-04-07\", authenticator);\nnaturalLanguageUnderstanding.SetServiceUrl(\"{url}\");\n\nvar result = naturalLanguageUnderstanding.Analyze(\n    text: \"With great power comes great responsibility\",\n    features: new Features()\n    {\n        Syntax = new SyntaxOptions()\n        {\n            Sentences = true,\n            Tokens = new SyntaxOptionsTokens()\n            {\n                Lemma = true,\n                PartOfSpeech = true\n            }\n        }\n    }\n    );\n\nConsole.WriteLine(result.Response);\n```\n\nExample Syntax feature request\n\n```cs\nIamAuthenticator authenticator = new IamAuthenticator(\n    Apikey: \"{apikey}\"\n);\n\nwhile (!authenticator.CanAuthenticate())\n    yield return null;\n\nNaturalLanguageUnderstandingService service = new NaturalLanguageUnderstandingService(\"2022-04-07\", authenticator);\n\nFeatures features = new Features()\n{\n    Syntax = new SyntaxOptions()\n    {\n        Sentences = true,\n        Tokens = new SyntaxOptionsTokens()\n        {\n            PartOfSpeech = true,\n            Lemma = true\n        }\n    }\n};\n\nnaturalLanguageUnderstanding.Analyze(\n    callback: (DetailedResponse<AnalysisResults> response, IBMError error) =>\n    {\n        Log.Debug(\"NaturalLanguageUnderstandingServiceV1\", \"Analyze result: {0}\", response.Response);\n    },\n    text: \"With great power comes great responsibility\",\n    features: features\n);\n```\n\nReturns information about the tokens and sentences in the input text. At least one of `syntax.tokens` or `syntax.sentences` must be specified.\n\n#### Syntax request options\n\n<div class=\"endpoint-details__description parameter-details\">\n  <div class=\"parameter-details__heading\">\n    <div class=\"parameter-list__parameter-metadata\">\n      <h4 class=\"parameter-list__parameter-name\" data-is-required=\"false\">Request options</h4>\n      <span class=\"parameter-list__parameter-type\">SyntaxOptions</span>\n    </div>\n    <div class=\"parameter-list__parameter-description\">\n      <div>\n      <p>For more information, see the request body for the <a href=\"#analyze\">Analyze text</a> method.</p>\n      </div>\n    </div>\n  </div>\n  <ul class=\"parameter-details__parameter-list parameter-list\">\n    <li class=\"parameter-list__parameter\">\n      <div class=\"parameter-list__parameter-metadata\">\n        <h5 class=\"parameter-list__parameter-name\" data-is-required=\"false\">syntax.sentences</h5>\n        <span class=\"parameter-list__parameter-type\" data-hd-programlang=\"curl node ruby java\">boolean</span>\n        <span class=\"parameter-list__parameter-type\" data-hd-programlang=\"python swift\">bool</span>\n      </div>\n      <div class=\"parameter-list__parameter-description\">\n        <p>Set this option to `true` to return information about the sentences in the input text.</p>\n      </div>\n    </li>\n    <li class=\"parameter-list__parameter\">\n      <div class=\"parameter-list__parameter-metadata\">\n        <h5 class=\"parameter-list__parameter-name\" data-is-required=\"false\">syntax.tokens</h5>\n      </div>\n      <div class=\"parameter-list__parameter-description\">\n        <div>\n          <p>Options for tokens</p>\n        </div>\n      </div>\n      <div role=\"menubar\"><button type=\"button\" class=\"bx--accordion__heading--nested\">\n        <svg class=\"bx--accordion__arrow--nested \" fill-rule=\"evenodd\" height=\"12\" name=\"chevron--right\" role=\"img\" viewBox=\"0 0 7 12\" width=\"7\" aria-label=\"Expand/Collapse\" alt=\"Expand/Collapse\">\n          <title>Expand/Collapse</title>\n          <path d=\"M5.569 5.994L0 .726.687 0l6.336 5.994-6.335 6.002L0 11.27z\"></path>\n        </svg>\n        <span class=\"parameter-list__parameter-type\">object</span></button>\n      </div>\n      <ul class=\"parameter-list--nested bx--accordion__content--nested \" role=\"menubar\">\n        <div class=\"parameter-list--nested-thread\">\n          <div class=\"bx--tooltip--definition\">\n            <div class=\"bx--tooltip__trigger\"></div>\n            <div class=\"bx--tooltip--definition__bottom\" role=\"tooltip\" aria-label=\"syntax.tokens\" style=\"top: 25px;\"><span class=\"bx--tooltip__caret\"></span>\n              <p>syntax.tokens</p>\n            </div>\n          </div>\n        </div>\n        <div class=\"parameter-list--nested-items\">\n          <li class=\"parameter-list__parameter\">\n            <div class=\"parameter-list__parameter-metadata\">\n              <h5 class=\"parameter-list__parameter-name\" data-is-required=\"false\">lemma</h5>\n              <span class=\"parameter-list__parameter-type\" data-hd-programlang=\"curl nody ruby java\">boolean</span>\n              <span class=\"parameter-list__parameter-type\" data-hd-programlang=\"python swift\">bool</span>\n            </div>\n            <div class=\"parameter-list__parameter-description\">\n              <div>\n                <p>Set this option to `true` to return the lemma for each token.</p>\n              </div>\n            </div>\n          </li>\n          <li class=\"parameter-list__parameter\">\n            <div class=\"parameter-list__parameter-metadata\">\n              <h5 class=\"parameter-list__parameter-name\" data-is-required=\"false\">part_of_speech</h5>\n              <span class=\"parameter-list__parameter-type\" data-hd-programlang=\"curl nody ruby java\">boolean</span>\n              <span class=\"parameter-list__parameter-type\" data-hd-programlang=\"python swift\">bool</span>\n            </div>\n            <div class=\"parameter-list__parameter-description\">\n              <div>\n                <p>Set this option to `true` to return the part of speech for each token.</p>\n              </div>\n            </div>\n          </li>\n        </div>\n      </ul>\n    </li>\n  </ul>\n</div>\n\n#### Syntax response\n\nSee the `SyntaxResult` object in the [Analyze text][analyze_link] method.\n\nExample Syntax feature response\n\n```json\n{\n  \"usage\": {\n    \"text_units\": 1,\n    \"text_characters\": 43,\n    \"features\": 1\n  },\n  \"syntax\": {\n    \"tokens\": [\n      {\n        \"text\": \"With\",\n        \"part_of_speech\": \"ADP\",\n        \"location\": [\n          0,\n          4\n        ],\n        \"lemma\": \"with\"\n      },\n      {\n        \"text\": \"great\",\n        \"part_of_speech\": \"ADJ\",\n        \"location\": [\n          5,\n          10\n        ],\n        \"lemma\": \"great\"\n      },\n      {\n        \"text\": \"power\",\n        \"part_of_speech\": \"NOUN\",\n        \"location\": [\n          11,\n          16\n        ],\n        \"lemma\": \"power\"\n      },\n      {\n        \"text\": \"comes\",\n        \"part_of_speech\": \"VERB\",\n        \"location\": [\n          17,\n          22\n        ],\n        \"lemma\": \"come\"\n      },\n      {\n        \"text\": \"great\",\n        \"part_of_speech\": \"ADJ\",\n        \"location\": [\n          23,\n          28\n        ],\n        \"lemma\": \"great\"\n      },\n      {\n        \"text\": \"responsibility\",\n        \"part_of_speech\": \"NOUN\",\n        \"location\": [\n          29,\n          43\n        ],\n        \"lemma\": \"responsibility\"\n      }\n    ],\n    \"sentences\": [\n      {\n        \"text\": \"With great power comes great responsibility\",\n        \"location\": [\n          0,\n          43\n        ]\n      }\n    ]\n  },\n  \"language\": \"en\"\n}\n```\n\n### Summarization (Experimental)\n\nExample Summarization feature request\n\n```bash\ncurl -X POST \\\n-H \"Content-Type: application/json\" \\\n-u \"apikey:{apikey}\" \\\n-d @parameters.json \\\n\"{url}/v1/analyze?version=2022-04-07\"\n```\n\nExample parameters\n\n```json\n{\n  \"url\": \"www.ibm.com\",\n  \"features\": {\n    \"summarization\": {\n      \"limit\": 2\n    }\n  }\n}\n```\n\nReturns a summary of the source content. For example, analysis of a sports article may return team names and scores.\n\n#### Summarization request options\n\n<div class=\"endpoint-details__description parameter-details\">\n  <div class=\"parameter-details__heading\">\n    <div class=\"parameter-list__parameter-metadata\">\n      <h4 class=\"parameter-list__parameter-name\" data-is-required=\"false\">Request options</h4>\n      <span class=\"parameter-list__parameter-type\">SummarizationOptions</span>\n    </div>\n    <div class=\"parameter-list__parameter-description\">\n      <div>\n      <p>For more information, see the request body for the <a href=\"#analyze\">Analyze text</a> method.</p>\n      </div>\n    </div>\n  </div>\n  <ul class=\"parameter-details__parameter-list parameter-list\">\n    <li class=\"parameter-list__parameter\">\n      <div class=\"parameter-list__parameter-metadata\">\n        <h5 class=\"parameter-list__parameter-name\" data-is-required=\"false\">summarization.limit</h5>\n        <span class=\"parameter-list__parameter-type\" data-hd-programlang=\"curl\">integer</span>\n      </div>\n      <div class=\"parameter-list__parameter-description\">\n        <p>Maximum number of summary sentences to return.</p>\n        <p class=\"default-value\">\n          <span class=\"default-value__desc\">Default: </span>\n          <code>3</code>\n        </p>\n      </div>\n    </li>\n  </ul>\n</div>\n\n#### Summarization response\n\nSee the `SummarizationResult` object in the [Analyze text][analyze_link] method.\n\nExample Summarization feature response\n\n```json\n{\n  \"usage\": {\n    \"text_units\": 1,\n    \"text_characters\": 2922,\n    \"features\": 0\n  },\n  \"retrieved_url\": \"https://newsroom.ibm.com/Five-Things-IBM-Workday\",\n  \"summarization\": {\n    \"text\": \"Today, IBM and Workday, a leading provider of enterprise applications for human resources and finance, announced a joint solution designed to help companies begin the process of safely re-opening their workplaces. Here are five key takeaways from the announcement.\"\n  },\n  \"language\": \"en\"\n}\n```\n\n## Endpoint URLs\n\nIdentify the base URL for your service instance.\n\n### IBM Cloud URLs\n\nThe base URLs come from the service instance. To find the URL, view the service credentials by clicking the name of the service in the [Resource list](https://cloud.ibm.com/resources?groups=resource-instance). Use the value of the URL. Add the method to form the complete API endpoint for your request.\n\nThe following example URL represents a Natural Language Understanding instance that is hosted in Washington DC:\n\n```text\nhttps://api.us-east.natural-language-understanding.watson.cloud.ibm.com/instances/6bbda3b3-d572-45e1-8c54-22d6ed9e52c2\n```\n\nThe following URLs represent the base URLs for Natural Language Understanding. When you call the API, use the URL that corresponds to the location of your service instance.\n\n- Dallas: `https://api.us-south.natural-language-understanding.watson.cloud.ibm.com`\n- Washington DC: `https://api.us-east.natural-language-understanding.watson.cloud.ibm.com`\n- Frankfurt: `https://api.eu-de.natural-language-understanding.watson.cloud.ibm.com`\n- Sydney: `https://api.au-syd.natural-language-understanding.watson.cloud.ibm.com`\n- Tokyo: `https://api.jp-tok.natural-language-understanding.watson.cloud.ibm.com`\n- London: `https://api.eu-gb.natural-language-understanding.watson.cloud.ibm.com`\n- Seoul: `https://api.kr-seo.natural-language-understanding.watson.cloud.ibm.com`\n\nSet the correct service URL by calling the `setServiceUrl()` method of the service instance.\n\nSet the correct service URL by specifying the `serviceUrl` parameter when you create the service instance.\n\nSet the correct service URL by calling the `set_service_url()` method of the service instance.\n\nSet the correct service URL by specifying the `service_url` property of the service instance.\n\nSet the correct service URL by calling the `SetServiceURL()` method of the service instance.\n\nSet the correct service URL by setting the `serviceURL` property of the service instance.\n\nSet the correct service URL by calling the `SetServiceUrl()` method of the service instance.\n\nSet the correct service URL by calling the `SetServiceUrl()` method of the service instance.\n\nDallas API endpoint example for services managed on IBM Cloud\n\n```sh\ncurl -X {request_method} -u \"apikey:{apikey}\" \\\n\"https://api.us-south.natural-language-understanding.watson.cloud.ibm.com/instances/{instance_id}\"\n```\n\nYour service instance might not use this URL\n\nDefault URL\n\n```text\nhttps://api.us-south.natural-language-understanding.watson.cloud.ibm.com\n```\n\nExample for the Washington DC location\n\n```java\nIamAuthenticator authenticator = new IamAuthenticator(\"{apikey}\");\nNaturalLanguageUnderstanding naturalLanguageUnderstanding = new NaturalLanguageUnderstanding(\"{version}\", authenticator);\nnaturalLanguageUnderstanding.setServiceUrl(\"https://api.us-east.natural-language-understanding.watson.cloud.ibm.com\");\n```\n\nDefault URL\n\n```text\nhttps://api.us-south.natural-language-understanding.watson.cloud.ibm.com\n```\n\nExample for the Washington DC location\n\n```javascript\nconst NaturalLanguageUnderstandingV1 = require('ibm-watson/natural-language-understanding/v1');\nconst { IamAuthenticator } = require('ibm-watson/auth');\n\nconst naturalLanguageUnderstanding = new NaturalLanguageUnderstandingV1({\n  version: '{version}',\n  authenticator: new IamAuthenticator({\n    apikey: '{apikey}',\n  }),\n  serviceUrl: 'https://api.us-east.natural-language-understanding.watson.cloud.ibm.com',\n});\n```\n\nDefault URL\n\n```text\nhttps://api.us-south.natural-language-understanding.watson.cloud.ibm.com\n```\n\nExample for the Washington DC location\n\n```python\nfrom ibm_watson import NaturalLanguageUnderstandingV1\nfrom ibm_cloud_sdk_core.authenticators import IAMAuthenticator\n\nauthenticator = IAMAuthenticator('{apikey}')\nnatural_language_understanding = NaturalLanguageUnderstandingV1(\n    version='{version}',\n    authenticator=authenticator\n)\n\nnatural_language_understanding.set_service_url('https://api.us-east.natural-language-understanding.watson.cloud.ibm.com')\n```\n\nDefault URL\n\n```text\nhttps://api.us-south.natural-language-understanding.watson.cloud.ibm.com\n```\n\nExample for the Washington DC location\n\n```ruby\nrequire \"ibm_watson/authenticators\"\nrequire \"ibm_watson/natural_language_understanding_v1\"\ninclude IBMWatson\n\nauthenticator = Authenticators::IamAuthenticator.new(\n  apikey: \"{apikey}\"\n)\nnatural_language_understanding = NaturalLanguageUnderstandingV1.new(\n  version: \"{version}\",\n  authenticator: authenticator\n)\nnatural_language_understanding.service_url = \"https://api.us-east.natural-language-understanding.watson.cloud.ibm.com\"\n```\n\nDefault URL\n\n```text\nhttps://api.us-south.natural-language-understanding.watson.cloud.ibm.com\n```\n\nExample for the Washington DC location\n\n```go\nnaturalLanguageUnderstanding, naturalLanguageUnderstandingErr := naturallanguageunderstandingv1.NewNaturalLanguageUnderstandingV1(options)\n\nif naturalLanguageUnderstandingErr != nil {\n  panic(naturalLanguageUnderstandingErr)\n}\n\nnaturalLanguageUnderstanding.SetServiceURL(\"https://api.us-east.natural-language-understanding.watson.cloud.ibm.com\")\n```\n\nDefault URL\n\n```text\nhttps://api.us-south.natural-language-understanding.watson.cloud.ibm.com\n```\n\nExample for the Washington DC location\n\n```swift\nlet authenticator = WatsonIAMAuthenticator(apiKey: \"{apikey}\")\nlet naturalLanguageUnderstanding = NaturalLanguageUnderstanding(version: \"{version}\", authenticator: authenticator)\nnaturalLanguageUnderstanding.serviceURL = \"https://api.us-east.natural-language-understanding.watson.cloud.ibm.com\"\n```\n\nDefault URL\n\n```text\nhttps://api.us-south.natural-language-understanding.watson.cloud.ibm.com\n```\n\nExample for the Washington DC location\n\n```cs\nIamAuthenticator authenticator = new IamAuthenticator(\n    apikey: \"{apikey}\"\n    );\n\nNaturalLanguageUnderstandingService naturalLanguageUnderstanding = new NaturalLanguageUnderstandingService(\"{version}\", authenticator);\nnaturalLanguageUnderstanding.SetServiceUrl(\"https://api.us-east.natural-language-understanding.watson.cloud.ibm.com\");\n```\n\nDefault URL\n\n```text\nhttps://api.us-south.natural-language-understanding.watson.cloud.ibm.com\n```\n\nExample for the Washington DC location\n\n```cs\nvar authenticator = new IamAuthenticator(\n    apikey: \"{apikey}\"\n);\n\nwhile (!authenticator.CanAuthenticate())\n    yield return null;\n\nvar naturalLanguageUnderstanding = new NaturalLanguageUnderstandingService(\"{version}\", authenticator);\nnaturalLanguageUnderstanding.SetServiceUrl(\"https://api.us-east.natural-language-understanding.watson.cloud.ibm.com\");\n```\n\n### Disabling SSL verification\n\nAll Watson services use Secure Sockets Layer (SSL) (or Transport Layer Security (TLS)) for secure connections between the client and server. The connection is verified against the local certificate store to ensure authentication, integrity, and confidentiality.\n\nIf you use a self-signed certificate, you need to disable SSL verification to make a successful connection.\n\nEnabling SSL verification is highly recommended. Disabling SSL jeopardizes the security of the connection and data. Disable SSL only if necessary, and take steps to enable SSL as soon as possible.\n\nTo disable SSL verification for a curl request, use the `--insecure` (`-k`) option with the request.\n\nExample to disable SSL verification. Replace `{apikey}` and `{url}` with your service credentials.\n\n```sh\ncurl -k -X {request_method} -u \"apikey:{apikey}\" \"{url}/{method}\"\n```\n\nTo disable SSL verification, create an `HttpConfigOptions` object and set the `disableSslVerification` property to `true`. Then, pass the object to the service instance by using the `configureClient` method.\n\nExample to disable SSL verification\n\n```java\nIamAuthenticator authenticator = new IamAuthenticator(\"{apikey}\");\nNaturalLanguageUnderstanding naturalLanguageUnderstanding = new NaturalLanguageUnderstanding(\"{version}\", authenticator);\nnaturalLanguageUnderstanding.setServiceUrl(\"{url}\");\n\nHttpConfigOptions configOptions = new HttpConfigOptions.Builder()\n  .disableSslVerification(true)\n  .build();\nnaturalLanguageUnderstanding.configureClient(configOptions);\n```\n\nTo disable SSL verification, set the `disableSslVerification` parameter to `true` when you create the service instance.\n\nExample to disable SSL verification\n\n```javascript\nconst NaturalLanguageUnderstandingV1 = require('ibm-watson/natural-language-understanding/v1');\nconst { IamAuthenticator } = require('ibm-watson/auth');\n\nconst naturalLanguageUnderstanding = new NaturalLanguageUnderstandingV1({\n  version: '{version}',\n  authenticator: new IamAuthenticator({\n    apikey: '{apikey}',\n  }),\n  serviceUrl: '{url}',\n  disableSslVerification: true,\n});\n```\n\nTo disable SSL verification, specify `True` on the `set_disable_ssl_verification` method for the service instance.\n\nExample to disable SSL verification\n\n```python\nfrom ibm_watson import NaturalLanguageUnderstandingV1\nfrom ibm_cloud_sdk_core.authenticators import IAMAuthenticator\n\nauthenticator = IAMAuthenticator('{apikey}')\nnatural_language_understanding = NaturalLanguageUnderstandingV1(\n    version='{version}',\n    authenticator=authenticator\n)\n\nnatural_language_understanding.set_service_url('{url}')\n\nnatural_language_understanding.set_disable_ssl_verification(True)\n```\n\nTo disable SSL verification, set the `disable_ssl_verification` parameter to `true` in the `configure_http_client()` method for the service instance.\n\nExample to disable SSL verification\n\n```ruby\nrequire \"ibm_watson/authenticators\"\nrequire \"ibm_watson/natural_language_understanding_v1\"\ninclude IBMWatson\n\nauthenticator = Authenticators::IamAuthenticator.new(\n  apikey: \"{apikey}\"\n)\nnatural_language_understanding = NaturalLanguageUnderstandingV1.new(\n  version: \"{version}\",\n  authenticator: authenticator\n)\nnatural_language_understanding.service_url = \"{url}\"\n\nnatural_language_understanding.configure_http_client(disable_ssl_verification: true)\n```\n\nTo disable SSL verification, call the `DisableSSLVerification` method on the service instance.\n\nExample to disable SSL verification\n\n```go\nnaturalLanguageUnderstanding, naturalLanguageUnderstandingErr := naturallanguageunderstandingv1.NewNaturalLanguageUnderstandingV1(options)\n\nif naturalLanguageUnderstandingErr != nil {\n  panic(naturalLanguageUnderstandingErr)\n}\n\nnaturalLanguageUnderstanding.SetServiceURL(\"{url}\")\n\nnaturalLanguageUnderstanding.DisableSSLVerification()\n```\n\nTo disable SSL verification, call the `disableSSLVerification()` method on the service instance. You cannot disable SSL verification on Linux.\n\nExample to disable SSL verification\n\n```swift\nlet authenticator = WatsonIAMAuthenticator(apiKey: \"{apikey}\")\nlet naturalLanguageUnderstanding = NaturalLanguageUnderstanding(version: \"{version}\", authenticator: authenticator)\nnaturalLanguageUnderstanding.serviceURL = \"{url}\"\n\nnaturalLanguageUnderstanding.disableSSLVerification()\n```\n\nTo disable SSL verification, set the `DisableSslVerification` method to `true` on the service instance.\n\nExample to disable SSL verification\n\n```cs\nIamAuthenticator authenticator = new IamAuthenticator(\n    apikey: \"{apikey}\"\n    );\n\nNaturalLanguageUnderstandingService naturalLanguageUnderstanding = new NaturalLanguageUnderstandingService(\"{version}\", authenticator);\nnaturalLanguageUnderstanding.SetServiceUrl(\"{url}\");\n\nnaturalLanguageUnderstanding.DisableSslVerification(true);\n```\n\nTo disable SSL verification, set the `DisableSslVerification` method to `true` on the service instance.\n\nExample to disable SSL verification\n\n```cs\nvar authenticator = new IamAuthenticator(\n    apikey: \"{apikey}\"\n);\n\nwhile (!authenticator.CanAuthenticate())\n    yield return null;\n\nvar naturalLanguageUnderstanding = new NaturalLanguageUnderstandingService(\"{version}\", authenticator);\nnaturalLanguageUnderstanding.SetServiceUrl(\"{url}\");\n\nnaturalLanguageUnderstanding.DisableSslVerification = true;\n```\n\n## Authentication\n\nYou authenticate to the API by using IBM Cloud Identity and Access Management (IAM).\n\nYou can pass either a bearer token in an authorization header or an API key. Tokens support authenticated requests without embedding service credentials in every call. API keys use basic authentication. For more information, see [Authenticating to Watson services](https://cloud.ibm.com/docs/watson?topic=watson-iam).\n\n- For testing and development, you can pass an API key directly.\n- For production use, unless you use the Watson SDKs, use an IAM token.\n\nIf you pass in an API key, use `apikey` for the username and the value of the API key as the password. For example, if the API key is `f5sAznhrKQyvBFFaZbtF60m5tzLbqWhyALQawBg5TjRI` in the service credentials, include the credentials in your call like this:\n\n```sh\ncurl -u \"apikey:f5sAznhrKQyvBFFaZbtF60m5tzLbqWhyALQawBg5TjRI\"\n```\n\nFor IBM Cloud instances, the SDK provides initialization methods for each form of authentication.\n\n- Use the API key to have the SDK manage the lifecycle of the access token. The SDK requests an access token, ensures that the access token is valid, and refreshes it if necessary.\n- Use the access token to manage the lifecycle yourself. You must periodically refresh the token.\n\n<span class=\"ph\" data-hd-programlang=\"dotnet-standard\">For more information, see [IAM authentication](https://github.com/watson-developer-cloud/dotnet-standard-sdk#iam) with the SDK.</span><span class=\"ph\" data-hd-programlang=\"go\">For more information, see [IAM authentication](https://github.com/watson-developer-cloud/go-sdk#iam) with the SDK.</span><span class=\"ph\" data-hd-programlang=\"java\">For more information, see [IAM authentication](https://github.com/watson-developer-cloud/java-sdk#iam) with the SDK.</span><span class=\"ph\" data-hd-programlang=\"node\">For more information, see [IAM authentication](https://github.com/watson-developer-cloud/node-sdk#iam) with the SDK.</span><span class=\"ph\" data-hd-programlang=\"python\">For more information, see [IAM authentication](https://github.com/watson-developer-cloud/python-sdk#iam) with the SDK.</span><span class=\"ph\" data-hd-programlang=\"ruby\">For more information, see [IAM authentication](https://github.com/watson-developer-cloud/ruby-sdk#iam) with the SDK.</span><span class=\"ph\" data-hd-programlang=\"swift\">For more information, see [IAM authentication](https://github.com/watson-developer-cloud/swift-sdk#iam) with the SDK.</span><span class=\"ph\" data-hd-programlang=\"unity\">For more information, see [IAM authentication](https://github.com/watson-developer-cloud/unity-sdk#iam) with the SDK.</span>\n\nReplace `{apikey}` and `{url}` with your service credentials.\n\n```sh\ncurl -X {request_method} -u \"apikey:{apikey}\" \"{url}/v1/{method}\"\n```\n\nSDK managing the IAM token. Replace `{apikey}`, `{version}`,  and `{url}`.\n\n```java\nIamAuthenticator authenticator = new IamAuthenticator(\"{apikey}\");\nNaturalLanguageUnderstanding naturalLanguageUnderstanding = new NaturalLanguageUnderstanding(\"{version}\", authenticator);\nnaturalLanguageUnderstanding.setServiceUrl(\"{url}\");\n```\n\nSDK managing the IAM token. Replace `{apikey}`, `{version}`, and `{url}`.\n\n```javascript\nconst NaturalLanguageUnderstandingV1 = require('ibm-watson/natural-language-understanding/v1');\nconst { IamAuthenticator } = require('ibm-watson/auth');\n\nconst naturalLanguageUnderstanding = new NaturalLanguageUnderstandingV1({\n  version: '{version}',\n  authenticator: new IamAuthenticator({\n    apikey: '{apikey}',\n  }),\n  serviceUrl: '{url}',\n});\n```\n\nSDK managing the IAM token. Replace `{apikey}`, `{version}`, and `{url}`.\n\n```python\nfrom ibm_watson import NaturalLanguageUnderstandingV1\nfrom ibm_cloud_sdk_core.authenticators import IAMAuthenticator\n\nauthenticator = IAMAuthenticator('{apikey}')\nnatural_language_understanding = NaturalLanguageUnderstandingV1(\n    version='{version}',\n    authenticator=authenticator\n)\n\nnatural_language_understanding.set_service_url('{url}')\n```\n\nSDK managing the IAM token. Replace `{apikey}`, `{version}`, and `{url}`.\n\n```ruby\nrequire \"ibm_watson/authenticators\"\nrequire \"ibm_watson/natural_language_understanding_v1\"\ninclude IBMWatson\n\nauthenticator = Authenticators::IamAuthenticator.new(\n  apikey: \"{apikey}\"\n)\nnatural_language_understanding = NaturalLanguageUnderstandingV1.new(\n  version: \"{version}\",\n  authenticator: authenticator\n)\nnatural_language_understanding.service_url = \"{url}\"\n```\n\nSDK managing the IAM token. Replace `{apikey}`, `{version}`, and `{url}`.\n\n```go\nimport (\n  \"github.com/IBM/go-sdk-core/core\"\n  \"github.com/watson-developer-cloud/go-sdk/naturallanguageunderstandingv1\"\n)\n\nfunc main() {\n  authenticator := &core.IamAuthenticator{\n    ApiKey: \"{apikey}\",\n  }\n\n  options := &naturallanguageunderstandingv1.NaturalLanguageUnderstandingV1Options{\n    Version: \"{version}\",\n    Authenticator: authenticator,\n  }\n\n  naturalLanguageUnderstanding, naturalLanguageUnderstandingErr := naturallanguageunderstandingv1.NewNaturalLanguageUnderstandingV1(options)\n\n  if naturalLanguageUnderstandingErr != nil {\n    panic(naturalLanguageUnderstandingErr)\n  }\n\n  naturalLanguageUnderstanding.SetServiceURL(\"{url}\")\n}\n```\n\nSDK managing the IAM token. Replace `{apikey}`, `{version}`, and `{url}`.\n\n```swift\nlet authenticator = WatsonIAMAuthenticator(apiKey: \"{apikey}\")\nlet naturalLanguageUnderstanding = NaturalLanguageUnderstanding(version: \"{version}\", authenticator: authenticator)\nnaturalLanguageUnderstanding.serviceURL = \"{url}\"\n```\n\nSDK managing the IAM token. Replace `{apikey}`, `{version}`, and `{url}`.\n\n```cs\nIamAuthenticator authenticator = new IamAuthenticator(\n    apikey: \"{apikey}\"\n    );\n\nNaturalLanguageUnderstandingService naturalLanguageUnderstanding = new NaturalLanguageUnderstandingService(\"{version}\", authenticator);\nnaturalLanguageUnderstanding.SetServiceUrl(\"{url}\");\n```\n\nSDK managing the IAM token. Replace `{apikey}`, `{version}`, and `{url}`.\n\n```cs\nvar authenticator = new IamAuthenticator(\n    apikey: \"{apikey}\"\n);\n\nwhile (!authenticator.CanAuthenticate())\n    yield return null;\n\nvar naturalLanguageUnderstanding = new NaturalLanguageUnderstandingService(\"{version}\", authenticator);\nnaturalLanguageUnderstanding.SetServiceUrl(\"{url}\");\n```\n\n### Access between services\n\nYour application might use more than one Watson service. You can grant access between services and you can grant access to more than one service for your applications.\n\nFor IBM Cloud services, the method to grant access between Watson services varies depending on the type of API key. For more information, see [IAM access](https://cloud.ibm.com/docs/account?topic=account-userroles).\n\n- To grant access between IBM Cloud services, create an authorization between the services. For more information, see [Granting access between services](https://cloud.ibm.com/docs/account?topic=account-serviceauth).\n- To grant access to your services by applications without using user credentials, create a service ID, add an API key, and assign access policies. For more information, see [Creating and working with service IDs](https://cloud.ibm.com/docs/account?topic=account-serviceids#serviceids).\n\nWhen you give a user ID access to multiple services, use an endpoint URL that includes the service instance ID (for example, `https://api.us-south.natural-language-understanding.watson.cloud.ibm.com/instances/6bbda3b3-d572-45e1-8c54-22d6ed9e52c2`).  You can find the instance ID in two places:\n\n- By clicking the service instance row in the [Resource list](https://cloud.ibm.com/resources?groups=resource-instance). The instance ID is the **GUID** in the details pane.\n- By clicking the name of the service instance in the list and looking at the credentials URL.\n\n    If you don't see the instance ID in the URL, the credentials predate service IDs. Add new credentials from the **Service credentials** page and use those credentials.\n    \n\n## Versioning\n\nAPI requests require a version parameter that takes a date in the format `version=YYYY-MM-DD`. When the API is updated with any [breaking changes](https://github.com/watson-developer-cloud/api-guidelines/#versioning), the service introduces a new version date for the API.\n\nSend the version parameter with every API request. The service uses the API version for the date you specify, or the most recent version before that date. Don't default to the current date. Instead, specify a date that matches a version that is compatible with your app, and don't change it until your app is ready for a later version.\n\nSpecify the version to use on API requests with the version parameter when you create the service instance. The service uses the API version for the date you specify, or the most recent version before that date. Don't default to the current date. Instead, specify a date that matches a version that is compatible with your app, and don't change it until your app is ready for a later version.\n\nThis documentation describes the current version of Natural Language Understanding, `2022-04-07`. In some cases, differences in earlier versions are noted in the descriptions of parameters and response models.\n\n## Error handling\n\nNatural Language Understanding uses standard HTTP response codes to indicate whether a method completed successfully. HTTP response codes in the 2xx range indicate success. A response in the 4xx range is some sort of failure, and a response in the 5xx range usually indicates an internal system error that cannot be resolved by the user. Response codes are listed with the method.\n\n**ErrorResponse**\n\n| Name                  | Description                      |\n|-----------------------|----------------------------------|\n| **code** <br/>integer | The HTTP response code.          |\n| **error**<br/>string  | General description of an error. |\n\nThe Java SDK generates an exception for any unsuccessful method invocation. All methods that accept an argument can also throw an `IllegalArgumentException`.\n\n| Exception                    | Description                                   |\n|------------------------------|-----------------------------------------------|\n| **IllegalArgumentException** | An invalid argument was passed to the method. |\n\nWhen the Java SDK receives an error response from the Natural Language Understanding service, it generates an exception from the `com.ibm.watson.developer_cloud.service.exception` package. All service exceptions contain the following fields.\n\n| Field          | Description                              |\n|----------------|------------------------------------------|\n| **statusCode** | The HTTP response code that is returned. |\n| **message**    | A message that describes the error.      |\n\nExample error handling\n\n```java\ntry {\n  // Invoke a method\n} catch (NotFoundException e) {\n  // Handle Not Found (404) exception\n} catch (RequestTooLargeException e) {\n  // Handle Request Too Large (413) exception\n} catch (ServiceResponseException e) {\n  // Base class for all exceptions caused by error responses from the service\n  System.out.println(\"Service returned status code \"\n    + e.getStatusCode() + \": \" + e.getMessage());\n}\n```\n\nWhen the Node SDK receives an error response from the Natural Language Understanding service, it creates an `Error` object with information that describes the error that occurred. This error object is passed as the first parameter to the callback function for the method. The contents of the error object are as shown in the following table.\n\n**Error**\n\n| Field       | Description                              |\n|-------------|------------------------------------------|\n| **code**    | The HTTP response code that is returned. |\n| **message** | A message that describes the error.      |\n\nExample error handling\n\n```javascript\nnaturalLanguageUnderstanding.method(params)\n  .catch(err => {\n    console.log('error:', err);\n  });\n```\n\nThe Python SDK generates an exception for any unsuccessful method invocation. When the Python SDK receives an error response from the Natural Language Understanding service, it generates an `ApiException` with the following fields.\n\n| Field       | Description                                             |\n|-------------|---------------------------------------------------------|\n| **code**    | The HTTP response code that is returned.                |\n| **message** | A message that describes the error.                     |\n| **info**    | A dictionary of additional information about the error. |\n\nExample error handling\n\n```python\nfrom ibm_watson import ApiException\ntry:\n    # Invoke a method\nexcept ApiException as ex:\n    print \"Method failed with status code \" + str(ex.code) + \": \" + ex.message\n```\n\nWhen the Ruby SDK receives an error response from the Natural Language Understanding service, it generates an `ApiException` with the following fields.\n\n| Field       | Description                                             |\n|-------------|---------------------------------------------------------|\n| **code**    | The HTTP response code that is returned.                |\n| **message** | A message that describes the error.                     |\n| **info**    | A dictionary of additional information about the error. |\n\nExample error handling\n\n```ruby\nrequire \"ibm_watson\"\nbegin\n  # Invoke a method\nrescue IBMWatson::ApiException => ex\n  print \"Method failed with status code #{ex.code}: #{ex.error}\"\nend\n```\n\nThe Go SDK generates an error for any unsuccessful service instantiation and method invocation. You can check for the error immediately. The contents of the error object are as shown in the following table.\n\n**Error**\n\n| Field       | Description                              |\n|-------------|------------------------------------------|\n| **code**    | The HTTP response code that is returned. |\n| **message** | A message that describes the error.      |\n\nExample error handling\n\n```go\nimport \"github.com/watson-developer-cloud/go-sdk/naturallanguageunderstandingv1\"\n\n// Instantiate a service\nnaturalLanguageUnderstanding, naturalLanguageUnderstandingErr := naturallanguageunderstandingv1.NewNaturalLanguageUnderstandingV1(options)\n\n// Check for errors\nif naturalLanguageUnderstandingErr != nil {\n  panic(naturalLanguageUnderstandingErr)\n}\n\n// Call a method\nresult, _, responseErr := naturalLanguageUnderstanding.MethodName(&methodOptions)\n\n// Check for errors\nif responseErr != nil {\n  panic(responseErr)\n}\n```\n\nThe Swift SDK returns a `WatsonError` in the `completionHandler` any unsuccessful method invocation. This error type is an enum that conforms to `LocalizedError` and contains an `errorDescription` property that returns an error message. Some of the `WatsonError` cases contain associated values that reveal more information about the error.\n\n| Field                | Description                         |\n|----------------------|-------------------------------------|\n| **errorDescription** | A message that describes the error. |\n\nExample error handling\n\n```swift\nnaturalLanguageUnderstanding.method() {\n  response, error in\n\n  if let error = error {\n    switch error {\n    case let .http(statusCode, message, metadata):\n      switch statusCode {\n      case .some(404):\n        // Handle Not Found (404) exception\n        print(\"Not found\")\n      case .some(413):\n        // Handle Request Too Large (413) exception\n        print(\"Payload too large\")\n      default:\n        if let statusCode = statusCode {\n          print(\"Error - code: \\(statusCode), \\(message ?? \"\")\")\n        }\n      }\n    default:\n      print(error.localizedDescription)\n    }\n    return\n  }\n\n  guard let result = response?.result else {\n    print(error?.localizedDescription ?? \"unknown error\")\n    return\n  }\n\n  print(result)\n}\n```\n\nWhen the .NET Standard SDK receives an error response from the Natural Language Understanding service, it generates a `ServiceResponseException` with the following fields.\n\n| Field               | Description                              |\n|---------------------|------------------------------------------|\n| **Message**         | A message that describes the error.      |\n| **CodeDescription** | The HTTP response code that is returned. |\n\nExample error handling\n\n```cs\ntry\n{\n    // Invoke a method\n}\ncatch(ServiceResponseException e)\n{\n    Console.WriteLine(\"Error: \" + e.Message);\n}\ncatch (Exception e)\n{\n    Console.WriteLine(\"Error: \" + e.Message);\n}\n```\n\nWhen the Unity SDK receives an error response from the Natural Language Understanding service, it generates an `IBMError` with the following fields.\n\n| Field               | Description                                    |\n|---------------------|------------------------------------------------|\n| **Url**             | The URL that generated the error.              |\n| **StatusCode**      | The HTTP response code returned.               |\n| **ErrorMessage**    | A message that describes the error.            |\n| **Response**        | The contents of the response from the server.  |\n| **ResponseHeaders** | A dictionary of headers returned by the request. |\n\nExample error handling\n\n```cs\n// Invoke a method\nnaturalLanguageUnderstanding.MethodName(Callback, Parameters);\n\n// Check for errors\nprivate void Callback(DetailedResponse<ExampleResponse> response, IBMError error)\n{\n    if (error == null)\n    {\n        Log.Debug(\"ExampleCallback\", \"Response received: {0}\", response.Response);\n    }\n    else\n    {\n        Log.Debug(\"ExampleCallback\", \"Error received: {0}, {1}, {3}\", error.StatusCode, error.ErrorMessage, error.Response);\n    }\n}\n```\n\n## Data handling\n\n### Additional headers\n\nSome Watson services accept special parameters in headers that are passed with the request.\n\nYou can pass request header parameters in all requests or in a single request to the service.\n\nTo pass a request header, use the `--header` (`-H`) option with a curl request.\n\nExample header parameter in a request\n\n```sh\ncurl -X {request_method} \\\n-H \"Request-Header: {header_value}\" \\\n\"{url}/v1/{method}\"\n```\n\nTo pass header parameters with every request, use the `setDefaultHeaders` method of the service object. See [Data collection](#data-collection) for an example use of this method.\n\nTo pass header parameters in a single request, use the `addHeader` method as a modifier on the request before you execute it.\n\nExample header parameter in a request\n\n```java\nReturnType returnValue = naturalLanguageUnderstanding.methodName(parameters)\n  .addHeader(\"Custom-Header\", \"{header_value}\")\n  .execute();\n```\n\nTo pass header parameters with every request, specify the `headers` parameter when you create the service object. See [Data collection](#data-collection) for an example use of this method.\n\nTo pass header parameters in a single request, use the `headers` method as a modifier on the request before you execute it.\n\nExample header parameter in a request\n\n```javascript\nconst parameters = {\n  {parameters}\n};\n\nnaturalLanguageUnderstanding.methodName(\n  parameters,\n  headers: {\n    'Custom-Header': '{header_value}'\n  })\n   .then(result => {\n    console.log(response);\n  })\n  .catch(err => {\n    console.log('error:', err);\n  });\n```\n\nTo pass header parameters with every request, specify the `set_default_headers` method of the service object. See [Data collection](#data-collection) for an example use of this method.\n\nTo pass header parameters in a single request, include `headers` as a `dict` in the request.\n\nExample header parameter in a request\n\n```python\nresponse = natural_language_understanding.methodName(\n    parameters,\n    headers = {\n        'Custom-Header': '{header_value}'\n    })\n```\n\nTo pass header parameters with every request, specify the `add_default_headers` method of the service object. See [Data collection](#data-collection) for an example use of this method.\n\nTo pass header parameters in a single request, specify the `headers` method as a chainable method in the request.\n\nExample header parameter in a request\n\n```ruby\nresponse = natural_language_understanding.headers(\n  \"Custom-Header\" => \"{header_value}\"\n).methodName(parameters)\n```\n\nTo pass header parameters with every request, specify the `SetDefaultHeaders` method of the service object. See [Data collection](#data-collection) for an example use of this method.\n\nTo pass header parameters in a single request, specify the `Headers` as a `map` in the request.\n\nExample header parameter in a request\n\n```go\nresult, _, responseErr := naturalLanguageUnderstanding.MethodName(\n  &methodOptions{\n    Headers: map[string]string{\n      \"Accept\": \"application/json\",\n    },\n  },\n)\n```\n\nTo pass header parameters with every request, add them to the `defaultHeaders` property of the service object. See [Data collection](#data-collection) for an example use of this method.\n\nTo pass header parameters in a single request, pass the `headers` parameter to the request method.\n\nExample header parameter in a request\n\n```swift\nlet customHeader: [String: String] = [\"Custom-Header\": \"{header_value}\"]\nnaturalLanguageUnderstanding.methodName(parameters, headers: customHeader) {\n  response, error in\n}\n```\n\nTo pass header parameters in a single request, use the `WithHeader()` method as a modifier on the request before you execute it. See [Data collection](#data-collection) for an example use of this method.\n\nExample header parameter in a request\n\n```cs\nIamAuthenticator authenticator = new IamAuthenticator(\n    apikey: \"{apikey}\"\n    );\n\nNaturalLanguageUnderstandingService naturalLanguageUnderstanding = new NaturalLanguageUnderstandingService(\"{version}\", authenticator);\nnaturalLanguageUnderstanding.SetServiceUrl(\"{url}\");\n\nnaturalLanguageUnderstanding.WithHeader(\"Custom-Header\", \"header_value\");\n```\n\nTo pass header parameters in a single request, use the `WithHeader()` method as a modifier on the request before you execute it.\n\nExample header parameter in a request\n\n```cs\nvar authenticator = new IamAuthenticator(\n    apikey: \"{apikey}\"\n);\n\nwhile (!authenticator.CanAuthenticate())\n    yield return null;\n\nvar naturalLanguageUnderstanding = new NaturalLanguageUnderstandingService(\"{version}\", authenticator);\nnaturalLanguageUnderstanding.SetServiceUrl(\"{url}\");\n\nnaturalLanguageUnderstanding.WithHeader(\"Custom-Header\", \"header_value\");\n```\n\n### Response details\n\nThe Natural Language Understanding service might return information to the application in response headers.\n\nTo access all response headers that the service returns, include the `--include` (`-i`) option with a curl request. To see detailed response data for the request, including request headers, response headers, and extra debugging information, include the `--verbose` (`-v`) option with the request.\n\nExample request to access response headers\n\n```sh\ncurl -X {request_method} {authentication_method} \\\n--include \\\n\"{url}/v1/{method}\"\n```\n\nTo access information in the response headers, use one of the request methods that returns details with the response: `executeWithDetails()`, `enqueueWithDetails()`, or `rxWithDetails()`. These methods return a `Response<T>` object, where `T` is the expected response model. Use the `getResult()` method to access the response object for the method, and use the `getHeaders()` method to access information in response headers.\n\nExample request to access response headers\n\n```java\nResponse<ReturnType> response = naturalLanguageUnderstanding.methodName(parameters)\n  .executeWithDetails();\n// Access response from methodName\nReturnType returnValue = response.getResult();\n// Access information in response headers\nHeaders responseHeaders = response.getHeaders();\n```\n\nAll response data is available in the `Response<T>` object that is returned by each method. To access information in the `response` object, use the following properties.\n\nExample request to access response headers\n\n```javascript\nnaturalLanguageUnderstanding.methodName(parameters)\n  .then(response => {\n    console.log(response.headers);\n  })\n  .catch(err => {\n    console.log('error:', err);\n  });\n```\n\n| Property  | Description                                           |\n|-----------|-------------------------------------------------------|\n| `result`  | Returns the response for the service-specific method. |\n| `headers` | Returns the response header information.              |\n| `status`  | Returns the HTTP status code.                         |\n\nThe return value from all service methods is a `DetailedResponse` object. To access information in the result object or response headers, use the following methods.\n\nExample request to access response headers\n\n```python\nnatural_language_understanding.set_detailed_response(True)\nresponse = natural_language_understanding.methodName(parameters)\n## Access response from methodName\nprint(json.dumps(response.get_result(), indent=2))\n## Access information in response headers\nprint(response.get_headers())\n## Access HTTP response status\nprint(response.get_status_code())\n```\n\n**DetailedResponse**\n\n| Method              | Description                                           |\n|---------------------|-------------------------------------------------------|\n| `get_result()`      | Returns the response for the service-specific method. |\n| `get_headers()`     | Returns the response header information.              |\n| `get_status_code()` | Returns the HTTP status code.                         |\n\nThe return value from all service methods is a `DetailedResponse` object. To access information in the `response` object, use the following properties.\n\nExample request to access response headers\n\n```ruby\nresponse = natural_language_understanding.methodName(parameters)\n## Access response from methodName\nprint response.result\n## Access information in response headers\nprint response.headers\n## Access HTTP response status\nprint response.status\n```\n\n**DetailedResponse**\n\n| Property  | Description                                           |\n|-----------|-------------------------------------------------------|\n| `result`  | Returns the response for the service-specific method. |\n| `headers` | Returns the response header information.              |\n| `status`  | Returns the HTTP status code.                         |\n\nThe return value from all service methods is a `DetailedResponse` object. To access information in the `response` object or response headers, use the following methods.\n\nExample request to access response headers\n\n```go\nimport (\n  \"github.com/IBM/go-sdk-core/core\"\n  \"github.com/watson-developer-cloud/go-sdk/naturallanguageunderstandingv1\"\n)\nresult, response, responseErr := naturalLanguageUnderstanding.MethodName(\n  &methodOptions{})\n// Access result\ncore.PrettyPrint(response.GetResult(), \"Result \")\n\n// Access response headers\ncore.PrettyPrint(response.GetHeaders(), \"Headers \")\n\n// Access status code\ncore.PrettyPrint(response.GetStatusCode(), \"Status Code \")\n```\n\n**DetailedResponse**\n\n| Method            | Description                                           |\n|-------------------|-------------------------------------------------------|\n| `GetResult()`     | Returns the response for the service-specific method. |\n| `GetHeaders()`    | Returns the response header information.              |\n| `GetStatusCode()` | Returns the HTTP status code.                         |\n\nAll response data is available in the `WatsonResponse<T>` object that is returned in each method's `completionHandler`.\n\nExample request to access response headers\n\n```swift\nnaturalLanguageUnderstanding.methodName(parameters) {\n  response, error in\n\n  guard let result = response?.result else {\n    print(error?.localizedDescription ?? \"unknown error\")\n    return\n  }\n  print(result) // The data returned by the service\n  print(response?.statusCode)\n  print(response?.headers)\n}\n```\n\nThe response contains fields for response headers, response JSON, and the status code.\n\nExample request to access response headers\n\n```cs\nvar results = naturalLanguageUnderstanding.MethodName(parameters);\n\nvar result = results.Result;            //  The result object\nvar responseHeaders = results.Headers;  //  The response headers\nvar responseJson = results.Response;    //  The raw response JSON\nvar statusCode = results.StatusCode;    //  The response status code\n```\n\n**DetailedResponse**\n\n| Property     | Description                                                    |\n|--------------|----------------------------------------------------------------|\n| `Result`     | Returns the result for the service-specific method.            |\n| `Response`   | Returns the raw JSON response for the service-specific method. |\n| `Headers`    | Returns the response header information.                       |\n| `StatusCode` | Returns the HTTP status code.                                  |\n\nThe response contains fields for response headers, response JSON, and the status code.\n\nExample request to access response headers\n\n```cs\nprivate void Example()\n{\n    naturalLanguageUnderstanding.MethodName(Callback, Parameters);\n}\n\nprivate void Callback(DetailedResponse<ResponseType> response, IBMError error)\n{\n    var result = response.Result;                 //  The result object\n    var responseHeaders = response.Headers;       //  The response headers\n    var responseJson = reresponsesults.Response;  //  The raw response JSON\n    var statusCode = response.StatusCode;         //  The response status code\n}\n```\n\n**DetailedResponse**\n\n| Property     | Description                                                    |\n|--------------|----------------------------------------------------------------|\n| `Result`     | Returns the result for the service-specific method.            |\n| `Response`   | Returns the raw JSON response for the service-specific method. |\n| `Headers`    | Returns the response header information.                       |\n| `StatusCode` | Returns the HTTP status code.                                  |\n\n### Data collection\n\nExample request\n\n```sh\ncurl -u \"apikey:{apikey}\" \\\n-H \"X-Watson-Learning-Opt-Out: true\" \\\n\"{url}/{method}\"\n```\n\nExample request\n\n```java\nMap<String, String> headers = new HashMap<String, String>();\nheaders.put(\"X-Watson-Learning-Opt-Out\", \"true\");\n\nnaturalLanguageUnderstanding.setDefaultHeaders(headers);\n```\n\nExample request\n\n```javascript\nconst NaturalLanguageUnderstandingV1 = require('ibm-watson/natural-language-understanding/v1');\nconst { IamAuthenticator } = require('ibm-watson/auth');\n\nconst naturalLanguageUnderstanding = new NaturalLanguageUnderstandingV1({\n  version: '{version}',\n  authenticator: new IamAuthenticator({\n    apikey: '{apikey}',\n  }),\n  serviceUrl: '{url}',\n  headers: {\n    'X-Watson-Learning-Opt-Out': 'true'\n  }\n});\n```\n\nExample request\n\n```python\nnatural_language_understanding.set_default_headers({'x-watson-learning-opt-out': \"true\"})\n```\n\nExample request\n\n```ruby\nnatural_language_understanding.add_default_headers(headers: {\"x-watson-learning-opt-out\" => \"true\"})\n```\n\nExample request\n\n```go\nimport \"net/http\"\n\nheaders := http.Header{}\nheaders.Add(\"x-watson-learning-opt-out\", \"true\")\nnaturalLanguageUnderstanding.SetDefaultHeaders(headers)\n```\n\nExample request\n\n```swift\nnaturalLanguageUnderstanding.defaultHeaders[\"X-Watson-Learning-Opt-Out\"] = \"true\"\n```\n\nExample request\n\n```cs\nIamAuthenticator authenticator = new IamAuthenticator(\n    apikey: \"{apikey}\"\n    );\n\nNaturalLanguageUnderstandingService naturalLanguageUnderstanding = new NaturalLanguageUnderstandingService(\"{version}\", authenticator);\nnaturalLanguageUnderstanding.SetServiceUrl(\"{url}\");\n\nnaturalLanguageUnderstanding.WithHeader(\"X-Watson-Learning-Opt-Out\", \"true\");\n```\n\nExample request\n\n```cs\nvar authenticator = new IamAuthenticator(\n    apikey: \"{apikey}\"\n);\n\nwhile (!authenticator.CanAuthenticate())\n    yield return null;\n\nvar naturalLanguageUnderstanding = new NaturalLanguageUnderstandingService(\"{version}\", authenticator);\nnaturalLanguageUnderstanding.SetServiceUrl(\"{url}\");\n\nnaturalLanguageUnderstanding.WithHeader(\"X-Watson-Learning-Opt-Out\", \"true\");\n```\n\nBy default, Natural Language Understanding service instances that are not part of Premium plans collect data about API requests and their results. This data is collected only to improve the services for future users. The collected data is not shared or made public. Data is not collected for services that are part of Premium plans.\n\nTo prevent IBM usage of your data for an API request, set the **X-Watson-Learning-Opt-Out** header parameter to `true`. You can also disable request logging at the account level. For more information, see [Controlling request logging for Watson services](https://cloud.ibm.com/docs/watson?topic=watson-gs-logging-overview).\n\nYou must set the header on each request that you do not want IBM to access for general service improvements.\n\nYou can set the header by using the `setDefaultHeaders` method of the service object.\n\nYou can set the header by using the `headers` parameter when you create the service object.\n\nYou can set the header by using the `set_default_headers` method of the service object.\n\nYou can set the header by using the `add_default_headers` method of the service object.\n\nYou can set the header by using the `SetDefaultHeaders` method of the service object.\n\nYou can set the header by adding it to the `defaultHeaders` property of the service object.\n\nYou can set the header by using the `WithHeader()` method of the service object.\n\n## Synchronous and asynchronous requests\n\nThe Java SDK supports both synchronous (blocking) and asynchronous (non-blocking) execution of service methods. All service methods implement the [ServiceCall](https://ibm.github.io/java-sdk-core/docs/9.5.4/com/ibm/cloud/sdk/core/http/ServiceCall.html) interface.\n\n- To call a method **synchronously**, use the `execute` method of the `ServiceCall` interface. You can call the `execute` method directly from an instance of the service.\n- To call a method **asynchronously**, use the `enqueue` method of the `ServiceCall` interface to receive a callback when the response arrives. The [ServiceCallback](https://ibm.github.io/java-sdk-core/docs/9.5.4/com/ibm/cloud/sdk/core/http/ServiceCallback.html) interface of the method's argument provides `onResponse` and `onFailure` methods that you override to handle the callback.\n\nExample synchronous request\n\n```java\nReturnType returnValue = naturalLanguageUnderstanding.method(parameters).execute();\n```\nExample asynchronous request\n\n```java\nnaturalLanguageUnderstanding.method(parameters).enqueue(new ServiceCallback<ReturnType>() {\n  @Override public void onResponse(ReturnType response) {\n    . . .\n  }\n  @Override public void onFailure(Exception e) {\n    . . .\n  }\n});\n```\n\nThe Ruby SDK supports both synchronous (blocking) and asynchronous (non-blocking) execution of service methods. All service methods implement the [Concurrent::Async](http://ruby-concurrency.github.io/concurrent-ruby/master/Concurrent/Async.html) module. When you use the synchronous or asynchronous methods, an **IVar** object is returned. You access the `DetailedResponse` object by calling `ivar_object.value`.\n\nFor more information about the **Ivar** object, see the [IVar](http://ruby-concurrency.github.io/concurrent-ruby/master/Concurrent/IVar.html) class docs.\n\n- To call a method **synchronously**, either call the method directly or use the `.await` chainable method of the `Concurrent::Async` module.\n\n  Calling a method directly (without `.await`) returns a `DetailedResponse` object.\n  \n- To call a method **asynchronously**, use the `.async` chainable method of the `Concurrent::Async` module.\n\nYou can call the `.await` and `.async` methods directly from an instance of the service.\n\nExample synchronous request\n\n```ruby\nresponse = natural_language_understanding.method_name(parameters)\n```\n\nor\n\n```ruby\nresponse = natural_language_understanding.await.method_name(parameters)\n```\n\nExample asynchronous request\n\n```ruby\nresponse = natural_language_understanding.async.method_name(parameters)\n```\n\n## Related information\n\n- Natural Language Understanding [docs](https://cloud.ibm.com/docs/natural-language-understanding)\n- [Release notes](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-release-notes)\n- [Javadoc for NaturalLanguageUnderstanding](http://watson-developer-cloud.github.io/java-sdk/docs/v12.0.1/com/ibm/watson/natural_language_understanding/v1/NaturalLanguageUnderstanding.html) \n- [Javadoc for sdk-core](https://ibm.github.io/java-sdk-core/docs/9.12.1/) \n\n[assistant-v1]: /apidocs/assistant-v1/\n[assistant-v1-java]: /apidocs/assistant-v1?code=java\n[assistant-v1-node]: /apidocs/assistant-v1?code=node\n[assistant-v1-python]: /apidocs/assistant-v1?code=python\n[assistant-v1-ruby]: /apidocs/assistant-v1?code=ruby\n[assistant-v1-go]: /apidocs/assistant-v1?code=go\n[assistant-v1-swift]: /apidocs/assistant-v1?code=swift\n[assistant-v1-dotnet-standard]: /apidocs/assistant-v1?code=dotnet-standard\n[assistant-v1-unity]: /apidocs/assistant-v1?code=unity\n[installed-assistant-v1]: /apidocs/assistant-data-v1\n[installed-assistant-v1-java]: /apidocs/assistant-data-v1?code=java\n[installed-assistant-v1-node]: /apidocs/assistant-data-v1?code=node\n[installed-assistant-v1-python]: /apidocs/assistant-data-v1?code=python\n[installed-assistant-v1-ruby]: /apidocs/assistant-data-v1?code=ruby\n[installed-assistant-v1-go]: /apidocs/assistant-data-v1?code=go\n[installed-assistant-v1-swift]: /apidocs/assistant-data-v1?code=swift\n[installed-assistant-v1-dotnet-standard]: /apidocs/assistant-data-v1?code=dotnet-standard\n[installed-assistant-v1-unity]: /apidocs/assistant-data-v1?code=unity\n\n[assistant-v2]: /apidocs/assistant-v2/\n[assistant-v2-java]: /apidocs/assistant-v2?code=java\n[assistant-v2-node]: /apidocs/assistant-v2?code=node\n[assistant-v2-python]: /apidocs/assistant-v2?code=python\n[assistant-v2-ruby]: /apidocs/assistant-v2?code=ruby\n[assistant-v2-go]: /apidocs/assistant-v2?code=go\n[assistant-v2-swift]: /apidocs/assistant-v2?code=swift\n[assistant-v2-dotnet-standard]: /apidocs/assistant-v2?code=dotnet-standard\n[assistant-v2-unity]: /apidocs/assistant-v2?code=unity\n[installed-assistant-v2]: /apidocs/assistant-data-v2\n[installed-assistant-v2-java]: /apidocs/assistant-data-v2?code=java\n[installed-assistant-v2-node]: /apidocs/assistant-data-v2?code=node\n[installed-assistant-v2-python]: /apidocs/assistant-data-v2?code=python\n[installed-assistant-v2-ruby]: /apidocs/assistant-data-v2?code=ruby\n[installed-assistant-v2-go]: /apidocs/assistant-data-v2?code=go\n[installed-assistant-v2-swift]: /apidocs/assistant-data-v2?code=swift\n[installed-assistant-v2-dotnet-standard]: /apidocs/assistant-data-v2?code=dotnet-standard\n[installed-assistant-v2-unity]: /apidocs/assistant-data-v2?code=unity\n\n[disco-v1]: /apidocs/discovery/\n[disco-v1-java]: /apidocs/discovery?code=java\n[disco-v1-node]: /apidocs/discovery?code=node\n[disco-v1-python]: /apidocs/discovery?code=python\n[disco-v1-ruby]: /apidocs/discovery?code=ruby\n[disco-v1-go]: /apidocs/discovery?code=go\n[disco-v1-swift]: /apidocs/discovery?code=swift\n[disco-v1-dotnet-standard]: /apidocs/discovery?code=dotnet-standard\n[disco-v1-unity]: /apidocs/discovery?code=unity\n[disco-v2]: /apidocs/discovery-data/\n[disco-v2-java]: /apidocs/discovery-data?code=java\n[disco-v2-node]: /apidocs/discovery-data?code=node\n[disco-v2-python]: /apidocs/discovery-data?code=python\n[disco-v2-ruby]: /apidocs/discovery-data?code=ruby\n[disco-v2-go]: /apidocs/discovery-data?code=go\n[disco-v2-swift]: /apidocs/discovery-data?code=swift\n[disco-v2-dotnet-standard]: /apidocs/discovery-data?code=dotnet-standard\n[disco-v2-unity]: /apidocs/discovery-data?code=unity",
    "x-vcap-service-name": "natural-language-understanding",
    "x-version-date": "2022-04-07",
    "x-sdk-supported-languages": [
      "java",
      "node",
      "python",
      "dotnet-standard"
    ],
    "x-codegen-config": {
      "includeExternalConfig": true,
      "supportNodeCallbacks": true,
      "dotnet-standard": {
        "apiPackage": "IBM.Watson"
      },
      "go": {
        "apiPackage": "github.com/watson-developer-cloud/go-sdk/v2"
      },
      "cli": {
        "apiPackage": "cli-watson-plugin",
        "cliPluginName": "watson"
      },
      "java": {
        "apiPackage": "com.ibm.watson"
      },
      "python": {
        "apiPackage": "ibm_watson"
      },
      "swift": {
        "resterror-alias": "WatsonError",
        "restresponse-alias": "WatsonResponse"
      }
    },
    "x-github": "https://github.ibm.com/cloud-api-docs/natural-language-understanding",
    "x-github-issues": "https://github.ibm.com/cloud-api-docs/natural-language-understanding/issues/new",
    "x-last-updated": "2024-05-10"
  },
  "security": [
    {
      "IAM": []
    }
  ],
  "externalDocs": {
    "description": "For more information about this service, see the docs.",
    "url": "https://cloud.ibm.com/docs/natural-language-understanding",
    "x-information-security": "https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-information-security",
    "x-release-notes": "https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-release-notes"
  },
  "x-doc-properties": [
    "hasCustomEndpoints",
    "publicDefinition"
  ],
  "tags": [
    {
      "name": "Analyze"
    },
    {
      "name": "Manage models"
    },
    {
      "name": "Manage sentiment models"
    },
    {
      "name": "Manage categories models"
    },
    {
      "name": "Manage classifications models"
    }
  ],
  "paths": {
    "/v1/analyze": {
      "parameters": [
        {
          "$ref": "#/components/parameters/version"
        }
      ],
      "get": {
        "operationId": "analyzeGet",
        "summary": "Analyze text (GET)",
        "description": "Analyzes raw text, HTML, or a public webpage.\n\nIf a language for the input text is not specified with the `language` parameter, the service [automatically detects the language](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-detectable-languages).",
        "x-ibm-change-notices": [
          {
            "version": "2022-04-07",
            "type": "breaking",
            "description": "The advanced rules feature is removed. As of 24 June 2021, you can no longer run advanced rules models for Natural Language Understanding.",
            "url": "https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-release-notes#5-may-2021"
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/text"
          },
          {
            "$ref": "#/components/parameters/html"
          },
          {
            "$ref": "#/components/parameters/url"
          },
          {
            "$ref": "#/components/parameters/features"
          },
          {
            "$ref": "#/components/parameters/return_analyzed_text"
          },
          {
            "$ref": "#/components/parameters/clean"
          },
          {
            "$ref": "#/components/parameters/xpath"
          },
          {
            "$ref": "#/components/parameters/fallback_to_raw"
          },
          {
            "$ref": "#/components/parameters/language"
          },
          {
            "$ref": "#/components/parameters/categories.explanation"
          },
          {
            "$ref": "#/components/parameters/categories.limit"
          },
          {
            "$ref": "#/components/parameters/categories.model"
          },
          {
            "$ref": "#/components/parameters/classifications.model"
          },
          {
            "$ref": "#/components/parameters/concepts.limit"
          },
          {
            "$ref": "#/components/parameters/emotion.document"
          },
          {
            "$ref": "#/components/parameters/emotion.targets"
          },
          {
            "$ref": "#/components/parameters/entities.limit"
          },
          {
            "$ref": "#/components/parameters/entities.mentions"
          },
          {
            "$ref": "#/components/parameters/entities.model"
          },
          {
            "$ref": "#/components/parameters/entities.emotion"
          },
          {
            "$ref": "#/components/parameters/entities.sentiment"
          },
          {
            "$ref": "#/components/parameters/keywords.limit"
          },
          {
            "$ref": "#/components/parameters/keywords.emotion"
          },
          {
            "$ref": "#/components/parameters/keywords.sentiment"
          },
          {
            "$ref": "#/components/parameters/relations.model"
          },
          {
            "$ref": "#/components/parameters/semantic_roles.limit"
          },
          {
            "$ref": "#/components/parameters/semantic_roles.entities"
          },
          {
            "$ref": "#/components/parameters/semantic_roles.keywords"
          },
          {
            "$ref": "#/components/parameters/sentiment.document"
          },
          {
            "$ref": "#/components/parameters/sentiment.targets"
          },
          {
            "$ref": "#/components/parameters/syntax.tokens"
          },
          {
            "$ref": "#/components/parameters/syntax.tokens.lemma"
          },
          {
            "$ref": "#/components/parameters/syntax.tokens.part_of_speech"
          },
          {
            "$ref": "#/components/parameters/syntax.sentences"
          },
          {
            "$ref": "#/components/parameters/limit_text_characters"
          }
        ],
        "tags": [
          "Analyze"
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/AnalyzeGetResponse"
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "source": [
                      "curl -u \"apikey:{apikey}\" \\\n",
                      "  \"{url}/v1/analyze}?version=2022-04-07&url=www.ibm.com&features=keywords,entities&entities.emotion=true&entities.sentiment=true&keywords.emotion=true&keywords.sentiment=true\""
                    ]
                  }
                ]
              }
            ]
          }
        },
        "x-sdk-exclude": true
      },
      "post": {
        "operationId": "analyze",
        "tags": [
          "Analyze"
        ],
        "summary": "Analyze text",
        "description": "Analyzes text, HTML, or a public webpage for the following features:\n- Categories\n- Classifications\n- Concepts\n- Emotion\n- Entities\n- Keywords\n- Metadata\n- Relations\n- Semantic roles\n- Sentiment\n- Syntax\n- Summarization (Experimental)\n\nIf a language for the input text is not specified with the `language` parameter, the service [automatically detects the language](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-detectable-languages).",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Parameters"
              }
            }
          },
          "description": "An object containing request parameters. The `features` object and one of the `text`, `html`, or `url` attributes are required.",
          "required": true
        },
        "x-codegen-request-body-name": "parameters",
        "responses": {
          "200": {
            "$ref": "#/components/responses/AnalyzeResponse"
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "source": [
                      "curl -X POST -u \"apikey:{apikey}\" -H \"Content-Type: application/json\" -d @parameters.json \"{url}/v1/analyze?version=2022-04-07\""
                    ]
                  }
                ]
              },
              {
                "name": "Example parameters",
                "example": [
                  {
                    "type": "code",
                    "source": [
                      "{\n",
                      "  \"text\": \"IBM is an American multinational technology company headquartered in Armonk, New York, United States, with operations in over 170 countries.\",\n",
                      "  \"features\": {\n",
                      "    \"entities\": {\n",
                      "      \"emotion\": true,\n",
                      "      \"sentiment\": true,\n",
                      "      \"limit\": 2\n",
                      "    },\n",
                      "    \"keywords\": {\n",
                      "      \"emotion\": true,\n",
                      "      \"sentiment\": true,\n",
                      "      \"limit\": 2\n",
                      "    }\n",
                      "  }\n",
                      "}"
                    ]
                  }
                ]
              }
            ],
            "dotnet-standard": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "source": [
                      "IamAuthenticator authenticator = new IamAuthenticator(\n",
                      "    apikey: \"{apikey}\"\n",
                      "    );\n",
                      "\n",
                      "NaturalLanguageUnderstandingService naturalLanguageUnderstanding = new NaturalLanguageUnderstandingService(\"2022-04-07\", authenticator);\n",
                      "naturalLanguageUnderstanding.SetServiceUrl(\"{url}\");\n",
                      "\n",
                      "var features = new Features()\n",
                      "{\n",
                      "    Keywords = new KeywordsOptions()\n",
                      "    {\n",
                      "        Limit = 2,\n",
                      "        Sentiment = true,\n",
                      "        Emotion = true\n",
                      "    },\n",
                      "    Entities = new EntitiesOptions()\n",
                      "    {\n",
                      "        Sentiment = true,\n",
                      "        Limit = 2\n",
                      "    }\n",
                      "};\n",
                      "\n",
                      "var result = naturalLanguageUnderstanding.Analyze(\n",
                      "    features: features,\n",
                      "    text: \"IBM is an American multinational technology company headquartered in Armonk, New York, United States, with operations in over 170 countries.\"\n",
                      "    );\n",
                      "\n",
                      "Console.WriteLine(result.Response);"
                    ]
                  }
                ]
              }
            ],
            "java": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "source": [
                      "IamAuthenticator authenticator = new IamAuthenticator(\"{apikey}\");\n",
                      "NaturalLanguageUnderstanding naturalLanguageUnderstanding = new NaturalLanguageUnderstanding(\n",
                      "  \"2022-04-07\", authenticator);\n",
                      "naturalLanguageUnderstanding.setServiceUrl(\"{url}\");\n",
                      "\n",
                      "String text = \"IBM is an American multinational technology \" +\n",
                      "  \"company headquartered in Armonk, New York, \" +\n",
                      "  \"United States, with operations in over 170 countries.\";\n",
                      "\n",
                      "EntitiesOptions entitiesOptions = new EntitiesOptions.Builder()\n",
                      "  .emotion(true)\n",
                      "  .sentiment(true)\n",
                      "  .limit(2)\n",
                      "  .build();\n",
                      "\n",
                      "KeywordsOptions keywordsOptions = new KeywordsOptions.Builder()\n",
                      "  .emotion(true)\n",
                      "  .sentiment(true)\n",
                      "  .limit(2)\n",
                      "  .build();\n",
                      "\n",
                      "Features features = new Features.Builder()\n",
                      "  .entities(entitiesOptions)\n",
                      "  .keywords(keywordsOptions)\n",
                      "  .build();\n",
                      "\n",
                      "AnalyzeOptions parameters = new AnalyzeOptions.Builder()\n",
                      "  .text(text)\n",
                      "  .features(features)\n",
                      "  .build();\n",
                      "\n",
                      "AnalysisResults response = naturalLanguageUnderstanding\n",
                      "  .analyze(parameters)\n",
                      "  .execute()\n",
                      "  .getResult();\n",
                      "System.out.println(response);"
                    ]
                  }
                ]
              }
            ],
            "node": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "source": [
                      "const NaturalLanguageUnderstandingV1 = require('ibm-watson/natural-language-understanding/v1');\n",
                      "const { IamAuthenticator } = require('ibm-watson/auth');\n",
                      "\n",
                      "const naturalLanguageUnderstanding = new NaturalLanguageUnderstandingV1({\n",
                      "  version: '2022-04-07',\n",
                      "  authenticator: new IamAuthenticator({\n",
                      "    apikey: '{apikey}',\n",
                      "  }),\n",
                      "  serviceUrl: '{url}',\n",
                      "});\n",
                      "\n",
                      "const analyzeParams = {\n",
                      "  'url': 'www.ibm.com',\n",
                      "  'features': {\n",
                      "    'entities': {\n",
                      "      'emotion': true,\n",
                      "      'sentiment': true,\n",
                      "      'limit': 2,\n",
                      "    },\n",
                      "    'keywords': {\n",
                      "      'emotion': true,\n",
                      "      'sentiment': true,\n",
                      "      'limit': 2,\n",
                      "    },\n",
                      "  },\n",
                      "};\n",
                      "\n",
                      "naturalLanguageUnderstanding.analyze(analyzeParams)\n",
                      "  .then(analysisResults => {\n",
                      "    console.log(JSON.stringify(analysisResults, null, 2));\n",
                      "  })\n",
                      "  .catch(err => {\n",
                      "    console.log('error:', err);\n",
                      "  });"
                    ]
                  }
                ]
              }
            ],
            "python": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "source": [
                      "import json\n",
                      "from ibm_watson import NaturalLanguageUnderstandingV1\n",
                      "from ibm_cloud_sdk_core.authenticators import IAMAuthenticator\n",
                      "from ibm_watson.natural_language_understanding_v1 \\ \n",
                      "    import Features, EntitiesOptions, KeywordsOptions\n",
                      "\n",
                      "authenticator = IAMAuthenticator('{apikey}')\n",
                      "natural_language_understanding = NaturalLanguageUnderstandingV1(\n",
                      "    version='2022-04-07',\n",
                      "    authenticator=authenticator)\n",
                      "\n",
                      "natural_language_understanding.set_service_url('{url}')\n",
                      "\n",
                      "response = natural_language_understanding.analyze(\n",
                      "    text='IBM is an American multinational technology company '\n",
                      "    'headquartered in Armonk, New York, United States, '\n",
                      "    'with operations in over 170 countries.',\n",
                      "    features=Features(\n",
                      "        entities=EntitiesOptions(emotion=True, sentiment=True, limit=2),\n",
                      "        keywords=KeywordsOptions(emotion=True, sentiment=True,\n",
                      "                                 limit=2))).get_result()\n",
                      "\n",
                      "print(json.dumps(response, indent=2))"
                    ]
                  }
                ]
              }
            ]
          }
        }
      }
    },
    "/v1/models": {
      "get": {
        "operationId": "listModels",
        "tags": [
          "Manage models"
        ],
        "summary": "List models",
        "description": "Lists Watson Knowledge Studio [custom entities and relations models](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-customizing) that are deployed to your Natural Language Understanding service.",
        "parameters": [
          {
            "$ref": "#/components/parameters/version"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/ListModelsResponse"
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "source": [
                      "curl -u \"apikey:{apikey}\" \"{url}/v1/models?version=2022-04-07\""
                    ]
                  }
                ]
              }
            ],
            "dotnet-standard": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "source": [
                      "IamAuthenticator authenticator = new IamAuthenticator(\n",
                      "    apikey: \"{apikey}\"\n",
                      "    );\n",
                      "\n",
                      "NaturalLanguageUnderstandingService naturalLanguageUnderstanding = new NaturalLanguageUnderstandingService(\"2022-04-07\", authenticator);\n",
                      "naturalLanguageUnderstanding.SetServiceUrl(\"{url}\");\n",
                      "\n",
                      "var result = naturalLanguageUnderstanding.ListModels();\n",
                      "\n",
                      "Console.WriteLine(result.Response);"
                    ]
                  }
                ]
              }
            ],
            "java": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "source": [
                      "IamAuthenticator authenticator = new IamAuthenticator(\"{apikey}\");\n",
                      "NaturalLanguageUnderstanding naturalLanguageUnderstanding = new NaturalLanguageUnderstanding(\n",
                      "  \"2022-04-07\", authenticator);\n",
                      "naturalLanguageUnderstanding.setServiceUrl(\"{url}\");\n",
                      "\n",
                      "ListModelsResults models = naturalLanguageUnderstanding\n",
                      "  .listModels()\n",
                      "  .execute()\n",
                      "  .getResult();\n",
                      "System.out.println(models);"
                    ]
                  }
                ]
              }
            ],
            "node": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "source": [
                      "const NaturalLanguageUnderstandingV1 = require('ibm-watson/natural-language-understanding/v1');\n",
                      "const { IamAuthenticator } = require('ibm-watson/auth');\n",
                      "\n",
                      "const naturalLanguageUnderstanding = new NaturalLanguageUnderstandingV1({\n",
                      "  version: '2022-04-07',\n",
                      "  authenticator: new IamAuthenticator({\n",
                      "    apikey: '{apikey}',\n",
                      "  }),\n",
                      "  serviceUrl: '{url}',\n",
                      "});\n",
                      "\n",
                      "naturalLanguageUnderstanding.listModels()\n",
                      "  .then(listModelsResults => {\n",
                      "    console.log(JSON.stringify(listModelsResults, null, 2));\n",
                      "  })\n",
                      "  .catch(err => {\n",
                      "    console.log('error:', err);\n",
                      "  });"
                    ]
                  }
                ]
              }
            ],
            "python": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "source": [
                      "import json\n",
                      "from ibm_watson import NaturalLanguageUnderstandingV1\n",
                      "from ibm_cloud_sdk_core.authenticators import IAMAuthenticator\n",
                      "\n",
                      "authenticator = IAMAuthenticator('{apikey}')\n",
                      "natural_language_understanding = NaturalLanguageUnderstandingV1(\n",
                      "    version='2022-04-07',\n",
                      "    authenticator=authenticator)\n",
                      "\n",
                      "natural_language_understanding.set_service_url('{url}')\n",
                      "\n",
                      "response = natural_language_understanding.list_models().get_result()\n",
                      "\n",
                      "print(json.dumps(response, indent=2))"
                    ]
                  }
                ]
              }
            ]
          }
        }
      }
    },
    "/v1/models/{model_id}": {
      "delete": {
        "operationId": "deleteModel",
        "tags": [
          "Manage models"
        ],
        "summary": "Delete model",
        "description": "Deletes a custom model",
        "parameters": [
          {
            "$ref": "#/components/parameters/version"
          },
          {
            "name": "model_id",
            "description": "Model ID of the model to delete",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/DeleteModelResponse"
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "source": [
                      "curl -X DELETE -u \"apikey:{apikey}\" \"{url}/v1/models/{model_id}?version=2022-04-07\""
                    ]
                  }
                ]
              }
            ],
            "dotnet-standard": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "source": [
                      "IamAuthenticator authenticator = new IamAuthenticator(\n",
                      "    apikey: \"{apikey}\"\n",
                      "    );\n",
                      "\n",
                      "NaturalLanguageUnderstandingService naturalLanguageUnderstanding = new NaturalLanguageUnderstandingService(\"2022-04-07\", authenticator);\n",
                      "naturalLanguageUnderstanding.SetServiceUrl(\"{url}\");\n",
                      "\n",
                      "var result = naturalLanguageUnderstanding.DeleteModel(\n",
                      "    modelId: \"model_id\"\n",
                      "    );\n",
                      "\n",
                      "Console.WriteLine(result.Response);"
                    ]
                  }
                ]
              }
            ],
            "java": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "source": [
                      "IamAuthenticator authenticator = new IamAuthenticator(\"{apikey}\");\n",
                      "NaturalLanguageUnderstanding naturalLanguageUnderstanding = new NaturalLanguageUnderstanding(\n",
                      "  \"2022-04-07\", authenticator);\n",
                      "naturalLanguageUnderstanding.setServiceUrl(\"{url}\");\n",
                      "\n",
                      "DeleteModelOptions options = new DeleteModelOptions.Builder().modelId(\"model_id\").build();\n",
                      "naturalLanguageUnderstanding.deleteModel(options).execute();"
                    ]
                  }
                ]
              }
            ],
            "node": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "source": [
                      "const NaturalLanguageUnderstandingV1 = require('ibm-watson/natural-language-understanding/v1');\n",
                      "const { IamAuthenticator } = require('ibm-watson/auth');\n",
                      "\n",
                      "const naturalLanguageUnderstanding = new NaturalLanguageUnderstandingV1({\n",
                      "  version: '2022-04-07',\n",
                      "  authenticator: new IamAuthenticator({\n",
                      "    apikey: '{apikey}',\n",
                      "  }),\n",
                      "  serviceUrl: '{url}',\n",
                      "});\n",
                      "\n",
                      "const deleteModelParams = {\n",
                      "  'modelId': '{model-id}',\n",
                      "};\n",
                      "\n",
                      "naturalLanguageUnderstanding.deleteModel(deleteModelParams)\n",
                      "  .then(deleteModelResults => {\n",
                      "    console.log(JSON.stringify(deleteModelResults, null, 2));\n",
                      "  })\n",
                      "  .catch(err => {\n",
                      "    console.log('error:', err);\n",
                      "  });"
                    ]
                  }
                ]
              }
            ],
            "python": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "source": [
                      "import json\n",
                      "from ibm_watson import NaturalLanguageUnderstandingV1\n",
                      "from ibm_cloud_sdk_core.authenticators import IAMAuthenticator\n",
                      "\n",
                      "authenticator = IAMAuthenticator('{apikey}')\n",
                      "natural_language_understanding = NaturalLanguageUnderstandingV1(\n",
                      "    version='2022-04-07',\n",
                      "    authenticator=authenticator)\n",
                      "\n",
                      "natural_language_understanding.set_service_url('{url}')\n",
                      "\n",
                      "response = natural_language_understanding.delete_model(\n",
                      "    model_id='model_id').get_result()\n",
                      "\n",
                      "print(json.dumps(response, indent=2))"
                    ]
                  }
                ]
              }
            ]
          }
        }
      }
    },
    "/v1/models/categories": {
      "parameters": [
        {
          "$ref": "#/components/parameters/version"
        }
      ],
      "post": {
        "tags": [
          "Manage categories models"
        ],
        "summary": "Create categories model",
        "description": "(Beta) Creates a custom categories model by uploading training data and associated metadata. The model begins the training and deploying process and is ready to use when the `status` is `available`.",
        "operationId": "createCategoriesModel",
        "responses": {
          "201": {
            "description": "Model created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CategoriesModel"
                },
                "examples": {
                  "response": {
                    "value": {
                      "name": "MyCategoriesModel",
                      "language": "en",
                      "model_version": "1.0.1",
                      "status": "training",
                      "notices": [],
                      "model_id": "cb3755ad-d226-4587-b956-43a4a7202202",
                      "features": [
                        "categories"
                      ],
                      "created": "2020-04-10T19:32:42Z",
                      "last_trained": "2020-04-10T19:32:42Z",
                      "last_deployed": "2020-04-10T19:32:42Z"
                    }
                  }
                }
              }
            },
            "links": {
              "getCategoriesModel": {
                "operationId": "getCategoriesModel",
                "parameters": {
                  "model_id": "$response.body#/model_id"
                }
              },
              "updateCategoriesModel": {
                "operationId": "updateCategoriesModel",
                "parameters": {
                  "model_id": "$response.body#/model_id"
                }
              },
              "deleteCategoriesModel": {
                "operationId": "deleteCategoriesModel",
                "parameters": {
                  "model_id": "$response.body#/model_id"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Access forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/CategoriesModelFileAndMetadata"
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "source": [
                      "curl -X POST -u \"apikey:{apikey}\" \\\n",
                      "-H \"Content-Type: multipart/form-data\" \\\n",
                      "-F \"training_data=@categories_data.json;type=application/json\" \\\n",
                      "-F \"language=en\" \\\n",
                      "-F \"name=MyCategoriesModel\" \\\n",
                      "-F \"model_version=1.0.1\" \\\n",
                      "\"{url}/v1/models/categories?version=2022-04-07\""
                    ]
                  }
                ]
              }
            ],
            "dotnet-standard": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "source": [
                      "IamAuthenticator authenticator = new IamAuthenticator(\n",
                      "    apikey: \"{apikey}\"\n",
                      "    );\n",
                      "\n",
                      "NaturalLanguageUnderstandingService naturalLanguageUnderstanding = new NaturalLanguageUnderstandingService(\"2022-04-07\", authenticator);\n",
                      "naturalLanguageUnderstanding.SetServiceUrl(\"{url}\");\n",
                      "\n",
                      "var result = naturalLanguageUnderstanding.CreateCategoriesModel(\n",
                      "    language: \"en\",\n",
                      "    trainingData: new MemoryStream(File.ReadAllBytes(\"trainingData.json\")),\n",
                      "    trainingDataContentType: NaturalLanguageUnderstandingService.CreateCategoriesModelEnums.TrainingDataContentTypeValue.APPLICATION_JSON,\n",
                      "    name: \"MyCategoriesModel\",\n",
                      "    modelVersion: \"1.0.1\"\n",
                      "    );\n",
                      "\n",
                      "Console.WriteLine(result.Response);"
                    ]
                  }
                ]
              }
            ],
            "java": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "source": [
                      "IamAuthenticator authenticator = new IamAuthenticator(\"{apikey}\");\n",
                      "NaturalLanguageUnderstanding naturalLanguageUnderstanding = new NaturalLanguageUnderstanding(\n",
                      "  \"2022-04-07\", authenticator);\n",
                      "naturalLanguageUnderstanding.setServiceUrl(\"{url}\");\n",
                      "\n",
                      "try {\n",
                      "  CreateCategoriesModelOptions createCategoriesModelOptions = new CreateCategoriesModelOptions.Builder()\n",
                      "    .language(\"en\")\n",
                      "    .trainingData(new FileInputStream(\"trainingData.json\"))\n",
                      "    .trainingDataContentType(\"application/json\")\n",
                      "    .name(\"testString\")\n",
                      "    .description(\"testString\")\n",
                      "    .modelVersion(\"testString\")\n",
                      "    .versionDescription(\"testString\")\n",
                      "    .build();\n",
                      "\n",
                      "  CategoriesModel response = naturalLanguageUnderstanding.createCategoriesModel(createCategoriesModelOptions).execute().getResult();\n",
                      "\n",
                      "  System.out.println(response);\n",
                      "} catch (FileNotFoundException e) {\n",
                      "  e.printStackTrace();\n",
                      "}"
                    ]
                  }
                ]
              }
            ],
            "node": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "source": [
                      "const fs = require('fs');\n",
                      "const NaturalLanguageUnderstandingV1 = require('ibm-watson/natural-language-understanding/v1');\n",
                      "const { IamAuthenticator } = require('ibm-watson/auth');\n",
                      "\n",
                      "const naturalLanguageUnderstanding = new NaturalLanguageUnderstandingV1({\n",
                      "  version: '2022-04-07',\n",
                      "  authenticator: new IamAuthenticator({\n",
                      "    apikey: '{apikey}',\n",
                      "  }),\n",
                      "  serviceUrl: '{url}',\n",
                      "});\n",
                      "\n",
                      "const createCategoriesModelParams = {\n",
                      "  language: 'en',\n",
                      "  trainingData: fs.createReadStream('./categories_data.json'),\n",
                      "  name: 'MyCategoriesModel',\n",
                      "  modelVersion: '1.0.1'\n",
                      "};\n",
                      "\n",
                      "naturalLanguageUnderstanding.createCategoriesModel(createCategoriesModelParams)\n",
                      "  .then(createCategoriesModelResults => {\n",
                      "    console.log(JSON.stringify(createCategoriesModelResults, null, 2));\n",
                      "  })\n",
                      "  .catch(err => {\n",
                      "    console.log('error:', err);\n",
                      "  });"
                    ]
                  }
                ]
              }
            ],
            "python": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "source": [
                      "from os.path import join, dirname\n",
                      "from ibm_watson import NaturalLanguageUnderstandingV1\n",
                      "from ibm_cloud_sdk_core.authenticators import IAMAuthenticator\n",
                      "\n",
                      "authenticator = IAMAuthenticator('{apikey}')\n",
                      "natural_language_understanding = NaturalLanguageUnderstandingV1(\n",
                      "    version='2022-04-07',\n",
                      "    authenticator=authenticator\n",
                      ")\n",
                      "\n",
                      "natural_language_understanding.set_service_url('{url}')\n",
                      "\n",
                      "with open(join(dirname(__file__), './.', 'categories_data.json'),\n",
                      "               'rb') as file:\n",
                      "    model=natural_language_understanding.create_categories_model(\n",
                      "        language='en',\n",
                      "        training_data=file\n",
                      "        name='MyCategoriesModel',\n",
                      "        model_version='1.0.1',\n",
                      "    ).get_result()\n",
                      "    print(json.dumps(model, indent=2))"
                    ]
                  }
                ]
              }
            ]
          }
        }
      },
      "get": {
        "tags": [
          "Manage categories models"
        ],
        "summary": "List categories models",
        "description": "(Beta) Returns all custom categories models associated with this service instance.",
        "operationId": "listCategoriesModels",
        "responses": {
          "200": {
            "description": "Models retrieved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CategoriesModelList"
                },
                "examples": {
                  "response": {
                    "value": {
                      "models": [
                        {
                          "name": "MyCategoriesModel",
                          "language": "en",
                          "model_version": "1.0.1",
                          "status": "available",
                          "notices": [],
                          "model_id": "cb3755ad-d226-4587-b956-43a4a7202202",
                          "features": [
                            "categories"
                          ],
                          "created": "2020-04-10T19:32:42Z",
                          "last_trained": "2020-04-10T19:32:42Z",
                          "last_deployed": "2020-04-10T19:32:42Z"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Access forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "source": [
                      "curl -u \"apikey:{apikey}\" \\\n",
                      "\"{url}/v1/models/categories?version=2022-04-07\""
                    ]
                  }
                ]
              }
            ],
            "dotnet-standard": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "source": [
                      "IamAuthenticator authenticator = new IamAuthenticator(\n",
                      "    apikey: \"{apikey}\"\n",
                      "    );\n",
                      "\n",
                      "NaturalLanguageUnderstandingService naturalLanguageUnderstanding = new NaturalLanguageUnderstandingService(\"2022-04-07\", authenticator);\n",
                      "naturalLanguageUnderstanding.SetServiceUrl(\"{url}\");\n",
                      "\n",
                      "var result = naturalLanguageUnderstanding.ListCategoriesModels();\n",
                      "\n",
                      "Console.WriteLine(result.Response);"
                    ]
                  }
                ]
              }
            ],
            "java": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "source": [
                      "IamAuthenticator authenticator = new IamAuthenticator(\"{apikey}\");\n",
                      "NaturalLanguageUnderstanding naturalLanguageUnderstanding = new NaturalLanguageUnderstanding(\n",
                      "  \"2022-04-07\", authenticator);\n",
                      "naturalLanguageUnderstanding.setServiceUrl(\"{url}\");\n",
                      "\n",
                      "CategoriesModelList response = naturalLanguageUnderstanding.listCategoriesModels().execute().getResult();\n",
                      "\n",
                      "System.out.println(response);"
                    ]
                  }
                ]
              }
            ],
            "node": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "source": [
                      "const NaturalLanguageUnderstandingV1 = require('ibm-watson/natural-language-understanding/v1');\n",
                      "const { IamAuthenticator } = require('ibm-watson/auth');\n",
                      "\n",
                      "const naturalLanguageUnderstanding = new NaturalLanguageUnderstandingV1({\n",
                      "  version: '2022-04-07',\n",
                      "  authenticator: new IamAuthenticator({\n",
                      "    apikey: '{apikey}',\n",
                      "  }),\n",
                      "  serviceUrl: '{url}',\n",
                      "});\n",
                      "\n",
                      "naturalLanguageUnderstanding.listCategoriesModels()\n",
                      "  .then(listCategoriesModelsResults => {\n",
                      "    console.log(JSON.stringify(listCategoriesModelsResults, null, 2));\n",
                      "  })\n",
                      "  .catch(err => {\n",
                      "    console.log('error:', err);\n",
                      "  });"
                    ]
                  }
                ]
              }
            ],
            "python": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "source": [
                      "import json\n",
                      "from ibm_watson import NaturalLanguageUnderstandingV1\n",
                      "from ibm_cloud_sdk_core.authenticators import IAMAuthenticator\n",
                      "\n",
                      "authenticator = IAMAuthenticator('{apikey}')\n",
                      "natural_language_understanding = NaturalLanguageUnderstandingV1(\n",
                      "    version='2022-04-07',\n",
                      "    authenticator=authenticator)\n",
                      "\n",
                      "natural_language_understanding.set_service_url('{url}')\n",
                      "\n",
                      "models = natural_language_understanding.list_categories_models().get_result()\n",
                      "\n",
                      "print(json.dumps(models, indent=2))"
                    ]
                  }
                ]
              }
            ]
          }
        }
      }
    },
    "/v1/models/categories/{model_id}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/version"
        },
        {
          "$ref": "#/components/parameters/model_id"
        }
      ],
      "get": {
        "tags": [
          "Manage categories models"
        ],
        "summary": "Get categories model details",
        "description": "(Beta) Returns the status of the categories model with the given model ID.",
        "operationId": "getCategoriesModel",
        "responses": {
          "200": {
            "description": "Model retrieved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CategoriesModel"
                },
                "examples": {
                  "response": {
                    "value": {
                      "name": "MyCategoriesModel",
                      "language": "en",
                      "model_version": "1.0.1",
                      "status": "available",
                      "notices": [],
                      "model_id": "cb3755ad-d226-4587-b956-43a4a7202202",
                      "features": [
                        "categories"
                      ],
                      "created": "2020-04-10T19:32:42Z",
                      "last_trained": "2020-04-10T19:32:42Z",
                      "last_deployed": "2020-04-10T19:32:42Z"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Access forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "source": [
                      "curl -u \"apikey:{apikey}\" \\\n",
                      "\"{url}/v1/models/categories/{model_id}?version=2022-04-07\""
                    ]
                  }
                ]
              }
            ],
            "dotnet-standard": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "source": [
                      "IamAuthenticator authenticator = new IamAuthenticator(\n",
                      "    apikey: \"{apikey}\"\n",
                      "    );\n",
                      "\n",
                      "NaturalLanguageUnderstandingService naturalLanguageUnderstanding = new NaturalLanguageUnderstandingService(\"2022-04-07\", authenticator);\n",
                      "naturalLanguageUnderstanding.SetServiceUrl(\"{url}\");\n",
                      "\n",
                      "var result = naturalLanguageUnderstanding.GetCategoriesModel(\n",
                      "    modelId: \"{modelId}\"\n",
                      "    );\n",
                      "\n",
                      "Console.WriteLine(result.Response);"
                    ]
                  }
                ]
              }
            ],
            "java": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "source": [
                      "IamAuthenticator authenticator = new IamAuthenticator(\"{apikey}\");\n",
                      "NaturalLanguageUnderstanding naturalLanguageUnderstanding = new NaturalLanguageUnderstanding(\n",
                      "  \"2022-04-07\", authenticator);\n",
                      "naturalLanguageUnderstanding.setServiceUrl(\"{url}\");\n",
                      "\n",
                      "GetCategoriesModelOptions getCategoriesModelOptions = new GetCategoriesModelOptions.Builder()\n",
                      "  .modelId(\"{modelId}\")\n",
                      "  .build();\n",
                      "\n",
                      "CategoriesModel response = naturalLanguageUnderstanding.getCategoriesModel(getCategoriesModelOptions).execute().getResult();\n",
                      "\n",
                      "System.out.println(response);"
                    ]
                  }
                ]
              }
            ],
            "node": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "source": [
                      "const NaturalLanguageUnderstandingV1 = require('ibm-watson/natural-language-understanding/v1');\n",
                      "const { IamAuthenticator } = require('ibm-watson/auth');\n",
                      "\n",
                      "const naturalLanguageUnderstanding = new NaturalLanguageUnderstandingV1({\n",
                      "  version: '2022-04-07',\n",
                      "  authenticator: new IamAuthenticator({\n",
                      "    apikey: '{apikey}',\n",
                      "  }),\n",
                      "  serviceUrl: '{url}',\n",
                      "});\n",
                      "\n",
                      "const getCategoriesModelParams = {\n",
                      "  modelId: '{model_id}',\n",
                      "};\n",
                      "\n",
                      "naturalLanguageUnderstanding.getCategoriesModel(getCategoriesModelParams)\n",
                      "  .then(getCategoriesModelResults => {\n",
                      "    console.log(JSON.stringify(getCategoriesModelResults, null, 2));\n",
                      "  })\n",
                      "  .catch(err => {\n",
                      "    console.log('error:', err);\n",
                      "  });"
                    ]
                  }
                ]
              }
            ],
            "python": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "source": [
                      "import json\n",
                      "from ibm_watson import NaturalLanguageUnderstandingV1\n",
                      "from ibm_cloud_sdk_core.authenticators import IAMAuthenticator\n",
                      "\n",
                      "authenticator = IAMAuthenticator('{apikey}')\n",
                      "natural_language_understanding = NaturalLanguageUnderstandingV1(\n",
                      "    version='2022-04-07',\n",
                      "    authenticator=authenticator)\n",
                      "\n",
                      "natural_language_understanding.set_service_url('{url}')\n",
                      "\n",
                      "model = natural_language_understanding.get_categories_model(\n",
                      "  model_id='{model_id}',\n",
                      ").get_result()\n",
                      "\n",
                      "\n",
                      "print(json.dumps(model, indent=2))"
                    ]
                  }
                ]
              }
            ]
          }
        }
      },
      "put": {
        "tags": [
          "Manage categories models"
        ],
        "summary": "Update categories model",
        "description": "(Beta) Overwrites the training data associated with this custom categories model and retrains the model. The new model replaces the current deployment.",
        "operationId": "updateCategoriesModel",
        "responses": {
          "200": {
            "description": "Model overwrite successful",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CategoriesModel"
                },
                "examples": {
                  "response": {
                    "value": {
                      "models": [
                        {
                          "name": "MyCategoriesModel",
                          "language": "en",
                          "model_version": "1.0.1",
                          "status": "deploying",
                          "notices": [],
                          "model_id": "cb3755ad-d226-4587-b956-43a4a7202202",
                          "features": [
                            "categories"
                          ],
                          "created": "2020-04-10T20:21:46Z",
                          "last_trained": "2020-04-10T20:21:46Z",
                          "last_deployed": "2020-04-10T20:21:46Z"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Access forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/CategoriesModelFileAndMetadata"
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "source": [
                      "curl -X PUT -u \"apikey:{apikey}\" \\\n",
                      "-H \"Content-Type: multipart/form-data\" \\\n",
                      "-F \"training_data=@categories_model.json;type=application/json\" \\\n",
                      "-F \"language=en\" \\\n",
                      "-F \"name=MyCategoriesModel\" \\\n",
                      "-F \"description=My updated categories model\" \\\n",
                      "-F \"model_version=1.0.1\" \\\n",
                      "-F \"version_description=Updated version\" \\\n",
                      "\"{url}/v1/models/categories/{model_id}?version=2022-04-07\""
                    ]
                  }
                ]
              }
            ],
            "dotnet-standard": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "source": [
                      "IamAuthenticator authenticator = new IamAuthenticator(\n",
                      "    apikey: \"{apikey}\"\n",
                      "    );\n",
                      "\n",
                      "NaturalLanguageUnderstandingService naturalLanguageUnderstanding = new NaturalLanguageUnderstandingService(\"2022-04-07\", authenticator);\n",
                      "naturalLanguageUnderstanding.SetServiceUrl(\"{url}\");\n",
                      "\n",
                      "var result = naturalLanguageUnderstanding.UpdateCategoriesModel(\n",
                      "    modelId: \"{modelId}\",\n",
                      "    trainingData: new MemoryStream(File.ReadAllBytes(\"trainingData.json\")),\n",
                      "    language: \"en\",\n",
                      "    name: \"MyCategoriesModel\",\n",
                      "    description: \"My updated categories model\",\n",
                      "    modelVersion: \"1.0.1\",\n",
                      "    versionDescription: \"Updated version\"\n",
                      "    );\n",
                      "\n",
                      "Console.WriteLine(result.Response);"
                    ]
                  }
                ]
              }
            ],
            "java": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "source": [
                      "IamAuthenticator authenticator = new IamAuthenticator(\"{apikey}\");\n",
                      "NaturalLanguageUnderstanding naturalLanguageUnderstanding = new NaturalLanguageUnderstanding(\n",
                      "  \"2022-04-07\", authenticator);\n",
                      "naturalLanguageUnderstanding.setServiceUrl(\"{url}\");\n",
                      "\n",
                      "try {\n",
                      "  UpdateCategoriesModelOptions updateCategoriesModelOptions = new UpdateCategoriesModelOptions.Builder()\n",
                      "    .language(\"en\")\n",
                      "    .trainingData(new FileInputStream(\"trainingData.json\"))\n",
                      "    .trainingDataContentType(\"application/json\")\n",
                      "    .name(\"newName\")\n",
                      "    .description(\"newDescription\")\n",
                      "    .modelVersion(\"testString\")\n",
                      "    .versionDescription(\"testString\")\n",
                      "    .modelId(\"{modelId}\")\n",
                      "    .build();\n",
                      "\n",
                      "  CategoriesModel response = naturalLanguageUnderstanding.updateCategoriesModel(updateCategoriesModelOptions).execute().getResult();\n",
                      "\n",
                      "  System.out.println(response);\n",
                      "} catch (FileNotFoundException e) {\n",
                      "  e.printStackTrace();\n",
                      "}"
                    ]
                  }
                ]
              }
            ],
            "node": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "source": [
                      "const fs = require('fs');\n",
                      "const NaturalLanguageUnderstandingV1 = require('ibm-watson/natural-language-understanding/v1');\n",
                      "const { IamAuthenticator } = require('ibm-watson/auth');\n",
                      "\n",
                      "const naturalLanguageUnderstanding = new NaturalLanguageUnderstandingV1({\n",
                      "  version: '2022-04-07',\n",
                      "  authenticator: new IamAuthenticator({\n",
                      "    apikey: '{apikey}',\n",
                      "  }),\n",
                      "  serviceUrl: '{url}',\n",
                      "});\n",
                      "\n",
                      "const updateCategoriesModelParams = {\n",
                      "  language: 'en',\n",
                      "  trainingData: fs.createReadStream('./categories_model.json'),\n",
                      "  name: 'MyCategoriesModel',\n",
                      "  description: 'My updated categories model',\n",
                      "  modelVersion: '1.0.1',\n",
                      "  versionDescription: 'Updated version',\n",
                      "  modelId: '{model_id}'\n",
                      "};\n",
                      "\n",
                      "naturalLanguageUnderstanding.updateCategoriesModel(updateCategoriesModelParams)\n",
                      "  .then(updateCategoriesModelResults => {\n",
                      "    console.log(JSON.stringify(updateCategoriesModelResults, null, 2));\n",
                      "  })\n",
                      "  .catch(err => {\n",
                      "    console.log('error:', err);\n",
                      "  });"
                    ]
                  }
                ]
              }
            ],
            "python": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "source": [
                      "from os.path import join, dirname\n",
                      "from ibm_watson import NaturalLanguageUnderstandingV1\n",
                      "from ibm_cloud_sdk_core.authenticators import IAMAuthenticator\n",
                      "\n",
                      "authenticator = IAMAuthenticator('{apikey}')\n",
                      "natural_language_understanding = NaturalLanguageUnderstandingV1(\n",
                      "    version='2022-04-07',\n",
                      "    authenticator=authenticator\n",
                      ")\n",
                      "\n",
                      "natural_language_understanding.set_service_url('{url}')\n",
                      "\n",
                      "with open(join(dirname(__file__), './.', 'categories_model.json'),\n",
                      "               'rb') as file:\n",
                      "    model=natural_language_understanding.update_categories_model(\n",
                      "        language='en',\n",
                      "        training_data=file\n",
                      "        name='MyCategoriesModel',\n",
                      "        description='My updated categories model',\n",
                      "        model_version='1.0.1',\n",
                      "        version_description='Updated version',\n",
                      "        model_id='{model_id}'\n",
                      "    ).get_result()\n",
                      "    print(json.dumps(model, indent=2))"
                    ]
                  }
                ]
              }
            ]
          }
        }
      },
      "delete": {
        "tags": [
          "Manage categories models"
        ],
        "summary": "Delete categories model",
        "description": "(Beta) Un-deploys the custom categories model with the given model ID and deletes all associated customer data, including any training data or binary artifacts.",
        "operationId": "deleteCategoriesModel",
        "responses": {
          "200": {
            "$ref": "#/components/responses/DeleteModelResponse"
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Access forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "source": [
                      "curl -X DELETE -u \"apikey:{apikey}\" \\\n",
                      "\"{url}/v1/models/categories/{model_id}?version=2022-04-07\""
                    ]
                  }
                ]
              }
            ],
            "dotnet-standard": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "source": [
                      "IamAuthenticator authenticator = new IamAuthenticator(\n",
                      "    apikey: \"{apikey}\"\n",
                      "    );\n",
                      "\n",
                      "NaturalLanguageUnderstandingService naturalLanguageUnderstanding = new NaturalLanguageUnderstandingService(\"2022-04-07\", authenticator);\n",
                      "naturalLanguageUnderstanding.SetServiceUrl(\"{url}\");\n",
                      "\n",
                      "var result = naturalLanguageUnderstanding.DeleteCategoriesModel(\n",
                      "    modelId: \"{modelId}\"\n",
                      "    );\n",
                      "\n",
                      "Console.WriteLine(result.Response);"
                    ]
                  }
                ]
              }
            ],
            "java": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "source": [
                      "IamAuthenticator authenticator = new IamAuthenticator(\"{apikey}\");\n",
                      "NaturalLanguageUnderstanding naturalLanguageUnderstanding = new NaturalLanguageUnderstanding(\n",
                      "  \"2022-04-07\", authenticator);\n",
                      "naturalLanguageUnderstanding.setServiceUrl(\"{url}\");\n",
                      "\n",
                      "DeleteCategoriesModelOptions deleteCategoriesModelOptions = new DeleteCategoriesModelOptions.Builder()\n",
                      "  .modelId(\"{modelId}\")\n",
                      "  .build();\n",
                      "\n",
                      "DeleteModelResults response = naturalLanguageUnderstanding.deleteCategoriesModel(deleteCategoriesModelOptions).execute().getResult();\n",
                      " \n",
                      "System.out.println(response);"
                    ]
                  }
                ]
              }
            ],
            "node": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "source": [
                      "const NaturalLanguageUnderstandingV1 = require('ibm-watson/natural-language-understanding/v1');\n",
                      "const { IamAuthenticator } = require('ibm-watson/auth');\n",
                      "\n",
                      "const naturalLanguageUnderstanding = new NaturalLanguageUnderstandingV1({\n",
                      "  version: '2022-04-07',\n",
                      "  authenticator: new IamAuthenticator({\n",
                      "    apikey: '{apikey}',\n",
                      "  }),\n",
                      "  serviceUrl: '{url}',\n",
                      "});\n",
                      "\n",
                      "const deleteCategoriesModelParams = {\n",
                      "  modelId: '{model_id}',\n",
                      "};\n",
                      "\n",
                      "naturalLanguageUnderstanding.deleteCategoriesModel(deleteCategoriesModelParams)\n",
                      "  .then(deleteCategoriesModelResults => {\n",
                      "    console.log(JSON.stringify(deleteCategoriesModelResults, null, 2));\n",
                      "  })\n",
                      "  .catch(err => {\n",
                      "    console.log('error:', err);\n",
                      "  });"
                    ]
                  }
                ]
              }
            ],
            "python": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "source": [
                      "import json\n",
                      "from ibm_watson import NaturalLanguageUnderstandingV1\n",
                      "from ibm_cloud_sdk_core.authenticators import IAMAuthenticator\n",
                      "\n",
                      "authenticator = IAMAuthenticator('{apikey}')\n",
                      "natural_language_understanding = NaturalLanguageUnderstandingV1(\n",
                      "    version='2022-04-07',\n",
                      "    authenticator=authenticator)\n",
                      "\n",
                      "natural_language_understanding.set_service_url('{url}')\n",
                      "\n",
                      "model = natural_language_understanding.delete_categories_model(\n",
                      "  model_id='{model_id}',\n",
                      ").get_result()\n",
                      "\n",
                      "\n",
                      "print(json.dumps(model, indent=2))"
                    ]
                  }
                ]
              }
            ]
          }
        }
      }
    },
    "/v1/models/classifications": {
      "parameters": [
        {
          "$ref": "#/components/parameters/version"
        }
      ],
      "post": {
        "tags": [
          "Manage classifications models"
        ],
        "summary": "Create classifications model",
        "description": "Creates a custom classifications model by uploading training data and associated metadata. The model begins the training and deploying process and is ready to use when the `status` is `available`.",
        "operationId": "createClassificationsModel",
        "responses": {
          "201": {
            "description": "Model created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClassificationsModel"
                },
                "examples": {
                  "response": {
                    "value": {
                      "name": "MyClassificationsModel",
                      "language": "en",
                      "model_version": "1.0.1",
                      "status": "training",
                      "notices": [],
                      "model_id": "cb3755ad-d226-4587-b956-43a4a7202202",
                      "features": [
                        "classifications"
                      ],
                      "created": "2020-04-10T19:32:42Z",
                      "last_trained": "2020-04-10T19:32:42Z",
                      "last_deployed": "2020-04-10T19:32:42Z"
                    }
                  }
                }
              }
            },
            "links": {
              "getClassificationsModel": {
                "operationId": "getClassificationsModel",
                "parameters": {
                  "model_id": "$response.body#/model_id"
                }
              },
              "updateClassificationsModel": {
                "operationId": "updateClassificationsModel",
                "parameters": {
                  "model_id": "$response.body#/model_id"
                }
              },
              "deleteClassificationsModel": {
                "operationId": "deleteClassificationsModel",
                "parameters": {
                  "model_id": "$response.body#/model_id"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Access forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/ClassificationsModelFileMetadataAndTrainingParameters"
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "source": [
                      "curl -X POST -u \"apikey:{apikey}\" \\\n",
                      "-H \"Content-Type: multipart/form-data\" \\\n",
                      "-F \"training_data=@classifications_data.json;type=application/json\" \\\n",
                      "-F \"language=en\" \\\n",
                      "-F \"name=MyClassificationsModel\" \\\n",
                      "-F \"model_version=1.0.1\" \\\n",
                      "\"{url}/v1/models/classifications?version=2022-04-07\""
                    ]
                  }
                ]
              }
            ],
            "dotnet-standard": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "source": [
                      "IamAuthenticator authenticator = new IamAuthenticator(\n",
                      "    apikey: \"{apikey}\"\n",
                      "    );\n",
                      "\n",
                      "NaturalLanguageUnderstandingService naturalLanguageUnderstanding = new NaturalLanguageUnderstandingService(\"2022-04-07\", authenticator);\n",
                      "naturalLanguageUnderstanding.SetServiceUrl(\"{url}\");\n",
                      "\n",
                      "var result = naturalLanguageUnderstanding.CreateClassificationsModel(\n",
                      "    trainingData: new MemoryStream(File.ReadAllBytes(\"trainingData.json\")),\n",
                      "    trainingDataContentType: NaturalLanguageUnderstandingService.CreateClassificationsModelEnums.TrainingDataContentTypeValue.APPLICATION_JSON,\n",
                      "    language: \"en\",\n",
                      "    name: \"MyClassificationsModel\",\n",
                      "    modelVersion: \"1.0.1\"\n",
                      "    );\n",
                      "\n",
                      "Console.WriteLine(result.Response);"
                    ]
                  }
                ]
              }
            ],
            "java": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "source": [
                      "IamAuthenticator authenticator = new IamAuthenticator(\"{apikey}\");\n",
                      "NaturalLanguageUnderstanding naturalLanguageUnderstanding = new NaturalLanguageUnderstanding(\n",
                      "  \"2022-04-07\", authenticator);\n",
                      "naturalLanguageUnderstanding.setServiceUrl(\"{url}\");\n",
                      "\n",
                      "try {\n",
                      "  CreateClassificationsModelOptions createClassificationsModelOptions = new CreateClassificationsModelOptions.Builder()\n",
                      "    .language(\"en\")\n",
                      "    .trainingData(new FileInputStream(\"trainingData.json\"))\n",
                      "    .trainingDataContentType(\"application/json\")\n",
                      "    .name(\"testString\")\n",
                      "    .description(\"testString\")\n",
                      "    .modelVersion(\"testString\")\n",
                      "    .versionDescription(\"testString\")\n",
                      "    .build();\n",
                      "\n",
                      "  ClassificationsModel response = naturalLanguageUnderstanding.createClassificationsModel(createClassificationsModelOptions).execute().getResult();\n",
                      "\n",
                      "  System.out.println(response);\n",
                      "} catch (FileNotFoundException e) {\n",
                      "  e.printStackTrace();\n",
                      "}"
                    ]
                  }
                ]
              }
            ],
            "node": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "source": [
                      "const fs = require('fs');\n",
                      "const NaturalLanguageUnderstandingV1 = require('ibm-watson/natural-language-understanding/v1');\n",
                      "const { IamAuthenticator } = require('ibm-watson/auth');\n",
                      "\n",
                      "const naturalLanguageUnderstanding = new NaturalLanguageUnderstandingV1({\n",
                      "  version: '2022-04-07',\n",
                      "  authenticator: new IamAuthenticator({\n",
                      "    apikey: '{apikey}',\n",
                      "  }),\n",
                      "  serviceUrl: '{url}',\n",
                      "});\n",
                      "\n",
                      "const createClassificationsModelParams = {\n",
                      "  language: 'en',\n",
                      "  trainingData: fs.createReadStream('./classifications_data.json'),\n",
                      "  name: 'MyClassificationsModel',\n",
                      "  modelVersion: '1.0.1',\n",
                      "};\n",
                      "\n",
                      "naturalLanguageUnderstanding.createClassificationsModel(createClassificationsModelParams)\n",
                      "  .then(createClassificationsModelResults => {\n",
                      "    console.log(JSON.stringify(createClassificationsModelResults, null, 2));\n",
                      "  })\n",
                      "  .catch(err => {\n",
                      "    console.log('error:', err);\n",
                      "  });"
                    ]
                  }
                ]
              }
            ],
            "python": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "source": [
                      "from os.path import join, dirname\n",
                      "from ibm_watson import NaturalLanguageUnderstandingV1\n",
                      "from ibm_cloud_sdk_core.authenticators import IAMAuthenticator\n",
                      "\n",
                      "authenticator = IAMAuthenticator('{apikey}')\n",
                      "natural_language_understanding = NaturalLanguageUnderstandingV1(\n",
                      "    version='2022-04-07',\n",
                      "    authenticator=authenticator\n",
                      ")\n",
                      "\n",
                      "natural_language_understanding.set_service_url('{url}')\n",
                      "\n",
                      "with open(join(dirname(__file__), './.', 'classifications_data.json'),\n",
                      "               'rb') as file:\n",
                      "    model=natural_language_understanding.create_classifications_model(\n",
                      "        language='en',\n",
                      "        training_data=file\n",
                      "        name='MyClassificationsModel',\n",
                      "        model_version='1.0.1',\n",
                      "    ).get_result()\n",
                      "    print(json.dumps(model, indent=2))"
                    ]
                  }
                ]
              }
            ]
          }
        }
      },
      "get": {
        "tags": [
          "Manage classifications models"
        ],
        "summary": "List classifications models",
        "description": "Returns all custom classifications models associated with this service instance.",
        "operationId": "listClassificationsModels",
        "responses": {
          "200": {
            "description": "Models retrieved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClassificationsModelList"
                },
                "examples": {
                  "response": {
                    "value": {
                      "models": [
                        {
                          "name": "MyClassificationsModel",
                          "language": "en",
                          "model_version": "1.0.1",
                          "status": "available",
                          "notices": [],
                          "model_id": "cb3755ad-d226-4587-b956-43a4a7202202",
                          "features": [
                            "classifications"
                          ],
                          "created": "2020-04-10T19:32:42Z",
                          "last_trained": "2020-04-10T19:32:42Z",
                          "last_deployed": "2020-04-10T19:32:42Z"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Access forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "source": [
                      "curl -u \"apikey:{apikey}\" \\\n",
                      "\"{url}/v1/models/classifications?version=2022-04-07\""
                    ]
                  }
                ]
              }
            ],
            "dotnet-standard": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "source": [
                      "IamAuthenticator authenticator = new IamAuthenticator(\n",
                      "    apikey: \"{apikey}\"\n",
                      "    );\n",
                      "\n",
                      "NaturalLanguageUnderstandingService naturalLanguageUnderstanding = new NaturalLanguageUnderstandingService(\"2022-04-07\", authenticator);\n",
                      "naturalLanguageUnderstanding.SetServiceUrl(\"{url}\");\n",
                      "\n",
                      "var result = naturalLanguageUnderstanding.ListClassificationsModels();\n",
                      "\n",
                      "Console.WriteLine(result.Response);"
                    ]
                  }
                ]
              }
            ],
            "java": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "source": [
                      "IamAuthenticator authenticator = new IamAuthenticator(\"{apikey}\");\n",
                      "NaturalLanguageUnderstanding naturalLanguageUnderstanding = new NaturalLanguageUnderstanding(\n",
                      "  \"2022-04-07\", authenticator);\n",
                      "naturalLanguageUnderstanding.setServiceUrl(\"{url}\");\n",
                      "\n",
                      "ListClassificationsModelsResponse response = naturalLanguageUnderstanding.listClassificationsModels().execute().getResult();\n",
                      "\n",
                      "System.out.println(response);"
                    ]
                  }
                ]
              }
            ],
            "node": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "source": [
                      "const NaturalLanguageUnderstandingV1 = require('ibm-watson/natural-language-understanding/v1');\n",
                      "const { IamAuthenticator } = require('ibm-watson/auth');\n",
                      "\n",
                      "const naturalLanguageUnderstanding = new NaturalLanguageUnderstandingV1({\n",
                      "  version: '2022-04-07',\n",
                      "  authenticator: new IamAuthenticator({\n",
                      "    apikey: '{apikey}',\n",
                      "  }),\n",
                      "  serviceUrl: '{url}',\n",
                      "});\n",
                      "\n",
                      "naturalLanguageUnderstanding.listClassificationsModels()\n",
                      "  .then(listClassificationsModelsResults => {\n",
                      "    console.log(JSON.stringify(listClassificationsModelsResults, null, 2));\n",
                      "  })\n",
                      "  .catch(err => {\n",
                      "    console.log('error:', err);\n",
                      "  });"
                    ]
                  }
                ]
              }
            ],
            "python": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "source": [
                      "import json\n",
                      "from ibm_watson import NaturalLanguageUnderstandingV1\n",
                      "from ibm_cloud_sdk_core.authenticators import IAMAuthenticator\n",
                      "\n",
                      "authenticator = IAMAuthenticator('{apikey}')\n",
                      "natural_language_understanding = NaturalLanguageUnderstandingV1(\n",
                      "    version='2022-04-07',\n",
                      "    authenticator=authenticator)\n",
                      "\n",
                      "natural_language_understanding.set_service_url('{url}')\n",
                      "\n",
                      "models = natural_language_understanding.list_classifications_models().get_result()\n",
                      "\n",
                      "print(json.dumps(models, indent=2))"
                    ]
                  }
                ]
              }
            ]
          }
        }
      }
    },
    "/v1/models/classifications/{model_id}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/version"
        },
        {
          "$ref": "#/components/parameters/model_id"
        }
      ],
      "get": {
        "tags": [
          "Manage classifications models"
        ],
        "summary": "Get classifications model details",
        "description": "Returns the status of the classifications model with the given model ID.",
        "operationId": "getClassificationsModel",
        "responses": {
          "200": {
            "description": "Model retrieved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClassificationsModel"
                },
                "examples": {
                  "response": {
                    "value": {
                      "name": "MyClassificationsModel",
                      "language": "en",
                      "model_version": "1.0.1",
                      "status": "available",
                      "notices": [],
                      "model_id": "cb3755ad-d226-4587-b956-43a4a7202202",
                      "features": [
                        "classifications"
                      ],
                      "created": "2020-04-10T19:32:42Z",
                      "last_trained": "2020-04-10T19:32:42Z",
                      "last_deployed": "2020-04-10T19:32:42Z"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Access forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "source": [
                      "curl -u \"apikey:{apikey}\" \\\n",
                      "\"{url}/v1/models/classifications/{model_id}?version=2022-04-07\""
                    ]
                  }
                ]
              }
            ],
            "dotnet-standard": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "source": [
                      "IamAuthenticator authenticator = new IamAuthenticator(\n",
                      "    apikey: \"{apikey}\"\n",
                      "    );\n",
                      "\n",
                      "NaturalLanguageUnderstandingService naturalLanguageUnderstanding = new NaturalLanguageUnderstandingService(\"2022-04-07\", authenticator);\n",
                      "naturalLanguageUnderstanding.SetServiceUrl(\"{url}\");\n",
                      "\n",
                      "var result = naturalLanguageUnderstanding.GetClassificationsModel(\n",
                      "    modelId: \"{modelId}\"\n",
                      "    );\n",
                      "\n",
                      "Console.WriteLine(result.Response);"
                    ]
                  }
                ]
              }
            ],
            "java": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "source": [
                      "IamAuthenticator authenticator = new IamAuthenticator(\"{apikey}\");\n",
                      "NaturalLanguageUnderstanding naturalLanguageUnderstanding = new NaturalLanguageUnderstanding(\n",
                      "  \"2022-04-07\", authenticator);\n",
                      "naturalLanguageUnderstanding.setServiceUrl(\"{url}\");\n",
                      "\n",
                      "GetClassificationsModelOptions getClassificationsModelOptions = new GetClassificationsModelOptions.Builder()\n",
                      "  .modelId(\"{modelId}\")\n",
                      "  .build();\n",
                      "\n",
                      "ClassificationsModel response = naturalLanguageUnderstanding.getClassificationsModel(getClassificationsModelOptions).execute().getResult();\n",
                      "\n",
                      "System.out.println(response);"
                    ]
                  }
                ]
              }
            ],
            "node": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "source": [
                      "const NaturalLanguageUnderstandingV1 = require('ibm-watson/natural-language-understanding/v1');\n",
                      "const { IamAuthenticator } = require('ibm-watson/auth');\n",
                      "\n",
                      "const naturalLanguageUnderstanding = new NaturalLanguageUnderstandingV1({\n",
                      "  version: '2022-04-07',\n",
                      "  authenticator: new IamAuthenticator({\n",
                      "    apikey: '{apikey}',\n",
                      "  }),\n",
                      "  serviceUrl: '{url}',\n",
                      "});\n",
                      "\n",
                      "const getClassificationsModelParams = {\n",
                      "  modelId: '{model_id}',\n",
                      "};\n",
                      "\n",
                      "naturalLanguageUnderstanding.getClassificationsModel(getClassificationsModelParams)\n",
                      "  .then(getClassificationsModelResults => {\n",
                      "    console.log(JSON.stringify(getClassificationsModelResults, null, 2));\n",
                      "  })\n",
                      "  .catch(err => {\n",
                      "    console.log('error:', err);\n",
                      "  });"
                    ]
                  }
                ]
              }
            ],
            "python": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "source": [
                      "import json\n",
                      "from ibm_watson import NaturalLanguageUnderstandingV1\n",
                      "from ibm_cloud_sdk_core.authenticators import IAMAuthenticator\n",
                      "\n",
                      "authenticator = IAMAuthenticator('{apikey}')\n",
                      "natural_language_understanding = NaturalLanguageUnderstandingV1(\n",
                      "    version='2022-04-07',\n",
                      "    authenticator=authenticator)\n",
                      "\n",
                      "natural_language_understanding.set_service_url('{url}')\n",
                      "\n",
                      "model = natural_language_understanding.get_classifications_model(\n",
                      "  model_id='{model_id}',\n",
                      ").get_result()\n",
                      "\n",
                      "\n",
                      "print(json.dumps(model, indent=2))"
                    ]
                  }
                ]
              }
            ]
          }
        }
      },
      "put": {
        "tags": [
          "Manage classifications models"
        ],
        "summary": "Update classifications model",
        "description": "Overwrites the training data associated with this custom classifications model and retrains the model. The new model replaces the current deployment.",
        "operationId": "updateClassificationsModel",
        "responses": {
          "200": {
            "description": "Model overwrite successful",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClassificationsModel"
                },
                "examples": {
                  "response": {
                    "value": {
                      "models": [
                        {
                          "name": "MyClassificationsModel",
                          "language": "en",
                          "model_version": "1.0.1",
                          "status": "deploying",
                          "notices": [],
                          "model_id": "cb3755ad-d226-4587-b956-43a4a7202202",
                          "features": [
                            "classifications"
                          ],
                          "created": "2020-04-10T20:21:46Z",
                          "last_trained": "2020-04-10T20:21:46Z",
                          "last_deployed": "2020-04-10T20:21:46Z"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Access forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/ClassificationsModelFileMetadataAndTrainingParameters"
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "source": [
                      "curl -X PUT -u \"apikey:{apikey}\" \\\n",
                      "-H \"Content-Type: multipart/form-data\" \\\n",
                      "-F \"training_data=@classifications_model.json;type=application/json\" \\\n",
                      "-F \"language=en\" \\\n",
                      "-F \"name=MyClassificationsModel\" \\\n",
                      "-F \"description=My updated classifications model\" \\\n",
                      "-F \"model_version=1.0.1\" \\\n",
                      "-F \"version_description=Updated version\" \\\n",
                      "\"{url}/v1/models/classifications/{model_id}?version=2022-04-07\""
                    ]
                  }
                ]
              }
            ],
            "dotnet-standard": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "source": [
                      "IamAuthenticator authenticator = new IamAuthenticator(\n",
                      "    apikey: \"{apikey}\"\n",
                      "    );\n",
                      "\n",
                      "NaturalLanguageUnderstandingService naturalLanguageUnderstanding = new NaturalLanguageUnderstandingService(\"2022-04-07\", authenticator);\n",
                      "naturalLanguageUnderstanding.SetServiceUrl(\"{url}\");\n",
                      "\n",
                      "var result = naturalLanguageUnderstanding.UpdateClassificationsModel(\n",
                      "    modelId: \"{modelId}\",\n",
                      "    trainingData: new MemoryStream(File.ReadAllBytes(\"trainingData.json\")),\n",
                      "    language: \"en\",\n",
                      "    name: \"MyClassificationsModel\",\n",
                      "    description: \"My updated classifications model\",\n",
                      "    modelVersion: \"1.0.1\",\n",
                      "    versionDescription: \"Updated version\"\n",
                      "    );\n",
                      "\n",
                      "Console.WriteLine(result.Response);"
                    ]
                  }
                ]
              }
            ],
            "java": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "source": [
                      "IamAuthenticator authenticator = new IamAuthenticator(\"{apikey}\");\n",
                      "NaturalLanguageUnderstanding naturalLanguageUnderstanding = new NaturalLanguageUnderstanding(\n",
                      "  \"2022-04-07\", authenticator);\n",
                      "naturalLanguageUnderstanding.setServiceUrl(\"{url}\");\n",
                      "\n",
                      "try {\n",
                      "  UpdateClassificationsModelOptions updateClassificationsModelOptions = new UpdateClassificationsModelOptions.Builder()\n",
                      "    .language(\"en\")\n",
                      "    .trainingData(new FileInputStream(\"trainingData.json\"))\n",
                      "    .trainingDataContentType(\"application/json\")\n",
                      "    .name(\"newName\")\n",
                      "    .description(\"newDescription\")\n",
                      "    .modelVersion(\"testString\")\n",
                      "    .versionDescription(\"testString\")\n",
                      "    .modelId(\"{modelId}\")\n",
                      "    .build();\n",
                      "  \n",
                      "  ClassificationsModel response = naturalLanguageUnderstanding.updateClassificationsModel(updateClassificationsModelOptions).execute().getResult();\n",
                      "  \n",
                      "  System.out.println(response);\n",
                      "} catch (FileNotFoundException e) {\n",
                      "  e.printStackTrace();\n",
                      "}"
                    ]
                  }
                ]
              }
            ],
            "node": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "source": [
                      "const fs = require('fs');\n",
                      "const NaturalLanguageUnderstandingV1 = require('ibm-watson/natural-language-understanding/v1');\n",
                      "const { IamAuthenticator } = require('ibm-watson/auth');\n",
                      "\n",
                      "const naturalLanguageUnderstanding = new NaturalLanguageUnderstandingV1({\n",
                      "  version: '2022-04-07',\n",
                      "  authenticator: new IamAuthenticator({\n",
                      "    apikey: '{apikey}',\n",
                      "  }),\n",
                      "  serviceUrl: '{url}',\n",
                      "});\n",
                      "\n",
                      "const updateClassificationsModelParams = {\n",
                      "  language: 'en',\n",
                      "  trainingData: fs.createReadStream('./classifications_model.json'),\n",
                      "  name: 'MyClassificationsModel',\n",
                      "  description: 'My updated classifications model',\n",
                      "  modelVersion: '1.0.1',\n",
                      "  versionDescription: 'Updated version',\n",
                      "  modelId: '{model_id}'\n",
                      "};\n",
                      "\n",
                      "naturalLanguageUnderstanding.updateClassificationsModel(updateClassificationsModelParams)\n",
                      "  .then(updateClassificationsModelResults => {\n",
                      "    console.log(JSON.stringify(updateClassificationsModelResults, null, 2));\n",
                      "  })\n",
                      "  .catch(err => {\n",
                      "    console.log('error:', err);\n",
                      "  });"
                    ]
                  }
                ]
              }
            ],
            "python": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "source": [
                      "from os.path import join, dirname\n",
                      "from ibm_watson import NaturalLanguageUnderstandingV1\n",
                      "from ibm_cloud_sdk_core.authenticators import IAMAuthenticator\n",
                      "\n",
                      "authenticator = IAMAuthenticator('{apikey}')\n",
                      "natural_language_understanding = NaturalLanguageUnderstandingV1(\n",
                      "    version='2022-04-07',\n",
                      "    authenticator=authenticator\n",
                      ")\n",
                      "\n",
                      "natural_language_understanding.set_service_url('{url}')\n",
                      "\n",
                      "with open(join(dirname(__file__), './.', 'classifications_model.json'),\n",
                      "               'rb') as file:\n",
                      "    model=natural_language_understanding.update_classifications_model(\n",
                      "        language='en',\n",
                      "        training_data=file\n",
                      "        name='MyClassificationsModel',\n",
                      "        description='My updated classifications model',\n",
                      "        model_version='1.0.1',\n",
                      "        version_description='Updated version',\n",
                      "        model_id='{model_id}'\n",
                      "    ).get_result()\n",
                      "    print(json.dumps(model, indent=2))"
                    ]
                  }
                ]
              }
            ]
          }
        }
      },
      "delete": {
        "tags": [
          "Manage classifications models"
        ],
        "summary": "Delete classifications model",
        "description": "Un-deploys the custom classifications model with the given model ID and deletes all associated customer data, including any training data or binary artifacts.",
        "operationId": "deleteClassificationsModel",
        "responses": {
          "200": {
            "$ref": "#/components/responses/DeleteModelResponse"
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Access forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "source": [
                      "curl -X DELETE -u \"apikey:{apikey}\" \\\n",
                      "\"{url}/v1/models/classifications/{model_id}?version=2022-04-07\""
                    ]
                  }
                ]
              }
            ],
            "dotnet-standard": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "source": [
                      "IamAuthenticator authenticator = new IamAuthenticator(\n",
                      "    apikey: \"{apikey}\"\n",
                      "    );\n",
                      "\n",
                      "NaturalLanguageUnderstandingService naturalLanguageUnderstanding = new NaturalLanguageUnderstandingService(\"2022-04-07\", authenticator);\n",
                      "naturalLanguageUnderstanding.SetServiceUrl(\"{url}\");\n",
                      "\n",
                      "var result = naturalLanguageUnderstanding.DeleteClassificationsModel(\n",
                      "    modelId: \"{modelId}\"\n",
                      "    );\n",
                      "\n",
                      "Console.WriteLine(result.Response);"
                    ]
                  }
                ]
              }
            ],
            "java": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "source": [
                      "IamAuthenticator authenticator = new IamAuthenticator(\"{apikey}\");\n",
                      "NaturalLanguageUnderstanding naturalLanguageUnderstanding = new NaturalLanguageUnderstanding(\n",
                      "  \"2022-04-07\", authenticator);\n",
                      "naturalLanguageUnderstanding.setServiceUrl(\"{url}\");\n",
                      "\n",
                      "DeleteClassificationsModelOptions deleteClassificationsModelOptions = new DeleteClassificationsModelOptions.Builder()\n",
                      "  .modelId(\"{modelId}\")\n",
                      "  .build();\n",
                      "\n",
                      "DeleteModelResults response = naturalLanguageUnderstanding.deleteClassificationsModel(deleteClassificationsModelOptions).execute().getResult();"
                    ]
                  }
                ]
              }
            ],
            "node": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "source": [
                      "const NaturalLanguageUnderstandingV1 = require('ibm-watson/natural-language-understanding/v1');\n",
                      "const { IamAuthenticator } = require('ibm-watson/auth');\n",
                      "\n",
                      "const naturalLanguageUnderstanding = new NaturalLanguageUnderstandingV1({\n",
                      "  version: '2022-04-07',\n",
                      "  authenticator: new IamAuthenticator({\n",
                      "    apikey: '{apikey}',\n",
                      "  }),\n",
                      "  serviceUrl: '{url}',\n",
                      "});\n",
                      "\n",
                      "const deleteClassificationsModelParams = {\n",
                      "  modelId: '{model_id}',\n",
                      "};\n",
                      "\n",
                      "naturalLanguageUnderstanding.deleteClassificationsModel(deleteClassificationsModelParams)\n",
                      "  .then(deleteClassificationsModelResults => {\n",
                      "    console.log(JSON.stringify(deleteClassificationsModelResults, null, 2));\n",
                      "  })\n",
                      "  .catch(err => {\n",
                      "    console.log('error:', err);\n",
                      "  });"
                    ]
                  }
                ]
              }
            ],
            "python": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "source": [
                      "import json\n",
                      "from ibm_watson import NaturalLanguageUnderstandingV1\n",
                      "from ibm_cloud_sdk_core.authenticators import IAMAuthenticator\n",
                      "\n",
                      "authenticator = IAMAuthenticator('{apikey}')\n",
                      "natural_language_understanding = NaturalLanguageUnderstandingV1(\n",
                      "    version='2022-04-07',\n",
                      "    authenticator=authenticator)\n",
                      "\n",
                      "natural_language_understanding.set_service_url('{url}')\n",
                      "\n",
                      "model = natural_language_understanding.delete_classifications_model(\n",
                      "  model_id='{model_id}',\n",
                      ").get_result()\n",
                      "\n",
                      "\n",
                      "print(json.dumps(model, indent=2))"
                    ]
                  }
                ]
              }
            ]
          }
        }
      }
    }
  },
  "servers": [
    {
      "url": "https://api.us-south.natural-language-understanding.watson.cloud.ibm.com",
      "description": "Dallas"
    }
  ],
  "components": {
    "parameters": {
      "version": {
        "name": "version",
        "in": "query",
        "description": "Release date of the API version you want to use. Specify dates in YYYY-MM-DD format. The current version is `2022-04-07`.",
        "required": true,
        "schema": {
          "type": "string"
        },
        "x-sdk-global-param": true
      },
      "text": {
        "name": "text",
        "description": "URL-encoded text to analyze. One of the `text`, `html`, or `url` parameters is required.",
        "in": "query",
        "schema": {
          "type": "string"
        }
      },
      "html": {
        "name": "html",
        "description": "URL-encoded HTML to analyze. One of the `text`, `html`, or `url` parameters is required.",
        "in": "query",
        "schema": {
          "type": "string"
        }
      },
      "url": {
        "name": "url",
        "description": "Public webpage to analyze. One of the `text`, `html`, or `url` parameters is required. `url` is not supported in IBM Cloud Dedicated instances.",
        "in": "query",
        "schema": {
          "type": "string"
        }
      },
      "language": {
        "name": "language",
        "description": "ISO 639-1 code that specifies the language of your text. This overrides automatic language detection. Language support differs depending on the features you include in your analysis. For more information, see [Language support](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-language-support).",
        "in": "query",
        "schema": {
          "type": "string"
        }
      },
      "limit_text_characters": {
        "name": "limit_text_characters",
        "description": "Sets the maximum number of characters that are processed by the service.",
        "in": "query",
        "schema": {
          "type": "integer"
        }
      },
      "model_id": {
        "name": "model_id",
        "description": "ID of the model",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "features": {
        "name": "features",
        "description": "Comma separated list of analysis features",
        "in": "query",
        "required": true,
        "schema": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "categories",
              "classifications",
              "concepts",
              "emotion",
              "entities",
              "keywords",
              "metadata",
              "relations",
              "semantic_roles",
              "sentiment",
              "summarization (experimental)",
              "syntax"
            ]
          }
        }
      },
      "clean": {
        "name": "clean",
        "description": "Set this to `false` to disable text cleaning when analyzing webpages. For more information about webpage cleaning, see [Analyzing webpages](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-analyzing-webpages).",
        "in": "query",
        "schema": {
          "type": "boolean",
          "default": true
        }
      },
      "xpath": {
        "name": "xpath",
        "description": "An [XPath query](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-analyzing-webpages#xpath) to perform on `html` or `url` input. Results of the query will be appended to the cleaned webpage text before it is analyzed. To analyze only the results of the XPath query, set the `clean` parameter to `false`.",
        "in": "query",
        "schema": {
          "type": "string"
        }
      },
      "fallback_to_raw": {
        "name": "fallback_to_raw",
        "description": "Whether to use raw HTML content if text cleaning fails",
        "in": "query",
        "schema": {
          "type": "boolean",
          "default": true
        }
      },
      "return_analyzed_text": {
        "name": "return_analyzed_text",
        "description": "Set this to `true` to show the analyzed text in the response",
        "in": "query",
        "schema": {
          "type": "boolean",
          "default": false
        }
      },
      "advanced_rules.model": {
        "name": "advanced_rules.model",
        "deprecated": true,
        "description": "The advanced rules feature is deprecated. Existing models are supported until 24 June 2021, but after 10 June 2021, you will not be able to deploy advanced rules models to Natural Language Understanding. After 24 June 2021, advanced rules models will not run in Natural Language Understanding.\n\nAn advanced rules model ID",
        "in": "query",
        "schema": {
          "type": "string"
        }
      },
      "categories.explanation": {
        "name": "categories.explanation",
        "description": "Set this to `true` to return explanations for each categorization. **This feature is available only for English language text.**",
        "in": "query",
        "schema": {
          "type": "boolean",
          "default": false
        }
      },
      "categories.limit": {
        "name": "categories.limit",
        "description": "Maximum number of categories to return.",
        "in": "query",
        "schema": {
          "type": "integer",
          "maximum": 10,
          "default": 3
        }
      },
      "categories.model": {
        "name": "categories.model",
        "description": "(Beta) Enter a [custom model](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-customizing) ID to override the standard categories model. **This feature is available only for English language text.**",
        "in": "query",
        "schema": {
          "type": "string"
        }
      },
      "classifications.model": {
        "name": "classifications.model",
        "description": "Model ID of the classifications model to be used",
        "in": "query",
        "schema": {
          "type": "string"
        }
      },
      "concepts.limit": {
        "name": "concepts.limit",
        "description": "Maximum number of concepts to return.",
        "in": "query",
        "schema": {
          "type": "integer",
          "maximum": 50,
          "default": 8
        }
      },
      "emotion.document": {
        "name": "emotion.document",
        "description": "Set this to `false` to hide document-level emotion results",
        "in": "query",
        "schema": {
          "type": "boolean",
          "default": true
        }
      },
      "emotion.targets": {
        "name": "emotion.targets",
        "description": "Target strings, separated by commas. Emotion results will be returned for each target string found in the document",
        "in": "query",
        "schema": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "entities.limit": {
        "name": "entities.limit",
        "description": "Maximum number of entities to return.",
        "in": "query",
        "schema": {
          "type": "integer",
          "maximum": 250,
          "default": 50
        }
      },
      "entities.mentions": {
        "name": "entities.mentions",
        "description": "Set this to `true` to return locations of entity mentions",
        "in": "query",
        "schema": {
          "type": "boolean",
          "default": false
        }
      },
      "entities.model": {
        "name": "entities.model",
        "description": "Enter a [custom model](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-customizing) ID to override the standard entity detection model",
        "in": "query",
        "schema": {
          "type": "string"
        }
      },
      "entities.emotion": {
        "name": "entities.emotion",
        "description": "Set this to `true` to return emotion information for detected entities",
        "in": "query",
        "schema": {
          "type": "boolean",
          "default": false
        }
      },
      "entities.sentiment": {
        "name": "entities.sentiment",
        "description": "Set this to `true` to return sentiment information for detected entities",
        "in": "query",
        "schema": {
          "type": "boolean",
          "default": false
        }
      },
      "keywords.emotion": {
        "name": "keywords.emotion",
        "description": "Set this to `true` to return emotion information for detected keywords",
        "in": "query",
        "schema": {
          "type": "boolean",
          "default": false
        }
      },
      "keywords.limit": {
        "name": "keywords.limit",
        "description": "Maximum number of keywords to return.",
        "in": "query",
        "schema": {
          "type": "integer",
          "maximum": 250,
          "default": 50
        }
      },
      "keywords.sentiment": {
        "name": "keywords.sentiment",
        "description": "Set this to `true` to return sentiment information for detected keywords",
        "in": "query",
        "schema": {
          "type": "boolean",
          "default": false
        }
      },
      "relations.model": {
        "name": "relations.model",
        "description": "Enter a [custom model](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-customizing) ID to override the default `en-news` relations model",
        "in": "query",
        "schema": {
          "type": "string",
          "default": "en-news"
        }
      },
      "semantic_roles.limit": {
        "name": "semantic_roles.limit",
        "description": "Maximum number of semantic_roles results to return",
        "in": "query",
        "schema": {
          "type": "integer",
          "default": 50
        }
      },
      "semantic_roles.entities": {
        "name": "semantic_roles.entities",
        "description": "Set this to `true` to return entity information for subjects and objects",
        "in": "query",
        "schema": {
          "type": "boolean",
          "default": false
        }
      },
      "semantic_roles.keywords": {
        "name": "semantic_roles.keywords",
        "description": "Set this to `true` to return keyword information for subjects and objects",
        "in": "query",
        "schema": {
          "type": "boolean",
          "default": false
        }
      },
      "sentiment.document": {
        "name": "sentiment.document",
        "description": "Set this to `false` to disable document level sentiment analysis",
        "in": "query",
        "schema": {
          "type": "boolean",
          "default": true
        }
      },
      "sentiment.targets": {
        "name": "sentiment.targets",
        "description": "Sentiment information will return for each target string that is found in the text",
        "in": "query",
        "schema": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "sentiment.model": {
        "name": "sentiment.model",
        "description": "(Beta) Enter a [custom model](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-customizing) ID to override the standard sentiment model for all sentiment analysis operations in the request, including targeted sentiment for entities and keywords.",
        "in": "query",
        "schema": {
          "type": "string"
        },
        "x-sdk-exclude": true
      },
      "syntax.tokens": {
        "name": "syntax.tokens",
        "description": "Set this to `true` to return information about the tokens in the input text.",
        "in": "query",
        "schema": {
          "type": "boolean",
          "default": false
        }
      },
      "syntax.tokens.lemma": {
        "name": "syntax.tokens.lemma",
        "description": "Set this to `true` to return the lemma for each token.",
        "in": "query",
        "schema": {
          "type": "boolean",
          "default": false
        }
      },
      "syntax.tokens.part_of_speech": {
        "name": "syntax.tokens.part_of_speech",
        "description": "Set this to `true` to return the part of speech for each token.",
        "in": "query",
        "schema": {
          "type": "boolean",
          "default": false
        }
      },
      "syntax.sentences": {
        "name": "syntax.sentences",
        "description": "Set this to `true` to return information about the sentences in the input text.",
        "in": "query",
        "schema": {
          "type": "boolean",
          "default": false
        }
      }
    },
    "responses": {
      "AnalyzeGetResponse": {
        "description": "Analysis results",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/AnalysisResults"
            },
            "examples": {
              "response": {
                "value": {
                  "entities": [
                    {
                      "type": "Company",
                      "relevance": 0.89792,
                      "count": 12,
                      "name": "IBM",
                      "disambiguation": {
                        "name": "IBM",
                        "dbpedia_resource": "http://dbpedia.org/resource/IBM",
                        "subtype": [
                          "SoftwareLicense",
                          "OperatingSystemDeveloper",
                          "ProcessorManufacturer",
                          "SoftwareDeveloper",
                          "CompanyFounder",
                          "ProgrammingLanguageDesigner",
                          "ProgrammingLanguageDeveloper"
                        ]
                      },
                      "emotion": {
                        "sadness": 0.271362,
                        "joy": 0.618694,
                        "fear": 0.033186,
                        "disgust": 0.056113,
                        "anger": 0.099437
                      }
                    }
                  ],
                  "keywords": [
                    {
                      "emotion": {
                        "sadness": 0.174379,
                        "joy": 0.66067,
                        "fear": 0.051475,
                        "disgust": 0.114401,
                        "anger": 0.044105
                      },
                      "relevance": "0.900808",
                      "sentiment": {
                        "score": 0.419889
                      },
                      "text": "free trial",
                      "count": 1
                    }
                  ],
                  "language": "en",
                  "retrieved_url": "https://www.ibm.com/us-en/"
                }
              }
            }
          }
        }
      },
      "AnalyzeResponse": {
        "description": "Analysis results",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/AnalysisResults"
            },
            "examples": {
              "response": {
                "value": {
                  "entities": [
                    {
                      "type": "Company",
                      "relevance": 0.89792,
                      "count": 12,
                      "name": "IBM",
                      "disambiguation": {
                        "name": "IBM",
                        "dbpedia_resource": "http://dbpedia.org/resource/IBM",
                        "subtype": [
                          "SoftwareLicense",
                          "OperatingSystemDeveloper",
                          "ProcessorManufacturer",
                          "SoftwareDeveloper",
                          "CompanyFounder",
                          "ProgrammingLanguageDesigner",
                          "ProgrammingLanguageDeveloper"
                        ]
                      },
                      "emotion": {
                        "sadness": 0.271362,
                        "joy": 0.618694,
                        "fear": 0.033186,
                        "disgust": 0.056113,
                        "anger": 0.099437
                      }
                    }
                  ],
                  "keywords": [
                    {
                      "emotion": {
                        "sadness": 0.174379,
                        "joy": 0.66067,
                        "fear": 0.051475,
                        "disgust": 0.114401,
                        "anger": 0.044105
                      },
                      "relevance": "0.900808",
                      "sentiment": {
                        "score": 0.419889
                      },
                      "text": "free trial",
                      "count": 1
                    }
                  ],
                  "language": "en",
                  "retrieved_url": "https://www.ibm.com/us-en/"
                }
              }
            }
          }
        }
      },
      "ListModelsResponse": {
        "description": "List models results",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ListModelsResults"
            },
            "examples": {
              "response": {
                "value": {
                  "models": [
                    {
                      "workspace_id": "504503a0-62c1-12e9-8346-d190294d088d",
                      "version_description": "Initial version",
                      "model_version": "1.0.1",
                      "version": "1.0.1",
                      "status": "available",
                      "notices": [],
                      "name": "MyAdvancedRulesModel",
                      "model_id": "2987ca3f-205f-4786-a168-2d8026ddcc9b",
                      "language": "en",
                      "description": "My custom advanced rules model",
                      "created": "2019-04-24T14:50:22Z"
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "DeleteModelResponse": {
        "description": "Delete model results",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/DeleteModelResults"
            },
            "examples": {
              "response": {
                "value": {
                  "deleted": "2987ca3f-205f-4786-a168-2d8026ddcc9b"
                }
              }
            }
          }
        }
      }
    },
    "securitySchemes": {
      "IAM": {
        "type": "apiKey",
        "name": "Authorization",
        "in": "header"
      }
    },
    "schemas": {
      "BaseAdvancedRulesModel": {
        "allOf": [
          {
            "$ref": "#/components/schemas/ModelMetadata"
          },
          {
            "description": "The advanced rules feature is deprecated. Existing models are supported until 24 June 2021, but after 10 June 2021, you will not be able to deploy advanced rules models to Natural Language Understanding. After 24 June 2021, advanced rules models will not run in Natural Language Understanding.\n\nAdvanced rules model",
            "type": "object",
            "properties": {
              "features": {
                "type": "array",
                "description": "The service features that are supported by the custom model",
                "items": {
                  "type": "string"
                }
              },
              "status": {
                "type": "string",
                "description": "When the status is `available`, the model is ready to use",
                "enum": [
                  "starting",
                  "training",
                  "deploying",
                  "available",
                  "error",
                  "deleted"
                ]
              },
              "model_id": {
                "type": "string",
                "description": "Unique model ID"
              },
              "workspace_id": {
                "description": "ID of the Watson Knowledge Studio workspace that deployed this model to Natural Language Understanding",
                "type": "string"
              },
              "created": {
                "description": "dateTime indicating when the model was created",
                "type": "string",
                "format": "date-time"
              },
              "notices": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Notice"
                },
                "example": [
                  {
                    "message": "Training data validation failed: Too few examples for label insufficient_examples. Minimum of 5 required"
                  },
                  {
                    "message": "Not enough examples for class 'foo'. 4 were given but 5 are required."
                  },
                  {
                    "message": "Duplicate label given in example 27: {'foo', 'bar', 'foo'}"
                  }
                ]
              },
              "last_trained": {
                "description": "dateTime of last successful model training",
                "type": "string",
                "format": "date-time"
              },
              "last_deployed": {
                "description": "dateTime of last successful model deployment",
                "type": "string",
                "format": "date-time"
              }
            }
          }
        ]
      },
      "AdvancedRulesModel": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseAdvancedRulesModel"
          },
          {
            "required": [
              "language",
              "model_id",
              "status",
              "created"
            ]
          }
        ]
      },
      "AdvancedRulesModelList": {
        "description": "The advanced rules feature is deprecated. Existing models are supported until 24 June 2021, but after 10 June 2021, you will not be able to deploy advanced rules models to Natural Language Understanding. After 24 June 2021, advanced rules models will not run in Natural Language Understanding.\n\nList of advanced rules models.",
        "type": "object",
        "properties": {
          "models": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AdvancedRulesModel"
            },
            "description": "The advanced rules models"
          }
        }
      },
      "AdvancedRulesAnalysisResults": {},
      "FileAndMetadata": {
        "allOf": [
          {
            "$ref": "#/components/schemas/ModelMetadata"
          },
          {
            "type": "object",
            "properties": {
              "model": {
                "type": "string",
                "description": "The advanced rules feature is deprecated. Existing models are supported until 24 June 2021, but after 10 June 2021, you will not be able to deploy advanced rules models to Natural Language Understanding. After 24 June 2021, advanced rules models will not run in Natural Language Understanding.\n\nModel file exported from the advanced rules editor in Watson Knowledge Studio. For more information, see [Creating an advanced rules model](https://cloud.ibm.com/docs/watson-knowledge-studio?topic=watson-knowledge-studio-create-advanced-rules-model#create-advanced-rules-model-procedure).",
                "format": "binary",
                "x-file-content-types": [
                  "csv",
                  "zip"
                ]
              }
            }
          }
        ]
      },
      "Parameters": {
        "description": "An object containing request parameters",
        "type": "object",
        "required": [
          "features"
        ],
        "properties": {
          "text": {
            "description": "The plain text to analyze. One of the `text`, `html`, or `url` parameters is required.",
            "type": "string"
          },
          "html": {
            "description": "The HTML file to analyze. One of the `text`, `html`, or `url` parameters is required.",
            "type": "string"
          },
          "url": {
            "description": "The webpage to analyze. One of the `text`, `html`, or `url` parameters is required.",
            "type": "string"
          },
          "features": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Features"
              },
              {
                "description": "Specific features to analyze the document for"
              }
            ]
          },
          "clean": {
            "description": "Set this to `false` to disable webpage cleaning. For more information about webpage cleaning, see [Analyzing webpages](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-analyzing-webpages).",
            "type": "boolean",
            "default": true
          },
          "xpath": {
            "type": "string",
            "description": "An [XPath query](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-analyzing-webpages#xpath) to perform on `html` or `url` input. Results of the query will be appended to the cleaned webpage text before it is analyzed. To analyze only the results of the XPath query, set the `clean` parameter to `false`."
          },
          "fallback_to_raw": {
            "type": "boolean",
            "description": "Whether to use raw HTML content if text cleaning fails",
            "default": true
          },
          "return_analyzed_text": {
            "type": "boolean",
            "description": "Whether or not to return the analyzed text",
            "default": false
          },
          "language": {
            "type": "string",
            "description": "ISO 639-1 code that specifies the language of your text. This overrides automatic language detection. Language support differs depending on the features you include in your analysis. For more information, see [Language support](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-language-support)."
          },
          "limit_text_characters": {
            "type": "integer",
            "description": "Sets the maximum number of characters that are processed by the service."
          },
          "advanced_rules.model": {
            "type": "string",
            "deprecated": true,
            "description": "The advanced rules feature is deprecated. Existing models are supported until 24 June 2021, but after 10 June 2021, you will not be able to deploy advanced rules models to Natural Language Understanding. After 24 June 2021, advanced rules models will not run in Natural Language Understanding.\n\nAn advanced rules model ID",
            "x-sdk-exclude": true
          }
        },
        "x-java-builder": true
      },
      "Features": {
        "description": "Analysis features and options",
        "type": "object",
        "properties": {
          "classifications": {
            "$ref": "#/components/schemas/ClassificationsOptions"
          },
          "concepts": {
            "$ref": "#/components/schemas/ConceptsOptions"
          },
          "emotion": {
            "$ref": "#/components/schemas/EmotionOptions"
          },
          "entities": {
            "$ref": "#/components/schemas/EntitiesOptions"
          },
          "keywords": {
            "$ref": "#/components/schemas/KeywordsOptions"
          },
          "metadata": {
            "$ref": "#/components/schemas/MetadataOptions"
          },
          "relations": {
            "$ref": "#/components/schemas/RelationsOptions"
          },
          "semantic_roles": {
            "$ref": "#/components/schemas/SemanticRolesOptions"
          },
          "sentiment": {
            "$ref": "#/components/schemas/SentimentOptions"
          },
          "summarization": {
            "$ref": "#/components/schemas/SummarizationOptions"
          },
          "categories": {
            "$ref": "#/components/schemas/CategoriesOptions"
          },
          "syntax": {
            "$ref": "#/components/schemas/SyntaxOptions"
          }
        },
        "x-java-builder": true
      },
      "ListModelsResults": {
        "description": "Custom models that are available for entities and relations",
        "type": "object",
        "properties": {
          "models": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Model"
            },
            "description": "An array of available models"
          }
        }
      },
      "DeleteModelResults": {
        "description": "Delete model results",
        "properties": {
          "deleted": {
            "type": "string",
            "description": "model_id of the deleted model"
          }
        }
      },
      "SentimentModel": {
        "type": "object",
        "properties": {
          "features": {
            "type": "array",
            "description": "The service features that are supported by the custom model",
            "items": {
              "type": "string"
            }
          },
          "status": {
            "type": "string",
            "description": "When the status is `available`, the model is ready to use",
            "enum": [
              "starting",
              "training",
              "deploying",
              "available",
              "error",
              "deleted"
            ]
          },
          "model_id": {
            "type": "string",
            "description": "Unique model ID"
          },
          "created": {
            "description": "dateTime indicating when the model was created",
            "type": "string",
            "format": "date-time"
          },
          "last_trained": {
            "description": "dateTime of last successful model training",
            "type": "string",
            "format": "date-time"
          },
          "last_deployed": {
            "description": "dateTime of last successful model deployment",
            "type": "string",
            "format": "date-time"
          },
          "name": {
            "type": "string",
            "description": "A name for the model"
          },
          "user_metadata": {
            "type": "object",
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "integer"
                },
                {
                  "type": "boolean"
                }
              ]
            },
            "example": {
              "region": "North America",
              "latest": true
            },
            "description": "An optional map of metadata key-value pairs to store with this model"
          },
          "language": {
            "type": "string",
            "description": "The 2-letter language code of this model"
          },
          "description": {
            "type": "string",
            "description": "An optional description of the model"
          },
          "model_version": {
            "type": "string",
            "description": "An optional version string"
          },
          "notices": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Notice"
            },
            "example": [
              {
                "message": "Training data validation failed: Too few examples for label insufficient_examples. Minimum of 5 required"
              },
              {
                "message": "Not enough examples for class 'foo'. 4 were given but 5 are required."
              },
              {
                "message": "Duplicate label given in example 27: {'foo', 'bar', 'foo'}"
              }
            ]
          },
          "version": {
            "type": "string",
            "deprecated": true,
            "description": "Deprecated — use `model_version`",
            "x-sdk-exclude": true
          },
          "workspace_id": {
            "type": "string",
            "description": "ID of the Watson Knowledge Studio workspace that deployed this model to Natural Language Understanding",
            "nullable": true
          },
          "version_description": {
            "type": "string",
            "description": "The description of the version",
            "nullable": true
          }
        }
      },
      "Model": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "description": "When the status is `available`, the model is ready to use",
            "enum": [
              "starting",
              "training",
              "deploying",
              "available",
              "error",
              "deleted"
            ]
          },
          "model_id": {
            "type": "string",
            "description": "Unique model ID"
          },
          "language": {
            "type": "string",
            "description": "ISO 639-1 code that indicates the language of the model"
          },
          "description": {
            "type": "string",
            "description": "Model description"
          },
          "workspace_id": {
            "description": "ID of the Watson Knowledge Studio workspace that deployed this model to Natural Language Understanding",
            "type": "string"
          },
          "model_version": {
            "description": "The model version, if it was manually provided in Watson Knowledge Studio",
            "type": "string"
          },
          "version": {
            "description": "Deprecated — use `model_version`",
            "type": "string",
            "deprecated": true
          },
          "version_description": {
            "description": "The description of the version, if it was manually provided in Watson Knowledge Studio",
            "type": "string"
          },
          "created": {
            "description": "A dateTime indicating when the model was created",
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "SentimentModelFileAndMetadata": {
        "allOf": [
          {
            "$ref": "#/components/schemas/ModelMetadata"
          },
          {
            "type": "object",
            "properties": {
              "training_data": {
                "type": "string",
                "description": "Training data in CSV format. For more information, see [Sentiment training data requirements](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-custom-sentiment#sentiment-training-data-requirements).",
                "format": "binary",
                "x-file-content-types": [
                  "text/csv"
                ]
              }
            },
            "required": [
              "training_data"
            ]
          }
        ]
      },
      "ModelFileAndMetadata": {
        "allOf": [
          {
            "$ref": "#/components/schemas/ModelMetadata"
          },
          {
            "type": "object",
            "properties": {
              "file": {
                "type": "string",
                "format": "binary",
                "x-file-content-types": [
                  "csv",
                  "zip"
                ]
              }
            },
            "required": [
              "file"
            ]
          }
        ]
      },
      "ModelMetadata": {
        "description": "Metadata associated with this custom model",
        "type": "object",
        "required": [
          "language"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "An optional name for the model"
          },
          "user_metadata": {
            "type": "object",
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "integer"
                },
                {
                  "type": "boolean"
                }
              ]
            },
            "example": {
              "region": "North America",
              "latest": true
            },
            "description": "An optional map of metadata key-value pairs to store with this model"
          },
          "language": {
            "type": "string",
            "description": "The 2-letter language code of this model"
          },
          "description": {
            "type": "string",
            "description": "An optional description of the model"
          },
          "model_version": {
            "type": "string",
            "description": "An optional version string"
          },
          "version": {
            "type": "string",
            "deprecated": true,
            "description": "Deprecated — use `model_version`",
            "x-sdk-exclude": true
          },
          "workspace_id": {
            "type": "string",
            "description": "ID of the Watson Knowledge Studio workspace that deployed this model to Natural Language Understanding",
            "nullable": true
          },
          "version_description": {
            "type": "string",
            "description": "The description of the version",
            "nullable": true
          }
        }
      },
      "AnalysisResults": {
        "description": "Results of the analysis, organized by feature",
        "type": "object",
        "allOf": [
          {
            "type": "object",
            "properties": {
              "language": {
                "type": "string",
                "description": "Language used to analyze the text"
              },
              "analyzed_text": {
                "type": "string",
                "description": "Text that was used in the analysis"
              },
              "retrieved_url": {
                "type": "string",
                "description": "URL of the webpage that was analyzed"
              },
              "usage": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Usage"
                  },
                  {
                    "type": "object",
                    "description": "API usage information for the request"
                  }
                ]
              },
              "advanced_rules": {
                "deprecated": true,
                "description": "The advanced rules feature is deprecated. Existing models are supported until 24 June 2021, but after 10 June 2021, you will not be able to deploy advanced rules models to Natural Language Understanding. After 24 June 2021, advanced rules models will not run in Natural Language Understanding.\n\nResponse from advanced rules analysis",
                "type": "object",
                "additionalProperties": {
                  "description": "The keys and values from the text extractor in the exported model file from Watson Knowledge Studio. For more information about the format, see [Output format for advanced rules analysis](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-customizing#advanced-rules-analysis-output)."
                },
                "example": {
                  "Country": [
                    {
                      "Country": {
                        "text": "USA",
                        "location": {
                          "end": 23,
                          "begin": 20
                        }
                      },
                      "Continent": null
                    }
                  ]
                },
                "x-sdk-exclude": true
              }
            }
          },
          {
            "$ref": "#/components/schemas/FeaturesResults"
          }
        ]
      },
      "Usage": {
        "description": "Usage information",
        "type": "object",
        "properties": {
          "features": {
            "type": "integer",
            "description": "Number of features used in the API call"
          },
          "text_characters": {
            "type": "integer",
            "description": "Number of text characters processed"
          },
          "text_units": {
            "type": "integer",
            "description": "Number of 10,000-character units processed"
          }
        }
      },
      "Notice": {
        "type": "object",
        "description": "A list of messages describing model training issues when model status is `error`",
        "properties": {
          "message": {
            "type": "string",
            "readOnly": true,
            "description": "Describes deficiencies or inconsistencies in training data"
          }
        }
      },
      "FeaturesResults": {
        "description": "Analysis results for each requested feature",
        "type": "object",
        "properties": {
          "concepts": {
            "description": "The general concepts referenced or alluded to in the analyzed text",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ConceptsResult"
            },
            "example": [
              {
                "text": "Social network service",
                "relevance": 0.92186,
                "dbpedia_resource": "http://dbpedia.org/resource/Social_network_service"
              },
              {
                "text": "Thomas J. Watson",
                "relevance": 0.871908,
                "dbpedia_resource": "http://dbpedia.org/resource/Thomas_J._Watson"
              },
              {
                "text": "Lotus Software",
                "relevance": 0.839578,
                "dbpedia_resource": "http://dbpedia.org/resource/Lotus_Software"
              }
            ]
          },
          "entities": {
            "description": "The entities detected in the analyzed text",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EntitiesResult"
            },
            "example": [
              {
                "text": "Social network service",
                "relevance": 0.92186,
                "dbpedia_resource": "http://dbpedia.org/resource/Social_network_service"
              },
              {
                "text": "Thomas J. Watson",
                "relevance": 0.871908,
                "dbpedia_resource": "http://dbpedia.org/resource/Thomas_J._Watson"
              },
              {
                "text": "Lotus Software",
                "relevance": 0.839578,
                "dbpedia_resource": "http://dbpedia.org/resource/Lotus_Software"
              }
            ]
          },
          "keywords": {
            "description": "The keywords from the analyzed text",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/KeywordsResult"
            },
            "example": [
              {
                "text": "curated online courses",
                "sentiment": {
                  "score": 0.792454
                },
                "relevance": 0.864624,
                "emotion": {
                  "sadness": 0.188625,
                  "joy": 0.522781,
                  "fear": 0.12012,
                  "disgust": 0.103212,
                  "anger": 0.106669
                },
                "count": 1
              },
              {
                "text": "free virtual server",
                "sentiment": {
                  "score": 0.664726
                },
                "relevance": 0.864593,
                "emotion": {
                  "sadness": 0.265225,
                  "joy": 0.532354,
                  "fear": 0.07773,
                  "disgust": 0.090112,
                  "anger": 0.102242
                },
                "count": 1
              }
            ]
          },
          "categories": {
            "description": "The categories that the service assigned to the analyzed text.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CategoriesResult"
            },
            "example": [
              {
                "score": 0.594296,
                "label": "/technology and computing/computing/computer software and applications"
              },
              {
                "score": 0.448495,
                "label": "/science"
              },
              {
                "score": 0.426429,
                "label": "/business and finance/industries"
              }
            ]
          },
          "classifications": {
            "description": "The classifications assigned to the analyzed text.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ClassificationsResult"
            },
            "example": [
              {
                "class_name": "temperature",
                "confidence": 0.562519
              },
              {
                "class_name": "conditions",
                "confidence": 0.433996
              }
            ]
          },
          "emotion": {
            "allOf": [
              {
                "$ref": "#/components/schemas/EmotionResult"
              },
              {
                "description": "The anger, disgust, fear, joy, or sadness conveyed by the content"
              }
            ]
          },
          "metadata": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MetadataResult"
              },
              {
                "description": "Webpage metadata, such as the author and the title of the page",
                "type": "object"
              }
            ]
          },
          "relations": {
            "description": "The relationships between entities in the content",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RelationsResult"
            },
            "example": [
              {
                "type": "awardedTo",
                "sentence": "Leonardo DiCaprio won Best Actor in a Leading Role for his performance.",
                "score": 0.680715,
                "arguments": [
                  {
                    "text": "Best Actor",
                    "location": [
                      22,
                      32
                    ],
                    "entities": [
                      {
                        "type": "EntertainmentAward",
                        "text": "Best Actor"
                      }
                    ]
                  },
                  {
                    "text": "Leonardo DiCaprio",
                    "location": [
                      0,
                      17
                    ],
                    "entities": [
                      {
                        "type": "Person",
                        "text": "Leonardo DiCaprio"
                      }
                    ]
                  }
                ]
              }
            ]
          },
          "semantic_roles": {
            "description": "Sentences parsed into `subject`, `action`, and `object` form.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SemanticRolesResult"
            },
            "example": [
              {
                "subject": {
                  "text": "IBM"
                },
                "sentence": "IBM has one of the largest workforces in the world",
                "object": {
                  "text": "one of the largest workforces in the world"
                },
                "action": {
                  "verb": {
                    "text": "have",
                    "tense": "present"
                  },
                  "text": "has",
                  "normalized": "have"
                }
              }
            ]
          },
          "sentiment": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SentimentResult"
              },
              {
                "description": "The sentiment of the content"
              }
            ]
          },
          "summarization": {
            "$ref": "#/components/schemas/SummarizationResult"
          },
          "syntax": {
            "$ref": "#/components/schemas/SyntaxResult"
          }
        }
      },
      "ConceptsResult": {
        "description": "The general concepts referenced or alluded to in the analyzed text",
        "type": "object",
        "properties": {
          "text": {
            "type": "string",
            "description": "Name of the concept"
          },
          "relevance": {
            "type": "number",
            "format": "double",
            "description": "Relevance score between 0 and 1. Higher scores indicate greater relevance"
          },
          "dbpedia_resource": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DBpediaResource"
              },
              {
                "description": "Link to the corresponding DBpedia resource"
              }
            ]
          }
        }
      },
      "DBpediaResource": {
        "type": "string",
        "description": "Link to the corresponding DBpedia resource"
      },
      "DisambiguationResult": {
        "description": "Disambiguation information for the entity",
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Common entity name"
          },
          "dbpedia_resource": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DBpediaResource"
              },
              {
                "description": "Link to the corresponding DBpedia resource"
              }
            ]
          },
          "subtype": {
            "type": "array",
            "description": "Entity subtype information",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "EntitiesResult": {
        "description": "The important people, places, geopolitical entities and other types of entities in your content",
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "description": "Entity type"
          },
          "text": {
            "type": "string",
            "description": "The name of the entity"
          },
          "relevance": {
            "type": "number",
            "format": "double",
            "description": "Relevance score from 0 to 1. Higher values indicate greater relevance"
          },
          "confidence": {
            "type": "number",
            "format": "double",
            "description": "Confidence in the entity identification from 0 to 1. Higher values indicate higher confidence. In standard entities requests, confidence is returned only for English text. All entities requests that use custom models return the confidence score."
          },
          "mentions": {
            "type": "array",
            "description": "Entity mentions and locations",
            "items": {
              "$ref": "#/components/schemas/EntityMention"
            }
          },
          "count": {
            "type": "integer",
            "description": "How many times the entity was mentioned in the text"
          },
          "emotion": {
            "allOf": [
              {
                "$ref": "#/components/schemas/EmotionScores"
              },
              {
                "description": "Emotion analysis results for the entity, enabled with the `emotion` option"
              }
            ]
          },
          "sentiment": {
            "allOf": [
              {
                "$ref": "#/components/schemas/FeatureSentimentResults"
              },
              {
                "description": "Sentiment analysis results for the entity, enabled with the `sentiment` option"
              }
            ]
          },
          "disambiguation": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DisambiguationResult"
              },
              {
                "description": "Disambiguation information for the entity"
              }
            ]
          }
        }
      },
      "EntityMention": {
        "type": "object",
        "properties": {
          "text": {
            "type": "string",
            "description": "Entity mention text"
          },
          "location": {
            "type": "array",
            "description": "Character offsets indicating the beginning and end of the mention in the analyzed text",
            "items": {
              "type": "integer"
            }
          },
          "confidence": {
            "type": "number",
            "format": "double",
            "description": "Confidence in the entity identification from 0 to 1. Higher values indicate higher confidence. In standard entities requests, confidence is returned only for English text. All entities requests that use custom models return the confidence score."
          }
        }
      },
      "KeywordsResult": {
        "type": "object",
        "description": "The important keywords in the content, organized by relevance",
        "properties": {
          "count": {
            "type": "integer",
            "description": "Number of times the keyword appears in the analyzed text"
          },
          "relevance": {
            "type": "number",
            "format": "double",
            "description": "Relevance score from 0 to 1. Higher values indicate greater relevance"
          },
          "text": {
            "type": "string",
            "description": "The keyword text"
          },
          "emotion": {
            "allOf": [
              {
                "$ref": "#/components/schemas/EmotionScores"
              },
              {
                "description": "Emotion analysis results for the keyword, enabled with the `emotion` option"
              }
            ]
          },
          "sentiment": {
            "allOf": [
              {
                "$ref": "#/components/schemas/FeatureSentimentResults"
              },
              {
                "description": "Sentiment analysis results for the keyword, enabled with the `sentiment` option"
              }
            ]
          }
        }
      },
      "CategoriesResult": {
        "description": "A categorization of the analyzed text",
        "type": "object",
        "properties": {
          "label": {
            "type": "string",
            "description": "The path to the category through the multi-level taxonomy hierarchy. For more information about the categories, see [Categories hierarchy](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-categories#categories-hierarchy)."
          },
          "score": {
            "type": "number",
            "format": "double",
            "description": "Confidence score for the category classification. Higher values indicate greater confidence."
          },
          "explanation": {
            "description": "Information that helps to explain what contributed to the categories result.",
            "type": "object",
            "properties": {
              "relevant_text": {
                "description": "An array of relevant text from the source that contributed to the categorization. The sorted array begins with the phrase that contributed most significantly to the result, followed by phrases that were less and less impactful.",
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/CategoriesRelevantText"
                }
              }
            }
          }
        }
      },
      "CategoriesRelevantText": {
        "description": "Relevant text that contributed to the categorization.",
        "type": "object",
        "properties": {
          "text": {
            "type": "string",
            "description": "Text from the analyzed source that supports the categorization."
          }
        }
      },
      "ClassificationsResult": {
        "description": "A classification of the analyzed text",
        "type": "object",
        "properties": {
          "class_name": {
            "type": "string",
            "description": "Classification assigned to the text."
          },
          "confidence": {
            "type": "number",
            "format": "double",
            "description": "Confidence score for the classification. Higher values indicate greater confidence."
          }
        }
      },
      "EmotionResult": {
        "type": "object",
        "description": "The detected anger, disgust, fear, joy, or sadness that is conveyed by the content. Emotion information can be returned for detected entities, keywords, or user-specified target phrases found in the text",
        "properties": {
          "document": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DocumentEmotionResults"
              },
              {
                "description": "Emotion results for the document as a whole"
              }
            ]
          },
          "targets": {
            "type": "array",
            "description": "Emotion results for specified targets",
            "items": {
              "$ref": "#/components/schemas/TargetedEmotionResults"
            }
          }
        },
        "example": {
          "targets": [
            {
              "text": "apples",
              "emotion": {
                "sadness": 0.028574,
                "joy": 0.859042,
                "fear": 0.02752,
                "disgust": 0.017519,
                "anger": 0.012855
              }
            },
            {
              "text": "oranges",
              "emotion": {
                "sadness": 0.514253,
                "joy": 0.078317,
                "fear": 0.074223,
                "disgust": 0.058103,
                "anger": 0.126859
              }
            }
          ],
          "document": {
            "emotion": {
              "sadness": 0.32665,
              "joy": 0.563273,
              "fear": 0.033387,
              "disgust": 0.022637,
              "anger": 0.041796
            }
          }
        }
      },
      "DocumentEmotionResults": {
        "type": "object",
        "description": "Emotion results for the document as a whole",
        "properties": {
          "emotion": {
            "allOf": [
              {
                "$ref": "#/components/schemas/EmotionScores"
              },
              {
                "description": "Emotion results for the document as a whole"
              }
            ]
          }
        }
      },
      "TargetedEmotionResults": {
        "type": "object",
        "description": "Emotion results for a specified target",
        "properties": {
          "text": {
            "type": "string",
            "description": "Targeted text"
          },
          "emotion": {
            "allOf": [
              {
                "$ref": "#/components/schemas/EmotionScores"
              },
              {
                "description": "The emotion results for the target"
              }
            ]
          }
        }
      },
      "EmotionScores": {
        "type": "object",
        "properties": {
          "anger": {
            "type": "number",
            "format": "double",
            "description": "Anger score from 0 to 1. A higher score means that the text is more likely to convey anger"
          },
          "disgust": {
            "type": "number",
            "format": "double",
            "description": "Disgust score from 0 to 1. A higher score means that the text is more likely to convey disgust"
          },
          "fear": {
            "type": "number",
            "format": "double",
            "description": "Fear score from 0 to 1. A higher score means that the text is more likely to convey fear"
          },
          "joy": {
            "type": "number",
            "format": "double",
            "description": "Joy score from 0 to 1. A higher score means that the text is more likely to convey joy"
          },
          "sadness": {
            "type": "number",
            "format": "double",
            "description": "Sadness score from 0 to 1. A higher score means that the text is more likely to convey sadness"
          }
        }
      },
      "MetadataResult": {
        "description": "The authors, publication date, title, prominent page image, and RSS/ATOM feeds of the webpage. Supports URL and HTML input types",
        "type": "object",
        "properties": {
          "authors": {
            "type": "array",
            "description": "The authors of the document",
            "items": {
              "$ref": "#/components/schemas/Author"
            }
          },
          "publication_date": {
            "type": "string",
            "description": "The publication date in the format ISO 8601"
          },
          "title": {
            "type": "string",
            "description": "The title of the document"
          },
          "image": {
            "type": "string",
            "description": "URL of a prominent image on the webpage"
          },
          "feeds": {
            "type": "array",
            "description": "RSS/ATOM feeds found on the webpage",
            "items": {
              "$ref": "#/components/schemas/Feed"
            }
          }
        },
        "example": {
          "title": "IBM - United States",
          "publication_date": "2015-10-01T00:00:00",
          "image": "",
          "feeds": [],
          "authors": []
        }
      },
      "Author": {
        "type": "object",
        "description": "The author of the analyzed content",
        "properties": {
          "name": {
            "type": "string",
            "description": "Name of the author"
          }
        }
      },
      "Feed": {
        "type": "object",
        "description": "RSS or ATOM feed found on the webpage",
        "properties": {
          "link": {
            "type": "string",
            "description": "URL of the RSS or ATOM feed"
          }
        }
      },
      "RelationsResult": {
        "type": "object",
        "description": "The relations between entities found in the content",
        "properties": {
          "score": {
            "type": "number",
            "format": "double",
            "description": "Confidence score for the relation. Higher values indicate greater confidence."
          },
          "sentence": {
            "type": "string",
            "description": "The sentence that contains the relation"
          },
          "type": {
            "type": "string",
            "description": "The type of the relation"
          },
          "arguments": {
            "type": "array",
            "description": "Entity mentions that are involved in the relation",
            "items": {
              "$ref": "#/components/schemas/RelationArgument"
            }
          }
        }
      },
      "RelationArgument": {
        "type": "object",
        "properties": {
          "entities": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RelationEntity"
            },
            "description": "An array of extracted entities"
          },
          "location": {
            "type": "array",
            "description": "Character offsets indicating the beginning and end of the mention in the analyzed text",
            "items": {
              "type": "integer"
            }
          },
          "text": {
            "type": "string",
            "description": "Text that corresponds to the argument"
          }
        }
      },
      "RelationEntity": {
        "type": "object",
        "description": "An entity that corresponds with an argument in a relation",
        "properties": {
          "text": {
            "type": "string",
            "description": "Text that corresponds to the entity"
          },
          "type": {
            "type": "string",
            "description": "Entity type"
          }
        }
      },
      "SemanticRolesResult": {
        "type": "object",
        "description": "The object containing the actions and the objects the actions act upon",
        "properties": {
          "sentence": {
            "type": "string",
            "description": "Sentence from the source that contains the subject, action, and object"
          },
          "subject": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SemanticRolesSubject"
              },
              {
                "type": "object",
                "description": "The extracted subject from the sentence"
              }
            ]
          },
          "action": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SemanticRolesAction"
              },
              {
                "type": "object",
                "description": "The extracted action from the sentence"
              }
            ]
          },
          "object": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SemanticRolesObject"
              },
              {
                "type": "object",
                "description": "The extracted object from the sentence"
              }
            ]
          }
        }
      },
      "SemanticRolesEntity": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "description": "Entity type"
          },
          "text": {
            "type": "string",
            "description": "The entity text"
          }
        }
      },
      "SemanticRolesKeyword": {
        "type": "object",
        "properties": {
          "text": {
            "type": "string",
            "description": "The keyword text"
          }
        }
      },
      "SemanticRolesSubject": {
        "type": "object",
        "properties": {
          "text": {
            "type": "string",
            "description": "Text that corresponds to the subject role"
          },
          "entities": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SemanticRolesEntity"
            },
            "description": "An array of extracted entities"
          },
          "keywords": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SemanticRolesKeyword"
            },
            "description": "An array of extracted keywords"
          }
        }
      },
      "SemanticRolesAction": {
        "type": "object",
        "properties": {
          "text": {
            "type": "string",
            "description": "Analyzed text that corresponds to the action"
          },
          "normalized": {
            "type": "string",
            "description": "normalized version of the action"
          },
          "verb": {
            "$ref": "#/components/schemas/SemanticRolesVerb"
          }
        }
      },
      "SemanticRolesObject": {
        "type": "object",
        "properties": {
          "text": {
            "type": "string",
            "description": "Object text"
          },
          "keywords": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SemanticRolesKeyword"
            },
            "description": "An array of extracted keywords"
          }
        }
      },
      "SemanticRolesVerb": {
        "type": "object",
        "properties": {
          "text": {
            "type": "string",
            "description": "The keyword text"
          },
          "tense": {
            "type": "string",
            "description": "Verb tense"
          }
        }
      },
      "SentimentResult": {
        "type": "object",
        "description": "The sentiment of the content",
        "properties": {
          "document": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DocumentSentimentResults"
              },
              {
                "description": "The document level sentiment"
              }
            ]
          },
          "targets": {
            "type": "array",
            "description": "The targeted sentiment to analyze",
            "items": {
              "$ref": "#/components/schemas/TargetedSentimentResults"
            }
          }
        },
        "example": {
          "targets": [
            {
              "text": "stocks",
              "score": 0.279964,
              "label": "positive"
            }
          ],
          "document": {
            "score": 0.127034,
            "label": "positive"
          }
        }
      },
      "DocumentSentimentResults": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string",
            "description": "Indicates whether the sentiment is positive, neutral, or negative"
          },
          "score": {
            "type": "number",
            "format": "double",
            "description": "Sentiment score from -1 (negative) to 1 (positive)"
          }
        }
      },
      "FeatureSentimentResults": {
        "type": "object",
        "properties": {
          "score": {
            "type": "number",
            "format": "double",
            "description": "Sentiment score from -1 (negative) to 1 (positive)"
          }
        }
      },
      "TargetedSentimentResults": {
        "type": "object",
        "properties": {
          "text": {
            "type": "string",
            "description": "Targeted text"
          },
          "score": {
            "type": "number",
            "format": "double",
            "description": "Sentiment score from -1 (negative) to 1 (positive)"
          }
        }
      },
      "SyntaxResult": {
        "description": "Tokens and sentences returned from syntax analysis.",
        "type": "object",
        "properties": {
          "tokens": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TokenResult"
            }
          },
          "sentences": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SentenceResult"
            }
          }
        }
      },
      "SummarizationResult": {
        "description": "(Experimental) Summary of content",
        "type": "object",
        "properties": {
          "text": {
            "type": "string",
            "description": "Summary sentences of input source"
          }
        },
        "example": {
          "text": "Today, IBM and Workday, a leading provider of enterprise applications for human resources and finance, announced a joint solution designed to help companies begin the process of safely re-opening their workplaces. Here are five key takeaways from the announcement. The two companies, which have had a partnership since 2011, announced a new solution to help businesses and communities determine when and how to safely open up their workplaces during the ongoing COVID-19 pandemic."
        },
        "x-sdk-exclude": true
      },
      "TokenResult": {
        "type": "object",
        "properties": {
          "text": {
            "type": "string",
            "description": "The token as it appears in the analyzed text."
          },
          "part_of_speech": {
            "type": "string",
            "description": "The part of speech of the token. For more information about the values, see [Universal Dependencies POS tags](https://universaldependencies.org/u/pos/).",
            "enum": [
              "ADJ",
              "ADP",
              "ADV",
              "AUX",
              "CCONJ",
              "DET",
              "INTJ",
              "NOUN",
              "NUM",
              "PART",
              "PRON",
              "PROPN",
              "PUNCT",
              "SCONJ",
              "SYM",
              "VERB",
              "X"
            ]
          },
          "location": {
            "type": "array",
            "description": "Character offsets indicating the beginning and end of the token in the analyzed text.",
            "items": {
              "type": "integer"
            }
          },
          "lemma": {
            "type": "string",
            "description": "The [lemma](https://wikipedia.org/wiki/Lemma_%28morphology%29) of the token."
          }
        }
      },
      "SentenceResult": {
        "type": "object",
        "properties": {
          "text": {
            "type": "string",
            "description": "The sentence."
          },
          "location": {
            "type": "array",
            "description": "Character offsets indicating the beginning and end of the sentence in the analyzed text.",
            "items": {
              "type": "integer"
            }
          }
        }
      },
      "ConceptsOptions": {
        "type": "object",
        "description": "Returns high-level concepts in the content. For example, a research paper about deep learning might return the concept, \"Artificial Intelligence\" although the term is not mentioned.\n\nSupported languages: English, French, German, Italian, Japanese, Korean, Portuguese, Spanish.",
        "properties": {
          "limit": {
            "type": "integer",
            "default": 8,
            "description": "Maximum number of concepts to return.",
            "maximum": 50
          }
        },
        "example": {
          "limit": 3
        },
        "x-java-builder": true
      },
      "EmotionOptions": {
        "type": "object",
        "description": "Detects anger, disgust, fear, joy, or sadness that is conveyed in the content or by the context around target phrases specified in the targets parameter. You can analyze emotion for detected entities with `entities.emotion` and for keywords with `keywords.emotion`.\n\nSupported languages: English",
        "properties": {
          "document": {
            "type": "boolean",
            "default": true,
            "description": "Set this to `false` to hide document-level emotion results"
          },
          "targets": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Emotion results will be returned for each target string that is found in the document"
          }
        },
        "example": {
          "targets": [
            "apples",
            "oranges"
          ]
        },
        "x-java-builder": true
      },
      "EntitiesOptions": {
        "type": "object",
        "description": "Identifies people, cities, organizations, and other entities in the content. For more information, see [Entity types and subtypes](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-entity-type-systems).\n\nSupported languages: English, French, German, Italian, Japanese, Korean, Portuguese, Russian, Spanish, Swedish. Arabic, Chinese, and Dutch are supported only through custom models.",
        "properties": {
          "limit": {
            "type": "integer",
            "default": 50,
            "description": "Maximum number of entities to return.",
            "maximum": 250
          },
          "mentions": {
            "type": "boolean",
            "default": false,
            "description": "Set this to `true` to return locations of entity mentions"
          },
          "model": {
            "type": "string",
            "description": "Enter a [custom model](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-customizing) ID to override the standard entity detection model"
          },
          "sentiment": {
            "type": "boolean",
            "default": false,
            "description": "Set this to `true` to return sentiment information for detected entities"
          },
          "emotion": {
            "type": "boolean",
            "default": false,
            "description": "Set this to `true` to analyze emotion for detected keywords"
          }
        },
        "example": {
          "sentiment": true,
          "limit": 1
        },
        "x-java-builder": true
      },
      "KeywordsOptions": {
        "type": "object",
        "description": "Returns important keywords in the content.\n\nSupported languages: English, French, German, Italian, Japanese, Korean, Portuguese, Russian, Spanish, Swedish.",
        "properties": {
          "limit": {
            "type": "integer",
            "default": 50,
            "description": "Maximum number of keywords to return",
            "maximum": 250
          },
          "sentiment": {
            "type": "boolean",
            "default": false,
            "description": "Set this to `true` to return sentiment information for detected keywords"
          },
          "emotion": {
            "type": "boolean",
            "default": false,
            "description": "Set this to `true` to analyze emotion for detected keywords"
          }
        },
        "example": {
          "sentiment": true,
          "emotion": true,
          "limit": 3
        },
        "x-java-builder": true
      },
      "MetadataOptions": {
        "type": "object",
        "description": "Returns information from the document, including author name, title, RSS/ATOM feeds, prominent page image, and publication date. Supports URL and HTML input types only.",
        "properties": {},
        "additionalProperties": true
      },
      "RelationsOptions": {
        "type": "object",
        "description": "Recognizes when two entities are related and identifies the type of relation. For example, an `awardedTo` relation might connect the entities \"Nobel Prize\" and \"Albert Einstein\". For more information, see [Relation types](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-relations).\n\nSupported languages: Arabic, English, German, Japanese, Korean, Spanish. Chinese, Dutch, French, Italian, and Portuguese custom models are also supported.",
        "properties": {
          "model": {
            "type": "string",
            "description": "Enter a [custom model](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-customizing) ID to override the default model"
          }
        },
        "x-java-builder": true
      },
      "SemanticRolesOptions": {
        "type": "object",
        "description": "Parses sentences into subject, action, and object form.\n\nSupported languages: English, German, Japanese, Korean, Spanish.",
        "properties": {
          "limit": {
            "type": "integer",
            "description": "Maximum number of semantic_roles results to return",
            "default": 50
          },
          "keywords": {
            "type": "boolean",
            "description": "Set this to `true` to return keyword information for subjects and objects",
            "default": false
          },
          "entities": {
            "type": "boolean",
            "description": "Set this to `true` to return entity information for subjects and objects",
            "default": false
          }
        },
        "example": {
          "keywords": true,
          "entities": true
        },
        "x-java-builder": true
      },
      "SentimentOptions": {
        "type": "object",
        "description": "Analyzes the general sentiment of your content or the sentiment toward specific target phrases. You can analyze sentiment for detected entities with `entities.sentiment` and for keywords with `keywords.sentiment`.\n\n Supported languages: Arabic, English, French, German, Italian, Japanese, Korean, Portuguese, Russian, Spanish",
        "properties": {
          "document": {
            "type": "boolean",
            "default": true,
            "description": "Set this to `false` to hide document-level sentiment results"
          },
          "targets": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Sentiment results will be returned for each target string that is found in the document"
          }
        },
        "example": {
          "targets": [
            "stocks"
          ]
        },
        "x-java-builder": true
      },
      "CategoriesModel": {
        "description": "Categories model",
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseAdvancedRulesModel"
          },
          {
            "required": [
              "language",
              "model_id",
              "status",
              "created"
            ]
          }
        ]
      },
      "CategoriesModelList": {
        "description": "List of categories models.",
        "type": "object",
        "properties": {
          "models": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CategoriesModel"
            },
            "description": "The categories models"
          }
        }
      },
      "CategoriesModelFileAndMetadata": {
        "allOf": [
          {
            "$ref": "#/components/schemas/ModelMetadata"
          },
          {
            "type": "object",
            "properties": {
              "training_data": {
                "type": "string",
                "description": "Training data in JSON format. For more information, see [Categories training data requirements](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-categories##categories-training-data-requirements).",
                "format": "binary",
                "x-file-content-types": [
                  "json",
                  "application/json"
                ]
              }
            },
            "required": [
              "training_data"
            ]
          }
        ]
      },
      "CategoriesOptions": {
        "type": "object",
        "description": "Returns a hierarchical taxonomy of the content. The top three categories are returned by default. \n\nSupported languages: Arabic, English, French, German, Italian, Japanese, Korean, Portuguese, Spanish.",
        "properties": {
          "explanation": {
            "description": "Set this to `true` to return explanations for each categorization. **This is available only for English categories.**",
            "type": "boolean",
            "default": false
          },
          "limit": {
            "description": "Maximum number of categories to return.",
            "type": "integer",
            "default": 3,
            "maximum": 10
          },
          "model": {
            "description": "(Beta) Enter a [custom model](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-customizing) ID to override the standard categories model. **This is available only for English categories.**",
            "type": "string"
          }
        },
        "x-java-builder": true
      },
      "ClassificationsModel": {
        "description": "Classifications model",
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseAdvancedRulesModel"
          },
          {
            "required": [
              "language",
              "model_id",
              "status",
              "created"
            ]
          }
        ]
      },
      "ClassificationsModelList": {
        "description": "List of classifications models.",
        "type": "object",
        "properties": {
          "models": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ClassificationsModel"
            },
            "description": "The classifications models"
          }
        }
      },
      "ClassificationsModelFileMetadataAndTrainingParameters": {
        "allOf": [
          {
            "$ref": "#/components/schemas/ClassificationsModelFileAndMetadata"
          },
          {
            "type": "object",
            "properties": {
              "training_parameters": {
                "$ref": "#/components/schemas/ClassificationsTrainingParameters"
              }
            }
          }
        ]
      },
      "ClassificationsModelFileAndMetadata": {
        "allOf": [
          {
            "$ref": "#/components/schemas/ModelMetadata"
          },
          {
            "type": "object",
            "properties": {
              "training_data": {
                "type": "string",
                "description": "Training data in JSON format. For more information, see [Classifications training data requirements](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-classifications#classification-training-data-requirements).",
                "format": "binary",
                "x-file-content-types": [
                  "json",
                  "application/json"
                ]
              }
            },
            "required": [
              "training_data"
            ]
          }
        ]
      },
      "ClassificationsOptions": {
        "type": "object",
        "description": "Returns text classifications for the content.",
        "properties": {
          "model": {
            "description": "Enter a [custom model](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-customizing) ID of the classifications model to be used. \n\nYou can analyze tone by using a language-specific model ID. See [Tone analytics (Classifications)](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-tone_analytics) for more information.",
            "type": "string"
          }
        },
        "x-java-builder": true
      },
      "SummarizationOptions": {
        "description": "(Experimental) Returns a summary of content. \n\nSupported languages: English only. \n\nSupported regions: Dallas region only",
        "type": "object",
        "properties": {
          "limit": {
            "type": "integer",
            "description": "Maximum number of summary sentences to return",
            "default": 3,
            "maximum": 10
          }
        },
        "additionalProperties": false
      },
      "SyntaxOptions": {
        "type": "object",
        "description": "Returns tokens and sentences from the input text.",
        "properties": {
          "tokens": {
            "type": "object",
            "description": "Tokenization options.",
            "properties": {
              "lemma": {
                "type": "boolean",
                "description": "Set this to `true` to return the lemma for each token."
              },
              "part_of_speech": {
                "type": "boolean",
                "description": "Set this to `true` to return the part of speech for each token."
              }
            }
          },
          "sentences": {
            "type": "boolean",
            "description": "Set this to `true` to return sentence information."
          }
        },
        "example": {
          "tokens": {
            "lemma": true,
            "part_of_speech": true
          },
          "sentences": true
        },
        "x-java-builder": true
      },
      "ErrorResponse": {
        "type": "object",
        "required": [
          "code",
          "error"
        ],
        "properties": {
          "code": {
            "description": "The HTTP error status code",
            "type": "integer"
          },
          "error": {
            "description": "A message describing the error",
            "type": "string"
          }
        }
      },
      "ClassificationsTrainingParameters": {
        "type": "object",
        "description": "Optional classifications training parameters along with model train requests",
        "properties": {
          "model_type": {
            "description": "Model type selector to train either a single_label or a multi_label classifier",
            "type": "string",
            "enum": [
              "single_label",
              "multi_label"
            ]
          }
        }
      }
    }
  }
}