INSTRUCTION stringlengths 1 8.43k | RESPONSE stringlengths 75 104k |
|---|---|
Initialize a UtteranceAnalysis object from a json dictionary. | 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... |
Return a json dictionary representing this model. | 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:
... |
Get response to user input. | def message(self,
workspace_id,
input=None,
intents=None,
entities=None,
alternate_intents=None,
context=None,
output=None,
nodes_visited_details=None,
**kwargs):
"""
... |
List workspaces. | def list_workspaces(self,
page_limit=None,
include_count=None,
sort=None,
cursor=None,
include_audit=None,
**kwargs):
"""
List workspaces.
List the wor... |
Update workspace. | def update_workspace(self,
workspace_id,
name=None,
description=None,
language=None,
metadata=None,
learning_opt_out=None,
system_settings=None,
... |
Create intent. | 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 ... |
Update intent. | def update_intent(self,
workspace_id,
intent,
new_intent=None,
new_description=None,
new_examples=None,
**kwargs):
"""
Update intent.
Update an existing intent wit... |
Create user input example. | 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 entity. | def create_entity(self,
workspace_id,
entity,
description=None,
metadata=None,
fuzzy_match=None,
values=None,
**kwargs):
"""
Create entity.
C... |
Update entity. | def update_entity(self,
workspace_id,
entity,
new_entity=None,
new_description=None,
new_metadata=None,
new_fuzzy_match=None,
new_values=None,
*... |
Create entity value. | def create_value(self,
workspace_id,
entity,
value,
metadata=None,
value_type=None,
synonyms=None,
patterns=None,
**kwargs):
"""
Create ... |
Update entity value. | def update_value(self,
workspace_id,
entity,
value,
new_value=None,
new_metadata=None,
new_value_type=None,
new_synonyms=None,
new_patterns=None,
... |
Create dialog node. | def create_dialog_node(self,
workspace_id,
dialog_node,
description=None,
conditions=None,
parent=None,
previous_sibling=None,
outp... |
Update dialog node. | def update_dialog_node(self,
workspace_id,
dialog_node,
new_dialog_node=None,
new_description=None,
new_conditions=None,
new_parent=None,
... |
Initialize a Context object from a json dictionary. | 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:
... |
Return a json dictionary representing this model. | 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. | 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. | 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. | 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. | 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. | 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
... |
Initialize a DialogNode object from a json dictionary. | 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... |
Return a json dictionary representing this model. | 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. | 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. | 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... |
Initialize a DialogNodeOutput object from a json dictionary. | 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'))
... |
Return a json dictionary representing this model. | 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. | 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. | 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 |
Initialize a DialogRuntimeResponseGeneric object from a json dictionary. | 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... |
Return a json dictionary representing this model. | 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... |
Initialize a DialogSuggestionValue object from a json dictionary. | 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.... |
Return a json dictionary representing this model. | 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. | 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. | 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. | 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:
... |
Initialize a Log object from a json dictionary. | 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 ... |
Return a json dictionary representing this model. | 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'... |
Initialize a LogCollection object from a json dictionary. | 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... |
Return a json dictionary representing this model. | 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. | 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. | 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. | 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. | 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. | 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:
... |
Initialize a MessageRequest object from a json dictionary. | 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... |
Return a json dictionary representing this model. | 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_... |
Initialize a OutputData object from a json dictionary. | 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'))
]
... |
Return a json dictionary representing this model. | 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:
... |
Initialize a RuntimeEntity object from a json dictionary. | 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... |
Return a json dictionary representing this model. | 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... |
Initialize a RuntimeIntent object from a json dictionary. | 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... |
Return a json dictionary representing this model. | 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. | 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. | 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:
... |
Initialize a ValueCollection object from a json dictionary. | 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(
... |
Return a json dictionary representing this model. | 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... |
Initialize a Workspace object from a json dictionary. | 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... |
Return a json dictionary representing this model. | 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. | 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:... |
Initialize a WorkspaceSystemSettings object from a json dictionary. | 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:
... |
Return a json dictionary representing this model. | 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. | 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. | 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 |
Classify a phrase. | 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 multiple phrases. | 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... |
Create classifier. | 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... |
Initialize a Classification object from a json dictionary. | 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:
... |
Return a json dictionary representing this model. | 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'] ... |
Initialize a ClassificationCollection object from a json dictionary. | 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... |
Return a json dictionary representing this model. | 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. | 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. | 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, ... |
Initialize a ClassifierList object from a json dictionary. | 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... |
Return a json dictionary representing this model. | 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
... |
Translate. | 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... |
Identify language. | 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... |
Create model. | 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... |
Return a json dictionary representing this model. | 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. | 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
... |
Initialize a IdentifiableLanguages object from a json dictionary. | 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... |
Return a json dictionary representing this model. | 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. | 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']... |
Initialize a IdentifiedLanguages object from a json dictionary. | 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:
... |
Return a json dictionary representing this model. | 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. | 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
... |
Initialize a TranslationModels object from a json dictionary. | 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 TranslationResult object from a json dictionary. | 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... |
Return a json dictionary representing this model. | 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 ... |
Recognize audio. | def recognize(self,
audio,
model=None,
language_customization_id=None,
acoustic_customization_id=None,
base_model_version=None,
customization_weight=None,
inactivity_timeout=None,
... |
Register a callback. | 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... |
Unregister a callback. | 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... |
Create a custom language model. | def create_language_model(self,
name,
base_model_name,
dialect=None,
description=None,
**kwargs):
"""
Create a custom language model.
Creates a n... |
List custom language models. | 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... |
Train a custom language model. | 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... |
Add a corpus. | 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 custom word. | 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 grammar. | 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 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.
... |
Return a json dictionary representing this model. | 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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.