def analyze(features:, text: nil, html: nil, url: nil, clean: nil, xpath: nil, fallback_to_raw: nil, return_analyzed_text: nil, language: nil, limit_text_characters: nil)
      raise ArgumentError.new("features must be provided") if features.nil?

      headers = {
      }
      sdk_headers = Common.new.get_sdk_headers("natural-language-understanding", "V1", "analyze")
      headers.merge!(sdk_headers)

      params = {
        "version" => @version
      }

      data = {
        "features" => features,
        "text" => text,
        "html" => html,
        "url" => url,
        "clean" => clean,
        "xpath" => xpath,
        "fallback_to_raw" => fallback_to_raw,
        "return_analyzed_text" => return_analyzed_text,
        "language" => language,
        "limit_text_characters" => limit_text_characters
      }

      method_url = "/v1/analyze"

      response = request(
        method: "POST",
        url: method_url,
        headers: headers,
        params: params,
        json: data,
        accept_json: true
      )
      response
    end
def analyze(features:, text: nil, html: nil, url: nil, clean: nil, xpath: nil, fallback_to_raw: nil, return_analyzed_text: nil, language: nil, limit_text_characters: nil)
      raise ArgumentError.new("features must be provided") if features.nil?

      headers = {
      }
      sdk_headers = Common.new.get_sdk_headers("natural-language-understanding", "V1", "analyze")
      headers.merge!(sdk_headers)

      params = {
        "version" => @version
      }

      data = {
        "features" => features,
        "text" => text,
        "html" => html,
        "url" => url,
        "clean" => clean,
        "xpath" => xpath,
        "fallback_to_raw" => fallback_to_raw,
        "return_analyzed_text" => return_analyzed_text,
        "language" => language,
        "limit_text_characters" => limit_text_characters
      }

      method_url = "/v1/analyze"

      response = request(
        method: "POST",
        url: method_url,
        headers: headers,
        params: params,
        json: data,
        accept_json: true
      )
      response
    end
@!method initialize(args)
 Construct a new client for the Natural Language Understanding service.

 @param args [Hash] The args to initialize with
 @option args version [String] The API version date to use with the service, in
   "YYYY-MM-DD" format. Whenever the API is changed in a backwards
   incompatible way, a new minor version of the API is released.
   The service uses the API version for the date you specify, or
   the most recent version before that date. Note that you should
   not programmatically specify the current date at runtime, in
   case the API has been updated since your application's release.
   Instead, specify a version date that is compatible with your
   application, and don't change it until your application is
   ready for a later version.
 @option args url [String] The base url to use when contacting the service (e.g.
   "https://gateway.watsonplatform.net/natural-language-understanding/api").
   The base url may differ between Bluemix regions.
 @option args username [String] The username used to authenticate with the service.
   Username and password credentials are only required to run your
   application locally or outside of Bluemix. When running on
   Bluemix, the credentials will be automatically loaded from the
   `VCAP_SERVICES` environment variable.
 @option args password [String] The password used to authenticate with the service.
   Username and password credentials are only required to run your
   application locally or outside of Bluemix. When running on
   Bluemix, the credentials will be automatically loaded from the
   `VCAP_SERVICES` environment variable.
 @option args iam_apikey [String] An API key that can be used to request IAM tokens. If
   this API key is provided, the SDK will manage the token and handle the
   refreshing.
 @option args iam_access_token [String] An IAM access token is fully managed by the application.
   Responsibility falls on the application to refresh the token, either before
   it expires or reactively upon receiving a 401 from the service as any requests
   made with an expired token will fail.
 @option args iam_url [String] An optional URL for the IAM service API. Defaults to
   'https://iam.ng.bluemix.net/identity/token'.

 Analyze


 @!method analyze(features:, text: nil, html: nil, url: nil, clean: nil, xpath: nil, fallback_to_raw: nil, return_analyzed_text: nil, language: nil, limit_text_characters: nil)
 Analyze text.
 Analyzes text, HTML, or a public webpage for the following features:
   - Categories
   - Concepts
   - Emotion
   - Entities
   - Keywords
   - Metadata
   - Relations
   - Semantic roles
   - Sentiment
   - Syntax (Experimental).
 @param features [Features] Specific features to analyze the document for.
 @param text [String] The plain text to analyze. One of the `text`, `html`, or `url` parameters is
   required.
 @param html [String] The HTML file to analyze. One of the `text`, `html`, or `url` parameters is
   required.
 @param url [String] The webpage to analyze. One of the `text`, `html`, or `url` parameters is
   required.
 @param clean [Boolean] Set this to `false` to disable webpage cleaning. To learn more about webpage
   cleaning, see the [Analyzing
   webpages](https://cloud.ibm.com/docs/services/natural-language-understanding/analyzing-webpages.html)
   documentation.
 @param xpath [String] An [XPath
   query](https://cloud.ibm.com/docs/services/natural-language-understanding/analyzing-webpages.html#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`.
 @param fallback_to_raw [Boolean] Whether to use raw HTML content if text cleaning fails.
 @param return_analyzed_text [Boolean] Whether or not to return the analyzed text.
 @param language [String] 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. See [Language
   support](https://www.bluemix.net/docs/services/natural-language-understanding/language-support.html)
   for more information.
 @param limit_text_characters [Fixnum] Sets the maximum number of characters that are processed by the service.
 @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.