watson_developer_cloud.natural_language_understanding_v1 module

class NaturalLanguageUnderstandingV1(version, url='https://gateway.watsonplatform.net/natural-language-understanding/api', username=None, password=None, use_vcap_services=True)[source]

Bases: watson_developer_cloud.watson_developer_cloud_service.WatsonDeveloperCloudService

All methods taking features use the feature classes from watson_developer_cloud/natural_language_understanding/features/v1

base_url = 'https://gateway.watsonplatform.net'
default_url = 'https://gateway.watsonplatform.net/natural-language-understanding/api'
latest_version = '2017-01-23'
analyze(features, text=None, url=None, html=None, clean=True, xpath=None, fallback_to_raw=True, return_analyzed_text=False, language=None)[source]

This is the method to call and analyze text with the supplied features :param features: The list of features :param text: Text to analyze (pick one of text, url, or html) :param url: url to analyze (pick one of text, url, or html) :param html: html to analyze (pick one of text, url, or html) :param clean: should the service clean the text? :param xpath: xpath to use for html or url :param fallback_to_raw: :param return_analyzed_text: should the analyzed

text be returned (defaults to false)
Parameters:language – what language to use
Returns:dict of analyzed text