Skip to content

Commit da15f4d

Browse files
committed
chore(nlu): regenerate NLU
1 parent cc9eace commit da15f4d

File tree

1 file changed

+30
-16
lines changed

1 file changed

+30
-16
lines changed

ibm_watson/natural_language_understanding_v1.py

Lines changed: 30 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# coding: utf-8
22

3-
# (C) Copyright IBM Corp. 2019, 2020.
3+
# (C) Copyright IBM Corp. 2020.
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.
@@ -30,8 +30,9 @@
3030
from datetime import datetime
3131
from enum import Enum
3232
from ibm_cloud_sdk_core import BaseService
33+
from ibm_cloud_sdk_core import DetailedResponse
3334
from ibm_cloud_sdk_core import datetime_to_string, string_to_datetime
34-
from ibm_cloud_sdk_core import get_authenticator_from_environment
35+
from ibm_cloud_sdk_core.get_authenticator import get_authenticator_from_environment
3536
from typing import Dict
3637
from typing import List
3738

@@ -716,37 +717,46 @@ class CategoriesOptions():
716717
:attr bool explanation: (optional) Set this to `true` to return explanations for
717718
each categorization. **This is available only for English categories.**.
718719
:attr int limit: (optional) Maximum number of categories to return.
719-
:attr str model: (optional) Deprecated: Enter a [custom model]
720-
(https://cloud.ibm.com/docs/services/natural-language-understanding?topic=natural-language-understanding-customizing)
721-
ID to override the standard categories model. The custom categories experimental feature will be retired on
722-
19 December 2019. On that date, deployed custom categories models will no longer be accessible in Natural Language
723-
Understanding. The feature will be removed from Knowledge Studio on an earlier date. Custom categories models will
724-
no longer be accessible in Knowledge Studio on 17 December 2019.
720+
:attr str model: (optional) Enter a [custom
721+
model](https://cloud.ibm.com/docs/services/natural-language-understanding?topic=natural-language-understanding-customizing)
722+
ID to override the standard categories model.
723+
The custom categories experimental feature will be retired on 19 December 2019.
724+
On that date, deployed custom categories models will no longer be accessible in
725+
Natural Language Understanding. The feature will be removed from Knowledge
726+
Studio on an earlier date. Custom categories models will no longer be accessible
727+
in Knowledge Studio on 17 December 2019.
725728
"""
726729

727-
def __init__(self, *, explanation: bool = None, limit: int = None, model: str = None) -> None:
730+
def __init__(self,
731+
*,
732+
explanation: bool = None,
733+
limit: int = None,
734+
model: str = None) -> None:
728735
"""
729736
Initialize a CategoriesOptions object.
730737
731738
:param bool explanation: (optional) Set this to `true` to return
732739
explanations for each categorization. **This is available only for English
733740
categories.**.
734741
:param int limit: (optional) Maximum number of categories to return.
735-
:attr str model: (optional) Deprecated: Enter a [custom model]
736-
(https://cloud.ibm.com/docs/services/natural-language-understanding?topic=natural-language-understanding-customizing)
737-
ID to override the standard categories model. The custom categories experimental feature will be retired on
738-
19 December 2019. On that date, deployed custom categories models will no longer be accessible in Natural Language
739-
Understanding. The feature will be removed from Knowledge Studio on an earlier date. Custom categories models will
740-
no longer be accessible in Knowledge Studio on 17 December 2019.
742+
:param str model: (optional) Enter a [custom
743+
model](https://cloud.ibm.com/docs/services/natural-language-understanding?topic=natural-language-understanding-customizing)
744+
ID to override the standard categories model.
745+
The custom categories experimental feature will be retired on 19 December
746+
2019. On that date, deployed custom categories models will no longer be
747+
accessible in Natural Language Understanding. The feature will be removed
748+
from Knowledge Studio on an earlier date. Custom categories models will no
749+
longer be accessible in Knowledge Studio on 17 December 2019.
741750
"""
742751
self.explanation = explanation
743752
self.limit = limit
753+
self.model = model
744754

745755
@classmethod
746756
def from_dict(cls, _dict: Dict) -> 'CategoriesOptions':
747757
"""Initialize a CategoriesOptions object from a json dictionary."""
748758
args = {}
749-
valid_keys = ['explanation', 'limit']
759+
valid_keys = ['explanation', 'limit', 'model']
750760
bad_keys = set(_dict.keys()) - set(valid_keys)
751761
if bad_keys:
752762
raise ValueError(
@@ -756,6 +766,8 @@ def from_dict(cls, _dict: Dict) -> 'CategoriesOptions':
756766
args['explanation'] = _dict.get('explanation')
757767
if 'limit' in _dict:
758768
args['limit'] = _dict.get('limit')
769+
if 'model' in _dict:
770+
args['model'] = _dict.get('model')
759771
return cls(**args)
760772

761773
@classmethod
@@ -770,6 +782,8 @@ def to_dict(self) -> Dict:
770782
_dict['explanation'] = self.explanation
771783
if hasattr(self, 'limit') and self.limit is not None:
772784
_dict['limit'] = self.limit
785+
if hasattr(self, 'model') and self.model is not None:
786+
_dict['model'] = self.model
773787
return _dict
774788

775789
def _to_dict(self):

0 commit comments

Comments
 (0)