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
UtteranceAnalysis._from_dict
Initialize a UtteranceAnalysis object from a json dictionary.
ibm_watson/tone_analyzer_v3.py
def _from_dict(cls, _dict): """Initialize a UtteranceAnalysis object from a json dictionary.""" args = {} if 'utterance_id' in _dict: args['utterance_id'] = _dict.get('utterance_id') else: raise ValueError( 'Required property \'utterance_id\' not p...
def _from_dict(cls, _dict): """Initialize a UtteranceAnalysis object from a json dictionary.""" args = {} if 'utterance_id' in _dict: args['utterance_id'] = _dict.get('utterance_id') else: raise ValueError( 'Required property \'utterance_id\' not p...
[ "Initialize", "a", "UtteranceAnalysis", "object", "from", "a", "json", "dictionary", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/tone_analyzer_v3.py#L1035-L1060
[ "def", "_from_dict", "(", "cls", ",", "_dict", ")", ":", "args", "=", "{", "}", "if", "'utterance_id'", "in", "_dict", ":", "args", "[", "'utterance_id'", "]", "=", "_dict", ".", "get", "(", "'utterance_id'", ")", "else", ":", "raise", "ValueError", "(...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
UtteranceAnalysis._to_dict
Return a json dictionary representing this model.
ibm_watson/tone_analyzer_v3.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'utterance_id') and self.utterance_id is not None: _dict['utterance_id'] = self.utterance_id if hasattr(self, 'utterance_text') and self.utterance_text is not None: ...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'utterance_id') and self.utterance_id is not None: _dict['utterance_id'] = self.utterance_id if hasattr(self, 'utterance_text') and self.utterance_text 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/tone_analyzer_v3.py#L1062-L1073
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'utterance_id'", ")", "and", "self", ".", "utterance_id", "is", "not", "None", ":", "_dict", "[", "'utterance_id'", "]", "=", "self", ".", "utterance_...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
AssistantV1.message
Get response to user input. Send user input to a workspace and receive a response. There is no rate limit for this operation. :param str workspace_id: Unique identifier of the workspace. :param MessageInput input: An input object that includes the input text. :param list[Runtim...
ibm_watson/assistant_v1.py
def message(self, workspace_id, input=None, intents=None, entities=None, alternate_intents=None, context=None, output=None, nodes_visited_details=None, **kwargs): """ ...
def message(self, workspace_id, input=None, intents=None, entities=None, alternate_intents=None, context=None, output=None, nodes_visited_details=None, **kwargs): """ ...
[ "Get", "response", "to", "user", "input", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/assistant_v1.py#L109-L189
[ "def", "message", "(", "self", ",", "workspace_id", ",", "input", "=", "None", ",", "intents", "=", "None", ",", "entities", "=", "None", ",", "alternate_intents", "=", "None", ",", "context", "=", "None", ",", "output", "=", "None", ",", "nodes_visited_...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
AssistantV1.list_workspaces
List workspaces. List the workspaces associated with a Watson Assistant service instance. This operation is limited to 500 requests per 30 minutes. For more information, see **Rate limiting**. :param int page_limit: The number of records to return in each page of results. :para...
ibm_watson/assistant_v1.py
def list_workspaces(self, page_limit=None, include_count=None, sort=None, cursor=None, include_audit=None, **kwargs): """ List workspaces. List the wor...
def list_workspaces(self, page_limit=None, include_count=None, sort=None, cursor=None, include_audit=None, **kwargs): """ List workspaces. List the wor...
[ "List", "workspaces", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/assistant_v1.py#L374-L423
[ "def", "list_workspaces", "(", "self", ",", "page_limit", "=", "None", ",", "include_count", "=", "None", ",", "sort", "=", "None", ",", "cursor", "=", "None", ",", "include_audit", "=", "None", ",", "*", "*", "kwargs", ")", ":", "headers", "=", "{", ...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
AssistantV1.update_workspace
Update workspace. Update an existing workspace with new or modified data. You must provide component objects defining the content of the updated workspace. This operation is limited to 30 request per 30 minutes. For more information, see **Rate limiting**. :param str workspace_...
ibm_watson/assistant_v1.py
def update_workspace(self, workspace_id, name=None, description=None, language=None, metadata=None, learning_opt_out=None, system_settings=None, ...
def update_workspace(self, workspace_id, name=None, description=None, language=None, metadata=None, learning_opt_out=None, system_settings=None, ...
[ "Update", "workspace", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/assistant_v1.py#L425-L528
[ "def", "update_workspace", "(", "self", ",", "workspace_id", ",", "name", "=", "None", ",", "description", "=", "None", ",", "language", "=", "None", ",", "metadata", "=", "None", ",", "learning_opt_out", "=", "None", ",", "system_settings", "=", "None", "...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
AssistantV1.create_intent
Create intent. Create a new intent. This operation is limited to 2000 requests per 30 minutes. For more information, see **Rate limiting**. :param str workspace_id: Unique identifier of the workspace. :param str intent: The name of the intent. This string must conform to the ...
ibm_watson/assistant_v1.py
def create_intent(self, workspace_id, intent, description=None, examples=None, **kwargs): """ Create intent. Create a new intent. This operation is limited to 2000 requests per ...
def create_intent(self, workspace_id, intent, description=None, examples=None, **kwargs): """ Create intent. Create a new intent. This operation is limited to 2000 requests per ...
[ "Create", "intent", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/assistant_v1.py#L534-L593
[ "def", "create_intent", "(", "self", ",", "workspace_id", ",", "intent", ",", "description", "=", "None", ",", "examples", "=", "None", ",", "*", "*", "kwargs", ")", ":", "if", "workspace_id", "is", "None", ":", "raise", "ValueError", "(", "'workspace_id m...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
AssistantV1.update_intent
Update intent. Update an existing intent with new or modified data. You must provide component objects defining the content of the updated intent. This operation is limited to 2000 requests per 30 minutes. For more information, see **Rate limiting**. :param str workspace_id: Un...
ibm_watson/assistant_v1.py
def update_intent(self, workspace_id, intent, new_intent=None, new_description=None, new_examples=None, **kwargs): """ Update intent. Update an existing intent wit...
def update_intent(self, workspace_id, intent, new_intent=None, new_description=None, new_examples=None, **kwargs): """ Update intent. Update an existing intent wit...
[ "Update", "intent", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/assistant_v1.py#L751-L815
[ "def", "update_intent", "(", "self", ",", "workspace_id", ",", "intent", ",", "new_intent", "=", "None", ",", "new_description", "=", "None", ",", "new_examples", "=", "None", ",", "*", "*", "kwargs", ")", ":", "if", "workspace_id", "is", "None", ":", "r...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
AssistantV1.create_example
Create user input example. Add a new user input example to an intent. This operation is limited to 1000 requests per 30 minutes. For more information, see **Rate limiting**. :param str workspace_id: Unique identifier of the workspace. :param str intent: The intent name. ...
ibm_watson/assistant_v1.py
def create_example(self, workspace_id, intent, text, mentions=None, **kwargs): """ Create user input example. Add a new user input example to an intent. This operation is l...
def create_example(self, workspace_id, intent, text, mentions=None, **kwargs): """ Create user input example. Add a new user input example to an intent. This operation is l...
[ "Create", "user", "input", "example", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/assistant_v1.py#L821-L875
[ "def", "create_example", "(", "self", ",", "workspace_id", ",", "intent", ",", "text", ",", "mentions", "=", "None", ",", "*", "*", "kwargs", ")", ":", "if", "workspace_id", "is", "None", ":", "raise", "ValueError", "(", "'workspace_id must be provided'", ")...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
AssistantV1.create_entity
Create entity. Create a new entity, or enable a system entity. This operation is limited to 1000 requests per 30 minutes. For more information, see **Rate limiting**. :param str workspace_id: Unique identifier of the workspace. :param str entity: The name of the entity. This st...
ibm_watson/assistant_v1.py
def create_entity(self, workspace_id, entity, description=None, metadata=None, fuzzy_match=None, values=None, **kwargs): """ Create entity. C...
def create_entity(self, workspace_id, entity, description=None, metadata=None, fuzzy_match=None, values=None, **kwargs): """ Create entity. C...
[ "Create", "entity", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/assistant_v1.py#L1340-L1406
[ "def", "create_entity", "(", "self", ",", "workspace_id", ",", "entity", ",", "description", "=", "None", ",", "metadata", "=", "None", ",", "fuzzy_match", "=", "None", ",", "values", "=", "None", ",", "*", "*", "kwargs", ")", ":", "if", "workspace_id", ...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
AssistantV1.update_entity
Update entity. Update an existing entity with new or modified data. You must provide component objects defining the content of the updated entity. This operation is limited to 1000 requests per 30 minutes. For more information, see **Rate limiting**. :param str workspace_id: Un...
ibm_watson/assistant_v1.py
def update_entity(self, workspace_id, entity, new_entity=None, new_description=None, new_metadata=None, new_fuzzy_match=None, new_values=None, *...
def update_entity(self, workspace_id, entity, new_entity=None, new_description=None, new_metadata=None, new_fuzzy_match=None, new_values=None, *...
[ "Update", "entity", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/assistant_v1.py#L1564-L1634
[ "def", "update_entity", "(", "self", ",", "workspace_id", ",", "entity", ",", "new_entity", "=", "None", ",", "new_description", "=", "None", ",", "new_metadata", "=", "None", ",", "new_fuzzy_match", "=", "None", ",", "new_values", "=", "None", ",", "*", "...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
AssistantV1.create_value
Create entity value. Create a new value for an entity. This operation is limited to 1000 requests per 30 minutes. For more information, see **Rate limiting**. :param str workspace_id: Unique identifier of the workspace. :param str entity: The name of the entity. :param ...
ibm_watson/assistant_v1.py
def create_value(self, workspace_id, entity, value, metadata=None, value_type=None, synonyms=None, patterns=None, **kwargs): """ Create ...
def create_value(self, workspace_id, entity, value, metadata=None, value_type=None, synonyms=None, patterns=None, **kwargs): """ Create ...
[ "Create", "entity", "value", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/assistant_v1.py#L1698-L1771
[ "def", "create_value", "(", "self", ",", "workspace_id", ",", "entity", ",", "value", ",", "metadata", "=", "None", ",", "value_type", "=", "None", ",", "synonyms", "=", "None", ",", "patterns", "=", "None", ",", "*", "*", "kwargs", ")", ":", "if", "...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
AssistantV1.update_value
Update entity value. Update an existing entity value with new or modified data. You must provide component objects defining the content of the updated entity value. This operation is limited to 1000 requests per 30 minutes. For more information, see **Rate limiting**. :param st...
ibm_watson/assistant_v1.py
def update_value(self, workspace_id, entity, value, new_value=None, new_metadata=None, new_value_type=None, new_synonyms=None, new_patterns=None, ...
def update_value(self, workspace_id, entity, value, new_value=None, new_metadata=None, new_value_type=None, new_synonyms=None, new_patterns=None, ...
[ "Update", "entity", "value", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/assistant_v1.py#L1938-L2014
[ "def", "update_value", "(", "self", ",", "workspace_id", ",", "entity", ",", "value", ",", "new_value", "=", "None", ",", "new_metadata", "=", "None", ",", "new_value_type", "=", "None", ",", "new_synonyms", "=", "None", ",", "new_patterns", "=", "None", "...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
AssistantV1.create_dialog_node
Create dialog node. Create a new dialog node. This operation is limited to 500 requests per 30 minutes. For more information, see **Rate limiting**. :param str workspace_id: Unique identifier of the workspace. :param str dialog_node: The dialog node ID. This string must conform...
ibm_watson/assistant_v1.py
def create_dialog_node(self, workspace_id, dialog_node, description=None, conditions=None, parent=None, previous_sibling=None, outp...
def create_dialog_node(self, workspace_id, dialog_node, description=None, conditions=None, parent=None, previous_sibling=None, outp...
[ "Create", "dialog", "node", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/assistant_v1.py#L2294-L2419
[ "def", "create_dialog_node", "(", "self", ",", "workspace_id", ",", "dialog_node", ",", "description", "=", "None", ",", "conditions", "=", "None", ",", "parent", "=", "None", ",", "previous_sibling", "=", "None", ",", "output", "=", "None", ",", "context", ...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
AssistantV1.update_dialog_node
Update dialog node. Update an existing dialog node with new or modified data. This operation is limited to 500 requests per 30 minutes. For more information, see **Rate limiting**. :param str workspace_id: Unique identifier of the workspace. :param str dialog_node: The dialog n...
ibm_watson/assistant_v1.py
def update_dialog_node(self, workspace_id, dialog_node, new_dialog_node=None, new_description=None, new_conditions=None, new_parent=None, ...
def update_dialog_node(self, workspace_id, dialog_node, new_dialog_node=None, new_description=None, new_conditions=None, new_parent=None, ...
[ "Update", "dialog", "node", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/assistant_v1.py#L2561-L2692
[ "def", "update_dialog_node", "(", "self", ",", "workspace_id", ",", "dialog_node", ",", "new_dialog_node", "=", "None", ",", "new_description", "=", "None", ",", "new_conditions", "=", "None", ",", "new_parent", "=", "None", ",", "new_previous_sibling", "=", "No...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
Context._from_dict
Initialize a Context object from a json dictionary.
ibm_watson/assistant_v1.py
def _from_dict(cls, _dict): """Initialize a Context object from a json dictionary.""" args = {} xtra = _dict.copy() if 'conversation_id' in _dict: args['conversation_id'] = _dict.get('conversation_id') del xtra['conversation_id'] if 'system' in _dict: ...
def _from_dict(cls, _dict): """Initialize a Context object from a json dictionary.""" args = {} xtra = _dict.copy() if 'conversation_id' in _dict: args['conversation_id'] = _dict.get('conversation_id') del xtra['conversation_id'] if 'system' in _dict: ...
[ "Initialize", "a", "Context", "object", "from", "a", "json", "dictionary", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/assistant_v1.py#L2944-L2959
[ "def", "_from_dict", "(", "cls", ",", "_dict", ")", ":", "args", "=", "{", "}", "xtra", "=", "_dict", ".", "copy", "(", ")", "if", "'conversation_id'", "in", "_dict", ":", "args", "[", "'conversation_id'", "]", "=", "_dict", ".", "get", "(", "'conver...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
Context._to_dict
Return a json dictionary representing this model.
ibm_watson/assistant_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'conversation_id') and self.conversation_id is not None: _dict['conversation_id'] = self.conversation_id if hasattr(self, 'system') and self.system is no...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'conversation_id') and self.conversation_id is not None: _dict['conversation_id'] = self.conversation_id if hasattr(self, 'system') and self.system 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/assistant_v1.py#L2961-L2976
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'conversation_id'", ")", "and", "self", ".", "conversation_id", "is", "not", "None", ":", "_dict", "[", "'conversation_id'", "]", "=", "self", ".", "c...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
Counterexample._to_dict
Return a json dictionary representing this model.
ibm_watson/assistant_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'text') and self.text is not None: _dict['text'] = self.text if hasattr(self, 'created') and self.created is not None: _dict['created'] = datetime_to_string(sel...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'text') and self.text is not None: _dict['text'] = self.text if hasattr(self, 'created') and self.created is not None: _dict['created'] = datetime_to_string(sel...
[ "Return", "a", "json", "dictionary", "representing", "this", "model", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/assistant_v1.py#L3047-L3056
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'text'", ")", "and", "self", ".", "text", "is", "not", "None", ":", "_dict", "[", "'text'", "]", "=", "self", ".", "text", "if", "hasattr", "(",...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
CounterexampleCollection._to_dict
Return a json dictionary representing this model.
ibm_watson/assistant_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'counterexamples') and self.counterexamples is not None: _dict['counterexamples'] = [ x._to_dict() for x in self.counterexamples ] ...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'counterexamples') and self.counterexamples is not None: _dict['counterexamples'] = [ x._to_dict() for x in self.counterexamples ] ...
[ "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/assistant_v1.py#L3114-L3124
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'counterexamples'", ")", "and", "self", ".", "counterexamples", "is", "not", "None", ":", "_dict", "[", "'counterexamples'", "]", "=", "[", "x", ".", ...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
CreateEntity._to_dict
Return a json dictionary representing this model.
ibm_watson/assistant_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'entity') and self.entity is not None: _dict['entity'] = self.entity if hasattr(self, 'description') and self.description is not None: _dict['description'] = se...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'entity') and self.entity is not None: _dict['entity'] = self.entity if hasattr(self, 'description') and self.description is not None: _dict['description'] = 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/assistant_v1.py#L3226-L3243
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'entity'", ")", "and", "self", ".", "entity", "is", "not", "None", ":", "_dict", "[", "'entity'", "]", "=", "self", ".", "entity", "if", "hasattr"...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
CreateIntent._to_dict
Return a json dictionary representing this model.
ibm_watson/assistant_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'intent') and self.intent is not None: _dict['intent'] = self.intent if hasattr(self, 'description') and self.description is not None: _dict['description'] = se...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'intent') and self.intent is not None: _dict['intent'] = self.intent if hasattr(self, 'description') and self.description is not None: _dict['description'] = 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/assistant_v1.py#L3330-L3343
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'intent'", ")", "and", "self", ".", "intent", "is", "not", "None", ":", "_dict", "[", "'intent'", "]", "=", "self", ".", "intent", "if", "hasattr"...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
CreateValue._to_dict
Return a json dictionary representing this model.
ibm_watson/assistant_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'value') and self.value is not None: _dict['value'] = self.value if hasattr(self, 'metadata') and self.metadata is not None: _dict['metadata'] = self.metadata ...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'value') and self.value is not None: _dict['value'] = self.value if hasattr(self, 'metadata') and self.metadata is not None: _dict['metadata'] = self.metadata ...
[ "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/assistant_v1.py#L3451-L3468
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'value'", ")", "and", "self", ".", "value", "is", "not", "None", ":", "_dict", "[", "'value'", "]", "=", "self", ".", "value", "if", "hasattr", ...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
DialogNode._from_dict
Initialize a DialogNode object from a json dictionary.
ibm_watson/assistant_v1.py
def _from_dict(cls, _dict): """Initialize a DialogNode object from a json dictionary.""" args = {} if 'dialog_node' in _dict: args['dialog_node'] = _dict.get('dialog_node') else: raise ValueError( 'Required property \'dialog_node\' not present in D...
def _from_dict(cls, _dict): """Initialize a DialogNode object from a json dictionary.""" args = {} if 'dialog_node' in _dict: args['dialog_node'] = _dict.get('dialog_node') else: raise ValueError( 'Required property \'dialog_node\' not present in D...
[ "Initialize", "a", "DialogNode", "object", "from", "a", "json", "dictionary", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/assistant_v1.py#L3631-L3683
[ "def", "_from_dict", "(", "cls", ",", "_dict", ")", ":", "args", "=", "{", "}", "if", "'dialog_node'", "in", "_dict", ":", "args", "[", "'dialog_node'", "]", "=", "_dict", ".", "get", "(", "'dialog_node'", ")", "else", ":", "raise", "ValueError", "(", ...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
DialogNode._to_dict
Return a json dictionary representing this model.
ibm_watson/assistant_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'dialog_node') and self.dialog_node is not None: _dict['dialog_node'] = self.dialog_node if hasattr(self, 'description') and self.description is not None: _dict...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'dialog_node') and self.dialog_node is not None: _dict['dialog_node'] = self.dialog_node if hasattr(self, 'description') and self.description 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/assistant_v1.py#L3685-L3732
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'dialog_node'", ")", "and", "self", ".", "dialog_node", "is", "not", "None", ":", "_dict", "[", "'dialog_node'", "]", "=", "self", ".", "dialog_node",...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
DialogNodeCollection._to_dict
Return a json dictionary representing this model.
ibm_watson/assistant_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'dialog_nodes') and self.dialog_nodes is not None: _dict['dialog_nodes'] = [x._to_dict() for x in self.dialog_nodes] if hasattr(self, 'pagination') and self.pagination is n...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'dialog_nodes') and self.dialog_nodes is not None: _dict['dialog_nodes'] = [x._to_dict() for x in self.dialog_nodes] if hasattr(self, 'pagination') and self.pagination is n...
[ "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/assistant_v1.py#L3882-L3889
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'dialog_nodes'", ")", "and", "self", ".", "dialog_nodes", "is", "not", "None", ":", "_dict", "[", "'dialog_nodes'", "]", "=", "[", "x", ".", "_to_di...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
DialogNodeNextStep._to_dict
Return a json dictionary representing this model.
ibm_watson/assistant_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'behavior') and self.behavior is not None: _dict['behavior'] = self.behavior if hasattr(self, 'dialog_node') and self.dialog_node is not None: _dict['dialog_nod...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'behavior') and self.behavior is not None: _dict['behavior'] = self.behavior if hasattr(self, 'dialog_node') and self.dialog_node is not None: _dict['dialog_nod...
[ "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/assistant_v1.py#L3985-L3994
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'behavior'", ")", "and", "self", ".", "behavior", "is", "not", "None", ":", "_dict", "[", "'behavior'", "]", "=", "self", ".", "behavior", "if", "...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
DialogNodeOutput._from_dict
Initialize a DialogNodeOutput object from a json dictionary.
ibm_watson/assistant_v1.py
def _from_dict(cls, _dict): """Initialize a DialogNodeOutput object from a json dictionary.""" args = {} xtra = _dict.copy() if 'generic' in _dict: args['generic'] = [ DialogNodeOutputGeneric._from_dict(x) for x in (_dict.get('generic')) ...
def _from_dict(cls, _dict): """Initialize a DialogNodeOutput object from a json dictionary.""" args = {} xtra = _dict.copy() if 'generic' in _dict: args['generic'] = [ DialogNodeOutputGeneric._from_dict(x) for x in (_dict.get('generic')) ...
[ "Initialize", "a", "DialogNodeOutput", "object", "from", "a", "json", "dictionary", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/assistant_v1.py#L4039-L4054
[ "def", "_from_dict", "(", "cls", ",", "_dict", ")", ":", "args", "=", "{", "}", "xtra", "=", "_dict", ".", "copy", "(", ")", "if", "'generic'", "in", "_dict", ":", "args", "[", "'generic'", "]", "=", "[", "DialogNodeOutputGeneric", ".", "_from_dict", ...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
DialogNodeOutput._to_dict
Return a json dictionary representing this model.
ibm_watson/assistant_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'generic') and self.generic is not None: _dict['generic'] = [x._to_dict() for x in self.generic] if hasattr(self, 'modifiers') and self.modifiers is not None: _...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'generic') and self.generic is not None: _dict['generic'] = [x._to_dict() for x in self.generic] if hasattr(self, 'modifiers') and self.modifiers 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/assistant_v1.py#L4056-L4068
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'generic'", ")", "and", "self", ".", "generic", "is", "not", "None", ":", "_dict", "[", "'generic'", "]", "=", "[", "x", ".", "_to_dict", "(", "...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
DialogNodeOutputGeneric._to_dict
Return a json dictionary representing this model.
ibm_watson/assistant_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'response_type') and self.response_type is not None: _dict['response_type'] = self.response_type if hasattr(self, 'values') and self.values is not None: _dict['...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'response_type') and self.response_type is not None: _dict['response_type'] = self.response_type if hasattr(self, 'values') and self.values 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/assistant_v1.py#L4230-L4259
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'response_type'", ")", "and", "self", ".", "response_type", "is", "not", "None", ":", "_dict", "[", "'response_type'", "]", "=", "self", ".", "respons...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
DialogNodeOutputModifiers._to_dict
Return a json dictionary representing this model.
ibm_watson/assistant_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'overwrite') and self.overwrite is not None: _dict['overwrite'] = self.overwrite return _dict
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'overwrite') and self.overwrite is not None: _dict['overwrite'] = self.overwrite 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/assistant_v1.py#L4304-L4309
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'overwrite'", ")", "and", "self", ".", "overwrite", "is", "not", "None", ":", "_dict", "[", "'overwrite'", "]", "=", "self", ".", "overwrite", "retu...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
DialogRuntimeResponseGeneric._from_dict
Initialize a DialogRuntimeResponseGeneric object from a json dictionary.
ibm_watson/assistant_v1.py
def _from_dict(cls, _dict): """Initialize a DialogRuntimeResponseGeneric object from a json dictionary.""" args = {} if 'response_type' in _dict: args['response_type'] = _dict.get('response_type') else: raise ValueError( 'Required property \'respon...
def _from_dict(cls, _dict): """Initialize a DialogRuntimeResponseGeneric object from a json dictionary.""" args = {} if 'response_type' in _dict: args['response_type'] = _dict.get('response_type') else: raise ValueError( 'Required property \'respon...
[ "Initialize", "a", "DialogRuntimeResponseGeneric", "object", "from", "a", "json", "dictionary", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/assistant_v1.py#L4639-L4678
[ "def", "_from_dict", "(", "cls", ",", "_dict", ")", ":", "args", "=", "{", "}", "if", "'response_type'", "in", "_dict", ":", "args", "[", "'response_type'", "]", "=", "_dict", ".", "get", "(", "'response_type'", ")", "else", ":", "raise", "ValueError", ...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
DialogRuntimeResponseGeneric._to_dict
Return a json dictionary representing this model.
ibm_watson/assistant_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'response_type') and self.response_type is not None: _dict['response_type'] = self.response_type if hasattr(self, 'text') and self.text is not None: _dict['text...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'response_type') and self.response_type is not None: _dict['response_type'] = self.response_type if hasattr(self, 'text') and self.text is not None: _dict['text...
[ "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/assistant_v1.py#L4680-L4710
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'response_type'", ")", "and", "self", ".", "response_type", "is", "not", "None", ":", "_dict", "[", "'response_type'", "]", "=", "self", ".", "respons...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
DialogSuggestionValue._from_dict
Initialize a DialogSuggestionValue object from a json dictionary.
ibm_watson/assistant_v1.py
def _from_dict(cls, _dict): """Initialize a DialogSuggestionValue object from a json dictionary.""" args = {} if 'input' in _dict: args['input'] = MessageInput._from_dict(_dict.get('input')) if 'intents' in _dict: args['intents'] = [ RuntimeIntent....
def _from_dict(cls, _dict): """Initialize a DialogSuggestionValue object from a json dictionary.""" args = {} if 'input' in _dict: args['input'] = MessageInput._from_dict(_dict.get('input')) if 'intents' in _dict: args['intents'] = [ RuntimeIntent....
[ "Initialize", "a", "DialogSuggestionValue", "object", "from", "a", "json", "dictionary", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/assistant_v1.py#L4841-L4854
[ "def", "_from_dict", "(", "cls", ",", "_dict", ")", ":", "args", "=", "{", "}", "if", "'input'", "in", "_dict", ":", "args", "[", "'input'", "]", "=", "MessageInput", ".", "_from_dict", "(", "_dict", ".", "get", "(", "'input'", ")", ")", "if", "'in...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
DialogSuggestionValue._to_dict
Return a json dictionary representing this model.
ibm_watson/assistant_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'input') and self.input is not None: _dict['input'] = self.input._to_dict() if hasattr(self, 'intents') and self.intents is not None: _dict['intents'] = [x._to_...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'input') and self.input is not None: _dict['input'] = self.input._to_dict() if hasattr(self, 'intents') and self.intents is not None: _dict['intents'] = [x._to_...
[ "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/assistant_v1.py#L4856-L4865
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'input'", ")", "and", "self", ".", "input", "is", "not", "None", ":", "_dict", "[", "'input'", "]", "=", "self", ".", "input", ".", "_to_dict", ...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
EntityCollection._to_dict
Return a json dictionary representing this model.
ibm_watson/assistant_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'entities') and self.entities is not None: _dict['entities'] = [x._to_dict() for x in self.entities] if hasattr(self, 'pagination') and self.pagination is not None: ...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'entities') and self.entities is not None: _dict['entities'] = [x._to_dict() for x in self.entities] if hasattr(self, 'pagination') and self.pagination 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/assistant_v1.py#L5040-L5047
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'entities'", ")", "and", "self", ".", "entities", "is", "not", "None", ":", "_dict", "[", "'entities'", "]", "=", "[", "x", ".", "_to_dict", "(", ...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
EntityMentionCollection._to_dict
Return a json dictionary representing this model.
ibm_watson/assistant_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'examples') and self.examples is not None: _dict['examples'] = [x._to_dict() for x in self.examples] if hasattr(self, 'pagination') and self.pagination is not None: ...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'examples') and self.examples is not None: _dict['examples'] = [x._to_dict() for x in self.examples] if hasattr(self, 'pagination') and self.pagination 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/assistant_v1.py#L5176-L5183
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'examples'", ")", "and", "self", ".", "examples", "is", "not", "None", ":", "_dict", "[", "'examples'", "]", "=", "[", "x", ".", "_to_dict", "(", ...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
IntentCollection._to_dict
Return a json dictionary representing this model.
ibm_watson/assistant_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'intents') and self.intents is not None: _dict['intents'] = [x._to_dict() for x in self.intents] if hasattr(self, 'pagination') and self.pagination is not None: ...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'intents') and self.intents is not None: _dict['intents'] = [x._to_dict() for x in self.intents] if hasattr(self, 'pagination') and self.pagination 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/assistant_v1.py#L5485-L5492
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'intents'", ")", "and", "self", ".", "intents", "is", "not", "None", ":", "_dict", "[", "'intents'", "]", "=", "[", "x", ".", "_to_dict", "(", "...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
Log._from_dict
Initialize a Log object from a json dictionary.
ibm_watson/assistant_v1.py
def _from_dict(cls, _dict): """Initialize a Log object from a json dictionary.""" args = {} if 'request' in _dict: args['request'] = MessageRequest._from_dict(_dict.get('request')) else: raise ValueError( 'Required property \'request\' not present ...
def _from_dict(cls, _dict): """Initialize a Log object from a json dictionary.""" args = {} if 'request' in _dict: args['request'] = MessageRequest._from_dict(_dict.get('request')) else: raise ValueError( 'Required property \'request\' not present ...
[ "Initialize", "a", "Log", "object", "from", "a", "json", "dictionary", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/assistant_v1.py#L5552-L5592
[ "def", "_from_dict", "(", "cls", ",", "_dict", ")", ":", "args", "=", "{", "}", "if", "'request'", "in", "_dict", ":", "args", "[", "'request'", "]", "=", "MessageRequest", ".", "_from_dict", "(", "_dict", ".", "get", "(", "'request'", ")", ")", "els...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
Log._to_dict
Return a json dictionary representing this model.
ibm_watson/assistant_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'request') and self.request is not None: _dict['request'] = self.request._to_dict() if hasattr(self, 'response') and self.response is not None: _dict['response'...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'request') and self.request is not None: _dict['request'] = self.request._to_dict() if hasattr(self, 'response') and self.response is not None: _dict['response'...
[ "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/assistant_v1.py#L5594-L5614
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'request'", ")", "and", "self", ".", "request", "is", "not", "None", ":", "_dict", "[", "'request'", "]", "=", "self", ".", "request", ".", "_to_d...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
LogCollection._from_dict
Initialize a LogCollection object from a json dictionary.
ibm_watson/assistant_v1.py
def _from_dict(cls, _dict): """Initialize a LogCollection object from a json dictionary.""" args = {} if 'logs' in _dict: args['logs'] = [Log._from_dict(x) for x in (_dict.get('logs'))] else: raise ValueError( 'Required property \'logs\' not presen...
def _from_dict(cls, _dict): """Initialize a LogCollection object from a json dictionary.""" args = {} if 'logs' in _dict: args['logs'] = [Log._from_dict(x) for x in (_dict.get('logs'))] else: raise ValueError( 'Required property \'logs\' not presen...
[ "Initialize", "a", "LogCollection", "object", "from", "a", "json", "dictionary", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/assistant_v1.py#L5650-L5665
[ "def", "_from_dict", "(", "cls", ",", "_dict", ")", ":", "args", "=", "{", "}", "if", "'logs'", "in", "_dict", ":", "args", "[", "'logs'", "]", "=", "[", "Log", ".", "_from_dict", "(", "x", ")", "for", "x", "in", "(", "_dict", ".", "get", "(", ...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
LogCollection._to_dict
Return a json dictionary representing this model.
ibm_watson/assistant_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'logs') and self.logs is not None: _dict['logs'] = [x._to_dict() for x in self.logs] if hasattr(self, 'pagination') and self.pagination is not None: _dict['pagi...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'logs') and self.logs is not None: _dict['logs'] = [x._to_dict() for x in self.logs] if hasattr(self, 'pagination') and self.pagination is not None: _dict['pagi...
[ "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/assistant_v1.py#L5667-L5674
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'logs'", ")", "and", "self", ".", "logs", "is", "not", "None", ":", "_dict", "[", "'logs'", "]", "=", "[", "x", ".", "_to_dict", "(", ")", "fo...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
LogMessage._to_dict
Return a json dictionary representing this model.
ibm_watson/assistant_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'level') and self.level is not None: _dict['level'] = self.level if hasattr(self, 'msg') and self.msg is not None: _dict['msg'] = self.msg if hasattr(se...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'level') and self.level is not None: _dict['level'] = self.level if hasattr(self, 'msg') and self.msg is not None: _dict['msg'] = self.msg 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/assistant_v1.py#L5732-L5744
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'level'", ")", "and", "self", ".", "level", "is", "not", "None", ":", "_dict", "[", "'level'", "]", "=", "self", ".", "level", "if", "hasattr", ...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
LogPagination._to_dict
Return a json dictionary representing this model.
ibm_watson/assistant_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'next_url') and self.next_url is not None: _dict['next_url'] = self.next_url if hasattr(self, 'matched') and self.matched is not None: _dict['matched'] = self.m...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'next_url') and self.next_url is not None: _dict['next_url'] = self.next_url if hasattr(self, 'matched') and self.matched is not None: _dict['matched'] = self.m...
[ "Return", "a", "json", "dictionary", "representing", "this", "model", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/assistant_v1.py#L5804-L5813
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'next_url'", ")", "and", "self", ".", "next_url", "is", "not", "None", ":", "_dict", "[", "'next_url'", "]", "=", "self", ".", "next_url", "if", "...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
Mention._to_dict
Return a json dictionary representing this model.
ibm_watson/assistant_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'entity') and self.entity is not None: _dict['entity'] = self.entity if hasattr(self, 'location') and self.location is not None: _dict['location'] = self.locati...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'entity') and self.entity is not None: _dict['entity'] = self.entity if hasattr(self, 'location') and self.location is not None: _dict['location'] = self.locati...
[ "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/assistant_v1.py#L5866-L5873
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'entity'", ")", "and", "self", ".", "entity", "is", "not", "None", ":", "_dict", "[", "'entity'", "]", "=", "self", ".", "entity", "if", "hasattr"...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
MessageContextMetadata._to_dict
Return a json dictionary representing this model.
ibm_watson/assistant_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'deployment') and self.deployment is not None: _dict['deployment'] = self.deployment if hasattr(self, 'user_id') and self.user_id is not None: _dict['user_id'] ...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'deployment') and self.deployment is not None: _dict['deployment'] = self.deployment if hasattr(self, 'user_id') and self.user_id is not None: _dict['user_id'] ...
[ "Return", "a", "json", "dictionary", "representing", "this", "model", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/assistant_v1.py#L5930-L5937
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'deployment'", ")", "and", "self", ".", "deployment", "is", "not", "None", ":", "_dict", "[", "'deployment'", "]", "=", "self", ".", "deployment", "...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
MessageInput._to_dict
Return a json dictionary representing this model.
ibm_watson/assistant_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'text') and self.text is not None: _dict['text'] = self.text if hasattr(self, '_additionalProperties'): for _key in self._additionalProperties: ...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'text') and self.text is not None: _dict['text'] = self.text if hasattr(self, '_additionalProperties'): for _key in self._additionalProperties: ...
[ "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/assistant_v1.py#L5987-L5997
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'text'", ")", "and", "self", ".", "text", "is", "not", "None", ":", "_dict", "[", "'text'", "]", "=", "self", ".", "text", "if", "hasattr", "(",...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
MessageRequest._from_dict
Initialize a MessageRequest object from a json dictionary.
ibm_watson/assistant_v1.py
def _from_dict(cls, _dict): """Initialize a MessageRequest object from a json dictionary.""" args = {} if 'input' in _dict: args['input'] = MessageInput._from_dict(_dict.get('input')) if 'intents' in _dict: args['intents'] = [ RuntimeIntent._from_d...
def _from_dict(cls, _dict): """Initialize a MessageRequest object from a json dictionary.""" args = {} if 'input' in _dict: args['input'] = MessageInput._from_dict(_dict.get('input')) if 'intents' in _dict: args['intents'] = [ RuntimeIntent._from_d...
[ "Initialize", "a", "MessageRequest", "object", "from", "a", "json", "dictionary", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/assistant_v1.py#L6081-L6104
[ "def", "_from_dict", "(", "cls", ",", "_dict", ")", ":", "args", "=", "{", "}", "if", "'input'", "in", "_dict", ":", "args", "[", "'input'", "]", "=", "MessageInput", ".", "_from_dict", "(", "_dict", ".", "get", "(", "'input'", ")", ")", "if", "'in...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
MessageRequest._to_dict
Return a json dictionary representing this model.
ibm_watson/assistant_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'input') and self.input is not None: _dict['input'] = self.input._to_dict() if hasattr(self, 'intents') and self.intents is not None: _dict['intents'] = [x._to_...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'input') and self.input is not None: _dict['input'] = self.input._to_dict() if hasattr(self, 'intents') and self.intents is not None: _dict['intents'] = [x._to_...
[ "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/assistant_v1.py#L6106-L6124
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'input'", ")", "and", "self", ".", "input", "is", "not", "None", ":", "_dict", "[", "'input'", "]", "=", "self", ".", "input", ".", "_to_dict", ...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
OutputData._from_dict
Initialize a OutputData object from a json dictionary.
ibm_watson/assistant_v1.py
def _from_dict(cls, _dict): """Initialize a OutputData object from a json dictionary.""" args = {} xtra = _dict.copy() if 'log_messages' in _dict: args['log_messages'] = [ LogMessage._from_dict(x) for x in (_dict.get('log_messages')) ] ...
def _from_dict(cls, _dict): """Initialize a OutputData object from a json dictionary.""" args = {} xtra = _dict.copy() if 'log_messages' in _dict: args['log_messages'] = [ LogMessage._from_dict(x) for x in (_dict.get('log_messages')) ] ...
[ "Initialize", "a", "OutputData", "object", "from", "a", "json", "dictionary", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/assistant_v1.py#L6329-L6364
[ "def", "_from_dict", "(", "cls", ",", "_dict", ")", ":", "args", "=", "{", "}", "xtra", "=", "_dict", ".", "copy", "(", ")", "if", "'log_messages'", "in", "_dict", ":", "args", "[", "'log_messages'", "]", "=", "[", "LogMessage", ".", "_from_dict", "(...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
OutputData._to_dict
Return a json dictionary representing this model.
ibm_watson/assistant_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'log_messages') and self.log_messages is not None: _dict['log_messages'] = [x._to_dict() for x in self.log_messages] if hasattr(self, 'text') and self.text is not None: ...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'log_messages') and self.log_messages is not None: _dict['log_messages'] = [x._to_dict() for x in self.log_messages] if hasattr(self, 'text') and self.text 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/assistant_v1.py#L6366-L6387
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'log_messages'", ")", "and", "self", ".", "log_messages", "is", "not", "None", ":", "_dict", "[", "'log_messages'", "]", "=", "[", "x", ".", "_to_di...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
RuntimeEntity._from_dict
Initialize a RuntimeEntity object from a json dictionary.
ibm_watson/assistant_v1.py
def _from_dict(cls, _dict): """Initialize a RuntimeEntity object from a json dictionary.""" args = {} xtra = _dict.copy() if 'entity' in _dict: args['entity'] = _dict.get('entity') del xtra['entity'] else: raise ValueError( 'Req...
def _from_dict(cls, _dict): """Initialize a RuntimeEntity object from a json dictionary.""" args = {} xtra = _dict.copy() if 'entity' in _dict: args['entity'] = _dict.get('entity') del xtra['entity'] else: raise ValueError( 'Req...
[ "Initialize", "a", "RuntimeEntity", "object", "from", "a", "json", "dictionary", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/assistant_v1.py#L6554-L6590
[ "def", "_from_dict", "(", "cls", ",", "_dict", ")", ":", "args", "=", "{", "}", "xtra", "=", "_dict", ".", "copy", "(", ")", "if", "'entity'", "in", "_dict", ":", "args", "[", "'entity'", "]", "=", "_dict", ".", "get", "(", "'entity'", ")", "del"...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
RuntimeEntity._to_dict
Return a json dictionary representing this model.
ibm_watson/assistant_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'entity') and self.entity is not None: _dict['entity'] = self.entity if hasattr(self, 'location') and self.location is not None: _dict['location'] = self.locati...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'entity') and self.entity is not None: _dict['entity'] = self.entity if hasattr(self, 'location') and self.location is not None: _dict['location'] = self.locati...
[ "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/assistant_v1.py#L6592-L6612
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'entity'", ")", "and", "self", ".", "entity", "is", "not", "None", ":", "_dict", "[", "'entity'", "]", "=", "self", ".", "entity", "if", "hasattr"...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
RuntimeIntent._from_dict
Initialize a RuntimeIntent object from a json dictionary.
ibm_watson/assistant_v1.py
def _from_dict(cls, _dict): """Initialize a RuntimeIntent object from a json dictionary.""" args = {} xtra = _dict.copy() if 'intent' in _dict: args['intent'] = _dict.get('intent') del xtra['intent'] else: raise ValueError( 'Req...
def _from_dict(cls, _dict): """Initialize a RuntimeIntent object from a json dictionary.""" args = {} xtra = _dict.copy() if 'intent' in _dict: args['intent'] = _dict.get('intent') del xtra['intent'] else: raise ValueError( 'Req...
[ "Initialize", "a", "RuntimeIntent", "object", "from", "a", "json", "dictionary", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/assistant_v1.py#L6664-L6683
[ "def", "_from_dict", "(", "cls", ",", "_dict", ")", ":", "args", "=", "{", "}", "xtra", "=", "_dict", ".", "copy", "(", ")", "if", "'intent'", "in", "_dict", ":", "args", "[", "'intent'", "]", "=", "_dict", ".", "get", "(", "'intent'", ")", "del"...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
RuntimeIntent._to_dict
Return a json dictionary representing this model.
ibm_watson/assistant_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'intent') and self.intent is not None: _dict['intent'] = self.intent if hasattr(self, 'confidence') and self.confidence is not None: _dict['confidence'] = self....
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'intent') and self.intent is not None: _dict['intent'] = self.intent if hasattr(self, 'confidence') and self.confidence is not None: _dict['confidence'] = 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/assistant_v1.py#L6685-L6697
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'intent'", ")", "and", "self", ".", "intent", "is", "not", "None", ":", "_dict", "[", "'intent'", "]", "=", "self", ".", "intent", "if", "hasattr"...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
Synonym._to_dict
Return a json dictionary representing this model.
ibm_watson/assistant_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'synonym') and self.synonym is not None: _dict['synonym'] = self.synonym if hasattr(self, 'created') and self.created is not None: _dict['created'] = datetime_t...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'synonym') and self.synonym is not None: _dict['synonym'] = self.synonym if hasattr(self, 'created') and self.created is not None: _dict['created'] = datetime_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/assistant_v1.py#L6769-L6778
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'synonym'", ")", "and", "self", ".", "synonym", "is", "not", "None", ":", "_dict", "[", "'synonym'", "]", "=", "self", ".", "synonym", "if", "hasa...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
SynonymCollection._to_dict
Return a json dictionary representing this model.
ibm_watson/assistant_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'synonyms') and self.synonyms is not None: _dict['synonyms'] = [x._to_dict() for x in self.synonyms] if hasattr(self, 'pagination') and self.pagination is not None: ...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'synonyms') and self.synonyms is not None: _dict['synonyms'] = [x._to_dict() for x in self.synonyms] if hasattr(self, 'pagination') and self.pagination 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/assistant_v1.py#L6833-L6840
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'synonyms'", ")", "and", "self", ".", "synonyms", "is", "not", "None", ":", "_dict", "[", "'synonyms'", "]", "=", "[", "x", ".", "_to_dict", "(", ...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
ValueCollection._from_dict
Initialize a ValueCollection object from a json dictionary.
ibm_watson/assistant_v1.py
def _from_dict(cls, _dict): """Initialize a ValueCollection object from a json dictionary.""" args = {} if 'values' in _dict: args['values'] = [ Value._from_dict(x) for x in (_dict.get('values')) ] else: raise ValueError( ...
def _from_dict(cls, _dict): """Initialize a ValueCollection object from a json dictionary.""" args = {} if 'values' in _dict: args['values'] = [ Value._from_dict(x) for x in (_dict.get('values')) ] else: raise ValueError( ...
[ "Initialize", "a", "ValueCollection", "object", "from", "a", "json", "dictionary", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/assistant_v1.py#L7061-L7078
[ "def", "_from_dict", "(", "cls", ",", "_dict", ")", ":", "args", "=", "{", "}", "if", "'values'", "in", "_dict", ":", "args", "[", "'values'", "]", "=", "[", "Value", ".", "_from_dict", "(", "x", ")", "for", "x", "in", "(", "_dict", ".", "get", ...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
ValueCollection._to_dict
Return a json dictionary representing this model.
ibm_watson/assistant_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'values') and self.values is not None: _dict['values'] = [x._to_dict() for x in self.values] if hasattr(self, 'pagination') and self.pagination is not None: _di...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'values') and self.values is not None: _dict['values'] = [x._to_dict() for x in self.values] if hasattr(self, 'pagination') and self.pagination 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/assistant_v1.py#L7080-L7087
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'values'", ")", "and", "self", ".", "values", "is", "not", "None", ":", "_dict", "[", "'values'", "]", "=", "[", "x", ".", "_to_dict", "(", ")",...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
Workspace._from_dict
Initialize a Workspace object from a json dictionary.
ibm_watson/assistant_v1.py
def _from_dict(cls, _dict): """Initialize a Workspace object from a json dictionary.""" args = {} if 'name' in _dict: args['name'] = _dict.get('name') else: raise ValueError( 'Required property \'name\' not present in Workspace JSON') if 'd...
def _from_dict(cls, _dict): """Initialize a Workspace object from a json dictionary.""" args = {} if 'name' in _dict: args['name'] = _dict.get('name') else: raise ValueError( 'Required property \'name\' not present in Workspace JSON') if 'd...
[ "Initialize", "a", "Workspace", "object", "from", "a", "json", "dictionary", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/assistant_v1.py#L7192-L7247
[ "def", "_from_dict", "(", "cls", ",", "_dict", ")", ":", "args", "=", "{", "}", "if", "'name'", "in", "_dict", ":", "args", "[", "'name'", "]", "=", "_dict", ".", "get", "(", "'name'", ")", "else", ":", "raise", "ValueError", "(", "'Required property...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
Workspace._to_dict
Return a json dictionary representing this model.
ibm_watson/assistant_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, 'description') and self.description is not None: _dict['description'] = self.descr...
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, 'description') and self.description is not None: _dict['description'] = self.descr...
[ "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/assistant_v1.py#L7249-L7285
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'name'", ")", "and", "self", ".", "name", "is", "not", "None", ":", "_dict", "[", "'name'", "]", "=", "self", ".", "name", "if", "hasattr", "(",...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
WorkspaceCollection._to_dict
Return a json dictionary representing this model.
ibm_watson/assistant_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'workspaces') and self.workspaces is not None: _dict['workspaces'] = [x._to_dict() for x in self.workspaces] if hasattr(self, 'pagination') and self.pagination is not None:...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'workspaces') and self.workspaces is not None: _dict['workspaces'] = [x._to_dict() for x in self.workspaces] if hasattr(self, 'pagination') and self.pagination 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/assistant_v1.py#L7342-L7349
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'workspaces'", ")", "and", "self", ".", "workspaces", "is", "not", "None", ":", "_dict", "[", "'workspaces'", "]", "=", "[", "x", ".", "_to_dict", ...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
WorkspaceSystemSettings._from_dict
Initialize a WorkspaceSystemSettings object from a json dictionary.
ibm_watson/assistant_v1.py
def _from_dict(cls, _dict): """Initialize a WorkspaceSystemSettings object from a json dictionary.""" args = {} if 'tooling' in _dict: args['tooling'] = WorkspaceSystemSettingsTooling._from_dict( _dict.get('tooling')) if 'disambiguation' in _dict: ...
def _from_dict(cls, _dict): """Initialize a WorkspaceSystemSettings object from a json dictionary.""" args = {} if 'tooling' in _dict: args['tooling'] = WorkspaceSystemSettingsTooling._from_dict( _dict.get('tooling')) if 'disambiguation' in _dict: ...
[ "Initialize", "a", "WorkspaceSystemSettings", "object", "from", "a", "json", "dictionary", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/assistant_v1.py#L7397-L7409
[ "def", "_from_dict", "(", "cls", ",", "_dict", ")", ":", "args", "=", "{", "}", "if", "'tooling'", "in", "_dict", ":", "args", "[", "'tooling'", "]", "=", "WorkspaceSystemSettingsTooling", ".", "_from_dict", "(", "_dict", ".", "get", "(", "'tooling'", ")...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
WorkspaceSystemSettings._to_dict
Return a json dictionary representing this model.
ibm_watson/assistant_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'tooling') and self.tooling is not None: _dict['tooling'] = self.tooling._to_dict() if hasattr(self, 'disambiguation') and self.disambiguation is not None: _dic...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'tooling') and self.tooling is not None: _dict['tooling'] = self.tooling._to_dict() if hasattr(self, 'disambiguation') and self.disambiguation is not None: _dic...
[ "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/assistant_v1.py#L7411-L7422
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'tooling'", ")", "and", "self", ".", "tooling", "is", "not", "None", ":", "_dict", "[", "'tooling'", "]", "=", "self", ".", "tooling", ".", "_to_d...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
WorkspaceSystemSettingsDisambiguation._to_dict
Return a json dictionary representing this model.
ibm_watson/assistant_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'prompt') and self.prompt is not None: _dict['prompt'] = self.prompt if hasattr(self, 'none_of_the_above_prompt' ) and self.none_of_the_above_prompt is no...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'prompt') and self.prompt is not None: _dict['prompt'] = self.prompt if hasattr(self, 'none_of_the_above_prompt' ) and self.none_of_the_above_prompt 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/assistant_v1.py#L7496-L7508
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'prompt'", ")", "and", "self", ".", "prompt", "is", "not", "None", ":", "_dict", "[", "'prompt'", "]", "=", "self", ".", "prompt", "if", "hasattr"...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
WorkspaceSystemSettingsTooling._to_dict
Return a json dictionary representing this model.
ibm_watson/assistant_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'store_generic_responses' ) and self.store_generic_responses is not None: _dict['store_generic_responses'] = self.store_generic_responses return _dict
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'store_generic_responses' ) and self.store_generic_responses is not None: _dict['store_generic_responses'] = self.store_generic_responses 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/assistant_v1.py#L7551-L7557
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'store_generic_responses'", ")", "and", "self", ".", "store_generic_responses", "is", "not", "None", ":", "_dict", "[", "'store_generic_responses'", "]", "=...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
NaturalLanguageClassifierV1.classify
Classify a phrase. Returns label information for the input. The status must be `Available` before you can use the classifier to classify text. :param str classifier_id: Classifier ID to use. :param str text: The submitted phrase. The maximum length is 2048 characters. :param di...
ibm_watson/natural_language_classifier_v1.py
def classify(self, classifier_id, text, **kwargs): """ Classify a phrase. Returns label information for the input. The status must be `Available` before you can use the classifier to classify text. :param str classifier_id: Classifier ID to use. :param str text: The sub...
def classify(self, classifier_id, text, **kwargs): """ Classify a phrase. Returns label information for the input. The status must be `Available` before you can use the classifier to classify text. :param str classifier_id: Classifier ID to use. :param str text: The sub...
[ "Classify", "a", "phrase", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/natural_language_classifier_v1.py#L97-L133
[ "def", "classify", "(", "self", ",", "classifier_id", ",", "text", ",", "*", "*", "kwargs", ")", ":", "if", "classifier_id", "is", "None", ":", "raise", "ValueError", "(", "'classifier_id must be provided'", ")", "if", "text", "is", "None", ":", "raise", "...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
NaturalLanguageClassifierV1.classify_collection
Classify multiple phrases. Returns label information for multiple phrases. The status must be `Available` before you can use the classifier to classify text. Note that classifying Japanese texts is a beta feature. :param str classifier_id: Classifier ID to use. :param list[Clas...
ibm_watson/natural_language_classifier_v1.py
def classify_collection(self, classifier_id, collection, **kwargs): """ Classify multiple phrases. Returns label information for multiple phrases. The status must be `Available` before you can use the classifier to classify text. Note that classifying Japanese texts is a beta fe...
def classify_collection(self, classifier_id, collection, **kwargs): """ Classify multiple phrases. Returns label information for multiple phrases. The status must be `Available` before you can use the classifier to classify text. Note that classifying Japanese texts is a beta fe...
[ "Classify", "multiple", "phrases", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/natural_language_classifier_v1.py#L135-L173
[ "def", "classify_collection", "(", "self", ",", "classifier_id", ",", "collection", ",", "*", "*", "kwargs", ")", ":", "if", "classifier_id", "is", "None", ":", "raise", "ValueError", "(", "'classifier_id must be provided'", ")", "if", "collection", "is", "None"...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
NaturalLanguageClassifierV1.create_classifier
Create classifier. Sends data to create and train a classifier and returns information about the new classifier. :param file metadata: Metadata in JSON format. The metadata identifies the language of the data, and an optional name to identify the classifier. Specify the languag...
ibm_watson/natural_language_classifier_v1.py
def create_classifier(self, metadata, training_data, **kwargs): """ Create classifier. Sends data to create and train a classifier and returns information about the new classifier. :param file metadata: Metadata in JSON format. The metadata identifies the language of th...
def create_classifier(self, metadata, training_data, **kwargs): """ Create classifier. Sends data to create and train a classifier and returns information about the new classifier. :param file metadata: Metadata in JSON format. The metadata identifies the language of th...
[ "Create", "classifier", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/natural_language_classifier_v1.py#L179-L224
[ "def", "create_classifier", "(", "self", ",", "metadata", ",", "training_data", ",", "*", "*", "kwargs", ")", ":", "if", "metadata", "is", "None", ":", "raise", "ValueError", "(", "'metadata must be provided'", ")", "if", "training_data", "is", "None", ":", ...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
Classification._from_dict
Initialize a Classification object from a json dictionary.
ibm_watson/natural_language_classifier_v1.py
def _from_dict(cls, _dict): """Initialize a Classification object from a json dictionary.""" args = {} if 'classifier_id' in _dict: args['classifier_id'] = _dict.get('classifier_id') if 'url' in _dict: args['url'] = _dict.get('url') if 'text' in _dict: ...
def _from_dict(cls, _dict): """Initialize a Classification object from a json dictionary.""" args = {} if 'classifier_id' in _dict: args['classifier_id'] = _dict.get('classifier_id') if 'url' in _dict: args['url'] = _dict.get('url') if 'text' in _dict: ...
[ "Initialize", "a", "Classification", "object", "from", "a", "json", "dictionary", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/natural_language_classifier_v1.py#L344-L359
[ "def", "_from_dict", "(", "cls", ",", "_dict", ")", ":", "args", "=", "{", "}", "if", "'classifier_id'", "in", "_dict", ":", "args", "[", "'classifier_id'", "]", "=", "_dict", ".", "get", "(", "'classifier_id'", ")", "if", "'url'", "in", "_dict", ":", ...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
Classification._to_dict
Return a json dictionary representing this model.
ibm_watson/natural_language_classifier_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'classifier_id') and self.classifier_id is not None: _dict['classifier_id'] = self.classifier_id if hasattr(self, 'url') and self.url is not None: _dict['url'] ...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'classifier_id') and self.classifier_id is not None: _dict['classifier_id'] = self.classifier_id if hasattr(self, 'url') and self.url is not None: _dict['url'] ...
[ "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/natural_language_classifier_v1.py#L361-L374
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'classifier_id'", ")", "and", "self", ".", "classifier_id", "is", "not", "None", ":", "_dict", "[", "'classifier_id'", "]", "=", "self", ".", "classif...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
ClassificationCollection._from_dict
Initialize a ClassificationCollection object from a json dictionary.
ibm_watson/natural_language_classifier_v1.py
def _from_dict(cls, _dict): """Initialize a ClassificationCollection object from a json dictionary.""" args = {} if 'classifier_id' in _dict: args['classifier_id'] = _dict.get('classifier_id') if 'url' in _dict: args['url'] = _dict.get('url') if 'collectio...
def _from_dict(cls, _dict): """Initialize a ClassificationCollection object from a json dictionary.""" args = {} if 'classifier_id' in _dict: args['classifier_id'] = _dict.get('classifier_id') if 'url' in _dict: args['url'] = _dict.get('url') if 'collectio...
[ "Initialize", "a", "ClassificationCollection", "object", "from", "a", "json", "dictionary", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/natural_language_classifier_v1.py#L415-L426
[ "def", "_from_dict", "(", "cls", ",", "_dict", ")", ":", "args", "=", "{", "}", "if", "'classifier_id'", "in", "_dict", ":", "args", "[", "'classifier_id'", "]", "=", "_dict", ".", "get", "(", "'classifier_id'", ")", "if", "'url'", "in", "_dict", ":", ...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
ClassificationCollection._to_dict
Return a json dictionary representing this model.
ibm_watson/natural_language_classifier_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'classifier_id') and self.classifier_id is not None: _dict['classifier_id'] = self.classifier_id if hasattr(self, 'url') and self.url is not None: _dict['url'] ...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'classifier_id') and self.classifier_id is not None: _dict['classifier_id'] = self.classifier_id if hasattr(self, 'url') and self.url is not None: _dict['url'] ...
[ "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/natural_language_classifier_v1.py#L428-L437
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'classifier_id'", ")", "and", "self", ".", "classifier_id", "is", "not", "None", ":", "_dict", "[", "'classifier_id'", "]", "=", "self", ".", "classif...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
ClassifiedClass._to_dict
Return a json dictionary representing this model.
ibm_watson/natural_language_classifier_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, 'class_name') and self.class_name is not None: _dict['clas...
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, 'class_name') and self.class_name is not None: _dict['clas...
[ "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/natural_language_classifier_v1.py#L485-L492
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'confidence'", ")", "and", "self", ".", "confidence", "is", "not", "None", ":", "_dict", "[", "'confidence'", "]", "=", "self", ".", "confidence", "...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
Classifier._to_dict
Return a json dictionary representing this model.
ibm_watson/natural_language_classifier_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, 'url') and self.url is not None: _dict['url'] = self.url if hasattr(self, ...
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, 'url') and self.url is not None: _dict['url'] = self.url 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/natural_language_classifier_v1.py#L577-L596
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'name'", ")", "and", "self", ".", "name", "is", "not", "None", ":", "_dict", "[", "'name'", "]", "=", "self", ".", "name", "if", "hasattr", "(",...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
ClassifierList._from_dict
Initialize a ClassifierList object from a json dictionary.
ibm_watson/natural_language_classifier_v1.py
def _from_dict(cls, _dict): """Initialize a ClassifierList object from a json dictionary.""" args = {} if 'classifiers' in _dict: args['classifiers'] = [ Classifier._from_dict(x) for x in (_dict.get('classifiers')) ] else: raise ValueEr...
def _from_dict(cls, _dict): """Initialize a ClassifierList object from a json dictionary.""" args = {} if 'classifiers' in _dict: args['classifiers'] = [ Classifier._from_dict(x) for x in (_dict.get('classifiers')) ] else: raise ValueEr...
[ "Initialize", "a", "ClassifierList", "object", "from", "a", "json", "dictionary", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/natural_language_classifier_v1.py#L631-L642
[ "def", "_from_dict", "(", "cls", ",", "_dict", ")", ":", "args", "=", "{", "}", "if", "'classifiers'", "in", "_dict", ":", "args", "[", "'classifiers'", "]", "=", "[", "Classifier", ".", "_from_dict", "(", "x", ")", "for", "x", "in", "(", "_dict", ...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
CollectionItem._to_dict
Return a json dictionary representing this model.
ibm_watson/natural_language_classifier_v1.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'text') and self.text is not None: _dict['text'] = self.text if hasattr(self, 'top_class') and self.top_class is not None: _dict['top_class'] = self.top_class ...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'text') and self.text is not None: _dict['text'] = self.text if hasattr(self, 'top_class') and self.top_class is not None: _dict['top_class'] = self.top_class ...
[ "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/natural_language_classifier_v1.py#L753-L762
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'text'", ")", "and", "self", ".", "text", "is", "not", "None", ":", "_dict", "[", "'text'", "]", "=", "self", ".", "text", "if", "hasattr", "(",...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
LanguageTranslatorV3.translate
Translate. Translates the input text from the source language to the target language. :param list[str] text: Input text in UTF-8 encoding. Multiple entries will result in multiple translations in the response. :param str model_id: A globally unique string that identifies the underlying...
ibm_watson/language_translator_v3.py
def translate(self, text, model_id=None, source=None, target=None, **kwargs): """ Translate. Translates the input text from the source language to the target language. :param list[str] text: Input text in UTF-8 encoding. Multiple entries will result in multipl...
def translate(self, text, model_id=None, source=None, target=None, **kwargs): """ Translate. Translates the input text from the source language to the target language. :param list[str] text: Input text in UTF-8 encoding. Multiple entries will result in multipl...
[ "Translate", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/language_translator_v3.py#L110-L154
[ "def", "translate", "(", "self", ",", "text", ",", "model_id", "=", "None", ",", "source", "=", "None", ",", "target", "=", "None", ",", "*", "*", "kwargs", ")", ":", "if", "text", "is", "None", ":", "raise", "ValueError", "(", "'text must be provided'...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
LanguageTranslatorV3.identify
Identify language. Identifies the language of the input text. :param str text: Input text in UTF-8 format. :param dict headers: A `dict` containing the request headers :return: A `DetailedResponse` containing the result, headers and HTTP status code. :rtype: DetailedResponse
ibm_watson/language_translator_v3.py
def identify(self, text, **kwargs): """ Identify language. Identifies the language of the input text. :param str text: Input text in UTF-8 format. :param dict headers: A `dict` containing the request headers :return: A `DetailedResponse` containing the result, headers a...
def identify(self, text, **kwargs): """ Identify language. Identifies the language of the input text. :param str text: Input text in UTF-8 format. :param dict headers: A `dict` containing the request headers :return: A `DetailedResponse` containing the result, headers a...
[ "Identify", "language", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/language_translator_v3.py#L160-L194
[ "def", "identify", "(", "self", ",", "text", ",", "*", "*", "kwargs", ")", ":", "if", "text", "is", "None", ":", "raise", "ValueError", "(", "'text must be provided'", ")", "headers", "=", "{", "}", "if", "'headers'", "in", "kwargs", ":", "headers", "....
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
LanguageTranslatorV3.create_model
Create model. Uploads Translation Memory eXchange (TMX) files to customize a translation model. You can either customize a model with a forced glossary or with a corpus that contains parallel sentences. To create a model that is customized with a parallel corpus <b>and</b> a forced glos...
ibm_watson/language_translator_v3.py
def create_model(self, base_model_id, forced_glossary=None, parallel_corpus=None, name=None, **kwargs): """ Create model. Uploads Translation Memory eXchange (TMX) files to customize a trans...
def create_model(self, base_model_id, forced_glossary=None, parallel_corpus=None, name=None, **kwargs): """ Create model. Uploads Translation Memory eXchange (TMX) files to customize a trans...
[ "Create", "model", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/language_translator_v3.py#L230-L307
[ "def", "create_model", "(", "self", ",", "base_model_id", ",", "forced_glossary", "=", "None", ",", "parallel_corpus", "=", "None", ",", "name", "=", "None", ",", "*", "*", "kwargs", ")", ":", "if", "base_model_id", "is", "None", ":", "raise", "ValueError"...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
DeleteModelResult._to_dict
Return a json dictionary representing this model.
ibm_watson/language_translator_v3.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 return _dict
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 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/language_translator_v3.py#L454-L459
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'status'", ")", "and", "self", ".", "status", "is", "not", "None", ":", "_dict", "[", "'status'", "]", "=", "self", ".", "status", "return", "_dic...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
IdentifiableLanguage._to_dict
Return a json dictionary representing this model.
ibm_watson/language_translator_v3.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'language') and self.language is not None: _dict['language'] = self.language 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, 'language') and self.language is not None: _dict['language'] = self.language 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/language_translator_v3.py#L512-L519
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'language'", ")", "and", "self", ".", "language", "is", "not", "None", ":", "_dict", "[", "'language'", "]", "=", "self", ".", "language", "if", "...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
IdentifiableLanguages._from_dict
Initialize a IdentifiableLanguages object from a json dictionary.
ibm_watson/language_translator_v3.py
def _from_dict(cls, _dict): """Initialize a IdentifiableLanguages object from a json dictionary.""" args = {} if 'languages' in _dict: args['languages'] = [ IdentifiableLanguage._from_dict(x) for x in (_dict.get('languages')) ] else...
def _from_dict(cls, _dict): """Initialize a IdentifiableLanguages object from a json dictionary.""" args = {} if 'languages' in _dict: args['languages'] = [ IdentifiableLanguage._from_dict(x) for x in (_dict.get('languages')) ] else...
[ "Initialize", "a", "IdentifiableLanguages", "object", "from", "a", "json", "dictionary", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/language_translator_v3.py#L554-L566
[ "def", "_from_dict", "(", "cls", ",", "_dict", ")", ":", "args", "=", "{", "}", "if", "'languages'", "in", "_dict", ":", "args", "[", "'languages'", "]", "=", "[", "IdentifiableLanguage", ".", "_from_dict", "(", "x", ")", "for", "x", "in", "(", "_dic...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
IdentifiableLanguages._to_dict
Return a json dictionary representing this model.
ibm_watson/language_translator_v3.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'languages') and self.languages is not None: _dict['languages'] = [x._to_dict() for x in self.languages] return _dict
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'languages') and self.languages is not None: _dict['languages'] = [x._to_dict() for x in self.languages] 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/language_translator_v3.py#L568-L573
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'languages'", ")", "and", "self", ".", "languages", "is", "not", "None", ":", "_dict", "[", "'languages'", "]", "=", "[", "x", ".", "_to_dict", "(...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
IdentifiedLanguage._to_dict
Return a json dictionary representing this model.
ibm_watson/language_translator_v3.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'language') and self.language is not None: _dict['language'] = self.language if hasattr(self, 'confidence') and self.confidence is not None: _dict['confidence']...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'language') and self.language is not None: _dict['language'] = self.language if hasattr(self, 'confidence') and self.confidence is not None: _dict['confidence']...
[ "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/language_translator_v3.py#L626-L633
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'language'", ")", "and", "self", ".", "language", "is", "not", "None", ":", "_dict", "[", "'language'", "]", "=", "self", ".", "language", "if", "...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
IdentifiedLanguages._from_dict
Initialize a IdentifiedLanguages object from a json dictionary.
ibm_watson/language_translator_v3.py
def _from_dict(cls, _dict): """Initialize a IdentifiedLanguages object from a json dictionary.""" args = {} if 'languages' in _dict: args['languages'] = [ IdentifiedLanguage._from_dict(x) for x in (_dict.get('languages')) ] else: ...
def _from_dict(cls, _dict): """Initialize a IdentifiedLanguages object from a json dictionary.""" args = {} if 'languages' in _dict: args['languages'] = [ IdentifiedLanguage._from_dict(x) for x in (_dict.get('languages')) ] else: ...
[ "Initialize", "a", "IdentifiedLanguages", "object", "from", "a", "json", "dictionary", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/language_translator_v3.py#L668-L680
[ "def", "_from_dict", "(", "cls", ",", "_dict", ")", ":", "args", "=", "{", "}", "if", "'languages'", "in", "_dict", ":", "args", "[", "'languages'", "]", "=", "[", "IdentifiedLanguage", ".", "_from_dict", "(", "x", ")", "for", "x", "in", "(", "_dict"...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
Translation._to_dict
Return a json dictionary representing this model.
ibm_watson/language_translator_v3.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr( self, 'translation_output') and self.translation_output is not None: _dict['translation'] = self.translation_output return _dict
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr( self, 'translation_output') and self.translation_output is not None: _dict['translation'] = self.translation_output 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/language_translator_v3.py#L732-L739
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'translation_output'", ")", "and", "self", ".", "translation_output", "is", "not", "None", ":", "_dict", "[", "'translation'", "]", "=", "self", ".", ...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
TranslationModel._to_dict
Return a json dictionary representing this model.
ibm_watson/language_translator_v3.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, '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, 'model_id') and self.model_id is not None: _dict['model_id'] = self.model_id 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/language_translator_v3.py#L855-L878
[ "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
TranslationModels._from_dict
Initialize a TranslationModels object from a json dictionary.
ibm_watson/language_translator_v3.py
def _from_dict(cls, _dict): """Initialize a TranslationModels object from a json dictionary.""" args = {} if 'models' in _dict: args['models'] = [ TranslationModel._from_dict(x) for x in (_dict.get('models')) ] else: raise ValueError( ...
def _from_dict(cls, _dict): """Initialize a TranslationModels object from a json dictionary.""" args = {} if 'models' in _dict: args['models'] = [ TranslationModel._from_dict(x) for x in (_dict.get('models')) ] else: raise ValueError( ...
[ "Initialize", "a", "TranslationModels", "object", "from", "a", "json", "dictionary", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/language_translator_v3.py#L911-L922
[ "def", "_from_dict", "(", "cls", ",", "_dict", ")", ":", "args", "=", "{", "}", "if", "'models'", "in", "_dict", ":", "args", "[", "'models'", "]", "=", "[", "TranslationModel", ".", "_from_dict", "(", "x", ")", "for", "x", "in", "(", "_dict", ".",...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
TranslationResult._from_dict
Initialize a TranslationResult object from a json dictionary.
ibm_watson/language_translator_v3.py
def _from_dict(cls, _dict): """Initialize a TranslationResult object from a json dictionary.""" args = {} if 'word_count' in _dict: args['word_count'] = _dict.get('word_count') else: raise ValueError( 'Required property \'word_count\' not present i...
def _from_dict(cls, _dict): """Initialize a TranslationResult object from a json dictionary.""" args = {} if 'word_count' in _dict: args['word_count'] = _dict.get('word_count') else: raise ValueError( 'Required property \'word_count\' not present i...
[ "Initialize", "a", "TranslationResult", "object", "from", "a", "json", "dictionary", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/language_translator_v3.py#L970-L993
[ "def", "_from_dict", "(", "cls", ",", "_dict", ")", ":", "args", "=", "{", "}", "if", "'word_count'", "in", "_dict", ":", "args", "[", "'word_count'", "]", "=", "_dict", ".", "get", "(", "'word_count'", ")", "else", ":", "raise", "ValueError", "(", "...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
TranslationResult._to_dict
Return a json dictionary representing this model.
ibm_watson/language_translator_v3.py
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'word_count') and self.word_count is not None: _dict['word_count'] = self.word_count if hasattr(self, 'character_count') and self.character_count is not ...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'word_count') and self.word_count is not None: _dict['word_count'] = self.word_count if hasattr(self, 'character_count') and self.character_count is not ...
[ "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/language_translator_v3.py#L995-L1005
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'word_count'", ")", "and", "self", ".", "word_count", "is", "not", "None", ":", "_dict", "[", "'word_count'", "]", "=", "self", ".", "word_count", "...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
SpeechToTextV1.recognize
Recognize audio. Sends audio and returns transcription results for a recognition request. You can pass a maximum of 100 MB and a minimum of 100 bytes of audio with a request. The service automatically detects the endianness of the incoming audio and, for audio that includes multiple cha...
ibm_watson/speech_to_text_v1.py
def recognize(self, audio, model=None, language_customization_id=None, acoustic_customization_id=None, base_model_version=None, customization_weight=None, inactivity_timeout=None, ...
def recognize(self, audio, model=None, language_customization_id=None, acoustic_customization_id=None, base_model_version=None, customization_weight=None, inactivity_timeout=None, ...
[ "Recognize", "audio", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/speech_to_text_v1.py#L171-L438
[ "def", "recognize", "(", "self", ",", "audio", ",", "model", "=", "None", ",", "language_customization_id", "=", "None", ",", "acoustic_customization_id", "=", "None", ",", "base_model_version", "=", "None", ",", "customization_weight", "=", "None", ",", "inacti...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
SpeechToTextV1.register_callback
Register a callback. Registers a callback URL with the service for use with subsequent asynchronous recognition requests. The service attempts to register, or white-list, the callback URL if it is not already registered by sending a `GET` request to the callback URL. The service passes ...
ibm_watson/speech_to_text_v1.py
def register_callback(self, callback_url, user_secret=None, **kwargs): """ Register a callback. Registers a callback URL with the service for use with subsequent asynchronous recognition requests. The service attempts to register, or white-list, the callback URL if it is not alr...
def register_callback(self, callback_url, user_secret=None, **kwargs): """ Register a callback. Registers a callback URL with the service for use with subsequent asynchronous recognition requests. The service attempts to register, or white-list, the callback URL if it is not alr...
[ "Register", "a", "callback", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/speech_to_text_v1.py#L871-L939
[ "def", "register_callback", "(", "self", ",", "callback_url", ",", "user_secret", "=", "None", ",", "*", "*", "kwargs", ")", ":", "if", "callback_url", "is", "None", ":", "raise", "ValueError", "(", "'callback_url must be provided'", ")", "headers", "=", "{", ...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
SpeechToTextV1.unregister_callback
Unregister a callback. Unregisters a callback URL that was previously white-listed with a **Register a callback** request for use with the asynchronous interface. Once unregistered, the URL can no longer be used with asynchronous recognition requests. **See also:** [Unregistering a call...
ibm_watson/speech_to_text_v1.py
def unregister_callback(self, callback_url, **kwargs): """ Unregister a callback. Unregisters a callback URL that was previously white-listed with a **Register a callback** request for use with the asynchronous interface. Once unregistered, the URL can no longer be used with asy...
def unregister_callback(self, callback_url, **kwargs): """ Unregister a callback. Unregisters a callback URL that was previously white-listed with a **Register a callback** request for use with the asynchronous interface. Once unregistered, the URL can no longer be used with asy...
[ "Unregister", "a", "callback", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/speech_to_text_v1.py#L941-L976
[ "def", "unregister_callback", "(", "self", ",", "callback_url", ",", "*", "*", "kwargs", ")", ":", "if", "callback_url", "is", "None", ":", "raise", "ValueError", "(", "'callback_url must be provided'", ")", "headers", "=", "{", "}", "if", "'headers'", "in", ...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
SpeechToTextV1.create_language_model
Create a custom language model. Creates a new custom language model for a specified base model. The custom language model can be used only with the base model for which it is created. The model is owned by the instance of the service whose credentials are used to create it. **Se...
ibm_watson/speech_to_text_v1.py
def create_language_model(self, name, base_model_name, dialect=None, description=None, **kwargs): """ Create a custom language model. Creates a n...
def create_language_model(self, name, base_model_name, dialect=None, description=None, **kwargs): """ Create a custom language model. Creates a n...
[ "Create", "a", "custom", "language", "model", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/speech_to_text_v1.py#L982-L1053
[ "def", "create_language_model", "(", "self", ",", "name", ",", "base_model_name", ",", "dialect", "=", "None", ",", "description", "=", "None", ",", "*", "*", "kwargs", ")", ":", "if", "name", "is", "None", ":", "raise", "ValueError", "(", "'name must be p...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
SpeechToTextV1.list_language_models
List custom language models. Lists information about all custom language models that are owned by an instance of the service. Use the `language` parameter to see all custom language models for the specified language. Omit the parameter to see all custom language models for all languages...
ibm_watson/speech_to_text_v1.py
def list_language_models(self, language=None, **kwargs): """ List custom language models. Lists information about all custom language models that are owned by an instance of the service. Use the `language` parameter to see all custom language models for the specified language. O...
def list_language_models(self, language=None, **kwargs): """ List custom language models. Lists information about all custom language models that are owned by an instance of the service. Use the `language` parameter to see all custom language models for the specified language. O...
[ "List", "custom", "language", "models", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/speech_to_text_v1.py#L1123-L1160
[ "def", "list_language_models", "(", "self", ",", "language", "=", "None", ",", "*", "*", "kwargs", ")", ":", "headers", "=", "{", "}", "if", "'headers'", "in", "kwargs", ":", "headers", ".", "update", "(", "kwargs", ".", "get", "(", "'headers'", ")", ...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
SpeechToTextV1.train_language_model
Train a custom language model. Initiates the training of a custom language model with new resources such as corpora, grammars, and custom words. After adding, modifying, or deleting resources for a custom language model, use this method to begin the actual training of the model on the l...
ibm_watson/speech_to_text_v1.py
def train_language_model(self, customization_id, word_type_to_add=None, customization_weight=None, **kwargs): """ Train a custom language model. Initiates the training of a custom...
def train_language_model(self, customization_id, word_type_to_add=None, customization_weight=None, **kwargs): """ Train a custom language model. Initiates the training of a custom...
[ "Train", "a", "custom", "language", "model", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/speech_to_text_v1.py#L1199-L1284
[ "def", "train_language_model", "(", "self", ",", "customization_id", ",", "word_type_to_add", "=", "None", ",", "customization_weight", "=", "None", ",", "*", "*", "kwargs", ")", ":", "if", "customization_id", "is", "None", ":", "raise", "ValueError", "(", "'c...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
SpeechToTextV1.add_corpus
Add a corpus. Adds a single corpus text file of new training data to a custom language model. Use multiple requests to submit multiple corpus text files. You must use credentials for the instance of the service that owns a model to add a corpus to it. Adding a corpus does not affect the...
ibm_watson/speech_to_text_v1.py
def add_corpus(self, customization_id, corpus_name, corpus_file, allow_overwrite=None, **kwargs): """ Add a corpus. Adds a single corpus text file of new training data to a custom language model. ...
def add_corpus(self, customization_id, corpus_name, corpus_file, allow_overwrite=None, **kwargs): """ Add a corpus. Adds a single corpus text file of new training data to a custom language model. ...
[ "Add", "a", "corpus", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/speech_to_text_v1.py#L1335-L1441
[ "def", "add_corpus", "(", "self", ",", "customization_id", ",", "corpus_name", ",", "corpus_file", ",", "allow_overwrite", "=", "None", ",", "*", "*", "kwargs", ")", ":", "if", "customization_id", "is", "None", ":", "raise", "ValueError", "(", "'customization_...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
SpeechToTextV1.add_word
Add a custom word. Adds a custom word to a custom language model. The service populates the words resource for a custom model with out-of-vocabulary (OOV) words from each corpus or grammar that is added to the model. You can use this method to add a word or to modify an existing word in...
ibm_watson/speech_to_text_v1.py
def add_word(self, customization_id, word_name, word=None, sounds_like=None, display_as=None, **kwargs): """ Add a custom word. Adds a custom word to a custom language model. The service popula...
def add_word(self, customization_id, word_name, word=None, sounds_like=None, display_as=None, **kwargs): """ Add a custom word. Adds a custom word to a custom language model. The service popula...
[ "Add", "a", "custom", "word", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/speech_to_text_v1.py#L1559-L1656
[ "def", "add_word", "(", "self", ",", "customization_id", ",", "word_name", ",", "word", "=", "None", ",", "sounds_like", "=", "None", ",", "display_as", "=", "None", ",", "*", "*", "kwargs", ")", ":", "if", "customization_id", "is", "None", ":", "raise",...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
SpeechToTextV1.add_grammar
Add a grammar. Adds a single grammar file to a custom language model. Submit a plain text file in UTF-8 format that defines the grammar. Use multiple requests to submit multiple grammar files. You must use credentials for the instance of the service that owns a model to add a grammar to...
ibm_watson/speech_to_text_v1.py
def add_grammar(self, customization_id, grammar_name, grammar_file, content_type, allow_overwrite=None, **kwargs): """ Add a grammar. Adds a single grammar file to a custom la...
def add_grammar(self, customization_id, grammar_name, grammar_file, content_type, allow_overwrite=None, **kwargs): """ Add a grammar. Adds a single grammar file to a custom la...
[ "Add", "a", "grammar", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/speech_to_text_v1.py#L1889-L1993
[ "def", "add_grammar", "(", "self", ",", "customization_id", ",", "grammar_name", ",", "grammar_file", ",", "content_type", ",", "allow_overwrite", "=", "None", ",", "*", "*", "kwargs", ")", ":", "if", "customization_id", "is", "None", ":", "raise", "ValueError...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
SpeechToTextV1.add_audio
Add an audio resource. Adds an audio resource to a custom acoustic model. Add audio content that reflects the acoustic characteristics of the audio that you plan to transcribe. You must use credentials for the instance of the service that owns a model to add an audio resource to it. Add...
ibm_watson/speech_to_text_v1.py
def add_audio(self, customization_id, audio_name, audio_resource, contained_content_type=None, allow_overwrite=None, content_type=None, **kwargs): """ Add an audio resource. ...
def add_audio(self, customization_id, audio_name, audio_resource, contained_content_type=None, allow_overwrite=None, content_type=None, **kwargs): """ Add an audio resource. ...
[ "Add", "an", "audio", "resource", "." ]
watson-developer-cloud/python-sdk
python
https://github.com/watson-developer-cloud/python-sdk/blob/4c2c9df4466fcde88975da9ecd834e6ba95eb353/ibm_watson/speech_to_text_v1.py#L2475-L2644
[ "def", "add_audio", "(", "self", ",", "customization_id", ",", "audio_name", ",", "audio_resource", ",", "contained_content_type", "=", "None", ",", "allow_overwrite", "=", "None", ",", "content_type", "=", "None", ",", "*", "*", "kwargs", ")", ":", "if", "c...
4c2c9df4466fcde88975da9ecd834e6ba95eb353
train
AcousticModel._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, 'customization_id') and self.customization_id is not None: _dict['customization_id'] = self.customization_id if hasattr(self, 'created') and self.created...
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, 'created') and self.created...
[ "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#L2959-L2986
[ "def", "_to_dict", "(", "self", ")", ":", "_dict", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'customization_id'", ")", "and", "self", ".", "customization_id", "is", "not", "None", ":", "_dict", "[", "'customization_id'", "]", "=", "self", ".", ...
4c2c9df4466fcde88975da9ecd834e6ba95eb353