text stringlengths 81 112k |
|---|
Return a json dictionary representing this model.
def _to_dict(self):
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'document_id') and self.document_id is not None:
_dict['document_id'] = self.document_id
if hasattr(self,
... |
Initialize a TrainingExampleList object from a json dictionary.
def _from_dict(cls, _dict):
"""Initialize a TrainingExampleList object from a json dictionary."""
args = {}
if 'examples' in _dict:
args['examples'] = [
TrainingExample._from_dict(x) for x in (_dict.get(... |
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]
return _dict |
Initialize a TrainingQuery object from a json dictionary.
def _from_dict(cls, _dict):
"""Initialize a TrainingQuery object from a json dictionary."""
args = {}
if 'query_id' in _dict:
args['query_id'] = _dict.get('query_id')
if 'natural_language_query' in _dict:
... |
Return a json dictionary representing this model.
def _to_dict(self):
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'query_id') and self.query_id is not None:
_dict['query_id'] = self.query_id
if hasattr(self, 'natural_language_query'
... |
Return a json dictionary representing this model.
def _to_dict(self):
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'total_examples') and self.total_examples is not None:
_dict['total_examples'] = self.total_examples
if hasattr(self, 'av... |
Initialize a WordHeadingDetection object from a json dictionary.
def _from_dict(cls, _dict):
"""Initialize a WordHeadingDetection object from a json dictionary."""
args = {}
if 'fonts' in _dict:
args['fonts'] = [
FontSetting._from_dict(x) for x in (_dict.get('fonts')... |
Return a json dictionary representing this model.
def _to_dict(self):
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'fonts') and self.fonts is not None:
_dict['fonts'] = [x._to_dict() for x in self.fonts]
if hasattr(self, 'styles') and s... |
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, 'names') and self.names 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, 'xpaths') and self.xpaths is not None:
_dict['xpaths'] = self.xpaths
return _dict |
Analyze general tone.
Use the general purpose endpoint to analyze the tone of your input content. The
service analyzes the content for emotional and language tones. The method always
analyzes the tone of the full document; by default, it also analyzes the tone of
each individual sentenc... |
Analyze customer engagement tone.
Use the customer engagement endpoint to analyze the tone of customer service and
customer support conversations. For each utterance of a conversation, the method
reports the most prevalent subset of the following seven tones: sad, frustrated,
satisfied,... |
Initialize a DocumentAnalysis object from a json dictionary.
def _from_dict(cls, _dict):
"""Initialize a DocumentAnalysis object from a json dictionary."""
args = {}
if 'tones' in _dict:
args['tones'] = [
ToneScore._from_dict(x) for x in (_dict.get('tones'))
... |
Return a json dictionary representing this model.
def _to_dict(self):
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'tones') and self.tones is not None:
_dict['tones'] = [x._to_dict() for x in self.tones]
if hasattr(self,
... |
Initialize a SentenceAnalysis object from a json dictionary.
def _from_dict(cls, _dict):
"""Initialize a SentenceAnalysis object from a json dictionary."""
args = {}
if 'sentence_id' in _dict:
args['sentence_id'] = _dict.get('sentence_id')
else:
raise ValueError(... |
Return a json dictionary representing this model.
def _to_dict(self):
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'sentence_id') and self.sentence_id is not None:
_dict['sentence_id'] = self.sentence_id
if hasattr(self, 'text') and sel... |
Initialize a ToneAnalysis object from a json dictionary.
def _from_dict(cls, _dict):
"""Initialize a ToneAnalysis object from a json dictionary."""
args = {}
if 'document_tone' in _dict:
args['document_tone'] = DocumentAnalysis._from_dict(
_dict.get('document_tone'))... |
Return a json dictionary representing this model.
def _to_dict(self):
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'document_tone') and self.document_tone is not None:
_dict['document_tone'] = self.document_tone._to_dict()
if hasattr(se... |
Initialize a ToneCategory object from a json dictionary.
def _from_dict(cls, _dict):
"""Initialize a ToneCategory object from a json dictionary."""
args = {}
if 'tones' in _dict:
args['tones'] = [
ToneScore._from_dict(x) for x in (_dict.get('tones'))
]
... |
Return a json dictionary representing this model.
def _to_dict(self):
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'tones') and self.tones is not None:
_dict['tones'] = [x._to_dict() for x in self.tones]
if hasattr(self, 'category_id') ... |
Return a json dictionary representing this model.
def _to_dict(self):
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self, 'score') and self.score is not None:
_dict['score'] = self.score
if hasattr(self, 'tone_id') and self.tone_id is not None... |
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, 'user') and self.user is not None:
... |
Initialize a UtteranceAnalyses object from a json dictionary.
def _from_dict(cls, _dict):
"""Initialize a UtteranceAnalyses object from a json dictionary."""
args = {}
if 'utterances_tone' in _dict:
args['utterances_tone'] = [
UtteranceAnalysis._from_dict(x)
... |
Return a json dictionary representing this model.
def _to_dict(self):
"""Return a json dictionary representing this model."""
_dict = {}
if hasattr(self,
'utterances_tone') and self.utterances_tone is not None:
_dict['utterances_tone'] = [
x._to_di... |
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 ValueE... |
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_... |
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... |
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... |
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_... |
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
... |
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... |
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.
... |
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... |
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... |
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 ... |
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... |
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... |
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... |
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[... |
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
... |
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:
... |
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_di... |
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... |
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... |
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 No... |
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(
... |
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') ... |
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 h... |
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.dia... |
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_... |
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, 'modifi... |
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... |
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:... |
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')... |
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 _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 ... |
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, 'pa... |
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, 'pa... |
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, 'pagina... |
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(
... |
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... |
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 ValueEr... |
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 s... |
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:
... |
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... |
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 no... |
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... |
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 _... |
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:
... |
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 ... |
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 i... |
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 h... |
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']
... |
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 no... |
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']
... |
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 i... |
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 ... |
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, 'pa... |
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'))
... |
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... |
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... |
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 ... |
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(s... |
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(
_di... |
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') an... |
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'
... |
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'] = se... |
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... |
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... |
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... |
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:
ar... |
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') ... |
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 _... |
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') ... |
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 s... |
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:
... |
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('classifi... |
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... |
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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.