partition
stringclasses
3 values
func_name
stringlengths
1
134
docstring
stringlengths
1
46.9k
path
stringlengths
4
223
original_string
stringlengths
75
104k
code
stringlengths
75
104k
docstring_tokens
listlengths
1
1.97k
repo
stringlengths
7
55
language
stringclasses
1 value
url
stringlengths
87
315
code_tokens
listlengths
19
28.4k
sha
stringlengths
40
40
train
ListCollectionFieldsResponse._from_dict
Initialize a ListCollectionFieldsResponse object from a json dictionary.
ibm_watson/discovery_v1.py
def _from_dict(cls, _dict): """Initialize a ListCollectionFieldsResponse object from a json dictionary.""" args = {} if 'fields' in _dict: args['fields'] = [ Field._from_dict(x) for x in (_dict.get('fields')) ] return cls(**args)
def _from_dict(cls, _dict): """Initialize a ListCollectionFieldsResponse object from a json dictionary.""" args = {} if 'fields' in _dict: args['fields'] = [ Field._from_dict(x) for x in (_dict.get('fields')) ] return cls(**args)
[ "Initialize", "a", "ListCollectionFieldsResponse", "object", "from", "a", "json", "dictionary", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/discovery_v1.py#L6641-L6648
[ "def", "_from_dict", "(", "cls", ",", "_dict", ")", ":", "args", "=", "{", "}", "if", "'fields'", "in", "_dict", ":", "args", "[", "'fields'", "]", "=", "[", "Field", ".", "_from_dict", "(", "x", ")", "for", "x", "in", "(", "_dict", ".", "get", ...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
ListCollectionFieldsResponse._to_dict
Return a json dictionary representing this model.
ibm_watson/discovery_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'fields') and self.fields is not None: _dict['fields'] = [x._to_dict() for x in self.fields] return _dict
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'fields') and self.fields is not None: _dict['fields'] = [x._to_dict() for x in self.fields] return _dict
[ "Return", "a", "json", "dictionary", "representing", "this", "model", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/discovery_v1.py#L6650-L6655
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'fields'", ")", "and", "self", ".", "fields", "is", "not", "None", ":", "_dict", "[", "'fields'", "]", "=", "[", "x", ".", "_to_dict", "(", ")",...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
ListCollectionsResponse._from_dict
Initialize a ListCollectionsResponse object from a json dictionary.
ibm_watson/discovery_v1.py
def _from_dict(cls, _dict): """Initialize a ListCollectionsResponse object from a json dictionary.""" args = {} if 'collections' in _dict: args['collections'] = [ Collection._from_dict(x) for x in (_dict.get('collections')) ] return cls(**args)
def _from_dict(cls, _dict): """Initialize a ListCollectionsResponse object from a json dictionary.""" args = {} if 'collections' in _dict: args['collections'] = [ Collection._from_dict(x) for x in (_dict.get('collections')) ] return cls(**args)
[ "Initialize", "a", "ListCollectionsResponse", "object", "from", "a", "json", "dictionary", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/discovery_v1.py#L6690-L6697
[ "def", "_from_dict", "(", "cls", ",", "_dict", ")", ":", "args", "=", "{", "}", "if", "'collections'", "in", "_dict", ":", "args", "[", "'collections'", "]", "=", "[", "Collection", ".", "_from_dict", "(", "x", ")", "for", "x", "in", "(", "_dict", ...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
ListCollectionsResponse._to_dict
Return a json dictionary representing this model.
ibm_watson/discovery_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'collections') and self.collections is not None: _dict['collections'] = [x._to_dict() for x in self.collections] return _dict
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'collections') and self.collections is not None: _dict['collections'] = [x._to_dict() for x in self.collections] return _dict
[ "Return", "a", "json", "dictionary", "representing", "this", "model", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/discovery_v1.py#L6699-L6704
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'collections'", ")", "and", "self", ".", "collections", "is", "not", "None", ":", "_dict", "[", "'collections'", "]", "=", "[", "x", ".", "_to_dict"...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
ListConfigurationsResponse._from_dict
Initialize a ListConfigurationsResponse object from a json dictionary.
ibm_watson/discovery_v1.py
def _from_dict(cls, _dict): """Initialize a ListConfigurationsResponse object from a json dictionary.""" args = {} if 'configurations' in _dict: args['configurations'] = [ Configuration._from_dict(x) for x in (_dict.get('configurations')) ]...
def _from_dict(cls, _dict): """Initialize a ListConfigurationsResponse object from a json dictionary.""" args = {} if 'configurations' in _dict: args['configurations'] = [ Configuration._from_dict(x) for x in (_dict.get('configurations')) ]...
[ "Initialize", "a", "ListConfigurationsResponse", "object", "from", "a", "json", "dictionary", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/discovery_v1.py#L6739-L6747
[ "def", "_from_dict", "(", "cls", ",", "_dict", ")", ":", "args", "=", "{", "}", "if", "'configurations'", "in", "_dict", ":", "args", "[", "'configurations'", "]", "=", "[", "Configuration", ".", "_from_dict", "(", "x", ")", "for", "x", "in", "(", "_...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
ListConfigurationsResponse._to_dict
Return a json dictionary representing this model.
ibm_watson/discovery_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'configurations') and self.configurations is not None: _dict['configurations'] = [ x._to_dict() for x in self.configurations ] return _dict
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'configurations') and self.configurations is not None: _dict['configurations'] = [ x._to_dict() for x in self.configurations ] return _dict
[ "Return", "a", "json", "dictionary", "representing", "this", "model", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/discovery_v1.py#L6749-L6756
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'configurations'", ")", "and", "self", ".", "configurations", "is", "not", "None", ":", "_dict", "[", "'configurations'", "]", "=", "[", "x", ".", "...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
ListEnvironmentsResponse._from_dict
Initialize a ListEnvironmentsResponse object from a json dictionary.
ibm_watson/discovery_v1.py
def _from_dict(cls, _dict): """Initialize a ListEnvironmentsResponse object from a json dictionary.""" args = {} if 'environments' in _dict: args['environments'] = [ Environment._from_dict(x) for x in (_dict.get('environments')) ] return cls(**args...
def _from_dict(cls, _dict): """Initialize a ListEnvironmentsResponse object from a json dictionary.""" args = {} if 'environments' in _dict: args['environments'] = [ Environment._from_dict(x) for x in (_dict.get('environments')) ] return cls(**args...
[ "Initialize", "a", "ListEnvironmentsResponse", "object", "from", "a", "json", "dictionary", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/discovery_v1.py#L6791-L6798
[ "def", "_from_dict", "(", "cls", ",", "_dict", ")", ":", "args", "=", "{", "}", "if", "'environments'", "in", "_dict", ":", "args", "[", "'environments'", "]", "=", "[", "Environment", ".", "_from_dict", "(", "x", ")", "for", "x", "in", "(", "_dict",...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
ListEnvironmentsResponse._to_dict
Return a json dictionary representing this model.
ibm_watson/discovery_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'environments') and self.environments is not None: _dict['environments'] = [x._to_dict() for x in self.environments] return _dict
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'environments') and self.environments is not None: _dict['environments'] = [x._to_dict() for x in self.environments] return _dict
[ "Return", "a", "json", "dictionary", "representing", "this", "model", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/discovery_v1.py#L6800-L6805
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'environments'", ")", "and", "self", ".", "environments", "is", "not", "None", ":", "_dict", "[", "'environments'", "]", "=", "[", "x", ".", "_to_di...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
LogQueryResponse._from_dict
Initialize a LogQueryResponse object from a json dictionary.
ibm_watson/discovery_v1.py
def _from_dict(cls, _dict): """Initialize a LogQueryResponse object from a json dictionary.""" args = {} if 'matching_results' in _dict: args['matching_results'] = _dict.get('matching_results') if 'results' in _dict: args['results'] = [ LogQueryRes...
def _from_dict(cls, _dict): """Initialize a LogQueryResponse object from a json dictionary.""" args = {} if 'matching_results' in _dict: args['matching_results'] = _dict.get('matching_results') if 'results' in _dict: args['results'] = [ LogQueryRes...
[ "Initialize", "a", "LogQueryResponse", "object", "from", "a", "json", "dictionary", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/discovery_v1.py#L6843-L6853
[ "def", "_from_dict", "(", "cls", ",", "_dict", ")", ":", "args", "=", "{", "}", "if", "'matching_results'", "in", "_dict", ":", "args", "[", "'matching_results'", "]", "=", "_dict", ".", "get", "(", "'matching_results'", ")", "if", "'results'", "in", "_d...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
LogQueryResponse._to_dict
Return a json dictionary representing this model.
ibm_watson/discovery_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'matching_results') and self.matching_results is not None: _dict['matching_results'] = self.matching_results if hasattr(self, 'results') and self.results...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'matching_results') and self.matching_results is not None: _dict['matching_results'] = self.matching_results if hasattr(self, 'results') and self.results...
[ "Return", "a", "json", "dictionary", "representing", "this", "model", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/discovery_v1.py#L6855-L6863
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'matching_results'", ")", "and", "self", ".", "matching_results", "is", "not", "None", ":", "_dict", "[", "'matching_results'", "]", "=", "self", ".", ...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
LogQueryResponseResult._from_dict
Initialize a LogQueryResponseResult object from a json dictionary.
ibm_watson/discovery_v1.py
def _from_dict(cls, _dict): """Initialize a LogQueryResponseResult object from a json dictionary.""" args = {} if 'environment_id' in _dict: args['environment_id'] = _dict.get('environment_id') if 'customer_id' in _dict: args['customer_id'] = _dict.get('customer_i...
def _from_dict(cls, _dict): """Initialize a LogQueryResponseResult object from a json dictionary.""" args = {} if 'environment_id' in _dict: args['environment_id'] = _dict.get('environment_id') if 'customer_id' in _dict: args['customer_id'] = _dict.get('customer_i...
[ "Initialize", "a", "LogQueryResponseResult", "object", "from", "a", "json", "dictionary", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/discovery_v1.py#L7018-L7053
[ "def", "_from_dict", "(", "cls", ",", "_dict", ")", ":", "args", "=", "{", "}", "if", "'environment_id'", "in", "_dict", ":", "args", "[", "'environment_id'", "]", "=", "_dict", ".", "get", "(", "'environment_id'", ")", "if", "'customer_id'", "in", "_dic...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
LogQueryResponseResult._to_dict
Return a json dictionary representing this model.
ibm_watson/discovery_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'environment_id') and self.environment_id is not None: _dict['environment_id'] = self.environment_id if hasattr(self, 'customer_id') and self.customer_id is not None: ...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'environment_id') and self.environment_id is not None: _dict['environment_id'] = self.environment_id if hasattr(self, 'customer_id') and self.customer_id is not None: ...
[ "Return", "a", "json", "dictionary", "representing", "this", "model", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/discovery_v1.py#L7055-L7092
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'environment_id'", ")", "and", "self", ".", "environment_id", "is", "not", "None", ":", "_dict", "[", "'environment_id'", "]", "=", "self", ".", "envi...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
LogQueryResponseResultDocuments._from_dict
Initialize a LogQueryResponseResultDocuments object from a json dictionary.
ibm_watson/discovery_v1.py
def _from_dict(cls, _dict): """Initialize a LogQueryResponseResultDocuments object from a json dictionary.""" args = {} if 'results' in _dict: args['results'] = [ LogQueryResponseResultDocumentsResult._from_dict(x) for x in (_dict.get('results')) ...
def _from_dict(cls, _dict): """Initialize a LogQueryResponseResultDocuments object from a json dictionary.""" args = {} if 'results' in _dict: args['results'] = [ LogQueryResponseResultDocumentsResult._from_dict(x) for x in (_dict.get('results')) ...
[ "Initialize", "a", "LogQueryResponseResultDocuments", "object", "from", "a", "json", "dictionary", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/discovery_v1.py#L7133-L7143
[ "def", "_from_dict", "(", "cls", ",", "_dict", ")", ":", "args", "=", "{", "}", "if", "'results'", "in", "_dict", ":", "args", "[", "'results'", "]", "=", "[", "LogQueryResponseResultDocumentsResult", ".", "_from_dict", "(", "x", ")", "for", "x", "in", ...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
LogQueryResponseResultDocuments._to_dict
Return a json dictionary representing this model.
ibm_watson/discovery_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'results') and self.results is not None: _dict['results'] = [x._to_dict() for x in self.results] if hasattr(self, 'count') and self.count is not None: _dict['co...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'results') and self.results is not None: _dict['results'] = [x._to_dict() for x in self.results] if hasattr(self, 'count') and self.count is not None: _dict['co...
[ "Return", "a", "json", "dictionary", "representing", "this", "model", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/discovery_v1.py#L7145-L7152
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'results'", ")", "and", "self", ".", "results", "is", "not", "None", ":", "_dict", "[", "'results'", "]", "=", "[", "x", ".", "_to_dict", "(", "...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
LogQueryResponseResultDocumentsResult._to_dict
Return a json dictionary representing this model.
ibm_watson/discovery_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'position') and self.position is not None: _dict['position'] = self.position if hasattr(self, 'document_id') and self.document_id is not None: _dict['document_i...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'position') and self.position is not None: _dict['position'] = self.position if hasattr(self, 'document_id') and self.document_id is not None: _dict['document_i...
[ "Return", "a", "json", "dictionary", "representing", "this", "model", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/discovery_v1.py#L7228-L7241
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'position'", ")", "and", "self", ".", "position", "is", "not", "None", ":", "_dict", "[", "'position'", "]", "=", "self", ".", "position", "if", "...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
MetricAggregation._from_dict
Initialize a MetricAggregation object from a json dictionary.
ibm_watson/discovery_v1.py
def _from_dict(cls, _dict): """Initialize a MetricAggregation object from a json dictionary.""" args = {} if 'interval' in _dict: args['interval'] = _dict.get('interval') if 'event_type' in _dict: args['event_type'] = _dict.get('event_type') if 'results' i...
def _from_dict(cls, _dict): """Initialize a MetricAggregation object from a json dictionary.""" args = {} if 'interval' in _dict: args['interval'] = _dict.get('interval') if 'event_type' in _dict: args['event_type'] = _dict.get('event_type') if 'results' i...
[ "Initialize", "a", "MetricAggregation", "object", "from", "a", "json", "dictionary", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/discovery_v1.py#L7286-L7298
[ "def", "_from_dict", "(", "cls", ",", "_dict", ")", ":", "args", "=", "{", "}", "if", "'interval'", "in", "_dict", ":", "args", "[", "'interval'", "]", "=", "_dict", ".", "get", "(", "'interval'", ")", "if", "'event_type'", "in", "_dict", ":", "args"...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
MetricAggregation._to_dict
Return a json dictionary representing this model.
ibm_watson/discovery_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'interval') and self.interval is not None: _dict['interval'] = self.interval if hasattr(self, 'event_type') and self.event_type is not None: _dict['event_type']...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'interval') and self.interval is not None: _dict['interval'] = self.interval if hasattr(self, 'event_type') and self.event_type is not None: _dict['event_type']...
[ "Return", "a", "json", "dictionary", "representing", "this", "model", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/discovery_v1.py#L7300-L7309
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'interval'", ")", "and", "self", ".", "interval", "is", "not", "None", ":", "_dict", "[", "'interval'", "]", "=", "self", ".", "interval", "if", "...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
MetricAggregationResult._to_dict
Return a json dictionary representing this model.
ibm_watson/discovery_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'key_as_string') and self.key_as_string is not None: _dict['key_as_string'] = datetime_to_string(self.key_as_string) if hasattr(self, 'key') and self.key is not None: ...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'key_as_string') and self.key_as_string is not None: _dict['key_as_string'] = datetime_to_string(self.key_as_string) if hasattr(self, 'key') and self.key is not None: ...
[ "Return", "a", "json", "dictionary", "representing", "this", "model", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/discovery_v1.py#L7377-L7389
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'key_as_string'", ")", "and", "self", ".", "key_as_string", "is", "not", "None", ":", "_dict", "[", "'key_as_string'", "]", "=", "datetime_to_string", "...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
MetricResponse._from_dict
Initialize a MetricResponse object from a json dictionary.
ibm_watson/discovery_v1.py
def _from_dict(cls, _dict): """Initialize a MetricResponse object from a json dictionary.""" args = {} if 'aggregations' in _dict: args['aggregations'] = [ MetricAggregation._from_dict(x) for x in (_dict.get('aggregations')) ] retur...
def _from_dict(cls, _dict): """Initialize a MetricResponse object from a json dictionary.""" args = {} if 'aggregations' in _dict: args['aggregations'] = [ MetricAggregation._from_dict(x) for x in (_dict.get('aggregations')) ] retur...
[ "Initialize", "a", "MetricResponse", "object", "from", "a", "json", "dictionary", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/discovery_v1.py#L7423-L7431
[ "def", "_from_dict", "(", "cls", ",", "_dict", ")", ":", "args", "=", "{", "}", "if", "'aggregations'", "in", "_dict", ":", "args", "[", "'aggregations'", "]", "=", "[", "MetricAggregation", ".", "_from_dict", "(", "x", ")", "for", "x", "in", "(", "_...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
MetricResponse._to_dict
Return a json dictionary representing this model.
ibm_watson/discovery_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'aggregations') and self.aggregations is not None: _dict['aggregations'] = [x._to_dict() for x in self.aggregations] return _dict
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'aggregations') and self.aggregations is not None: _dict['aggregations'] = [x._to_dict() for x in self.aggregations] return _dict
[ "Return", "a", "json", "dictionary", "representing", "this", "model", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/discovery_v1.py#L7433-L7438
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'aggregations'", ")", "and", "self", ".", "aggregations", "is", "not", "None", ":", "_dict", "[", "'aggregations'", "]", "=", "[", "x", ".", "_to_di...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
MetricTokenAggregation._from_dict
Initialize a MetricTokenAggregation object from a json dictionary.
ibm_watson/discovery_v1.py
def _from_dict(cls, _dict): """Initialize a MetricTokenAggregation object from a json dictionary.""" args = {} if 'event_type' in _dict: args['event_type'] = _dict.get('event_type') if 'results' in _dict: args['results'] = [ MetricTokenAggregationR...
def _from_dict(cls, _dict): """Initialize a MetricTokenAggregation object from a json dictionary.""" args = {} if 'event_type' in _dict: args['event_type'] = _dict.get('event_type') if 'results' in _dict: args['results'] = [ MetricTokenAggregationR...
[ "Initialize", "a", "MetricTokenAggregation", "object", "from", "a", "json", "dictionary", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/discovery_v1.py#L7478-L7488
[ "def", "_from_dict", "(", "cls", ",", "_dict", ")", ":", "args", "=", "{", "}", "if", "'event_type'", "in", "_dict", ":", "args", "[", "'event_type'", "]", "=", "_dict", ".", "get", "(", "'event_type'", ")", "if", "'results'", "in", "_dict", ":", "ar...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
MetricTokenAggregationResult._to_dict
Return a json dictionary representing this model.
ibm_watson/discovery_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'key') and self.key is not None: _dict['key'] = self.key if hasattr(self, 'matching_results') and self.matching_results is not None: _dict['m...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'key') and self.key is not None: _dict['key'] = self.key if hasattr(self, 'matching_results') and self.matching_results is not None: _dict['m...
[ "Return", "a", "json", "dictionary", "representing", "this", "model", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/discovery_v1.py#L7553-L7563
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'key'", ")", "and", "self", ".", "key", "is", "not", "None", ":", "_dict", "[", "'key'", "]", "=", "self", ".", "key", "if", "hasattr", "(", "...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
MetricTokenResponse._from_dict
Initialize a MetricTokenResponse object from a json dictionary.
ibm_watson/discovery_v1.py
def _from_dict(cls, _dict): """Initialize a MetricTokenResponse object from a json dictionary.""" args = {} if 'aggregations' in _dict: args['aggregations'] = [ MetricTokenAggregation._from_dict(x) for x in (_dict.get('aggregations')) ] ...
def _from_dict(cls, _dict): """Initialize a MetricTokenResponse object from a json dictionary.""" args = {} if 'aggregations' in _dict: args['aggregations'] = [ MetricTokenAggregation._from_dict(x) for x in (_dict.get('aggregations')) ] ...
[ "Initialize", "a", "MetricTokenResponse", "object", "from", "a", "json", "dictionary", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/discovery_v1.py#L7598-L7606
[ "def", "_from_dict", "(", "cls", ",", "_dict", ")", ":", "args", "=", "{", "}", "if", "'aggregations'", "in", "_dict", ":", "args", "[", "'aggregations'", "]", "=", "[", "MetricTokenAggregation", ".", "_from_dict", "(", "x", ")", "for", "x", "in", "(",...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
Nested._to_dict
Return a json dictionary representing this model.
ibm_watson/discovery_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'path') and self.path is not None: _dict['path'] = self.path return _dict
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'path') and self.path is not None: _dict['path'] = self.path return _dict
[ "Return", "a", "json", "dictionary", "representing", "this", "model", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/discovery_v1.py#L7665-L7670
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'path'", ")", "and", "self", ".", "path", "is", "not", "None", ":", "_dict", "[", "'path'", "]", "=", "self", ".", "path", "return", "_dict" ]
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
NluEnrichmentFeatures._from_dict
Initialize a NluEnrichmentFeatures object from a json dictionary.
ibm_watson/discovery_v1.py
def _from_dict(cls, _dict): """Initialize a NluEnrichmentFeatures object from a json dictionary.""" args = {} if 'keywords' in _dict: args['keywords'] = NluEnrichmentKeywords._from_dict( _dict.get('keywords')) if 'entities' in _dict: args['entities...
def _from_dict(cls, _dict): """Initialize a NluEnrichmentFeatures object from a json dictionary.""" args = {} if 'keywords' in _dict: args['keywords'] = NluEnrichmentKeywords._from_dict( _dict.get('keywords')) if 'entities' in _dict: args['entities...
[ "Initialize", "a", "NluEnrichmentFeatures", "object", "from", "a", "json", "dictionary", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/discovery_v1.py#L8022-L8049
[ "def", "_from_dict", "(", "cls", ",", "_dict", ")", ":", "args", "=", "{", "}", "if", "'keywords'", "in", "_dict", ":", "args", "[", "'keywords'", "]", "=", "NluEnrichmentKeywords", ".", "_from_dict", "(", "_dict", ".", "get", "(", "'keywords'", ")", "...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
NluEnrichmentKeywords._to_dict
Return a json dictionary representing this model.
ibm_watson/discovery_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'sentiment') and self.sentiment is not None: _dict['sentiment'] = self.sentiment if hasattr(self, 'emotion') and self.emotion is not None: _dict['emotion'] = se...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'sentiment') and self.sentiment is not None: _dict['sentiment'] = self.sentiment if hasattr(self, 'emotion') and self.emotion is not None: _dict['emotion'] = se...
[ "Return", "a", "json", "dictionary", "representing", "this", "model", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/discovery_v1.py#L8126-L8135
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'sentiment'", ")", "and", "self", ".", "sentiment", "is", "not", "None", ":", "_dict", "[", "'sentiment'", "]", "=", "self", ".", "sentiment", "if",...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
NormalizationOperation._to_dict
Return a json dictionary representing this model.
ibm_watson/discovery_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'operation') and self.operation is not None: _dict['operation'] = self.operation if hasattr(self, 'source_field') and self.source_field is not None: _dict['sour...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'operation') and self.operation is not None: _dict['operation'] = self.operation if hasattr(self, 'source_field') and self.source_field is not None: _dict['sour...
[ "Return", "a", "json", "dictionary", "representing", "this", "model", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/discovery_v1.py#L8405-L8415
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'operation'", ")", "and", "self", ".", "operation", "is", "not", "None", ":", "_dict", "[", "'operation'", "]", "=", "self", ".", "operation", "if",...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
Notice._to_dict
Return a json dictionary representing this model.
ibm_watson/discovery_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'notice_id') and self.notice_id is not None: _dict['notice_id'] = self.notice_id if hasattr(self, 'created') and self.created is not None: _dict['created'] = da...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'notice_id') and self.notice_id is not None: _dict['notice_id'] = self.notice_id if hasattr(self, 'created') and self.created is not None: _dict['created'] = da...
[ "Return", "a", "json", "dictionary", "representing", "this", "model", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/discovery_v1.py#L8527-L8544
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'notice_id'", ")", "and", "self", ".", "notice_id", "is", "not", "None", ":", "_dict", "[", "'notice_id'", "]", "=", "self", ".", "notice_id", "if",...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
PdfHeadingDetection._from_dict
Initialize a PdfHeadingDetection object from a json dictionary.
ibm_watson/discovery_v1.py
def _from_dict(cls, _dict): """Initialize a PdfHeadingDetection object from a json dictionary.""" args = {} if 'fonts' in _dict: args['fonts'] = [ FontSetting._from_dict(x) for x in (_dict.get('fonts')) ] return cls(**args)
def _from_dict(cls, _dict): """Initialize a PdfHeadingDetection object from a json dictionary.""" args = {} if 'fonts' in _dict: args['fonts'] = [ FontSetting._from_dict(x) for x in (_dict.get('fonts')) ] return cls(**args)
[ "Initialize", "a", "PdfHeadingDetection", "object", "from", "a", "json", "dictionary", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/discovery_v1.py#L8577-L8584
[ "def", "_from_dict", "(", "cls", ",", "_dict", ")", ":", "args", "=", "{", "}", "if", "'fonts'", "in", "_dict", ":", "args", "[", "'fonts'", "]", "=", "[", "FontSetting", ".", "_from_dict", "(", "x", ")", "for", "x", "in", "(", "_dict", ".", "get...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
PdfHeadingDetection._to_dict
Return a json dictionary representing this model.
ibm_watson/discovery_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'fonts') and self.fonts is not None: _dict['fonts'] = [x._to_dict() for x in self.fonts] return _dict
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'fonts') and self.fonts is not None: _dict['fonts'] = [x._to_dict() for x in self.fonts] return _dict
[ "Return", "a", "json", "dictionary", "representing", "this", "model", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/discovery_v1.py#L8586-L8591
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'fonts'", ")", "and", "self", ".", "fonts", "is", "not", "None", ":", "_dict", "[", "'fonts'", "]", "=", "[", "x", ".", "_to_dict", "(", ")", ...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
PdfSettings._to_dict
Return a json dictionary representing this model.
ibm_watson/discovery_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'heading') and self.heading is not None: _dict['heading'] = self.heading._to_dict() return _dict
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'heading') and self.heading is not None: _dict['heading'] = self.heading._to_dict() return _dict
[ "Return", "a", "json", "dictionary", "representing", "this", "model", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/discovery_v1.py#L8632-L8637
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'heading'", ")", "and", "self", ".", "heading", "is", "not", "None", ":", "_dict", "[", "'heading'", "]", "=", "self", ".", "heading", ".", "_to_d...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
QueryAggregation._to_dict
Return a json dictionary representing this model.
ibm_watson/discovery_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'type') and self.type is not None: _dict['type'] = self.type if hasattr(self, 'results') and self.results is not None: _dict['results'] = [x._to_dict() for x in...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'type') and self.type is not None: _dict['type'] = self.type if hasattr(self, 'results') and self.results is not None: _dict['results'] = [x._to_dict() for x in...
[ "Return", "a", "json", "dictionary", "representing", "this", "model", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/discovery_v1.py#L8705-L8717
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'type'", ")", "and", "self", ".", "type", "is", "not", "None", ":", "_dict", "[", "'type'", "]", "=", "self", ".", "type", "if", "hasattr", "(",...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
QueryEntitiesResponse._from_dict
Initialize a QueryEntitiesResponse object from a json dictionary.
ibm_watson/discovery_v1.py
def _from_dict(cls, _dict): """Initialize a QueryEntitiesResponse object from a json dictionary.""" args = {} if 'entities' in _dict: args['entities'] = [ QueryEntitiesResponseItem._from_dict(x) for x in (_dict.get('entities')) ] re...
def _from_dict(cls, _dict): """Initialize a QueryEntitiesResponse object from a json dictionary.""" args = {} if 'entities' in _dict: args['entities'] = [ QueryEntitiesResponseItem._from_dict(x) for x in (_dict.get('entities')) ] re...
[ "Initialize", "a", "QueryEntitiesResponse", "object", "from", "a", "json", "dictionary", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/discovery_v1.py#L8856-L8864
[ "def", "_from_dict", "(", "cls", ",", "_dict", ")", ":", "args", "=", "{", "}", "if", "'entities'", "in", "_dict", ":", "args", "[", "'entities'", "]", "=", "[", "QueryEntitiesResponseItem", ".", "_from_dict", "(", "x", ")", "for", "x", "in", "(", "_...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
QueryEntitiesResponse._to_dict
Return a json dictionary representing this model.
ibm_watson/discovery_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'entities') and self.entities is not None: _dict['entities'] = [x._to_dict() for x in self.entities] return _dict
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'entities') and self.entities is not None: _dict['entities'] = [x._to_dict() for x in self.entities] return _dict
[ "Return", "a", "json", "dictionary", "representing", "this", "model", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/discovery_v1.py#L8866-L8871
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'entities'", ")", "and", "self", ".", "entities", "is", "not", "None", ":", "_dict", "[", "'entities'", "]", "=", "[", "x", ".", "_to_dict", "(", ...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
QueryEntitiesResponseItem._to_dict
Return a json dictionary representing this model.
ibm_watson/discovery_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'text') and self.text is not None: _dict['text'] = self.text if hasattr(self, 'type') and self.type is not None: _dict['type'] = self.type if hasattr(se...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'text') and self.text is not None: _dict['text'] = self.text if hasattr(self, 'type') and self.type is not None: _dict['type'] = self.type if hasattr(se...
[ "Return", "a", "json", "dictionary", "representing", "this", "model", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/discovery_v1.py#L8925-L8934
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'text'", ")", "and", "self", ".", "text", "is", "not", "None", ":", "_dict", "[", "'text'", "]", "=", "self", ".", "text", "if", "hasattr", "(",...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
QueryEvidence._from_dict
Initialize a QueryEvidence object from a json dictionary.
ibm_watson/discovery_v1.py
def _from_dict(cls, _dict): """Initialize a QueryEvidence object from a json dictionary.""" args = {} if 'document_id' in _dict: args['document_id'] = _dict.get('document_id') if 'field' in _dict: args['field'] = _dict.get('field') if 'start_offset' in _di...
def _from_dict(cls, _dict): """Initialize a QueryEvidence object from a json dictionary.""" args = {} if 'document_id' in _dict: args['document_id'] = _dict.get('document_id') if 'field' in _dict: args['field'] = _dict.get('field') if 'start_offset' in _di...
[ "Initialize", "a", "QueryEvidence", "object", "from", "a", "json", "dictionary", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/discovery_v1.py#L8994-L9010
[ "def", "_from_dict", "(", "cls", ",", "_dict", ")", ":", "args", "=", "{", "}", "if", "'document_id'", "in", "_dict", ":", "args", "[", "'document_id'", "]", "=", "_dict", ".", "get", "(", "'document_id'", ")", "if", "'field'", "in", "_dict", ":", "a...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
QueryEvidence._to_dict
Return a json dictionary representing this model.
ibm_watson/discovery_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'document_id') and self.document_id is not None: _dict['document_id'] = self.document_id if hasattr(self, 'field') and self.field is not None: _dict['field'] = ...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'document_id') and self.document_id is not None: _dict['document_id'] = self.document_id if hasattr(self, 'field') and self.field is not None: _dict['field'] = ...
[ "Return", "a", "json", "dictionary", "representing", "this", "model", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/discovery_v1.py#L9012-L9025
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'document_id'", ")", "and", "self", ".", "document_id", "is", "not", "None", ":", "_dict", "[", "'document_id'", "]", "=", "self", ".", "document_id",...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
QueryEvidenceEntity._to_dict
Return a json dictionary representing this model.
ibm_watson/discovery_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'type') and self.type is not None: _dict['type'] = self.type if hasattr(self, 'text') and self.text is not None: _dict['text'] = self.text if hasattr(se...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'type') and self.type is not None: _dict['type'] = self.type if hasattr(self, 'text') and self.text is not None: _dict['text'] = self.text if hasattr(se...
[ "Return", "a", "json", "dictionary", "representing", "this", "model", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/discovery_v1.py#L9089-L9100
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'type'", ")", "and", "self", ".", "type", "is", "not", "None", ":", "_dict", "[", "'type'", "]", "=", "self", ".", "type", "if", "hasattr", "(",...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
QueryFilterType._to_dict
Return a json dictionary representing this model.
ibm_watson/discovery_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'exclude') and self.exclude is not None: _dict['exclude'] = self.exclude if hasattr(self, 'include') and self.include is not None: _dict['include'] = self.inclu...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'exclude') and self.exclude is not None: _dict['exclude'] = self.exclude if hasattr(self, 'include') and self.include is not None: _dict['include'] = self.inclu...
[ "Return", "a", "json", "dictionary", "representing", "this", "model", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/discovery_v1.py#L9147-L9154
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'exclude'", ")", "and", "self", ".", "exclude", "is", "not", "None", ":", "_dict", "[", "'exclude'", "]", "=", "self", ".", "exclude", "if", "hasa...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
QueryNoticesResponse._from_dict
Initialize a QueryNoticesResponse object from a json dictionary.
ibm_watson/discovery_v1.py
def _from_dict(cls, _dict): """Initialize a QueryNoticesResponse object from a json dictionary.""" args = {} if 'matching_results' in _dict: args['matching_results'] = _dict.get('matching_results') if 'results' in _dict: args['results'] = [ QueryNo...
def _from_dict(cls, _dict): """Initialize a QueryNoticesResponse object from a json dictionary.""" args = {} if 'matching_results' in _dict: args['matching_results'] = _dict.get('matching_results') if 'results' in _dict: args['results'] = [ QueryNo...
[ "Initialize", "a", "QueryNoticesResponse", "object", "from", "a", "json", "dictionary", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/discovery_v1.py#L9212-L9232
[ "def", "_from_dict", "(", "cls", ",", "_dict", ")", ":", "args", "=", "{", "}", "if", "'matching_results'", "in", "_dict", ":", "args", "[", "'matching_results'", "]", "=", "_dict", ".", "get", "(", "'matching_results'", ")", "if", "'results'", "in", "_d...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
QueryNoticesResponse._to_dict
Return a json dictionary representing this model.
ibm_watson/discovery_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'matching_results') and self.matching_results is not None: _dict['matching_results'] = self.matching_results if hasattr(self, 'results') and self.results...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'matching_results') and self.matching_results is not None: _dict['matching_results'] = self.matching_results if hasattr(self, 'results') and self.results...
[ "Return", "a", "json", "dictionary", "representing", "this", "model", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/discovery_v1.py#L9234-L9250
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'matching_results'", ")", "and", "self", ".", "matching_results", "is", "not", "None", ":", "_dict", "[", "'matching_results'", "]", "=", "self", ".", ...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
QueryNoticesResult._from_dict
Initialize a QueryNoticesResult object from a json dictionary.
ibm_watson/discovery_v1.py
def _from_dict(cls, _dict): """Initialize a QueryNoticesResult object from a json dictionary.""" args = {} xtra = _dict.copy() if 'id' in _dict: args['id'] = _dict.get('id') del xtra['id'] if 'metadata' in _dict: args['metadata'] = _dict.get('m...
def _from_dict(cls, _dict): """Initialize a QueryNoticesResult object from a json dictionary.""" args = {} xtra = _dict.copy() if 'id' in _dict: args['id'] = _dict.get('id') del xtra['id'] if 'metadata' in _dict: args['metadata'] = _dict.get('m...
[ "Initialize", "a", "QueryNoticesResult", "object", "from", "a", "json", "dictionary", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/discovery_v1.py#L9330-L9368
[ "def", "_from_dict", "(", "cls", ",", "_dict", ")", ":", "args", "=", "{", "}", "xtra", "=", "_dict", ".", "copy", "(", ")", "if", "'id'", "in", "_dict", ":", "args", "[", "'id'", "]", "=", "_dict", ".", "get", "(", "'id'", ")", "del", "xtra", ...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
QueryNoticesResult._to_dict
Return a json dictionary representing this model.
ibm_watson/discovery_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'id') and self.id is not None: _dict['id'] = self.id if hasattr(self, 'metadata') and self.metadata is not None: _dict['metadata'] = self.metadata if ha...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'id') and self.id is not None: _dict['id'] = self.id if hasattr(self, 'metadata') and self.metadata is not None: _dict['metadata'] = self.metadata if ha...
[ "Return", "a", "json", "dictionary", "representing", "this", "model", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/discovery_v1.py#L9370-L9399
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'id'", ")", "and", "self", ".", "id", "is", "not", "None", ":", "_dict", "[", "'id'", "]", "=", "self", ".", "id", "if", "hasattr", "(", "self...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
QueryPassages._to_dict
Return a json dictionary representing this model.
ibm_watson/discovery_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'document_id') and self.document_id is not None: _dict['document_id'] = self.document_id if hasattr(self, 'passage_score') and self.passage_score is not None: _...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'document_id') and self.document_id is not None: _dict['document_id'] = self.document_id if hasattr(self, 'passage_score') and self.passage_score is not None: _...
[ "Return", "a", "json", "dictionary", "representing", "this", "model", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/discovery_v1.py#L9492-L9507
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'document_id'", ")", "and", "self", ".", "document_id", "is", "not", "None", ":", "_dict", "[", "'document_id'", "]", "=", "self", ".", "document_id",...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
QueryRelationsArgument._from_dict
Initialize a QueryRelationsArgument object from a json dictionary.
ibm_watson/discovery_v1.py
def _from_dict(cls, _dict): """Initialize a QueryRelationsArgument object from a json dictionary.""" args = {} if 'entities' in _dict: args['entities'] = [ QueryEntitiesEntity._from_dict(x) for x in (_dict.get('entities')) ] return ...
def _from_dict(cls, _dict): """Initialize a QueryRelationsArgument object from a json dictionary.""" args = {} if 'entities' in _dict: args['entities'] = [ QueryEntitiesEntity._from_dict(x) for x in (_dict.get('entities')) ] return ...
[ "Initialize", "a", "QueryRelationsArgument", "object", "from", "a", "json", "dictionary", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/discovery_v1.py#L9540-L9548
[ "def", "_from_dict", "(", "cls", ",", "_dict", ")", ":", "args", "=", "{", "}", "if", "'entities'", "in", "_dict", ":", "args", "[", "'entities'", "]", "=", "[", "QueryEntitiesEntity", ".", "_from_dict", "(", "x", ")", "for", "x", "in", "(", "_dict",...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
QueryRelationsFilter._to_dict
Return a json dictionary representing this model.
ibm_watson/discovery_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'relation_types') and self.relation_types is not None: _dict['relation_types'] = self.relation_types._to_dict() if hasattr(self, 'entity_types') and self.entity_types is no...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'relation_types') and self.relation_types is not None: _dict['relation_types'] = self.relation_types._to_dict() if hasattr(self, 'entity_types') and self.entity_types is no...
[ "Return", "a", "json", "dictionary", "representing", "this", "model", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/discovery_v1.py#L9673-L9682
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'relation_types'", ")", "and", "self", ".", "relation_types", "is", "not", "None", ":", "_dict", "[", "'relation_types'", "]", "=", "self", ".", "rela...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
QueryRelationsRelationship._from_dict
Initialize a QueryRelationsRelationship object from a json dictionary.
ibm_watson/discovery_v1.py
def _from_dict(cls, _dict): """Initialize a QueryRelationsRelationship object from a json dictionary.""" args = {} if 'type' in _dict: args['type'] = _dict.get('type') if 'frequency' in _dict: args['frequency'] = _dict.get('frequency') if 'arguments' in _d...
def _from_dict(cls, _dict): """Initialize a QueryRelationsRelationship object from a json dictionary.""" args = {} if 'type' in _dict: args['type'] = _dict.get('type') if 'frequency' in _dict: args['frequency'] = _dict.get('frequency') if 'arguments' in _d...
[ "Initialize", "a", "QueryRelationsRelationship", "object", "from", "a", "json", "dictionary", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/discovery_v1.py#L9730-L9746
[ "def", "_from_dict", "(", "cls", ",", "_dict", ")", ":", "args", "=", "{", "}", "if", "'type'", "in", "_dict", ":", "args", "[", "'type'", "]", "=", "_dict", ".", "get", "(", "'type'", ")", "if", "'frequency'", "in", "_dict", ":", "args", "[", "'...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
QueryRelationsRelationship._to_dict
Return a json dictionary representing this model.
ibm_watson/discovery_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'type') and self.type is not None: _dict['type'] = self.type if hasattr(self, 'frequency') and self.frequency is not None: _dict['frequency'] = self.frequency ...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'type') and self.type is not None: _dict['type'] = self.type if hasattr(self, 'frequency') and self.frequency is not None: _dict['frequency'] = self.frequency ...
[ "Return", "a", "json", "dictionary", "representing", "this", "model", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/discovery_v1.py#L9748-L9759
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'type'", ")", "and", "self", ".", "type", "is", "not", "None", ":", "_dict", "[", "'type'", "]", "=", "self", ".", "type", "if", "hasattr", "(",...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
QueryRelationsResponse._from_dict
Initialize a QueryRelationsResponse object from a json dictionary.
ibm_watson/discovery_v1.py
def _from_dict(cls, _dict): """Initialize a QueryRelationsResponse object from a json dictionary.""" args = {} if 'relations' in _dict: args['relations'] = [ QueryRelationsRelationship._from_dict(x) for x in (_dict.get('relations')) ] ...
def _from_dict(cls, _dict): """Initialize a QueryRelationsResponse object from a json dictionary.""" args = {} if 'relations' in _dict: args['relations'] = [ QueryRelationsRelationship._from_dict(x) for x in (_dict.get('relations')) ] ...
[ "Initialize", "a", "QueryRelationsResponse", "object", "from", "a", "json", "dictionary", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/discovery_v1.py#L9794-L9802
[ "def", "_from_dict", "(", "cls", ",", "_dict", ")", ":", "args", "=", "{", "}", "if", "'relations'", "in", "_dict", ":", "args", "[", "'relations'", "]", "=", "[", "QueryRelationsRelationship", ".", "_from_dict", "(", "x", ")", "for", "x", "in", "(", ...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
QueryRelationsResponse._to_dict
Return a json dictionary representing this model.
ibm_watson/discovery_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'relations') and self.relations is not None: _dict['relations'] = [x._to_dict() for x in self.relations] return _dict
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'relations') and self.relations is not None: _dict['relations'] = [x._to_dict() for x in self.relations] return _dict
[ "Return", "a", "json", "dictionary", "representing", "this", "model", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/discovery_v1.py#L9804-L9809
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'relations'", ")", "and", "self", ".", "relations", "is", "not", "None", ":", "_dict", "[", "'relations'", "]", "=", "[", "x", ".", "_to_dict", "(...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
QueryResponse._from_dict
Initialize a QueryResponse object from a json dictionary.
ibm_watson/discovery_v1.py
def _from_dict(cls, _dict): """Initialize a QueryResponse object from a json dictionary.""" args = {} if 'matching_results' in _dict: args['matching_results'] = _dict.get('matching_results') if 'results' in _dict: args['results'] = [ QueryResult._f...
def _from_dict(cls, _dict): """Initialize a QueryResponse object from a json dictionary.""" args = {} if 'matching_results' in _dict: args['matching_results'] = _dict.get('matching_results') if 'results' in _dict: args['results'] = [ QueryResult._f...
[ "Initialize", "a", "QueryResponse", "object", "from", "a", "json", "dictionary", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/discovery_v1.py#L9879-L9904
[ "def", "_from_dict", "(", "cls", ",", "_dict", ")", ":", "args", "=", "{", "}", "if", "'matching_results'", "in", "_dict", ":", "args", "[", "'matching_results'", "]", "=", "_dict", ".", "get", "(", "'matching_results'", ")", "if", "'results'", "in", "_d...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
QueryResult._from_dict
Initialize a QueryResult object from a json dictionary.
ibm_watson/discovery_v1.py
def _from_dict(cls, _dict): """Initialize a QueryResult object from a json dictionary.""" args = {} xtra = _dict.copy() if 'id' in _dict: args['id'] = _dict.get('id') del xtra['id'] if 'metadata' in _dict: args['metadata'] = _dict.get('metadata...
def _from_dict(cls, _dict): """Initialize a QueryResult object from a json dictionary.""" args = {} xtra = _dict.copy() if 'id' in _dict: args['id'] = _dict.get('id') del xtra['id'] if 'metadata' in _dict: args['metadata'] = _dict.get('metadata...
[ "Initialize", "a", "QueryResult", "object", "from", "a", "json", "dictionary", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/discovery_v1.py#L9983-L10004
[ "def", "_from_dict", "(", "cls", ",", "_dict", ")", ":", "args", "=", "{", "}", "xtra", "=", "_dict", ".", "copy", "(", ")", "if", "'id'", "in", "_dict", ":", "args", "[", "'id'", "]", "=", "_dict", ".", "get", "(", "'id'", ")", "del", "xtra", ...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
QueryResult._to_dict
Return a json dictionary representing this model.
ibm_watson/discovery_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'id') and self.id is not None: _dict['id'] = self.id if hasattr(self, 'metadata') and self.metadata is not None: _dict['metadata'] = self.metadata if ha...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'id') and self.id is not None: _dict['id'] = self.id if hasattr(self, 'metadata') and self.metadata is not None: _dict['metadata'] = self.metadata if ha...
[ "Return", "a", "json", "dictionary", "representing", "this", "model", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/discovery_v1.py#L10006-L10025
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'id'", ")", "and", "self", ".", "id", "is", "not", "None", ":", "_dict", "[", "'id'", "]", "=", "self", ".", "id", "if", "hasattr", "(", "self...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
QueryResultMetadata._to_dict
Return a json dictionary representing this model.
ibm_watson/discovery_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'score') and self.score is not None: _dict['score'] = self.score if hasattr(self, 'confidence') and self.confidence is not None: _dict['confidence'] = self.conf...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'score') and self.score is not None: _dict['score'] = self.score if hasattr(self, 'confidence') and self.confidence is not None: _dict['confidence'] = self.conf...
[ "Return", "a", "json", "dictionary", "representing", "this", "model", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/discovery_v1.py#L10096-L10103
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'score'", ")", "and", "self", ".", "score", "is", "not", "None", ":", "_dict", "[", "'score'", "]", "=", "self", ".", "score", "if", "hasattr", ...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
RetrievalDetails._to_dict
Return a json dictionary representing this model.
ibm_watson/discovery_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'document_retrieval_strategy' ) and self.document_retrieval_strategy is not None: _dict[ 'document_retrieval_strategy'] = self.document_retrieval_...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'document_retrieval_strategy' ) and self.document_retrieval_strategy is not None: _dict[ 'document_retrieval_strategy'] = self.document_retrieval_...
[ "Return", "a", "json", "dictionary", "representing", "this", "model", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/discovery_v1.py#L10160-L10167
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'document_retrieval_strategy'", ")", "and", "self", ".", "document_retrieval_strategy", "is", "not", "None", ":", "_dict", "[", "'document_retrieval_strategy'",...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
SearchStatus._to_dict
Return a json dictionary representing this model.
ibm_watson/discovery_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'scope') and self.scope is not None: _dict['scope'] = self.scope if hasattr(self, 'status') and self.status is not None: _dict['status'] = self.status i...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'scope') and self.scope is not None: _dict['scope'] = self.scope if hasattr(self, 'status') and self.status is not None: _dict['status'] = self.status i...
[ "Return", "a", "json", "dictionary", "representing", "this", "model", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/discovery_v1.py#L10234-L10247
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'scope'", ")", "and", "self", ".", "scope", "is", "not", "None", ":", "_dict", "[", "'scope'", "]", "=", "self", ".", "scope", "if", "hasattr", ...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
SegmentSettings._to_dict
Return a json dictionary representing this model.
ibm_watson/discovery_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'enabled') and self.enabled is not None: _dict['enabled'] = self.enabled if hasattr(self, 'selector_tags') and self.selector_tags is not None: _dict['selector_t...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'enabled') and self.enabled is not None: _dict['enabled'] = self.enabled if hasattr(self, 'selector_tags') and self.selector_tags is not None: _dict['selector_t...
[ "Return", "a", "json", "dictionary", "representing", "this", "model", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/discovery_v1.py#L10299-L10306
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'enabled'", ")", "and", "self", ".", "enabled", "is", "not", "None", ":", "_dict", "[", "'enabled'", "]", "=", "self", ".", "enabled", "if", "hasa...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
Source._from_dict
Initialize a Source object from a json dictionary.
ibm_watson/discovery_v1.py
def _from_dict(cls, _dict): """Initialize a Source object from a json dictionary.""" args = {} if 'type' in _dict: args['type'] = _dict.get('type') if 'credential_id' in _dict: args['credential_id'] = _dict.get('credential_id') if 'schedule' in _dict: ...
def _from_dict(cls, _dict): """Initialize a Source object from a json dictionary.""" args = {} if 'type' in _dict: args['type'] = _dict.get('type') if 'credential_id' in _dict: args['credential_id'] = _dict.get('credential_id') if 'schedule' in _dict: ...
[ "Initialize", "a", "Source", "object", "from", "a", "json", "dictionary", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/discovery_v1.py#L10376-L10387
[ "def", "_from_dict", "(", "cls", ",", "_dict", ")", ":", "args", "=", "{", "}", "if", "'type'", "in", "_dict", ":", "args", "[", "'type'", "]", "=", "_dict", ".", "get", "(", "'type'", ")", "if", "'credential_id'", "in", "_dict", ":", "args", "[", ...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
Source._to_dict
Return a json dictionary representing this model.
ibm_watson/discovery_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'type') and self.type is not None: _dict['type'] = self.type if hasattr(self, 'credential_id') and self.credential_id is not None: _dict['credential_id'] = self...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'type') and self.type is not None: _dict['type'] = self.type if hasattr(self, 'credential_id') and self.credential_id is not None: _dict['credential_id'] = self...
[ "Return", "a", "json", "dictionary", "representing", "this", "model", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/discovery_v1.py#L10389-L10400
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'type'", ")", "and", "self", ".", "type", "is", "not", "None", ":", "_dict", "[", "'type'", "]", "=", "self", ".", "type", "if", "hasattr", "(",...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
SourceOptions._from_dict
Initialize a SourceOptions object from a json dictionary.
ibm_watson/discovery_v1.py
def _from_dict(cls, _dict): """Initialize a SourceOptions object from a json dictionary.""" args = {} if 'folders' in _dict: args['folders'] = [ SourceOptionsFolder._from_dict(x) for x in (_dict.get('folders')) ] if 'objects' in _di...
def _from_dict(cls, _dict): """Initialize a SourceOptions object from a json dictionary.""" args = {} if 'folders' in _dict: args['folders'] = [ SourceOptionsFolder._from_dict(x) for x in (_dict.get('folders')) ] if 'objects' in _di...
[ "Initialize", "a", "SourceOptions", "object", "from", "a", "json", "dictionary", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/discovery_v1.py#L10481-L10510
[ "def", "_from_dict", "(", "cls", ",", "_dict", ")", ":", "args", "=", "{", "}", "if", "'folders'", "in", "_dict", ":", "args", "[", "'folders'", "]", "=", "[", "SourceOptionsFolder", ".", "_from_dict", "(", "x", ")", "for", "x", "in", "(", "_dict", ...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
SourceOptions._to_dict
Return a json dictionary representing this model.
ibm_watson/discovery_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'folders') and self.folders is not None: _dict['folders'] = [x._to_dict() for x in self.folders] if hasattr(self, 'objects') and self.objects is not None: _dict...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'folders') and self.folders is not None: _dict['folders'] = [x._to_dict() for x in self.folders] if hasattr(self, 'objects') and self.objects is not None: _dict...
[ "Return", "a", "json", "dictionary", "representing", "this", "model", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/discovery_v1.py#L10512-L10531
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'folders'", ")", "and", "self", ".", "folders", "is", "not", "None", ":", "_dict", "[", "'folders'", "]", "=", "[", "x", ".", "_to_dict", "(", "...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
SourceOptionsBuckets._to_dict
Return a json dictionary representing this model.
ibm_watson/discovery_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name if hasattr(self, 'limit') and self.limit is not None: _dict['limit'] = self.limit return _d...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name if hasattr(self, 'limit') and self.limit is not None: _dict['limit'] = self.limit return _d...
[ "Return", "a", "json", "dictionary", "representing", "this", "model", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/discovery_v1.py#L10582-L10589
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'name'", ")", "and", "self", ".", "name", "is", "not", "None", ":", "_dict", "[", "'name'", "]", "=", "self", ".", "name", "if", "hasattr", "(",...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
SourceOptionsFolder._to_dict
Return a json dictionary representing this model.
ibm_watson/discovery_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'owner_user_id') and self.owner_user_id is not None: _dict['owner_user_id'] = self.owner_user_id if hasattr(self, 'folder_id') and self.folder_id is not None: _...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'owner_user_id') and self.owner_user_id is not None: _dict['owner_user_id'] = self.owner_user_id if hasattr(self, 'folder_id') and self.folder_id is not None: _...
[ "Return", "a", "json", "dictionary", "representing", "this", "model", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/discovery_v1.py#L10650-L10659
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'owner_user_id'", ")", "and", "self", ".", "owner_user_id", "is", "not", "None", ":", "_dict", "[", "'owner_user_id'", "]", "=", "self", ".", "owner_u...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
SourceOptionsSiteColl._to_dict
Return a json dictionary representing this model.
ibm_watson/discovery_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'site_collection_path' ) and self.site_collection_path is not None: _dict['site_collection_path'] = self.site_collection_path if hasattr(self, 'limit') an...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'site_collection_path' ) and self.site_collection_path is not None: _dict['site_collection_path'] = self.site_collection_path if hasattr(self, 'limit') an...
[ "Return", "a", "json", "dictionary", "representing", "this", "model", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/discovery_v1.py#L10775-L10783
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'site_collection_path'", ")", "and", "self", ".", "site_collection_path", "is", "not", "None", ":", "_dict", "[", "'site_collection_path'", "]", "=", "sel...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
SourceOptionsWebCrawl._to_dict
Return a json dictionary representing this model.
ibm_watson/discovery_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'url') and self.url is not None: _dict['url'] = self.url if hasattr(self, 'limit_to_starting_hosts' ) and self.limit_to_starting_hosts is not None: ...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'url') and self.url is not None: _dict['url'] = self.url if hasattr(self, 'limit_to_starting_hosts' ) and self.limit_to_starting_hosts is not None: ...
[ "Return", "a", "json", "dictionary", "representing", "this", "model", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/discovery_v1.py#L10894-L10917
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'url'", ")", "and", "self", ".", "url", "is", "not", "None", ":", "_dict", "[", "'url'", "]", "=", "self", ".", "url", "if", "hasattr", "(", "...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
SourceSchedule._to_dict
Return a json dictionary representing this model.
ibm_watson/discovery_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'enabled') and self.enabled is not None: _dict['enabled'] = self.enabled if hasattr(self, 'time_zone') and self.time_zone is not None: _dict['time_zone'] = self...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'enabled') and self.enabled is not None: _dict['enabled'] = self.enabled if hasattr(self, 'time_zone') and self.time_zone is not None: _dict['time_zone'] = self...
[ "Return", "a", "json", "dictionary", "representing", "this", "model", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/discovery_v1.py#L10981-L10990
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'enabled'", ")", "and", "self", ".", "enabled", "is", "not", "None", ":", "_dict", "[", "'enabled'", "]", "=", "self", ".", "enabled", "if", "hasa...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
SourceStatus._to_dict
Return a json dictionary representing this model.
ibm_watson/discovery_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'status') and self.status is not None: _dict['status'] = self.status if hasattr(self, 'last_updated') and self.last_updated is not None: _dict['last_updated'] =...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'status') and self.status is not None: _dict['status'] = self.status if hasattr(self, 'last_updated') and self.last_updated is not None: _dict['last_updated'] =...
[ "Return", "a", "json", "dictionary", "representing", "this", "model", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/discovery_v1.py#L11049-L11056
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'status'", ")", "and", "self", ".", "status", "is", "not", "None", ":", "_dict", "[", "'status'", "]", "=", "self", ".", "status", "if", "hasattr"...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
Term._to_dict
Return a json dictionary representing this model.
ibm_watson/discovery_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'field') and self.field is not None: _dict['field'] = self.field if hasattr(self, 'count') and self.count is not None: _dict['count'] = self.count retur...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'field') and self.field is not None: _dict['field'] = self.field if hasattr(self, 'count') and self.count is not None: _dict['count'] = self.count retur...
[ "Return", "a", "json", "dictionary", "representing", "this", "model", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/discovery_v1.py#L11115-L11122
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'field'", ")", "and", "self", ".", "field", "is", "not", "None", ":", "_dict", "[", "'field'", "]", "=", "self", ".", "field", "if", "hasattr", ...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
Timeslice._to_dict
Return a json dictionary representing this model.
ibm_watson/discovery_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'field') and self.field is not None: _dict['field'] = self.field if hasattr(self, 'interval') and self.interval is not None: _dict['interval'] = self.interval ...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'field') and self.field is not None: _dict['field'] = self.field if hasattr(self, 'interval') and self.interval is not None: _dict['interval'] = self.interval ...
[ "Return", "a", "json", "dictionary", "representing", "this", "model", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/discovery_v1.py#L11297-L11306
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'field'", ")", "and", "self", ".", "field", "is", "not", "None", ":", "_dict", "[", "'field'", "]", "=", "self", ".", "field", "if", "hasattr", ...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
TokenDictRule._to_dict
Return a json dictionary representing this model.
ibm_watson/discovery_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'text') and self.text is not None: _dict['text'] = self.text if hasattr(self, 'tokens') and self.tokens is not None: _dict['tokens'] = self.tokens if ha...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'text') and self.text is not None: _dict['text'] = self.text if hasattr(self, 'tokens') and self.tokens is not None: _dict['tokens'] = self.tokens if ha...
[ "Return", "a", "json", "dictionary", "representing", "this", "model", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/discovery_v1.py#L11378-L11389
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'text'", ")", "and", "self", ".", "text", "is", "not", "None", ":", "_dict", "[", "'text'", "]", "=", "self", ".", "text", "if", "hasattr", "(",...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
TokenDictStatusResponse._to_dict
Return a json dictionary representing this model.
ibm_watson/discovery_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'status') and self.status is not None: _dict['status'] = self.status if hasattr(self, 'type') and self.type is not None: _dict['type'] = self.type retur...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'status') and self.status is not None: _dict['status'] = self.status if hasattr(self, 'type') and self.type is not None: _dict['type'] = self.type retur...
[ "Return", "a", "json", "dictionary", "representing", "this", "model", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/discovery_v1.py#L11437-L11444
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'status'", ")", "and", "self", ".", "status", "is", "not", "None", ":", "_dict", "[", "'status'", "]", "=", "self", ".", "status", "if", "hasattr"...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
TopHits._to_dict
Return a json dictionary representing this model.
ibm_watson/discovery_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'size') and self.size is not None: _dict['size'] = self.size if hasattr(self, 'hits') and self.hits is not None: _dict['hits'] = self.hits._to_dict() re...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'size') and self.size is not None: _dict['size'] = self.size if hasattr(self, 'hits') and self.hits is not None: _dict['hits'] = self.hits._to_dict() re...
[ "Return", "a", "json", "dictionary", "representing", "this", "model", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/discovery_v1.py#L11501-L11508
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'size'", ")", "and", "self", ".", "size", "is", "not", "None", ":", "_dict", "[", "'size'", "]", "=", "self", ".", "size", "if", "hasattr", "(",...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
TopHitsResults._from_dict
Initialize a TopHitsResults object from a json dictionary.
ibm_watson/discovery_v1.py
def _from_dict(cls, _dict): """Initialize a TopHitsResults object from a json dictionary.""" args = {} if 'matching_results' in _dict: args['matching_results'] = _dict.get('matching_results') if 'hits' in _dict: args['hits'] = [ QueryResult._from_d...
def _from_dict(cls, _dict): """Initialize a TopHitsResults object from a json dictionary.""" args = {} if 'matching_results' in _dict: args['matching_results'] = _dict.get('matching_results') if 'hits' in _dict: args['hits'] = [ QueryResult._from_d...
[ "Initialize", "a", "TopHitsResults", "object", "from", "a", "json", "dictionary", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/discovery_v1.py#L11544-L11553
[ "def", "_from_dict", "(", "cls", ",", "_dict", ")", ":", "args", "=", "{", "}", "if", "'matching_results'", "in", "_dict", ":", "args", "[", "'matching_results'", "]", "=", "_dict", ".", "get", "(", "'matching_results'", ")", "if", "'hits'", "in", "_dict...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
TopHitsResults._to_dict
Return a json dictionary representing this model.
ibm_watson/discovery_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'matching_results') and self.matching_results is not None: _dict['matching_results'] = self.matching_results if hasattr(self, 'hits') and self.hits is no...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'matching_results') and self.matching_results is not None: _dict['matching_results'] = self.matching_results if hasattr(self, 'hits') and self.hits is no...
[ "Return", "a", "json", "dictionary", "representing", "this", "model", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/discovery_v1.py#L11555-L11563
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'matching_results'", ")", "and", "self", ".", "matching_results", "is", "not", "None", ":", "_dict", "[", "'matching_results'", "]", "=", "self", ".", ...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
TrainingDataSet._from_dict
Initialize a TrainingDataSet object from a json dictionary.
ibm_watson/discovery_v1.py
def _from_dict(cls, _dict): """Initialize a TrainingDataSet object from a json dictionary.""" args = {} if 'environment_id' in _dict: args['environment_id'] = _dict.get('environment_id') if 'collection_id' in _dict: args['collection_id'] = _dict.get('collection_id...
def _from_dict(cls, _dict): """Initialize a TrainingDataSet object from a json dictionary.""" args = {} if 'environment_id' in _dict: args['environment_id'] = _dict.get('environment_id') if 'collection_id' in _dict: args['collection_id'] = _dict.get('collection_id...
[ "Initialize", "a", "TrainingDataSet", "object", "from", "a", "json", "dictionary", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/discovery_v1.py#L11606-L11617
[ "def", "_from_dict", "(", "cls", ",", "_dict", ")", ":", "args", "=", "{", "}", "if", "'environment_id'", "in", "_dict", ":", "args", "[", "'environment_id'", "]", "=", "_dict", ".", "get", "(", "'environment_id'", ")", "if", "'collection_id'", "in", "_d...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
TrainingDataSet._to_dict
Return a json dictionary representing this model.
ibm_watson/discovery_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'environment_id') and self.environment_id is not None: _dict['environment_id'] = self.environment_id if hasattr(self, 'collection_id') and self.collection_id is not None: ...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'environment_id') and self.environment_id is not None: _dict['environment_id'] = self.environment_id if hasattr(self, 'collection_id') and self.collection_id is not None: ...
[ "Return", "a", "json", "dictionary", "representing", "this", "model", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/discovery_v1.py#L11619-L11628
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'environment_id'", ")", "and", "self", ".", "environment_id", "is", "not", "None", ":", "_dict", "[", "'environment_id'", "]", "=", "self", ".", "envi...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
TrainingExample._to_dict
Return a json dictionary representing this model.
ibm_watson/discovery_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'document_id') and self.document_id is not None: _dict['document_id'] = self.document_id if hasattr(self, 'cross_reference') and self.cross_reference is ...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'document_id') and self.document_id is not None: _dict['document_id'] = self.document_id if hasattr(self, 'cross_reference') and self.cross_reference is ...
[ "Return", "a", "json", "dictionary", "representing", "this", "model", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/discovery_v1.py#L11682-L11692
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'document_id'", ")", "and", "self", ".", "document_id", "is", "not", "None", ":", "_dict", "[", "'document_id'", "]", "=", "self", ".", "document_id",...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
TrainingExampleList._from_dict
Initialize a TrainingExampleList object from a json dictionary.
ibm_watson/discovery_v1.py
def _from_dict(cls, _dict): """Initialize a TrainingExampleList object from a json dictionary.""" args = {} if 'examples' in _dict: args['examples'] = [ TrainingExample._from_dict(x) for x in (_dict.get('examples')) ] return cls(**args)
def _from_dict(cls, _dict): """Initialize a TrainingExampleList object from a json dictionary.""" args = {} if 'examples' in _dict: args['examples'] = [ TrainingExample._from_dict(x) for x in (_dict.get('examples')) ] return cls(**args)
[ "Initialize", "a", "TrainingExampleList", "object", "from", "a", "json", "dictionary", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/discovery_v1.py#L11725-L11732
[ "def", "_from_dict", "(", "cls", ",", "_dict", ")", ":", "args", "=", "{", "}", "if", "'examples'", "in", "_dict", ":", "args", "[", "'examples'", "]", "=", "[", "TrainingExample", ".", "_from_dict", "(", "x", ")", "for", "x", "in", "(", "_dict", "...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
TrainingExampleList._to_dict
Return a json dictionary representing this model.
ibm_watson/discovery_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'examples') and self.examples is not None: _dict['examples'] = [x._to_dict() for x in self.examples] return _dict
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'examples') and self.examples is not None: _dict['examples'] = [x._to_dict() for x in self.examples] return _dict
[ "Return", "a", "json", "dictionary", "representing", "this", "model", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/discovery_v1.py#L11734-L11739
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'examples'", ")", "and", "self", ".", "examples", "is", "not", "None", ":", "_dict", "[", "'examples'", "]", "=", "[", "x", ".", "_to_dict", "(", ...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
TrainingQuery._from_dict
Initialize a TrainingQuery object from a json dictionary.
ibm_watson/discovery_v1.py
def _from_dict(cls, _dict): """Initialize a TrainingQuery object from a json dictionary.""" args = {} if 'query_id' in _dict: args['query_id'] = _dict.get('query_id') if 'natural_language_query' in _dict: args['natural_language_query'] = _dict.get('natural_languag...
def _from_dict(cls, _dict): """Initialize a TrainingQuery object from a json dictionary.""" args = {} if 'query_id' in _dict: args['query_id'] = _dict.get('query_id') if 'natural_language_query' in _dict: args['natural_language_query'] = _dict.get('natural_languag...
[ "Initialize", "a", "TrainingQuery", "object", "from", "a", "json", "dictionary", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/discovery_v1.py#L11789-L11802
[ "def", "_from_dict", "(", "cls", ",", "_dict", ")", ":", "args", "=", "{", "}", "if", "'query_id'", "in", "_dict", ":", "args", "[", "'query_id'", "]", "=", "_dict", ".", "get", "(", "'query_id'", ")", "if", "'natural_language_query'", "in", "_dict", "...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
TrainingQuery._to_dict
Return a json dictionary representing this model.
ibm_watson/discovery_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'query_id') and self.query_id is not None: _dict['query_id'] = self.query_id if hasattr(self, 'natural_language_query' ) and self.natural_language_query i...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'query_id') and self.query_id is not None: _dict['query_id'] = self.query_id if hasattr(self, 'natural_language_query' ) and self.natural_language_query i...
[ "Return", "a", "json", "dictionary", "representing", "this", "model", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/discovery_v1.py#L11804-L11816
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'query_id'", ")", "and", "self", ".", "query_id", "is", "not", "None", ":", "_dict", "[", "'query_id'", "]", "=", "self", ".", "query_id", "if", "...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
TrainingStatus._to_dict
Return a json dictionary representing this model.
ibm_watson/discovery_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'total_examples') and self.total_examples is not None: _dict['total_examples'] = self.total_examples if hasattr(self, 'available') and self.available is not None: ...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'total_examples') and self.total_examples is not None: _dict['total_examples'] = self.total_examples if hasattr(self, 'available') and self.available is not None: ...
[ "Return", "a", "json", "dictionary", "representing", "this", "model", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/discovery_v1.py#L11923-L11950
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'total_examples'", ")", "and", "self", ".", "total_examples", "is", "not", "None", ":", "_dict", "[", "'total_examples'", "]", "=", "self", ".", "tota...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
WordHeadingDetection._from_dict
Initialize a WordHeadingDetection object from a json dictionary.
ibm_watson/discovery_v1.py
def _from_dict(cls, _dict): """Initialize a WordHeadingDetection object from a json dictionary.""" args = {} if 'fonts' in _dict: args['fonts'] = [ FontSetting._from_dict(x) for x in (_dict.get('fonts')) ] if 'styles' in _dict: args['st...
def _from_dict(cls, _dict): """Initialize a WordHeadingDetection object from a json dictionary.""" args = {} if 'fonts' in _dict: args['fonts'] = [ FontSetting._from_dict(x) for x in (_dict.get('fonts')) ] if 'styles' in _dict: args['st...
[ "Initialize", "a", "WordHeadingDetection", "object", "from", "a", "json", "dictionary", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/discovery_v1.py#L11986-L11997
[ "def", "_from_dict", "(", "cls", ",", "_dict", ")", ":", "args", "=", "{", "}", "if", "'fonts'", "in", "_dict", ":", "args", "[", "'fonts'", "]", "=", "[", "FontSetting", ".", "_from_dict", "(", "x", ")", "for", "x", "in", "(", "_dict", ".", "get...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
WordHeadingDetection._to_dict
Return a json dictionary representing this model.
ibm_watson/discovery_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'fonts') and self.fonts is not None: _dict['fonts'] = [x._to_dict() for x in self.fonts] if hasattr(self, 'styles') and self.styles is not None: _dict['styles']...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'fonts') and self.fonts is not None: _dict['fonts'] = [x._to_dict() for x in self.fonts] if hasattr(self, 'styles') and self.styles is not None: _dict['styles']...
[ "Return", "a", "json", "dictionary", "representing", "this", "model", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/discovery_v1.py#L11999-L12006
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'fonts'", ")", "and", "self", ".", "fonts", "is", "not", "None", ":", "_dict", "[", "'fonts'", "]", "=", "[", "x", ".", "_to_dict", "(", ")", ...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
WordStyle._to_dict
Return a json dictionary representing this model.
ibm_watson/discovery_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'level') and self.level is not None: _dict['level'] = self.level if hasattr(self, 'names') and self.names is not None: _dict['names'] = self.names retur...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'level') and self.level is not None: _dict['level'] = self.level if hasattr(self, 'names') and self.names is not None: _dict['names'] = self.names retur...
[ "Return", "a", "json", "dictionary", "representing", "this", "model", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/discovery_v1.py#L12099-L12106
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'level'", ")", "and", "self", ".", "level", "is", "not", "None", ":", "_dict", "[", "'level'", "]", "=", "self", ".", "level", "if", "hasattr", ...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
XPathPatterns._to_dict
Return a json dictionary representing this model.
ibm_watson/discovery_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'xpaths') and self.xpaths is not None: _dict['xpaths'] = self.xpaths return _dict
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'xpaths') and self.xpaths is not None: _dict['xpaths'] = self.xpaths return _dict
[ "Return", "a", "json", "dictionary", "representing", "this", "model", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/discovery_v1.py#L12146-L12151
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'xpaths'", ")", "and", "self", ".", "xpaths", "is", "not", "None", ":", "_dict", "[", "'xpaths'", "]", "=", "self", ".", "xpaths", "return", "_dic...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
ToneAnalyzerV3.tone
Analyze general tone. Use the general purpose endpoint to analyze the tone of your input content. The service analyzes the content for emotional and language tones. The method always analyzes the tone of the full document; by default, it also analyzes the tone of each individual sentenc...
ibm_watson/tone_analyzer_v3.py
def tone(self, tone_input, sentences=None, tones=None, content_language=None, accept_language=None, content_type=None, **kwargs): """ Analyze general tone. Use the general purpose endpoint to analyze the ...
def tone(self, tone_input, sentences=None, tones=None, content_language=None, accept_language=None, content_type=None, **kwargs): """ Analyze general tone. Use the general purpose endpoint to analyze the ...
[ "Analyze", "general", "tone", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/tone_analyzer_v3.py#L114-L208
[ "def", "tone", "(", "self", ",", "tone_input", ",", "sentences", "=", "None", ",", "tones", "=", "None", ",", "content_language", "=", "None", ",", "accept_language", "=", "None", ",", "content_type", "=", "None", ",", "*", "*", "kwargs", ")", ":", "if...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
ToneAnalyzerV3.tone_chat
Analyze customer engagement tone. Use the customer engagement endpoint to analyze the tone of customer service and customer support conversations. For each utterance of a conversation, the method reports the most prevalent subset of the following seven tones: sad, frustrated, satisfied,...
ibm_watson/tone_analyzer_v3.py
def tone_chat(self, utterances, content_language=None, accept_language=None, **kwargs): """ Analyze customer engagement tone. Use the customer engagement endpoint to analyze the tone of customer service and customer...
def tone_chat(self, utterances, content_language=None, accept_language=None, **kwargs): """ Analyze customer engagement tone. Use the customer engagement endpoint to analyze the tone of customer service and customer...
[ "Analyze", "customer", "engagement", "tone", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/tone_analyzer_v3.py#L210-L274
[ "def", "tone_chat", "(", "self", ",", "utterances", ",", "content_language", "=", "None", ",", "accept_language", "=", "None", ",", "*", "*", "kwargs", ")", ":", "if", "utterances", "is", "None", ":", "raise", "ValueError", "(", "'utterances must be provided'"...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
DocumentAnalysis._from_dict
Initialize a DocumentAnalysis object from a json dictionary.
ibm_watson/tone_analyzer_v3.py
def _from_dict(cls, _dict): """Initialize a DocumentAnalysis object from a json dictionary.""" args = {} if 'tones' in _dict: args['tones'] = [ ToneScore._from_dict(x) for x in (_dict.get('tones')) ] if 'tone_categories' in _dict: args[...
def _from_dict(cls, _dict): """Initialize a DocumentAnalysis object from a json dictionary.""" args = {} if 'tones' in _dict: args['tones'] = [ ToneScore._from_dict(x) for x in (_dict.get('tones')) ] if 'tone_categories' in _dict: args[...
[ "Initialize", "a", "DocumentAnalysis", "object", "from", "a", "json", "dictionary", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/tone_analyzer_v3.py#L326-L340
[ "def", "_from_dict", "(", "cls", ",", "_dict", ")", ":", "args", "=", "{", "}", "if", "'tones'", "in", "_dict", ":", "args", "[", "'tones'", "]", "=", "[", "ToneScore", ".", "_from_dict", "(", "x", ")", "for", "x", "in", "(", "_dict", ".", "get",...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
DocumentAnalysis._to_dict
Return a json dictionary representing this model.
ibm_watson/tone_analyzer_v3.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'tones') and self.tones is not None: _dict['tones'] = [x._to_dict() for x in self.tones] if hasattr(self, 'tone_categories') and self.tone_categories is ...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'tones') and self.tones is not None: _dict['tones'] = [x._to_dict() for x in self.tones] if hasattr(self, 'tone_categories') and self.tone_categories is ...
[ "Return", "a", "json", "dictionary", "representing", "this", "model", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/tone_analyzer_v3.py#L342-L354
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'tones'", ")", "and", "self", ".", "tones", "is", "not", "None", ":", "_dict", "[", "'tones'", "]", "=", "[", "x", ".", "_to_dict", "(", ")", ...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
SentenceAnalysis._from_dict
Initialize a SentenceAnalysis object from a json dictionary.
ibm_watson/tone_analyzer_v3.py
def _from_dict(cls, _dict): """Initialize a SentenceAnalysis object from a json dictionary.""" args = {} if 'sentence_id' in _dict: args['sentence_id'] = _dict.get('sentence_id') else: raise ValueError( 'Required property \'sentence_id\' not presen...
def _from_dict(cls, _dict): """Initialize a SentenceAnalysis object from a json dictionary.""" args = {} if 'sentence_id' in _dict: args['sentence_id'] = _dict.get('sentence_id') else: raise ValueError( 'Required property \'sentence_id\' not presen...
[ "Initialize", "a", "SentenceAnalysis", "object", "from", "a", "json", "dictionary", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/tone_analyzer_v3.py#L430-L458
[ "def", "_from_dict", "(", "cls", ",", "_dict", ")", ":", "args", "=", "{", "}", "if", "'sentence_id'", "in", "_dict", ":", "args", "[", "'sentence_id'", "]", "=", "_dict", ".", "get", "(", "'sentence_id'", ")", "else", ":", "raise", "ValueError", "(", ...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
SentenceAnalysis._to_dict
Return a json dictionary representing this model.
ibm_watson/tone_analyzer_v3.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'sentence_id') and self.sentence_id is not None: _dict['sentence_id'] = self.sentence_id if hasattr(self, 'text') and self.text is not None: _dict['text'] = sel...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'sentence_id') and self.sentence_id is not None: _dict['sentence_id'] = self.sentence_id if hasattr(self, 'text') and self.text is not None: _dict['text'] = sel...
[ "Return", "a", "json", "dictionary", "representing", "this", "model", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/tone_analyzer_v3.py#L460-L478
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'sentence_id'", ")", "and", "self", ".", "sentence_id", "is", "not", "None", ":", "_dict", "[", "'sentence_id'", "]", "=", "self", ".", "sentence_id",...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
ToneAnalysis._from_dict
Initialize a ToneAnalysis object from a json dictionary.
ibm_watson/tone_analyzer_v3.py
def _from_dict(cls, _dict): """Initialize a ToneAnalysis object from a json dictionary.""" args = {} if 'document_tone' in _dict: args['document_tone'] = DocumentAnalysis._from_dict( _dict.get('document_tone')) else: raise ValueError( ...
def _from_dict(cls, _dict): """Initialize a ToneAnalysis object from a json dictionary.""" args = {} if 'document_tone' in _dict: args['document_tone'] = DocumentAnalysis._from_dict( _dict.get('document_tone')) else: raise ValueError( ...
[ "Initialize", "a", "ToneAnalysis", "object", "from", "a", "json", "dictionary", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/tone_analyzer_v3.py#L524-L539
[ "def", "_from_dict", "(", "cls", ",", "_dict", ")", ":", "args", "=", "{", "}", "if", "'document_tone'", "in", "_dict", ":", "args", "[", "'document_tone'", "]", "=", "DocumentAnalysis", ".", "_from_dict", "(", "_dict", ".", "get", "(", "'document_tone'", ...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
ToneAnalysis._to_dict
Return a json dictionary representing this model.
ibm_watson/tone_analyzer_v3.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'document_tone') and self.document_tone is not None: _dict['document_tone'] = self.document_tone._to_dict() if hasattr(self, 'sentences_tone') and self.sentences_tone is no...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'document_tone') and self.document_tone is not None: _dict['document_tone'] = self.document_tone._to_dict() if hasattr(self, 'sentences_tone') and self.sentences_tone is no...
[ "Return", "a", "json", "dictionary", "representing", "this", "model", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/tone_analyzer_v3.py#L541-L550
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'document_tone'", ")", "and", "self", ".", "document_tone", "is", "not", "None", ":", "_dict", "[", "'document_tone'", "]", "=", "self", ".", "documen...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
ToneCategory._from_dict
Initialize a ToneCategory object from a json dictionary.
ibm_watson/tone_analyzer_v3.py
def _from_dict(cls, _dict): """Initialize a ToneCategory object from a json dictionary.""" args = {} if 'tones' in _dict: args['tones'] = [ ToneScore._from_dict(x) for x in (_dict.get('tones')) ] else: raise ValueError( ...
def _from_dict(cls, _dict): """Initialize a ToneCategory object from a json dictionary.""" args = {} if 'tones' in _dict: args['tones'] = [ ToneScore._from_dict(x) for x in (_dict.get('tones')) ] else: raise ValueError( ...
[ "Initialize", "a", "ToneCategory", "object", "from", "a", "json", "dictionary", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/tone_analyzer_v3.py#L595-L617
[ "def", "_from_dict", "(", "cls", ",", "_dict", ")", ":", "args", "=", "{", "}", "if", "'tones'", "in", "_dict", ":", "args", "[", "'tones'", "]", "=", "[", "ToneScore", ".", "_from_dict", "(", "x", ")", "for", "x", "in", "(", "_dict", ".", "get",...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
ToneCategory._to_dict
Return a json dictionary representing this model.
ibm_watson/tone_analyzer_v3.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'tones') and self.tones is not None: _dict['tones'] = [x._to_dict() for x in self.tones] if hasattr(self, 'category_id') and self.category_id is not None: _dict...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'tones') and self.tones is not None: _dict['tones'] = [x._to_dict() for x in self.tones] if hasattr(self, 'category_id') and self.category_id is not None: _dict...
[ "Return", "a", "json", "dictionary", "representing", "this", "model", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/tone_analyzer_v3.py#L619-L628
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'tones'", ")", "and", "self", ".", "tones", "is", "not", "None", ":", "_dict", "[", "'tones'", "]", "=", "[", "x", ".", "_to_dict", "(", ")", ...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
ToneChatScore._to_dict
Return a json dictionary representing this model.
ibm_watson/tone_analyzer_v3.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'score') and self.score is not None: _dict['score'] = self.score if hasattr(self, 'tone_id') and self.tone_id is not None: _dict['tone_id'] = self.tone_id ...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'score') and self.score is not None: _dict['score'] = self.score if hasattr(self, 'tone_id') and self.tone_id is not None: _dict['tone_id'] = self.tone_id ...
[ "Return", "a", "json", "dictionary", "representing", "this", "model", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/tone_analyzer_v3.py#L696-L705
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'score'", ")", "and", "self", ".", "score", "is", "not", "None", ":", "_dict", "[", "'score'", "]", "=", "self", ".", "score", "if", "hasattr", ...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
Utterance._to_dict
Return a json dictionary representing this model.
ibm_watson/tone_analyzer_v3.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'text') and self.text is not None: _dict['text'] = self.text if hasattr(self, 'user') and self.user is not None: _dict['user'] = self.user return _dict
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'text') and self.text is not None: _dict['text'] = self.text if hasattr(self, 'user') and self.user is not None: _dict['user'] = self.user return _dict
[ "Return", "a", "json", "dictionary", "representing", "this", "model", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/tone_analyzer_v3.py#L906-L913
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'text'", ")", "and", "self", ".", "text", "is", "not", "None", ":", "_dict", "[", "'text'", "]", "=", "self", ".", "text", "if", "hasattr", "(",...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
UtteranceAnalyses._from_dict
Initialize a UtteranceAnalyses object from a json dictionary.
ibm_watson/tone_analyzer_v3.py
def _from_dict(cls, _dict): """Initialize a UtteranceAnalyses object from a json dictionary.""" args = {} if 'utterances_tone' in _dict: args['utterances_tone'] = [ UtteranceAnalysis._from_dict(x) for x in (_dict.get('utterances_tone')) ] ...
def _from_dict(cls, _dict): """Initialize a UtteranceAnalyses object from a json dictionary.""" args = {} if 'utterances_tone' in _dict: args['utterances_tone'] = [ UtteranceAnalysis._from_dict(x) for x in (_dict.get('utterances_tone')) ] ...
[ "Initialize", "a", "UtteranceAnalyses", "object", "from", "a", "json", "dictionary", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/tone_analyzer_v3.py#L955-L969
[ "def", "_from_dict", "(", "cls", ",", "_dict", ")", ":", "args", "=", "{", "}", "if", "'utterances_tone'", "in", "_dict", ":", "args", "[", "'utterances_tone'", "]", "=", "[", "UtteranceAnalysis", ".", "_from_dict", "(", "x", ")", "for", "x", "in", "("...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
UtteranceAnalyses._to_dict
Return a json dictionary representing this model.
ibm_watson/tone_analyzer_v3.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'utterances_tone') and self.utterances_tone is not None: _dict['utterances_tone'] = [ x._to_dict() for x in self.utterances_tone ] ...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'utterances_tone') and self.utterances_tone is not None: _dict['utterances_tone'] = [ x._to_dict() for x in self.utterances_tone ] ...
[ "Return", "a", "json", "dictionary", "representing", "this", "model", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/tone_analyzer_v3.py#L971-L981
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'utterances_tone'", ")", "and", "self", ".", "utterances_tone", "is", "not", "None", ":", "_dict", "[", "'utterances_tone'", "]", "=", "[", "x", ".", ...
4c2c9df4466fcde88975da9ecd834e6ba95eb353