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
AcousticModels._from_dict
Initialize a AcousticModels object from a json dictionary.
ibm_watson/speech_to_text_v1.py
def _from_dict(cls, _dict): """Initialize a AcousticModels object from a json dictionary.""" args = {} if 'customizations' in _dict: args['customizations'] = [ AcousticModel._from_dict(x) for x in (_dict.get('customizations')) ] els...
def _from_dict(cls, _dict): """Initialize a AcousticModels object from a json dictionary.""" args = {} if 'customizations' in _dict: args['customizations'] = [ AcousticModel._from_dict(x) for x in (_dict.get('customizations')) ] els...
[ "Initialize", "a", "AcousticModels", "object", "from", "a", "json", "dictionary", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/speech_to_text_v1.py#L3025-L3037
[ "def", "_from_dict", "(", "cls", ",", "_dict", ")", ":", "args", "=", "{", "}", "if", "'customizations'", "in", "_dict", ":", "args", "[", "'customizations'", "]", "=", "[", "AcousticModel", ".", "_from_dict", "(", "x", ")", "for", "x", "in", "(", "_...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
AcousticModels._to_dict
Return a json dictionary representing this model.
ibm_watson/speech_to_text_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'customizations') and self.customizations is not None: _dict['customizations'] = [ x._to_dict() for x in self.customizations ] return _dict
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'customizations') and self.customizations is not None: _dict['customizations'] = [ x._to_dict() for x in self.customizations ] 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/speech_to_text_v1.py#L3039-L3046
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'customizations'", ")", "and", "self", ".", "customizations", "is", "not", "None", ":", "_dict", "[", "'customizations'", "]", "=", "[", "x", ".", "...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
AudioDetails._to_dict
Return a json dictionary representing this model.
ibm_watson/speech_to_text_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, 'codec') and self.codec is not None: _dict['codec'] = self.codec if hasatt...
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, 'codec') and self.codec is not None: _dict['codec'] = self.codec if hasatt...
[ "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/speech_to_text_v1.py#L3123-L3134
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'type'", ")", "and", "self", ".", "type", "is", "not", "None", ":", "_dict", "[", "'type'", "]", "=", "self", ".", "type", "if", "hasattr", "(",...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
AudioListing._from_dict
Initialize a AudioListing object from a json dictionary.
ibm_watson/speech_to_text_v1.py
def _from_dict(cls, _dict): """Initialize a AudioListing object from a json dictionary.""" args = {} if 'duration' in _dict: args['duration'] = _dict.get('duration') if 'name' in _dict: args['name'] = _dict.get('name') if 'details' in _dict: ar...
def _from_dict(cls, _dict): """Initialize a AudioListing object from a json dictionary.""" args = {} if 'duration' in _dict: args['duration'] = _dict.get('duration') if 'name' in _dict: args['name'] = _dict.get('name') if 'details' in _dict: ar...
[ "Initialize", "a", "AudioListing", "object", "from", "a", "json", "dictionary", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/speech_to_text_v1.py#L3224-L3241
[ "def", "_from_dict", "(", "cls", ",", "_dict", ")", ":", "args", "=", "{", "}", "if", "'duration'", "in", "_dict", ":", "args", "[", "'duration'", "]", "=", "_dict", ".", "get", "(", "'duration'", ")", "if", "'name'", "in", "_dict", ":", "args", "[...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
AudioListing._to_dict
Return a json dictionary representing this model.
ibm_watson/speech_to_text_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'duration') and self.duration is not None: _dict['duration'] = self.duration if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name ...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'duration') and self.duration is not None: _dict['duration'] = self.duration if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name ...
[ "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/speech_to_text_v1.py#L3243-L3258
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'duration'", ")", "and", "self", ".", "duration", "is", "not", "None", ":", "_dict", "[", "'duration'", "]", "=", "self", ".", "duration", "if", "...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
AudioResource._to_dict
Return a json dictionary representing this model.
ibm_watson/speech_to_text_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'duration') and self.duration is not None: _dict['duration'] = self.duration if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name ...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'duration') and self.duration is not None: _dict['duration'] = self.duration if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name ...
[ "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/speech_to_text_v1.py#L3357-L3368
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'duration'", ")", "and", "self", ".", "duration", "is", "not", "None", ":", "_dict", "[", "'duration'", "]", "=", "self", ".", "duration", "if", "...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
AudioResources._from_dict
Initialize a AudioResources object from a json dictionary.
ibm_watson/speech_to_text_v1.py
def _from_dict(cls, _dict): """Initialize a AudioResources object from a json dictionary.""" args = {} if 'total_minutes_of_audio' in _dict: args['total_minutes_of_audio'] = _dict.get('total_minutes_of_audio') else: raise ValueError( 'Required prop...
def _from_dict(cls, _dict): """Initialize a AudioResources object from a json dictionary.""" args = {} if 'total_minutes_of_audio' in _dict: args['total_minutes_of_audio'] = _dict.get('total_minutes_of_audio') else: raise ValueError( 'Required prop...
[ "Initialize", "a", "AudioResources", "object", "from", "a", "json", "dictionary", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/speech_to_text_v1.py#L3414-L3431
[ "def", "_from_dict", "(", "cls", ",", "_dict", ")", ":", "args", "=", "{", "}", "if", "'total_minutes_of_audio'", "in", "_dict", ":", "args", "[", "'total_minutes_of_audio'", "]", "=", "_dict", ".", "get", "(", "'total_minutes_of_audio'", ")", "else", ":", ...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
AudioResources._to_dict
Return a json dictionary representing this model.
ibm_watson/speech_to_text_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'total_minutes_of_audio' ) and self.total_minutes_of_audio is not None: _dict['total_minutes_of_audio'] = self.total_minutes_of_audio if hasattr(self, 'au...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'total_minutes_of_audio' ) and self.total_minutes_of_audio is not None: _dict['total_minutes_of_audio'] = self.total_minutes_of_audio if hasattr(self, 'au...
[ "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/speech_to_text_v1.py#L3433-L3441
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'total_minutes_of_audio'", ")", "and", "self", ".", "total_minutes_of_audio", "is", "not", "None", ":", "_dict", "[", "'total_minutes_of_audio'", "]", "=", ...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
Corpora._from_dict
Initialize a Corpora object from a json dictionary.
ibm_watson/speech_to_text_v1.py
def _from_dict(cls, _dict): """Initialize a Corpora object from a json dictionary.""" args = {} if 'corpora' in _dict: args['corpora'] = [ Corpus._from_dict(x) for x in (_dict.get('corpora')) ] else: raise ValueError( 'R...
def _from_dict(cls, _dict): """Initialize a Corpora object from a json dictionary.""" args = {} if 'corpora' in _dict: args['corpora'] = [ Corpus._from_dict(x) for x in (_dict.get('corpora')) ] else: raise ValueError( 'R...
[ "Initialize", "a", "Corpora", "object", "from", "a", "json", "dictionary", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/speech_to_text_v1.py#L3478-L3488
[ "def", "_from_dict", "(", "cls", ",", "_dict", ")", ":", "args", "=", "{", "}", "if", "'corpora'", "in", "_dict", ":", "args", "[", "'corpora'", "]", "=", "[", "Corpus", ".", "_from_dict", "(", "x", ")", "for", "x", "in", "(", "_dict", ".", "get"...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
Corpora._to_dict
Return a json dictionary representing this model.
ibm_watson/speech_to_text_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'corpora') and self.corpora is not None: _dict['corpora'] = [x._to_dict() for x in self.corpora] return _dict
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'corpora') and self.corpora is not None: _dict['corpora'] = [x._to_dict() for x in self.corpora] 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/speech_to_text_v1.py#L3490-L3495
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'corpora'", ")", "and", "self", ".", "corpora", "is", "not", "None", ":", "_dict", "[", "'corpora'", "]", "=", "[", "x", ".", "_to_dict", "(", "...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
CustomWord._to_dict
Return a json dictionary representing this model.
ibm_watson/speech_to_text_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'word') and self.word is not None: _dict['word'] = self.word if hasattr(self, 'sounds_like') and self.sounds_like is not None: _dict['sounds_like'] = self.sound...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'word') and self.word is not None: _dict['word'] = self.word if hasattr(self, 'sounds_like') and self.sounds_like is not None: _dict['sounds_like'] = self.sound...
[ "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/speech_to_text_v1.py#L3691-L3700
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'word'", ")", "and", "self", ".", "word", "is", "not", "None", ":", "_dict", "[", "'word'", "]", "=", "self", ".", "word", "if", "hasattr", "(",...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
Grammar._to_dict
Return a json dictionary representing this model.
ibm_watson/speech_to_text_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, 'out_of_vocabulary_words' ) and self.out_of_vocabulary_words is not None: ...
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, 'out_of_vocabulary_words' ) and self.out_of_vocabulary_words 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/speech_to_text_v1.py#L3785-L3797
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'name'", ")", "and", "self", ".", "name", "is", "not", "None", ":", "_dict", "[", "'name'", "]", "=", "self", ".", "name", "if", "hasattr", "(",...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
Grammars._from_dict
Initialize a Grammars object from a json dictionary.
ibm_watson/speech_to_text_v1.py
def _from_dict(cls, _dict): """Initialize a Grammars object from a json dictionary.""" args = {} if 'grammars' in _dict: args['grammars'] = [ Grammar._from_dict(x) for x in (_dict.get('grammars')) ] else: raise ValueError( ...
def _from_dict(cls, _dict): """Initialize a Grammars object from a json dictionary.""" args = {} if 'grammars' in _dict: args['grammars'] = [ Grammar._from_dict(x) for x in (_dict.get('grammars')) ] else: raise ValueError( ...
[ "Initialize", "a", "Grammars", "object", "from", "a", "json", "dictionary", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/speech_to_text_v1.py#L3834-L3844
[ "def", "_from_dict", "(", "cls", ",", "_dict", ")", ":", "args", "=", "{", "}", "if", "'grammars'", "in", "_dict", ":", "args", "[", "'grammars'", "]", "=", "[", "Grammar", ".", "_from_dict", "(", "x", ")", "for", "x", "in", "(", "_dict", ".", "g...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
Grammars._to_dict
Return a json dictionary representing this model.
ibm_watson/speech_to_text_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'grammars') and self.grammars is not None: _dict['grammars'] = [x._to_dict() for x in self.grammars] return _dict
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'grammars') and self.grammars is not None: _dict['grammars'] = [x._to_dict() for x in self.grammars] 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/speech_to_text_v1.py#L3846-L3851
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'grammars'", ")", "and", "self", ".", "grammars", "is", "not", "None", ":", "_dict", "[", "'grammars'", "]", "=", "[", "x", ".", "_to_dict", "(", ...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
KeywordResult._to_dict
Return a json dictionary representing this model.
ibm_watson/speech_to_text_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'normalized_text') and self.normalized_text is not None: _dict['normalized_text'] = self.normalized_text if hasattr(self, 'start_time') and self.start_ti...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'normalized_text') and self.normalized_text is not None: _dict['normalized_text'] = self.normalized_text if hasattr(self, 'start_time') and self.start_ti...
[ "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/speech_to_text_v1.py#L3926-L3938
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'normalized_text'", ")", "and", "self", ".", "normalized_text", "is", "not", "None", ":", "_dict", "[", "'normalized_text'", "]", "=", "self", ".", "n...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
LanguageModels._from_dict
Initialize a LanguageModels object from a json dictionary.
ibm_watson/speech_to_text_v1.py
def _from_dict(cls, _dict): """Initialize a LanguageModels object from a json dictionary.""" args = {} if 'customizations' in _dict: args['customizations'] = [ LanguageModel._from_dict(x) for x in (_dict.get('customizations')) ] els...
def _from_dict(cls, _dict): """Initialize a LanguageModels object from a json dictionary.""" args = {} if 'customizations' in _dict: args['customizations'] = [ LanguageModel._from_dict(x) for x in (_dict.get('customizations')) ] els...
[ "Initialize", "a", "LanguageModels", "object", "from", "a", "json", "dictionary", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/speech_to_text_v1.py#L4188-L4200
[ "def", "_from_dict", "(", "cls", ",", "_dict", ")", ":", "args", "=", "{", "}", "if", "'customizations'", "in", "_dict", ":", "args", "[", "'customizations'", "]", "=", "[", "LanguageModel", ".", "_from_dict", "(", "x", ")", "for", "x", "in", "(", "_...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
RecognitionJob._from_dict
Initialize a RecognitionJob object from a json dictionary.
ibm_watson/speech_to_text_v1.py
def _from_dict(cls, _dict): """Initialize a RecognitionJob object from a json dictionary.""" args = {} if 'id' in _dict: args['id'] = _dict.get('id') else: raise ValueError( 'Required property \'id\' not present in RecognitionJob JSON') if ...
def _from_dict(cls, _dict): """Initialize a RecognitionJob object from a json dictionary.""" args = {} if 'id' in _dict: args['id'] = _dict.get('id') else: raise ValueError( 'Required property \'id\' not present in RecognitionJob JSON') if ...
[ "Initialize", "a", "RecognitionJob", "object", "from", "a", "json", "dictionary", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/speech_to_text_v1.py#L4323-L4356
[ "def", "_from_dict", "(", "cls", ",", "_dict", ")", ":", "args", "=", "{", "}", "if", "'id'", "in", "_dict", ":", "args", "[", "'id'", "]", "=", "_dict", ".", "get", "(", "'id'", ")", "else", ":", "raise", "ValueError", "(", "'Required property \\'id...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
RecognitionJob._to_dict
Return a json dictionary representing this model.
ibm_watson/speech_to_text_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, 'status') and self.status is not None: _dict['status'] = self.status if hasattr(se...
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, 'status') and self.status is not None: _dict['status'] = self.status 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/speech_to_text_v1.py#L4358-L4377
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'id'", ")", "and", "self", ".", "id", "is", "not", "None", ":", "_dict", "[", "'id'", "]", "=", "self", ".", "id", "if", "hasattr", "(", "self...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
RecognitionJobs._from_dict
Initialize a RecognitionJobs object from a json dictionary.
ibm_watson/speech_to_text_v1.py
def _from_dict(cls, _dict): """Initialize a RecognitionJobs object from a json dictionary.""" args = {} if 'recognitions' in _dict: args['recognitions'] = [ RecognitionJob._from_dict(x) for x in (_dict.get('recognitions')) ] else: ...
def _from_dict(cls, _dict): """Initialize a RecognitionJobs object from a json dictionary.""" args = {} if 'recognitions' in _dict: args['recognitions'] = [ RecognitionJob._from_dict(x) for x in (_dict.get('recognitions')) ] else: ...
[ "Initialize", "a", "RecognitionJobs", "object", "from", "a", "json", "dictionary", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/speech_to_text_v1.py#L4414-L4426
[ "def", "_from_dict", "(", "cls", ",", "_dict", ")", ":", "args", "=", "{", "}", "if", "'recognitions'", "in", "_dict", ":", "args", "[", "'recognitions'", "]", "=", "[", "RecognitionJob", ".", "_from_dict", "(", "x", ")", "for", "x", "in", "(", "_dic...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
RecognitionJobs._to_dict
Return a json dictionary representing this model.
ibm_watson/speech_to_text_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'recognitions') and self.recognitions is not None: _dict['recognitions'] = [x._to_dict() for x in self.recognitions] return _dict
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'recognitions') and self.recognitions is not None: _dict['recognitions'] = [x._to_dict() for x in self.recognitions] 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/speech_to_text_v1.py#L4428-L4433
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'recognitions'", ")", "and", "self", ".", "recognitions", "is", "not", "None", ":", "_dict", "[", "'recognitions'", "]", "=", "[", "x", ".", "_to_di...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
RegisterStatus._to_dict
Return a json dictionary representing this model.
ibm_watson/speech_to_text_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, 'url') and self.url is not None: _dict['url'] = self.url return _d...
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, 'url') and self.url is not None: _dict['url'] = self.url 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/speech_to_text_v1.py#L4491-L4498
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'status'", ")", "and", "self", ".", "status", "is", "not", "None", ":", "_dict", "[", "'status'", "]", "=", "self", ".", "status", "if", "hasattr"...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
SpeakerLabelsResult._to_dict
Return a json dictionary representing this model.
ibm_watson/speech_to_text_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'from_') and self.from_ is not None: _dict['from'] = self.from_ if hasattr(self, 'to') and self.to is not None: _dict['to'] = self.to if hasattr(self, '...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'from_') and self.from_ is not None: _dict['from'] = self.from_ if hasattr(self, 'to') and self.to is not None: _dict['to'] = self.to if hasattr(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/speech_to_text_v1.py#L4599-L4612
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'from_'", ")", "and", "self", ".", "from_", "is", "not", "None", ":", "_dict", "[", "'from'", "]", "=", "self", ".", "from_", "if", "hasattr", "...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
SpeechModel._to_dict
Return a json dictionary representing this model.
ibm_watson/speech_to_text_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, 'language') and self.language is not None: _dict['language'] = self.language ...
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, 'language') and self.language is not None: _dict['language'] = self.language ...
[ "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/speech_to_text_v1.py#L4706-L4723
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'name'", ")", "and", "self", ".", "name", "is", "not", "None", ":", "_dict", "[", "'name'", "]", "=", "self", ".", "name", "if", "hasattr", "(",...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
SpeechModels._from_dict
Initialize a SpeechModels object from a json dictionary.
ibm_watson/speech_to_text_v1.py
def _from_dict(cls, _dict): """Initialize a SpeechModels object from a json dictionary.""" args = {} if 'models' in _dict: args['models'] = [ SpeechModel._from_dict(x) for x in (_dict.get('models')) ] else: raise ValueError( ...
def _from_dict(cls, _dict): """Initialize a SpeechModels object from a json dictionary.""" args = {} if 'models' in _dict: args['models'] = [ SpeechModel._from_dict(x) for x in (_dict.get('models')) ] else: raise ValueError( ...
[ "Initialize", "a", "SpeechModels", "object", "from", "a", "json", "dictionary", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/speech_to_text_v1.py#L4758-L4768
[ "def", "_from_dict", "(", "cls", ",", "_dict", ")", ":", "args", "=", "{", "}", "if", "'models'", "in", "_dict", ":", "args", "[", "'models'", "]", "=", "[", "SpeechModel", ".", "_from_dict", "(", "x", ")", "for", "x", "in", "(", "_dict", ".", "g...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
SpeechRecognitionAlternative._to_dict
Return a json dictionary representing this model.
ibm_watson/speech_to_text_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'transcript') and self.transcript is not None: _dict['transcript'] = self.transcript if hasattr(self, 'confidence') and self.confidence is not None: _dict['conf...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'transcript') and self.transcript is not None: _dict['transcript'] = self.transcript if hasattr(self, 'confidence') and self.confidence is not None: _dict['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/speech_to_text_v1.py#L4858-L4870
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'transcript'", ")", "and", "self", ".", "transcript", "is", "not", "None", ":", "_dict", "[", "'transcript'", "]", "=", "self", ".", "transcript", "...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
SpeechRecognitionResult._from_dict
Initialize a SpeechRecognitionResult object from a json dictionary.
ibm_watson/speech_to_text_v1.py
def _from_dict(cls, _dict): """Initialize a SpeechRecognitionResult object from a json dictionary.""" args = {} if 'final' in _dict or 'final_results' in _dict: args['final_results'] = _dict.get('final') or _dict.get( 'final_results') else: raise V...
def _from_dict(cls, _dict): """Initialize a SpeechRecognitionResult object from a json dictionary.""" args = {} if 'final' in _dict or 'final_results' in _dict: args['final_results'] = _dict.get('final') or _dict.get( 'final_results') else: raise V...
[ "Initialize", "a", "SpeechRecognitionResult", "object", "from", "a", "json", "dictionary", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/speech_to_text_v1.py#L4941-L4967
[ "def", "_from_dict", "(", "cls", ",", "_dict", ")", ":", "args", "=", "{", "}", "if", "'final'", "in", "_dict", "or", "'final_results'", "in", "_dict", ":", "args", "[", "'final_results'", "]", "=", "_dict", ".", "get", "(", "'final'", ")", "or", "_d...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
SpeechRecognitionResult._to_dict
Return a json dictionary representing this model.
ibm_watson/speech_to_text_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'final_results') and self.final_results is not None: _dict['final'] = self.final_results if hasattr(self, 'alternatives') and self.alternatives is not None: _di...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'final_results') and self.final_results is not None: _dict['final'] = self.final_results if hasattr(self, 'alternatives') and self.alternatives is not None: _di...
[ "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/speech_to_text_v1.py#L4969-L4984
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'final_results'", ")", "and", "self", ".", "final_results", "is", "not", "None", ":", "_dict", "[", "'final'", "]", "=", "self", ".", "final_results",...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
SpeechRecognitionResults._from_dict
Initialize a SpeechRecognitionResults object from a json dictionary.
ibm_watson/speech_to_text_v1.py
def _from_dict(cls, _dict): """Initialize a SpeechRecognitionResults object from a json dictionary.""" args = {} if 'results' in _dict: args['results'] = [ SpeechRecognitionResult._from_dict(x) for x in (_dict.get('results')) ] if '...
def _from_dict(cls, _dict): """Initialize a SpeechRecognitionResults object from a json dictionary.""" args = {} if 'results' in _dict: args['results'] = [ SpeechRecognitionResult._from_dict(x) for x in (_dict.get('results')) ] if '...
[ "Initialize", "a", "SpeechRecognitionResults", "object", "from", "a", "json", "dictionary", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/speech_to_text_v1.py#L5081-L5098
[ "def", "_from_dict", "(", "cls", ",", "_dict", ")", ":", "args", "=", "{", "}", "if", "'results'", "in", "_dict", ":", "args", "[", "'results'", "]", "=", "[", "SpeechRecognitionResult", ".", "_from_dict", "(", "x", ")", "for", "x", "in", "(", "_dict...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
SpeechRecognitionResults._to_dict
Return a json dictionary representing this model.
ibm_watson/speech_to_text_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, 'result_index') and self.result_index is not None: ...
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, 'result_index') and self.result_index 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/speech_to_text_v1.py#L5100-L5113
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'results'", ")", "and", "self", ".", "results", "is", "not", "None", ":", "_dict", "[", "'results'", "]", "=", "[", "x", ".", "_to_dict", "(", "...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
SupportedFeatures._from_dict
Initialize a SupportedFeatures object from a json dictionary.
ibm_watson/speech_to_text_v1.py
def _from_dict(cls, _dict): """Initialize a SupportedFeatures object from a json dictionary.""" args = {} if 'custom_language_model' in _dict: args['custom_language_model'] = _dict.get('custom_language_model') else: raise ValueError( 'Required prop...
def _from_dict(cls, _dict): """Initialize a SupportedFeatures object from a json dictionary.""" args = {} if 'custom_language_model' in _dict: args['custom_language_model'] = _dict.get('custom_language_model') else: raise ValueError( 'Required prop...
[ "Initialize", "a", "SupportedFeatures", "object", "from", "a", "json", "dictionary", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/speech_to_text_v1.py#L5153-L5168
[ "def", "_from_dict", "(", "cls", ",", "_dict", ")", ":", "args", "=", "{", "}", "if", "'custom_language_model'", "in", "_dict", ":", "args", "[", "'custom_language_model'", "]", "=", "_dict", ".", "get", "(", "'custom_language_model'", ")", "else", ":", "r...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
SupportedFeatures._to_dict
Return a json dictionary representing this model.
ibm_watson/speech_to_text_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'custom_language_model' ) and self.custom_language_model is not None: _dict['custom_language_model'] = self.custom_language_model if hasattr(self, 'speake...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'custom_language_model' ) and self.custom_language_model is not None: _dict['custom_language_model'] = self.custom_language_model if hasattr(self, 'speake...
[ "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/speech_to_text_v1.py#L5170-L5178
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'custom_language_model'", ")", "and", "self", ".", "custom_language_model", "is", "not", "None", ":", "_dict", "[", "'custom_language_model'", "]", "=", "...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
Word._from_dict
Initialize a Word object from a json dictionary.
ibm_watson/speech_to_text_v1.py
def _from_dict(cls, _dict): """Initialize a Word object from a json dictionary.""" args = {} if 'word' in _dict: args['word'] = _dict.get('word') else: raise ValueError( 'Required property \'word\' not present in Word JSON') if 'sounds_like...
def _from_dict(cls, _dict): """Initialize a Word object from a json dictionary.""" args = {} if 'word' in _dict: args['word'] = _dict.get('word') else: raise ValueError( 'Required property \'word\' not present in Word JSON') if 'sounds_like...
[ "Initialize", "a", "Word", "object", "from", "a", "json", "dictionary", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/speech_to_text_v1.py#L5261-L5293
[ "def", "_from_dict", "(", "cls", ",", "_dict", ")", ":", "args", "=", "{", "}", "if", "'word'", "in", "_dict", ":", "args", "[", "'word'", "]", "=", "_dict", ".", "get", "(", "'word'", ")", "else", ":", "raise", "ValueError", "(", "'Required property...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
Word._to_dict
Return a json dictionary representing this model.
ibm_watson/speech_to_text_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'word') and self.word is not None: _dict['word'] = self.word if hasattr(self, 'sounds_like') and self.sounds_like is not None: _dict['sounds_like'] = self.sound...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'word') and self.word is not None: _dict['word'] = self.word if hasattr(self, 'sounds_like') and self.sounds_like is not None: _dict['sounds_like'] = self.sound...
[ "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/speech_to_text_v1.py#L5295-L5310
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'word'", ")", "and", "self", ".", "word", "is", "not", "None", ":", "_dict", "[", "'word'", "]", "=", "self", ".", "word", "if", "hasattr", "(",...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
WordAlternativeResult._to_dict
Return a json dictionary representing this model.
ibm_watson/speech_to_text_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'confidence') and self.confidence is not None: _dict['confidence'] = self.confidence if hasattr(self, 'word') and self.word is not None: _dict['word'] = self.wo...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'confidence') and self.confidence is not None: _dict['confidence'] = self.confidence if hasattr(self, 'word') and self.word is not None: _dict['word'] = self.wo...
[ "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/speech_to_text_v1.py#L5365-L5372
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'confidence'", ")", "and", "self", ".", "confidence", "is", "not", "None", ":", "_dict", "[", "'confidence'", "]", "=", "self", ".", "confidence", "...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
WordAlternativeResults._from_dict
Initialize a WordAlternativeResults object from a json dictionary.
ibm_watson/speech_to_text_v1.py
def _from_dict(cls, _dict): """Initialize a WordAlternativeResults object from a json dictionary.""" args = {} if 'start_time' in _dict: args['start_time'] = _dict.get('start_time') else: raise ValueError( 'Required property \'start_time\' not pres...
def _from_dict(cls, _dict): """Initialize a WordAlternativeResults object from a json dictionary.""" args = {} if 'start_time' in _dict: args['start_time'] = _dict.get('start_time') else: raise ValueError( 'Required property \'start_time\' not pres...
[ "Initialize", "a", "WordAlternativeResults", "object", "from", "a", "json", "dictionary", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/speech_to_text_v1.py#L5417-L5441
[ "def", "_from_dict", "(", "cls", ",", "_dict", ")", ":", "args", "=", "{", "}", "if", "'start_time'", "in", "_dict", ":", "args", "[", "'start_time'", "]", "=", "_dict", ".", "get", "(", "'start_time'", ")", "else", ":", "raise", "ValueError", "(", "...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
WordAlternativeResults._to_dict
Return a json dictionary representing this model.
ibm_watson/speech_to_text_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'start_time') and self.start_time is not None: _dict['start_time'] = self.start_time if hasattr(self, 'end_time') and self.end_time is not None: _dict['end_time...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'start_time') and self.start_time is not None: _dict['start_time'] = self.start_time if hasattr(self, 'end_time') and self.end_time is not None: _dict['end_time...
[ "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/speech_to_text_v1.py#L5443-L5452
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'start_time'", ")", "and", "self", ".", "start_time", "is", "not", "None", ":", "_dict", "[", "'start_time'", "]", "=", "self", ".", "start_time", "...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
WordError._to_dict
Return a json dictionary representing this model.
ibm_watson/speech_to_text_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'element') and self.element is not None: _dict['element'] = self.element return _dict
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'element') and self.element is not None: _dict['element'] = self.element 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/speech_to_text_v1.py#L5507-L5512
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'element'", ")", "and", "self", ".", "element", "is", "not", "None", ":", "_dict", "[", "'element'", "]", "=", "self", ".", "element", "return", "...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
Words._from_dict
Initialize a Words object from a json dictionary.
ibm_watson/speech_to_text_v1.py
def _from_dict(cls, _dict): """Initialize a Words object from a json dictionary.""" args = {} if 'words' in _dict: args['words'] = [Word._from_dict(x) for x in (_dict.get('words'))] else: raise ValueError( 'Required property \'words\' not present i...
def _from_dict(cls, _dict): """Initialize a Words object from a json dictionary.""" args = {} if 'words' in _dict: args['words'] = [Word._from_dict(x) for x in (_dict.get('words'))] else: raise ValueError( 'Required property \'words\' not present i...
[ "Initialize", "a", "Words", "object", "from", "a", "json", "dictionary", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/speech_to_text_v1.py#L5549-L5557
[ "def", "_from_dict", "(", "cls", ",", "_dict", ")", ":", "args", "=", "{", "}", "if", "'words'", "in", "_dict", ":", "args", "[", "'words'", "]", "=", "[", "Word", ".", "_from_dict", "(", "x", ")", "for", "x", "in", "(", "_dict", ".", "get", "(...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
Words._to_dict
Return a json dictionary representing this model.
ibm_watson/speech_to_text_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'words') and self.words is not None: _dict['words'] = [x._to_dict() for x in self.words] return _dict
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'words') and self.words is not None: _dict['words'] = [x._to_dict() for x in self.words] 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/speech_to_text_v1.py#L5559-L5564
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'words'", ")", "and", "self", ".", "words", "is", "not", "None", ":", "_dict", "[", "'words'", "]", "=", "[", "x", ".", "_to_dict", "(", ")", ...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
updateUserTone
updateUserTone processes the Tone Analyzer payload to pull out the emotion, writing and social tones, and identify the meaningful tones (i.e., those tones that meet the specified thresholds). The conversationPayload json object is updated to include these tones. @param conversationPayload json object re...
examples/assistant_tone_analyzer_integration/tone_detection.py
def updateUserTone(conversationPayload, toneAnalyzerPayload, maintainHistory): """ updateUserTone processes the Tone Analyzer payload to pull out the emotion, writing and social tones, and identify the meaningful tones (i.e., those tones that meet the specified thresholds). The conversationPayload j...
def updateUserTone(conversationPayload, toneAnalyzerPayload, maintainHistory): """ updateUserTone processes the Tone Analyzer payload to pull out the emotion, writing and social tones, and identify the meaningful tones (i.e., those tones that meet the specified thresholds). The conversationPayload j...
[ "updateUserTone", "processes", "the", "Tone", "Analyzer", "payload", "to", "pull", "out", "the", "emotion", "writing", "and", "social", "tones", "and", "identify", "the", "meaningful", "tones", "(", "i", ".", "e", ".", "those", "tones", "that", "meet", "the"...
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/examples/assistant_tone_analyzer_integration/tone_detection.py#L34-L77
[ "def", "updateUserTone", "(", "conversationPayload", ",", "toneAnalyzerPayload", ",", "maintainHistory", ")", ":", "emotionTone", "=", "None", "writingTone", "=", "None", "socialTone", "=", "None", "# if there is no context in a", "if", "'context'", "not", "in", "conv...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
updateEmotionTone
updateEmotionTone updates the user emotion tone with the primary emotion - the emotion tone that has a score greater than or equal to the EMOTION_SCORE_THRESHOLD; otherwise primary emotion will be 'neutral' @param user a json object representing user information (tone) to be used in conversing with the ...
examples/assistant_tone_analyzer_integration/tone_detection.py
def updateEmotionTone(user, emotionTone, maintainHistory): """ updateEmotionTone updates the user emotion tone with the primary emotion - the emotion tone that has a score greater than or equal to the EMOTION_SCORE_THRESHOLD; otherwise primary emotion will be 'neutral' @param user a json object repr...
def updateEmotionTone(user, emotionTone, maintainHistory): """ updateEmotionTone updates the user emotion tone with the primary emotion - the emotion tone that has a score greater than or equal to the EMOTION_SCORE_THRESHOLD; otherwise primary emotion will be 'neutral' @param user a json object repr...
[ "updateEmotionTone", "updates", "the", "user", "emotion", "tone", "with", "the", "primary", "emotion", "-", "the", "emotion", "tone", "that", "has", "a", "score", "greater", "than", "or", "equal", "to", "the", "EMOTION_SCORE_THRESHOLD", ";", "otherwise", "primar...
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/examples/assistant_tone_analyzer_integration/tone_detection.py#L108-L141
[ "def", "updateEmotionTone", "(", "user", ",", "emotionTone", ",", "maintainHistory", ")", ":", "maxScore", "=", "0.0", "primaryEmotion", "=", "None", "primaryEmotionScore", "=", "None", "for", "tone", "in", "emotionTone", "[", "'tones'", "]", ":", "if", "tone"...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
updateWritingTone
updateWritingTone updates the user with the writing tones interpreted based on the specified thresholds @param: user a json object representing user information (tone) to be used in conversing with the Conversation Service @param: writingTone a json object containing the writing tones in the payload...
examples/assistant_tone_analyzer_integration/tone_detection.py
def updateWritingTone(user, writingTone, maintainHistory): """ updateWritingTone updates the user with the writing tones interpreted based on the specified thresholds @param: user a json object representing user information (tone) to be used in conversing with the Conversation Service @param: wr...
def updateWritingTone(user, writingTone, maintainHistory): """ updateWritingTone updates the user with the writing tones interpreted based on the specified thresholds @param: user a json object representing user information (tone) to be used in conversing with the Conversation Service @param: wr...
[ "updateWritingTone", "updates", "the", "user", "with", "the", "writing", "tones", "interpreted", "based", "on", "the", "specified", "thresholds" ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/examples/assistant_tone_analyzer_integration/tone_detection.py#L144-L183
[ "def", "updateWritingTone", "(", "user", ",", "writingTone", ",", "maintainHistory", ")", ":", "currentWriting", "=", "[", "]", "currentWritingObject", "=", "[", "]", "# Process each writing tone and determine if it is high or low", "for", "tone", "in", "writingTone", "...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
updateSocialTone
updateSocialTone updates the user with the social tones interpreted based on the specified thresholds @param user a json object representing user information (tone) to be used in conversing with the Conversation Service @param socialTone a json object containing the social tones in the payload retur...
examples/assistant_tone_analyzer_integration/tone_detection.py
def updateSocialTone(user, socialTone, maintainHistory): """ updateSocialTone updates the user with the social tones interpreted based on the specified thresholds @param user a json object representing user information (tone) to be used in conversing with the Conversation Service @param socialTo...
def updateSocialTone(user, socialTone, maintainHistory): """ updateSocialTone updates the user with the social tones interpreted based on the specified thresholds @param user a json object representing user information (tone) to be used in conversing with the Conversation Service @param socialTo...
[ "updateSocialTone", "updates", "the", "user", "with", "the", "social", "tones", "interpreted", "based", "on", "the", "specified", "thresholds" ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/examples/assistant_tone_analyzer_integration/tone_detection.py#L186-L226
[ "def", "updateSocialTone", "(", "user", ",", "socialTone", ",", "maintainHistory", ")", ":", "currentSocial", "=", "[", "]", "currentSocialObject", "=", "[", "]", "# Process each social tone and determine if it is high or low", "for", "tone", "in", "socialTone", "[", ...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
TextToSpeechV1.synthesize
Synthesize audio. Synthesizes text to audio that is spoken in the specified voice. The service bases its understanding of the language for the input text on the specified voice. Use a voice that matches the language of the input text. The method accepts a maximum of 5 KB of input text i...
ibm_watson/text_to_speech_v1.py
def synthesize(self, text, voice=None, customization_id=None, accept=None, **kwargs): """ Synthesize audio. Synthesizes text to audio that is spoken in the specified voice. The service bases i...
def synthesize(self, text, voice=None, customization_id=None, accept=None, **kwargs): """ Synthesize audio. Synthesizes text to audio that is spoken in the specified voice. The service bases i...
[ "Synthesize", "audio", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/text_to_speech_v1.py#L180-L295
[ "def", "synthesize", "(", "self", ",", "text", ",", "voice", "=", "None", ",", "customization_id", "=", "None", ",", "accept", "=", "None", ",", "*", "*", "kwargs", ")", ":", "if", "text", "is", "None", ":", "raise", "ValueError", "(", "'text must be p...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
TextToSpeechV1.update_voice_model
Update a custom model. Updates information for the specified custom voice model. You can update metadata such as the name and description of the voice model. You can also update the words in the model and their translations. Adding a new translation for a word that already exists in a c...
ibm_watson/text_to_speech_v1.py
def update_voice_model(self, customization_id, name=None, description=None, words=None, **kwargs): """ Update a custom model. Updates information for the specif...
def update_voice_model(self, customization_id, name=None, description=None, words=None, **kwargs): """ Update a custom model. Updates information for the specif...
[ "Update", "a", "custom", "model", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/text_to_speech_v1.py#L522-L591
[ "def", "update_voice_model", "(", "self", ",", "customization_id", ",", "name", "=", "None", ",", "description", "=", "None", ",", "words", "=", "None", ",", "*", "*", "kwargs", ")", ":", "if", "customization_id", "is", "None", ":", "raise", "ValueError", ...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
TextToSpeechV1.add_word
Add a custom word. Adds a single word and its translation to the specified custom voice model. Adding a new translation for a word that already exists in a custom model overwrites the word's existing translation. A custom model can contain no more than 20,000 entries. You must use crede...
ibm_watson/text_to_speech_v1.py
def add_word(self, customization_id, word, translation, part_of_speech=None, **kwargs): """ Add a custom word. Adds a single word and its translation to the specified custom voice model. Adding a new tr...
def add_word(self, customization_id, word, translation, part_of_speech=None, **kwargs): """ Add a custom word. Adds a single word and its translation to the specified custom voice model. Adding a new tr...
[ "Add", "a", "custom", "word", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/text_to_speech_v1.py#L597-L673
[ "def", "add_word", "(", "self", ",", "customization_id", ",", "word", ",", "translation", ",", "part_of_speech", "=", "None", ",", "*", "*", "kwargs", ")", ":", "if", "customization_id", "is", "None", ":", "raise", "ValueError", "(", "'customization_id must be...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
TextToSpeechV1.delete_user_data
Delete labeled data. Deletes all data that is associated with a specified customer ID. The method deletes all data for the customer ID, regardless of the method by which the information was added. The method has no effect if no data is associated with the customer ID. You must issue the...
ibm_watson/text_to_speech_v1.py
def delete_user_data(self, customer_id, **kwargs): """ Delete labeled data. Deletes all data that is associated with a specified customer ID. The method deletes all data for the customer ID, regardless of the method by which the information was added. The method has no effect if...
def delete_user_data(self, customer_id, **kwargs): """ Delete labeled data. Deletes all data that is associated with a specified customer ID. The method deletes all data for the customer ID, regardless of the method by which the information was added. The method has no effect if...
[ "Delete", "labeled", "data", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/text_to_speech_v1.py#L854-L893
[ "def", "delete_user_data", "(", "self", ",", "customer_id", ",", "*", "*", "kwargs", ")", ":", "if", "customer_id", "is", "None", ":", "raise", "ValueError", "(", "'customer_id must be provided'", ")", "headers", "=", "{", "}", "if", "'headers'", "in", "kwar...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
Pronunciation._to_dict
Return a json dictionary representing this model.
ibm_watson/text_to_speech_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'pronunciation') and self.pronunciation is not None: _dict['pronunciation'] = self.pronunciation return _dict
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'pronunciation') and self.pronunciation is not None: _dict['pronunciation'] = self.pronunciation 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/text_to_speech_v1.py#L932-L937
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'pronunciation'", ")", "and", "self", ".", "pronunciation", "is", "not", "None", ":", "_dict", "[", "'pronunciation'", "]", "=", "self", ".", "pronunc...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
SupportedFeatures._to_dict
Return a json dictionary representing this model.
ibm_watson/text_to_speech_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'custom_pronunciation' ) and self.custom_pronunciation is not None: _dict['custom_pronunciation'] = self.custom_pronunciation if hasattr(self, 'voice_tran...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'custom_pronunciation' ) and self.custom_pronunciation is not None: _dict['custom_pronunciation'] = self.custom_pronunciation if hasattr(self, 'voice_tran...
[ "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/text_to_speech_v1.py#L996-L1005
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'custom_pronunciation'", ")", "and", "self", ".", "custom_pronunciation", "is", "not", "None", ":", "_dict", "[", "'custom_pronunciation'", "]", "=", "sel...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
Voice._to_dict
Return a json dictionary representing this model.
ibm_watson/text_to_speech_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, 'gender') and self.gender is not None: _dict['gender'] = self.gender if hasatt...
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, 'gender') and self.gender is not None: _dict['gender'] = self.gender if hasatt...
[ "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/text_to_speech_v1.py#L1196-L1217
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'url'", ")", "and", "self", ".", "url", "is", "not", "None", ":", "_dict", "[", "'url'", "]", "=", "self", ".", "url", "if", "hasattr", "(", "...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
VoiceModel._from_dict
Initialize a VoiceModel object from a json dictionary.
ibm_watson/text_to_speech_v1.py
def _from_dict(cls, _dict): """Initialize a VoiceModel object from a json dictionary.""" args = {} if 'customization_id' in _dict: args['customization_id'] = _dict.get('customization_id') else: raise ValueError( 'Required property \'customization_i...
def _from_dict(cls, _dict): """Initialize a VoiceModel object from a json dictionary.""" args = {} if 'customization_id' in _dict: args['customization_id'] = _dict.get('customization_id') else: raise ValueError( 'Required property \'customization_i...
[ "Initialize", "a", "VoiceModel", "object", "from", "a", "json", "dictionary", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/text_to_speech_v1.py#L1306-L1329
[ "def", "_from_dict", "(", "cls", ",", "_dict", ")", ":", "args", "=", "{", "}", "if", "'customization_id'", "in", "_dict", ":", "args", "[", "'customization_id'", "]", "=", "_dict", ".", "get", "(", "'customization_id'", ")", "else", ":", "raise", "Value...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
VoiceModel._to_dict
Return a json dictionary representing this model.
ibm_watson/text_to_speech_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'customization_id') and self.customization_id is not None: _dict['customization_id'] = self.customization_id if hasattr(self, 'name') and self.name is no...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'customization_id') and self.customization_id is not None: _dict['customization_id'] = self.customization_id if hasattr(self, 'name') and self.name 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/text_to_speech_v1.py#L1331-L1351
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'customization_id'", ")", "and", "self", ".", "customization_id", "is", "not", "None", ":", "_dict", "[", "'customization_id'", "]", "=", "self", ".", ...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
VoiceModels._from_dict
Initialize a VoiceModels object from a json dictionary.
ibm_watson/text_to_speech_v1.py
def _from_dict(cls, _dict): """Initialize a VoiceModels object from a json dictionary.""" args = {} if 'customizations' in _dict: args['customizations'] = [ VoiceModel._from_dict(x) for x in (_dict.get('customizations')) ] else: raise V...
def _from_dict(cls, _dict): """Initialize a VoiceModels object from a json dictionary.""" args = {} if 'customizations' in _dict: args['customizations'] = [ VoiceModel._from_dict(x) for x in (_dict.get('customizations')) ] else: raise V...
[ "Initialize", "a", "VoiceModels", "object", "from", "a", "json", "dictionary", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/text_to_speech_v1.py#L1390-L1401
[ "def", "_from_dict", "(", "cls", ",", "_dict", ")", ":", "args", "=", "{", "}", "if", "'customizations'", "in", "_dict", ":", "args", "[", "'customizations'", "]", "=", "[", "VoiceModel", ".", "_from_dict", "(", "x", ")", "for", "x", "in", "(", "_dic...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
Voices._from_dict
Initialize a Voices object from a json dictionary.
ibm_watson/text_to_speech_v1.py
def _from_dict(cls, _dict): """Initialize a Voices object from a json dictionary.""" args = {} if 'voices' in _dict: args['voices'] = [ Voice._from_dict(x) for x in (_dict.get('voices')) ] else: raise ValueError( 'Requir...
def _from_dict(cls, _dict): """Initialize a Voices object from a json dictionary.""" args = {} if 'voices' in _dict: args['voices'] = [ Voice._from_dict(x) for x in (_dict.get('voices')) ] else: raise ValueError( 'Requir...
[ "Initialize", "a", "Voices", "object", "from", "a", "json", "dictionary", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/text_to_speech_v1.py#L1443-L1453
[ "def", "_from_dict", "(", "cls", ",", "_dict", ")", ":", "args", "=", "{", "}", "if", "'voices'", "in", "_dict", ":", "args", "[", "'voices'", "]", "=", "[", "Voice", ".", "_from_dict", "(", "x", ")", "for", "x", "in", "(", "_dict", ".", "get", ...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
Voices._to_dict
Return a json dictionary representing this model.
ibm_watson/text_to_speech_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'voices') and self.voices is not None: _dict['voices'] = [x._to_dict() for x in self.voices] return _dict
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'voices') and self.voices is not None: _dict['voices'] = [x._to_dict() for x in self.voices] 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/text_to_speech_v1.py#L1455-L1460
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'voices'", ")", "and", "self", ".", "voices", "is", "not", "None", ":", "_dict", "[", "'voices'", "]", "=", "[", "x", ".", "_to_dict", "(", ")",...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
Word._to_dict
Return a json dictionary representing this model.
ibm_watson/text_to_speech_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'word') and self.word is not None: _dict['word'] = self.word if hasattr(self, 'translation') and self.translation is not None: _dict['translation'] = self.trans...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'word') and self.word is not None: _dict['word'] = self.word if hasattr(self, 'translation') and self.translation is not None: _dict['translation'] = self.trans...
[ "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/text_to_speech_v1.py#L1533-L1542
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'word'", ")", "and", "self", ".", "word", "is", "not", "None", ":", "_dict", "[", "'word'", "]", "=", "self", ".", "word", "if", "hasattr", "(",...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
invokeToneConversation
invokeToneConversation calls the Tone Analyzer service to get the tone information for the user's input text (input['text'] in the payload json object), adds/updates the user's tone in the payload's context, and sends the payload to the conversation service to get a response which is printed to scre...
examples/assistant_tone_analyzer_integration/tone_assistant_integration.v1.py
def invokeToneConversation(payload, maintainToneHistoryInContext): """ invokeToneConversation calls the Tone Analyzer service to get the tone information for the user's input text (input['text'] in the payload json object), adds/updates the user's tone in the payload's context, and sends the pay...
def invokeToneConversation(payload, maintainToneHistoryInContext): """ invokeToneConversation calls the Tone Analyzer service to get the tone information for the user's input text (input['text'] in the payload json object), adds/updates the user's tone in the payload's context, and sends the pay...
[ "invokeToneConversation", "calls", "the", "Tone", "Analyzer", "service", "to", "get", "the", "tone", "information", "for", "the", "user", "s", "input", "text", "(", "input", "[", "text", "]", "in", "the", "payload", "json", "object", ")", "adds", "/", "upd...
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/examples/assistant_tone_analyzer_integration/tone_assistant_integration.v1.py#L43-L65
[ "def", "invokeToneConversation", "(", "payload", ",", "maintainToneHistoryInContext", ")", ":", "tone", "=", "tone_analyzer", ".", "tone", "(", "tone_input", "=", "payload", "[", "'input'", "]", ",", "content_type", "=", "'application/json'", ")", ".", "get_result...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
CompareComplyV1.convert_to_html
Convert document to HTML. Converts a document to HTML. :param file file: The document to convert. :param str filename: The filename for file. :param str file_content_type: The content type of file. :param str model: The analysis model to be used by the service. For the **Elemen...
ibm_watson/compare_comply_v1.py
def convert_to_html(self, file, filename=None, file_content_type=None, model=None, **kwargs): """ Convert document to HTML. Converts a document to HTML. :param file f...
def convert_to_html(self, file, filename=None, file_content_type=None, model=None, **kwargs): """ Convert document to HTML. Converts a document to HTML. :param file f...
[ "Convert", "document", "to", "HTML", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/compare_comply_v1.py#L93-L144
[ "def", "convert_to_html", "(", "self", ",", "file", ",", "filename", "=", "None", ",", "file_content_type", "=", "None", ",", "model", "=", "None", ",", "*", "*", "kwargs", ")", ":", "if", "file", "is", "None", ":", "raise", "ValueError", "(", "'file m...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
CompareComplyV1.classify_elements
Classify the elements of a document. Analyzes the structural and semantic elements of a document. :param file file: The document to classify. :param str file_content_type: The content type of file. :param str model: The analysis model to be used by the service. For the **Element ...
ibm_watson/compare_comply_v1.py
def classify_elements(self, file, file_content_type=None, model=None, **kwargs): """ Classify the elements of a document. Analyzes the structural and semantic elements of a document. ...
def classify_elements(self, file, file_content_type=None, model=None, **kwargs): """ Classify the elements of a document. Analyzes the structural and semantic elements of a document. ...
[ "Classify", "the", "elements", "of", "a", "document", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/compare_comply_v1.py#L150-L196
[ "def", "classify_elements", "(", "self", ",", "file", ",", "file_content_type", "=", "None", ",", "model", "=", "None", ",", "*", "*", "kwargs", ")", ":", "if", "file", "is", "None", ":", "raise", "ValueError", "(", "'file must be provided'", ")", "headers...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
CompareComplyV1.compare_documents
Compare two documents. Compares two input documents. Documents must be in the same format. :param file file_1: The first document to compare. :param file file_2: The second document to compare. :param str file_1_content_type: The content type of file_1. :param str file_2_conten...
ibm_watson/compare_comply_v1.py
def compare_documents(self, file_1, file_2, file_1_content_type=None, file_2_content_type=None, file_1_label=None, file_2_label=None, mode...
def compare_documents(self, file_1, file_2, file_1_content_type=None, file_2_content_type=None, file_1_label=None, file_2_label=None, mode...
[ "Compare", "two", "documents", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/compare_comply_v1.py#L250-L313
[ "def", "compare_documents", "(", "self", ",", "file_1", ",", "file_2", ",", "file_1_content_type", "=", "None", ",", "file_2_content_type", "=", "None", ",", "file_1_label", "=", "None", ",", "file_2_label", "=", "None", ",", "model", "=", "None", ",", "*", ...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
CompareComplyV1.add_feedback
Add feedback. Adds feedback in the form of _labels_ from a subject-matter expert (SME) to a governing document. **Important:** Feedback is not immediately incorporated into the training model, nor is it guaranteed to be incorporated at a later date. Instead, submitted feedback i...
ibm_watson/compare_comply_v1.py
def add_feedback(self, feedback_data, user_id=None, comment=None, **kwargs): """ Add feedback. Adds feedback in the form of _labels_ from a subject-matter expert (SME) to a governing document. **Important:** Feedback is not immediately incorporated into the training model, ...
def add_feedback(self, feedback_data, user_id=None, comment=None, **kwargs): """ Add feedback. Adds feedback in the form of _labels_ from a subject-matter expert (SME) to a governing document. **Important:** Feedback is not immediately incorporated into the training model, ...
[ "Add", "feedback", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/compare_comply_v1.py#L319-L363
[ "def", "add_feedback", "(", "self", ",", "feedback_data", ",", "user_id", "=", "None", ",", "comment", "=", "None", ",", "*", "*", "kwargs", ")", ":", "if", "feedback_data", "is", "None", ":", "raise", "ValueError", "(", "'feedback_data must be provided'", "...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
CompareComplyV1.get_feedback
List a specified feedback entry. Lists a feedback entry with a specified `feedback_id`. :param str feedback_id: A string that specifies the feedback entry to be included in the output. :param str model: The analysis model to be used by the service. For the **Element classificat...
ibm_watson/compare_comply_v1.py
def get_feedback(self, feedback_id, model=None, **kwargs): """ List a specified feedback entry. Lists a feedback entry with a specified `feedback_id`. :param str feedback_id: A string that specifies the feedback entry to be included in the output. :param str model: The ...
def get_feedback(self, feedback_id, model=None, **kwargs): """ List a specified feedback entry. Lists a feedback entry with a specified `feedback_id`. :param str feedback_id: A string that specifies the feedback entry to be included in the output. :param str model: The ...
[ "List", "a", "specified", "feedback", "entry", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/compare_comply_v1.py#L403-L439
[ "def", "get_feedback", "(", "self", ",", "feedback_id", ",", "model", "=", "None", ",", "*", "*", "kwargs", ")", ":", "if", "feedback_id", "is", "None", ":", "raise", "ValueError", "(", "'feedback_id must be provided'", ")", "headers", "=", "{", "}", "if",...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
CompareComplyV1.list_feedback
List the feedback in a document. Lists the feedback in a document. :param str feedback_type: An optional string that filters the output to include only feedback with the specified feedback type. The only permitted value is `element_classification`. :param date before: An option...
ibm_watson/compare_comply_v1.py
def list_feedback(self, feedback_type=None, before=None, after=None, document_title=None, model_id=None, model_version=None, category_removed=None, ...
def list_feedback(self, feedback_type=None, before=None, after=None, document_title=None, model_id=None, model_version=None, category_removed=None, ...
[ "List", "the", "feedback", "in", "a", "document", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/compare_comply_v1.py#L441-L546
[ "def", "list_feedback", "(", "self", ",", "feedback_type", "=", "None", ",", "before", "=", "None", ",", "after", "=", "None", ",", "document_title", "=", "None", ",", "model_id", "=", "None", ",", "model_version", "=", "None", ",", "category_removed", "="...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
CompareComplyV1.create_batch
Submit a batch-processing request. Run Compare and Comply methods over a collection of input documents. **Important:** Batch processing requires the use of the [IBM Cloud Object Storage service](https://cloud.ibm.com/docs/services/cloud-object-storage/about-cos.html#about-ibm-cloud-object-stora...
ibm_watson/compare_comply_v1.py
def create_batch(self, function, input_credentials_file, input_bucket_location, input_bucket_name, output_credentials_file, output_bucket_location, output_bucket_name, ...
def create_batch(self, function, input_credentials_file, input_bucket_location, input_bucket_name, output_credentials_file, output_bucket_location, output_bucket_name, ...
[ "Submit", "a", "batch", "-", "processing", "request", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/compare_comply_v1.py#L552-L642
[ "def", "create_batch", "(", "self", ",", "function", ",", "input_credentials_file", ",", "input_bucket_location", ",", "input_bucket_name", ",", "output_credentials_file", ",", "output_bucket_location", ",", "output_bucket_name", ",", "model", "=", "None", ",", "*", "...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
AlignedElement._from_dict
Initialize a AlignedElement object from a json dictionary.
ibm_watson/compare_comply_v1.py
def _from_dict(cls, _dict): """Initialize a AlignedElement object from a json dictionary.""" args = {} if 'element_pair' in _dict: args['element_pair'] = [ ElementPair._from_dict(x) for x in (_dict.get('element_pair')) ] if 'identical_text' in _dic...
def _from_dict(cls, _dict): """Initialize a AlignedElement object from a json dictionary.""" args = {} if 'element_pair' in _dict: args['element_pair'] = [ ElementPair._from_dict(x) for x in (_dict.get('element_pair')) ] if 'identical_text' in _dic...
[ "Initialize", "a", "AlignedElement", "object", "from", "a", "json", "dictionary", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/compare_comply_v1.py#L848-L861
[ "def", "_from_dict", "(", "cls", ",", "_dict", ")", ":", "args", "=", "{", "}", "if", "'element_pair'", "in", "_dict", ":", "args", "[", "'element_pair'", "]", "=", "[", "ElementPair", ".", "_from_dict", "(", "x", ")", "for", "x", "in", "(", "_dict",...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
AlignedElement._to_dict
Return a json dictionary representing this model.
ibm_watson/compare_comply_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'element_pair') and self.element_pair is not None: _dict['element_pair'] = [x._to_dict() for x in self.element_pair] if hasattr(self, 'identical_text') and self.identical_t...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'element_pair') and self.element_pair is not None: _dict['element_pair'] = [x._to_dict() for x in self.element_pair] if hasattr(self, 'identical_text') and self.identical_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/compare_comply_v1.py#L863-L875
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'element_pair'", ")", "and", "self", ".", "element_pair", "is", "not", "None", ":", "_dict", "[", "'element_pair'", "]", "=", "[", "x", ".", "_to_di...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
BatchStatus._to_dict
Return a json dictionary representing this model.
ibm_watson/compare_comply_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'function') and self.function is not None: _dict['function'] = self.function if hasattr(self, 'input_bucket_location' ) and self.input_bucket_location is ...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'function') and self.function is not None: _dict['function'] = self.function if hasattr(self, 'input_bucket_location' ) and self.input_bucket_location 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/compare_comply_v1.py#L1048-L1077
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'function'", ")", "and", "self", ".", "function", "is", "not", "None", ":", "_dict", "[", "'function'", "]", "=", "self", ".", "function", "if", "...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
Batches._from_dict
Initialize a Batches object from a json dictionary.
ibm_watson/compare_comply_v1.py
def _from_dict(cls, _dict): """Initialize a Batches object from a json dictionary.""" args = {} if 'batches' in _dict: args['batches'] = [ BatchStatus._from_dict(x) for x in (_dict.get('batches')) ] return cls(**args)
def _from_dict(cls, _dict): """Initialize a Batches object from a json dictionary.""" args = {} if 'batches' in _dict: args['batches'] = [ BatchStatus._from_dict(x) for x in (_dict.get('batches')) ] return cls(**args)
[ "Initialize", "a", "Batches", "object", "from", "a", "json", "dictionary", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/compare_comply_v1.py#L1112-L1119
[ "def", "_from_dict", "(", "cls", ",", "_dict", ")", ":", "args", "=", "{", "}", "if", "'batches'", "in", "_dict", ":", "args", "[", "'batches'", "]", "=", "[", "BatchStatus", ".", "_from_dict", "(", "x", ")", "for", "x", "in", "(", "_dict", ".", ...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
Batches._to_dict
Return a json dictionary representing this model.
ibm_watson/compare_comply_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'batches') and self.batches is not None: _dict['batches'] = [x._to_dict() for x in self.batches] return _dict
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'batches') and self.batches is not None: _dict['batches'] = [x._to_dict() for x in self.batches] 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/compare_comply_v1.py#L1121-L1126
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'batches'", ")", "and", "self", ".", "batches", "is", "not", "None", ":", "_dict", "[", "'batches'", "]", "=", "[", "x", ".", "_to_dict", "(", "...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
BodyCells._from_dict
Initialize a BodyCells object from a json dictionary.
ibm_watson/compare_comply_v1.py
def _from_dict(cls, _dict): """Initialize a BodyCells object from a json dictionary.""" args = {} if 'cell_id' in _dict: args['cell_id'] = _dict.get('cell_id') if 'location' in _dict: args['location'] = Location._from_dict(_dict.get('location')) if 'text' ...
def _from_dict(cls, _dict): """Initialize a BodyCells object from a json dictionary.""" args = {} if 'cell_id' in _dict: args['cell_id'] = _dict.get('cell_id') if 'location' in _dict: args['location'] = Location._from_dict(_dict.get('location')) if 'text' ...
[ "Initialize", "a", "BodyCells", "object", "from", "a", "json", "dictionary", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/compare_comply_v1.py#L1225-L1276
[ "def", "_from_dict", "(", "cls", ",", "_dict", ")", ":", "args", "=", "{", "}", "if", "'cell_id'", "in", "_dict", ":", "args", "[", "'cell_id'", "]", "=", "_dict", ".", "get", "(", "'cell_id'", ")", "if", "'location'", "in", "_dict", ":", "args", "...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
BodyCells._to_dict
Return a json dictionary representing this model.
ibm_watson/compare_comply_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'cell_id') and self.cell_id is not None: _dict['cell_id'] = self.cell_id if hasattr(self, 'location') and self.location is not None: _dict['location'] = self.lo...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'cell_id') and self.cell_id is not None: _dict['cell_id'] = self.cell_id if hasattr(self, 'location') and self.location is not None: _dict['location'] = self.lo...
[ "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/compare_comply_v1.py#L1278-L1331
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'cell_id'", ")", "and", "self", ".", "cell_id", "is", "not", "None", ":", "_dict", "[", "'cell_id'", "]", "=", "self", ".", "cell_id", "if", "hasa...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
Category._to_dict
Return a json dictionary representing this model.
ibm_watson/compare_comply_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'label') and self.label is not None: _dict['label'] = self.label if hasattr(self, 'provenance_ids') and self.provenance_ids is not None: _dict['provenance_ids']...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'label') and self.label is not None: _dict['label'] = self.label if hasattr(self, 'provenance_ids') and self.provenance_ids is not None: _dict['provenance_ids']...
[ "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/compare_comply_v1.py#L1378-L1385
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'label'", ")", "and", "self", ".", "label", "is", "not", "None", ":", "_dict", "[", "'label'", "]", "=", "self", ".", "label", "if", "hasattr", ...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
ClassifyReturn._from_dict
Initialize a ClassifyReturn object from a json dictionary.
ibm_watson/compare_comply_v1.py
def _from_dict(cls, _dict): """Initialize a ClassifyReturn object from a json dictionary.""" args = {} if 'document' in _dict: args['document'] = Document._from_dict(_dict.get('document')) if 'model_id' in _dict: args['model_id'] = _dict.get('model_id') if...
def _from_dict(cls, _dict): """Initialize a ClassifyReturn object from a json dictionary.""" args = {} if 'document' in _dict: args['document'] = Document._from_dict(_dict.get('document')) if 'model_id' in _dict: args['model_id'] = _dict.get('model_id') if...
[ "Initialize", "a", "ClassifyReturn", "object", "from", "a", "json", "dictionary", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/compare_comply_v1.py#L1525-L1568
[ "def", "_from_dict", "(", "cls", ",", "_dict", ")", ":", "args", "=", "{", "}", "if", "'document'", "in", "_dict", ":", "args", "[", "'document'", "]", "=", "Document", ".", "_from_dict", "(", "_dict", ".", "get", "(", "'document'", ")", ")", "if", ...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
ClassifyReturn._to_dict
Return a json dictionary representing this model.
ibm_watson/compare_comply_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'document') and self.document is not None: _dict['document'] = self.document._to_dict() if hasattr(self, 'model_id') and self.model_id is not None: _dict['model...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'document') and self.document is not None: _dict['document'] = self.document._to_dict() if hasattr(self, 'model_id') and self.model_id is not None: _dict['model...
[ "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/compare_comply_v1.py#L1570-L1606
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'document'", ")", "and", "self", ".", "document", "is", "not", "None", ":", "_dict", "[", "'document'", "]", "=", "self", ".", "document", ".", "_...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
ColumnHeaderIds._to_dict
Return a json dictionary representing this model.
ibm_watson/compare_comply_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 return _dict
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 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/compare_comply_v1.py#L1647-L1652
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'id'", ")", "and", "self", ".", "id", "is", "not", "None", ":", "_dict", "[", "'id'", "]", "=", "self", ".", "id", "return", "_dict" ]
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
ColumnHeaderTextsNormalized._to_dict
Return a json dictionary representing this model.
ibm_watson/compare_comply_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'text_normalized') and self.text_normalized is not None: _dict['text_normalized'] = self.text_normalized return _dict
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'text_normalized') and self.text_normalized is not None: _dict['text_normalized'] = self.text_normalized 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/compare_comply_v1.py#L1740-L1746
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'text_normalized'", ")", "and", "self", ".", "text_normalized", "is", "not", "None", ":", "_dict", "[", "'text_normalized'", "]", "=", "self", ".", "t...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
CompareReturn._from_dict
Initialize a CompareReturn object from a json dictionary.
ibm_watson/compare_comply_v1.py
def _from_dict(cls, _dict): """Initialize a CompareReturn object from a json dictionary.""" args = {} if 'model_id' in _dict: args['model_id'] = _dict.get('model_id') if 'model_version' in _dict: args['model_version'] = _dict.get('model_version') if 'docum...
def _from_dict(cls, _dict): """Initialize a CompareReturn object from a json dictionary.""" args = {} if 'model_id' in _dict: args['model_id'] = _dict.get('model_id') if 'model_version' in _dict: args['model_version'] = _dict.get('model_version') if 'docum...
[ "Initialize", "a", "CompareReturn", "object", "from", "a", "json", "dictionary", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/compare_comply_v1.py#L1933-L1954
[ "def", "_from_dict", "(", "cls", ",", "_dict", ")", ":", "args", "=", "{", "}", "if", "'model_id'", "in", "_dict", ":", "args", "[", "'model_id'", "]", "=", "_dict", ".", "get", "(", "'model_id'", ")", "if", "'model_version'", "in", "_dict", ":", "ar...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
CompareReturn._to_dict
Return a json dictionary representing this model.
ibm_watson/compare_comply_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'model_id') and self.model_id is not None: _dict['model_id'] = self.model_id if hasattr(self, 'model_version') and self.model_version is not None: _dict['model_...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'model_id') and self.model_id is not None: _dict['model_id'] = self.model_id if hasattr(self, 'model_version') and self.model_version is not None: _dict['model_...
[ "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/compare_comply_v1.py#L1956-L1976
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'model_id'", ")", "and", "self", ".", "model_id", "is", "not", "None", ":", "_dict", "[", "'model_id'", "]", "=", "self", ".", "model_id", "if", "...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
Contact._to_dict
Return a json dictionary representing this model.
ibm_watson/compare_comply_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, 'role') and self.role is not None: _dict['role'] = self.role return _dict
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, 'role') and self.role is not None: _dict['role'] = self.role 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/compare_comply_v1.py#L2021-L2028
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'name'", ")", "and", "self", ".", "name", "is", "not", "None", ":", "_dict", "[", "'name'", "]", "=", "self", ".", "name", "if", "hasattr", "(",...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
DocCounts._to_dict
Return a json dictionary representing this model.
ibm_watson/compare_comply_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'total') and self.total is not None: _dict['total'] = self.total if hasattr(self, 'pending') and self.pending is not None: _dict['pending'] = self.pending ...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'total') and self.total is not None: _dict['total'] = self.total if hasattr(self, 'pending') and self.pending is not None: _dict['pending'] = self.pending ...
[ "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/compare_comply_v1.py#L2211-L2222
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'total'", ")", "and", "self", ".", "total", "is", "not", "None", ":", "_dict", "[", "'total'", "]", "=", "self", ".", "total", "if", "hasattr", ...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
DocStructure._from_dict
Initialize a DocStructure object from a json dictionary.
ibm_watson/compare_comply_v1.py
def _from_dict(cls, _dict): """Initialize a DocStructure object from a json dictionary.""" args = {} if 'section_titles' in _dict: args['section_titles'] = [ SectionTitles._from_dict(x) for x in (_dict.get('section_titles')) ] if 'l...
def _from_dict(cls, _dict): """Initialize a DocStructure object from a json dictionary.""" args = {} if 'section_titles' in _dict: args['section_titles'] = [ SectionTitles._from_dict(x) for x in (_dict.get('section_titles')) ] if 'l...
[ "Initialize", "a", "DocStructure", "object", "from", "a", "json", "dictionary", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/compare_comply_v1.py#L2325-L2338
[ "def", "_from_dict", "(", "cls", ",", "_dict", ")", ":", "args", "=", "{", "}", "if", "'section_titles'", "in", "_dict", ":", "args", "[", "'section_titles'", "]", "=", "[", "SectionTitles", ".", "_from_dict", "(", "x", ")", "for", "x", "in", "(", "_...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
DocStructure._to_dict
Return a json dictionary representing this model.
ibm_watson/compare_comply_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'section_titles') and self.section_titles is not None: _dict['section_titles'] = [ x._to_dict() for x in self.section_titles ] if hasattr(self, ...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'section_titles') and self.section_titles is not None: _dict['section_titles'] = [ x._to_dict() for x in self.section_titles ] if hasattr(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/compare_comply_v1.py#L2340-L2352
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'section_titles'", ")", "and", "self", ".", "section_titles", "is", "not", "None", ":", "_dict", "[", "'section_titles'", "]", "=", "[", "x", ".", "...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
Element._from_dict
Initialize a Element object from a json dictionary.
ibm_watson/compare_comply_v1.py
def _from_dict(cls, _dict): """Initialize a Element object from a json dictionary.""" args = {} if 'location' in _dict: args['location'] = Location._from_dict(_dict.get('location')) if 'text' in _dict: args['text'] = _dict.get('text') if 'types' in _dict: ...
def _from_dict(cls, _dict): """Initialize a Element object from a json dictionary.""" args = {} if 'location' in _dict: args['location'] = Location._from_dict(_dict.get('location')) if 'text' in _dict: args['text'] = _dict.get('text') if 'types' in _dict: ...
[ "Initialize", "a", "Element", "object", "from", "a", "json", "dictionary", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/compare_comply_v1.py#L2542-L2561
[ "def", "_from_dict", "(", "cls", ",", "_dict", ")", ":", "args", "=", "{", "}", "if", "'location'", "in", "_dict", ":", "args", "[", "'location'", "]", "=", "Location", ".", "_from_dict", "(", "_dict", ".", "get", "(", "'location'", ")", ")", "if", ...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
ElementLocations._to_dict
Return a json dictionary representing this model.
ibm_watson/compare_comply_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'begin') and self.begin is not None: _dict['begin'] = self.begin if hasattr(self, 'end') and self.end is not None: _dict['end'] = self.end return _dict
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'begin') and self.begin is not None: _dict['begin'] = self.begin if hasattr(self, 'end') and self.end is not None: _dict['end'] = self.end 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/compare_comply_v1.py#L2626-L2633
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'begin'", ")", "and", "self", ".", "begin", "is", "not", "None", ":", "_dict", "[", "'begin'", "]", "=", "self", ".", "begin", "if", "hasattr", ...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
FeedbackDataInput._from_dict
Initialize a FeedbackDataInput object from a json dictionary.
ibm_watson/compare_comply_v1.py
def _from_dict(cls, _dict): """Initialize a FeedbackDataInput object from a json dictionary.""" args = {} if 'feedback_type' in _dict: args['feedback_type'] = _dict.get('feedback_type') else: raise ValueError( 'Required property \'feedback_type\' n...
def _from_dict(cls, _dict): """Initialize a FeedbackDataInput object from a json dictionary.""" args = {} if 'feedback_type' in _dict: args['feedback_type'] = _dict.get('feedback_type') else: raise ValueError( 'Required property \'feedback_type\' n...
[ "Initialize", "a", "FeedbackDataInput", "object", "from", "a", "json", "dictionary", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/compare_comply_v1.py#L2810-L2851
[ "def", "_from_dict", "(", "cls", ",", "_dict", ")", ":", "args", "=", "{", "}", "if", "'feedback_type'", "in", "_dict", ":", "args", "[", "'feedback_type'", "]", "=", "_dict", ".", "get", "(", "'feedback_type'", ")", "else", ":", "raise", "ValueError", ...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
FeedbackDataOutput._from_dict
Initialize a FeedbackDataOutput object from a json dictionary.
ibm_watson/compare_comply_v1.py
def _from_dict(cls, _dict): """Initialize a FeedbackDataOutput object from a json dictionary.""" args = {} if 'feedback_type' in _dict: args['feedback_type'] = _dict.get('feedback_type') if 'document' in _dict: args['document'] = ShortDoc._from_dict(_dict.get('doc...
def _from_dict(cls, _dict): """Initialize a FeedbackDataOutput object from a json dictionary.""" args = {} if 'feedback_type' in _dict: args['feedback_type'] = _dict.get('feedback_type') if 'document' in _dict: args['document'] = ShortDoc._from_dict(_dict.get('doc...
[ "Initialize", "a", "FeedbackDataOutput", "object", "from", "a", "json", "dictionary", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/compare_comply_v1.py#L2953-L2976
[ "def", "_from_dict", "(", "cls", ",", "_dict", ")", ":", "args", "=", "{", "}", "if", "'feedback_type'", "in", "_dict", ":", "args", "[", "'feedback_type'", "]", "=", "_dict", ".", "get", "(", "'feedback_type'", ")", "if", "'document'", "in", "_dict", ...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
FeedbackDataOutput._to_dict
Return a json dictionary representing this model.
ibm_watson/compare_comply_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'feedback_type') and self.feedback_type is not None: _dict['feedback_type'] = self.feedback_type if hasattr(self, 'document') and self.document is not None: _di...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'feedback_type') and self.feedback_type is not None: _dict['feedback_type'] = self.feedback_type if hasattr(self, 'document') and self.document is not None: _di...
[ "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/compare_comply_v1.py#L2978-L3000
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'feedback_type'", ")", "and", "self", ".", "feedback_type", "is", "not", "None", ":", "_dict", "[", "'feedback_type'", "]", "=", "self", ".", "feedbac...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
FeedbackDeleted._to_dict
Return a json dictionary representing this model.
ibm_watson/compare_comply_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, 'message') and self.message is not None: _dict['message'] = self.message ...
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, 'message') and self.message is not None: _dict['message'] = self.message ...
[ "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/compare_comply_v1.py#L3045-L3052
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'status'", ")", "and", "self", ".", "status", "is", "not", "None", ":", "_dict", "[", "'status'", "]", "=", "self", ".", "status", "if", "hasattr"...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
FeedbackList._from_dict
Initialize a FeedbackList object from a json dictionary.
ibm_watson/compare_comply_v1.py
def _from_dict(cls, _dict): """Initialize a FeedbackList object from a json dictionary.""" args = {} if 'feedback' in _dict: args['feedback'] = [ GetFeedback._from_dict(x) for x in (_dict.get('feedback')) ] return cls(**args)
def _from_dict(cls, _dict): """Initialize a FeedbackList object from a json dictionary.""" args = {} if 'feedback' in _dict: args['feedback'] = [ GetFeedback._from_dict(x) for x in (_dict.get('feedback')) ] return cls(**args)
[ "Initialize", "a", "FeedbackList", "object", "from", "a", "json", "dictionary", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/compare_comply_v1.py#L3086-L3093
[ "def", "_from_dict", "(", "cls", ",", "_dict", ")", ":", "args", "=", "{", "}", "if", "'feedback'", "in", "_dict", ":", "args", "[", "'feedback'", "]", "=", "[", "GetFeedback", ".", "_from_dict", "(", "x", ")", "for", "x", "in", "(", "_dict", ".", ...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
FeedbackList._to_dict
Return a json dictionary representing this model.
ibm_watson/compare_comply_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'feedback') and self.feedback is not None: _dict['feedback'] = [x._to_dict() for x in self.feedback] return _dict
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'feedback') and self.feedback is not None: _dict['feedback'] = [x._to_dict() for x in self.feedback] 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/compare_comply_v1.py#L3095-L3100
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'feedback'", ")", "and", "self", ".", "feedback", "is", "not", "None", ":", "_dict", "[", "'feedback'", "]", "=", "[", "x", ".", "_to_dict", "(", ...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
FeedbackReturn._to_dict
Return a json dictionary representing this model.
ibm_watson/compare_comply_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'feedback_id') and self.feedback_id is not None: _dict['feedback_id'] = self.feedback_id if hasattr(self, 'user_id') and self.user_id is not None: _dict['user_i...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'feedback_id') and self.feedback_id is not None: _dict['feedback_id'] = self.feedback_id if hasattr(self, 'user_id') and self.user_id is not None: _dict['user_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/compare_comply_v1.py#L3174-L3187
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'feedback_id'", ")", "and", "self", ".", "feedback_id", "is", "not", "None", ":", "_dict", "[", "'feedback_id'", "]", "=", "self", ".", "feedback_id",...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
HTMLReturn._to_dict
Return a json dictionary representing this model.
ibm_watson/compare_comply_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'num_pages') and self.num_pages is not None: _dict['num_pages'] = self.num_pages if hasattr(self, 'author') and self.author is not None: _dict['author'] = self....
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'num_pages') and self.num_pages is not None: _dict['num_pages'] = self.num_pages if hasattr(self, 'author') and self.author is not None: _dict['author'] = 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/compare_comply_v1.py#L3332-L3346
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'num_pages'", ")", "and", "self", ".", "num_pages", "is", "not", "None", ":", "_dict", "[", "'num_pages'", "]", "=", "self", ".", "num_pages", "if",...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
Key._to_dict
Return a json dictionary representing this model.
ibm_watson/compare_comply_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'cell_id') and self.cell_id is not None: _dict['cell_id'] = self.cell_id if hasattr(self, 'location') and self.location is not None: _dict['location'] = self.lo...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'cell_id') and self.cell_id is not None: _dict['cell_id'] = self.cell_id if hasattr(self, 'location') and self.location is not None: _dict['location'] = self.lo...
[ "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/compare_comply_v1.py#L3399-L3408
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'cell_id'", ")", "and", "self", ".", "cell_id", "is", "not", "None", ":", "_dict", "[", "'cell_id'", "]", "=", "self", ".", "cell_id", "if", "hasa...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
KeyValuePair._from_dict
Initialize a KeyValuePair object from a json dictionary.
ibm_watson/compare_comply_v1.py
def _from_dict(cls, _dict): """Initialize a KeyValuePair object from a json dictionary.""" args = {} if 'key' in _dict: args['key'] = Key._from_dict(_dict.get('key')) if 'value' in _dict: args['value'] = Value._from_dict(_dict.get('value')) return cls(**ar...
def _from_dict(cls, _dict): """Initialize a KeyValuePair object from a json dictionary.""" args = {} if 'key' in _dict: args['key'] = Key._from_dict(_dict.get('key')) if 'value' in _dict: args['value'] = Value._from_dict(_dict.get('value')) return cls(**ar...
[ "Initialize", "a", "KeyValuePair", "object", "from", "a", "json", "dictionary", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/compare_comply_v1.py#L3444-L3451
[ "def", "_from_dict", "(", "cls", ",", "_dict", ")", ":", "args", "=", "{", "}", "if", "'key'", "in", "_dict", ":", "args", "[", "'key'", "]", "=", "Key", ".", "_from_dict", "(", "_dict", ".", "get", "(", "'key'", ")", ")", "if", "'value'", "in", ...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
KeyValuePair._to_dict
Return a json dictionary representing this model.
ibm_watson/compare_comply_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._to_dict() if hasattr(self, 'value') and self.value is not None: _dict['value'] = self.value._to_dict()...
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._to_dict() if hasattr(self, 'value') and self.value is not None: _dict['value'] = self.value._to_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/compare_comply_v1.py#L3453-L3460
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'key'", ")", "and", "self", ".", "key", "is", "not", "None", ":", "_dict", "[", "'key'", "]", "=", "self", ".", "key", ".", "_to_dict", "(", "...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
Label._to_dict
Return a json dictionary representing this model.
ibm_watson/compare_comply_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'nature') and self.nature is not None: _dict['nature'] = self.nature if hasattr(self, 'party') and self.party is not None: _dict['party'] = self.party r...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'nature') and self.nature is not None: _dict['nature'] = self.nature if hasattr(self, 'party') and self.party is not None: _dict['party'] = self.party r...
[ "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/compare_comply_v1.py#L3513-L3520
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'nature'", ")", "and", "self", ".", "nature", "is", "not", "None", ":", "_dict", "[", "'nature'", "]", "=", "self", ".", "nature", "if", "hasattr"...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
LeadingSentence._from_dict
Initialize a LeadingSentence object from a json dictionary.
ibm_watson/compare_comply_v1.py
def _from_dict(cls, _dict): """Initialize a LeadingSentence object from a json dictionary.""" args = {} if 'text' in _dict: args['text'] = _dict.get('text') if 'location' in _dict: args['location'] = Location._from_dict(_dict.get('location')) if 'element_l...
def _from_dict(cls, _dict): """Initialize a LeadingSentence object from a json dictionary.""" args = {} if 'text' in _dict: args['text'] = _dict.get('text') if 'location' in _dict: args['location'] = Location._from_dict(_dict.get('location')) if 'element_l...
[ "Initialize", "a", "LeadingSentence", "object", "from", "a", "json", "dictionary", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/compare_comply_v1.py#L3563-L3575
[ "def", "_from_dict", "(", "cls", ",", "_dict", ")", ":", "args", "=", "{", "}", "if", "'text'", "in", "_dict", ":", "args", "[", "'text'", "]", "=", "_dict", ".", "get", "(", "'text'", ")", "if", "'location'", "in", "_dict", ":", "args", "[", "'l...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
OriginalLabelsIn._from_dict
Initialize a OriginalLabelsIn object from a json dictionary.
ibm_watson/compare_comply_v1.py
def _from_dict(cls, _dict): """Initialize a OriginalLabelsIn object from a json dictionary.""" args = {} if 'types' in _dict: args['types'] = [ TypeLabel._from_dict(x) for x in (_dict.get('types')) ] else: raise ValueError( ...
def _from_dict(cls, _dict): """Initialize a OriginalLabelsIn object from a json dictionary.""" args = {} if 'types' in _dict: args['types'] = [ TypeLabel._from_dict(x) for x in (_dict.get('types')) ] else: raise ValueError( ...
[ "Initialize", "a", "OriginalLabelsIn", "object", "from", "a", "json", "dictionary", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/compare_comply_v1.py#L3688-L3707
[ "def", "_from_dict", "(", "cls", ",", "_dict", ")", ":", "args", "=", "{", "}", "if", "'types'", "in", "_dict", ":", "args", "[", "'types'", "]", "=", "[", "TypeLabel", ".", "_from_dict", "(", "x", ")", "for", "x", "in", "(", "_dict", ".", "get",...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
OriginalLabelsIn._to_dict
Return a json dictionary representing this model.
ibm_watson/compare_comply_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'types') and self.types is not None: _dict['types'] = [x._to_dict() for x in self.types] if hasattr(self, 'categories') and self.categories is not None: _dict['...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'types') and self.types is not None: _dict['types'] = [x._to_dict() for x in self.types] if hasattr(self, 'categories') and self.categories 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/compare_comply_v1.py#L3709-L3716
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'types'", ")", "and", "self", ".", "types", "is", "not", "None", ":", "_dict", "[", "'types'", "]", "=", "[", "x", ".", "_to_dict", "(", ")", ...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
Pagination._to_dict
Return a json dictionary representing this model.
ibm_watson/compare_comply_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'refresh_cursor') and self.refresh_cursor is not None: _dict['refresh_cursor'] = self.refresh_cursor if hasattr(self, 'next_cursor') and self.next_cursor is not None: ...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'refresh_cursor') and self.refresh_cursor is not None: _dict['refresh_cursor'] = self.refresh_cursor if hasattr(self, 'next_cursor') and self.next_cursor 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/compare_comply_v1.py#L3854-L3867
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'refresh_cursor'", ")", "and", "self", ".", "refresh_cursor", "is", "not", "None", ":", "_dict", "[", "'refresh_cursor'", "]", "=", "self", ".", "refr...
4c2c9df4466fcde88975da9ecd834e6ba95eb353