Skip to content

Commit 2f5a186

Browse files
authored
Merge pull request #756 from watson-developer-cloud/feat/aug-release
Feat/aug release
2 parents 83370b7 + a091f24 commit 2f5a186

32 files changed

+5711
-983
lines changed

examples/assistant_v2.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,8 @@
3131
}
3232
}).get_result()
3333
print(json.dumps(message, indent=2))
34+
35+
# logs = assistant.list_logs(
36+
# "<YOUR ASSISTANT ID>"
37+
# )
38+
# print(json.dumps(logs, indent=2))

ibm_watson/assistant_v1.py

Lines changed: 11 additions & 130 deletions
Large diffs are not rendered by default.

ibm_watson/assistant_v2.py

Lines changed: 563 additions & 25 deletions
Large diffs are not rendered by default.

ibm_watson/compare_comply_v1.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
class CompareComplyV1(BaseService):
4141
"""The Compare Comply V1 service."""
4242

43-
DEFAULT_SERVICE_URL = 'https://gateway.watsonplatform.net/compare-comply/api'
43+
DEFAULT_SERVICE_URL = 'https://api.us-south.compare-comply.watson.cloud.ibm.com'
4444
DEFAULT_SERVICE_NAME = 'compare_comply'
4545

4646
def __init__(

ibm_watson/discovery_v1.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
class DiscoveryV1(BaseService):
4646
"""The Discovery V1 service."""
4747

48-
DEFAULT_SERVICE_URL = 'https://gateway.watsonplatform.net/discovery/api'
48+
DEFAULT_SERVICE_URL = 'https://api.us-south.discovery.watson.cloud.ibm.com'
4949
DEFAULT_SERVICE_NAME = 'discovery'
5050

5151
def __init__(

ibm_watson/discovery_v2.py

Lines changed: 3083 additions & 674 deletions
Large diffs are not rendered by default.

ibm_watson/language_translator_v3.py

Lines changed: 376 additions & 53 deletions
Large diffs are not rendered by default.

ibm_watson/natural_language_classifier_v1.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
class NaturalLanguageClassifierV1(BaseService):
4242
"""The Natural Language Classifier V1 service."""
4343

44-
DEFAULT_SERVICE_URL = 'https://gateway.watsonplatform.net/natural-language-classifier/api'
44+
DEFAULT_SERVICE_URL = 'https://api.us-south.natural-language-classifier.watson.cloud.ibm.com'
4545
DEFAULT_SERVICE_NAME = 'natural_language_classifier'
4646

4747
def __init__(

ibm_watson/natural_language_understanding_v1.py

Lines changed: 40 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
class NaturalLanguageUnderstandingV1(BaseService):
4545
"""The Natural Language Understanding V1 service."""
4646

47-
DEFAULT_SERVICE_URL = 'https://gateway.watsonplatform.net/natural-language-understanding/api'
47+
DEFAULT_SERVICE_URL = 'https://api.us-south.natural-language-understanding.watson.cloud.ibm.com'
4848
DEFAULT_SERVICE_NAME = 'natural-language-understanding'
4949

5050
def __init__(
@@ -110,7 +110,7 @@ def analyze(self,
110110
- Relations
111111
- Semantic roles
112112
- Sentiment
113-
- Syntax (Experimental).
113+
- Syntax.
114114
If a language for the input text is not specified with the `language` parameter,
115115
the service [automatically detects the
116116
language](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-detectable-languages).
@@ -123,9 +123,8 @@ def analyze(self,
123123
:param str url: (optional) The webpage to analyze. One of the `text`,
124124
`html`, or `url` parameters is required.
125125
:param bool clean: (optional) Set this to `false` to disable webpage
126-
cleaning. To learn more about webpage cleaning, see the [Analyzing
127-
webpages](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-analyzing-webpages)
128-
documentation.
126+
cleaning. For more information about webpage cleaning, see [Analyzing
127+
webpages](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-analyzing-webpages).
129128
:param str xpath: (optional) An [XPath
130129
query](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-analyzing-webpages#xpath)
131130
to perform on `html` or `url` input. Results of the query will be appended
@@ -137,10 +136,9 @@ def analyze(self,
137136
analyzed text.
138137
:param str language: (optional) ISO 639-1 code that specifies the language
139138
of your text. This overrides automatic language detection. Language support
140-
differs depending on the features you include in your analysis. See
141-
[Language
142-
support](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-language-support)
143-
for more information.
139+
differs depending on the features you include in your analysis. For more
140+
information, see [Language
141+
support](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-language-support).
144142
:param int limit_text_characters: (optional) Sets the maximum number of
145143
characters that are processed by the service.
146144
:param dict headers: A `dict` containing the request headers
@@ -872,9 +870,8 @@ class CategoriesResult():
872870
A categorization of the analyzed text.
873871
874872
:attr str label: (optional) The path to the category through the 5-level
875-
taxonomy hierarchy. For the complete list of categories, see the [Categories
876-
hierarchy](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-categories#categories-hierarchy)
877-
documentation.
873+
taxonomy hierarchy. For more information about the categories, see [Categories
874+
hierarchy](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-categories#categories-hierarchy).
878875
:attr float score: (optional) Confidence score for the category classification.
879876
Higher values indicate greater confidence.
880877
:attr CategoriesResultExplanation explanation: (optional) Information that helps
@@ -890,10 +887,9 @@ def __init__(self,
890887
Initialize a CategoriesResult object.
891888
892889
:param str label: (optional) The path to the category through the 5-level
893-
taxonomy hierarchy. For the complete list of categories, see the
890+
taxonomy hierarchy. For more information about the categories, see
894891
[Categories
895-
hierarchy](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-categories#categories-hierarchy)
896-
documentation.
892+
hierarchy](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-categories#categories-hierarchy).
897893
:param float score: (optional) Confidence score for the category
898894
classification. Higher values indicate greater confidence.
899895
:param CategoriesResultExplanation explanation: (optional) Information that
@@ -1713,8 +1709,8 @@ def __ne__(self, other: 'EmotionScores') -> bool:
17131709

17141710
class EntitiesOptions():
17151711
"""
1716-
Identifies people, cities, organizations, and other entities in the content. See
1717-
[Entity types and
1712+
Identifies people, cities, organizations, and other entities in the content. For more
1713+
information, see [Entity types and
17181714
subtypes](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-entity-types).
17191715
Supported languages: English, French, German, Italian, Japanese, Korean, Portuguese,
17201716
Russian, Spanish, Swedish. Arabic, Chinese, and Dutch are supported only through
@@ -2133,7 +2129,8 @@ class Features():
21332129
entities with `entities.emotion` and for keywords with `keywords.emotion`.
21342130
Supported languages: English.
21352131
:attr EntitiesOptions entities: (optional) Identifies people, cities,
2136-
organizations, and other entities in the content. See [Entity types and
2132+
organizations, and other entities in the content. For more information, see
2133+
[Entity types and
21372134
subtypes](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-entity-types).
21382135
Supported languages: English, French, German, Italian, Japanese, Korean,
21392136
Portuguese, Russian, Spanish, Swedish. Arabic, Chinese, and Dutch are supported
@@ -2147,8 +2144,8 @@ class Features():
21472144
and publication date. Supports URL and HTML input types only.
21482145
:attr RelationsOptions relations: (optional) Recognizes when two entities are
21492146
related and identifies the type of relation. For example, an `awardedTo`
2150-
relation might connect the entities "Nobel Prize" and "Albert Einstein". See
2151-
[Relation
2147+
relation might connect the entities "Nobel Prize" and "Albert Einstein". For
2148+
more information, see [Relation
21522149
types](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-relations).
21532150
Supported languages: Arabic, English, German, Japanese, Korean, Spanish.
21542151
Chinese, Dutch, French, Italian, and Portuguese custom models are also
@@ -2197,7 +2194,8 @@ def __init__(self,
21972194
`keywords.emotion`.
21982195
Supported languages: English.
21992196
:param EntitiesOptions entities: (optional) Identifies people, cities,
2200-
organizations, and other entities in the content. See [Entity types and
2197+
organizations, and other entities in the content. For more information, see
2198+
[Entity types and
22012199
subtypes](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-entity-types).
22022200
Supported languages: English, French, German, Italian, Japanese, Korean,
22032201
Portuguese, Russian, Spanish, Swedish. Arabic, Chinese, and Dutch are
@@ -2212,7 +2210,7 @@ def __init__(self,
22122210
:param RelationsOptions relations: (optional) Recognizes when two entities
22132211
are related and identifies the type of relation. For example, an
22142212
`awardedTo` relation might connect the entities "Nobel Prize" and "Albert
2215-
Einstein". See [Relation
2213+
Einstein". For more information, see [Relation
22162214
types](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-relations).
22172215
Supported languages: Arabic, English, German, Japanese, Korean, Spanish.
22182216
Chinese, Dutch, French, Italian, and Portuguese custom models are also
@@ -2696,7 +2694,7 @@ class Model():
26962694
:attr str status: (optional) When the status is `available`, the model is ready
26972695
to use.
26982696
:attr str model_id: (optional) Unique model ID.
2699-
:attr str language: (optional) ISO 639-1 code indicating the language of the
2697+
:attr str language: (optional) ISO 639-1 code that indicates the language of the
27002698
model.
27012699
:attr str description: (optional) Model description.
27022700
:attr str workspace_id: (optional) ID of the Watson Knowledge Studio workspace
@@ -2728,8 +2726,8 @@ def __init__(self,
27282726
:param str status: (optional) When the status is `available`, the model is
27292727
ready to use.
27302728
:param str model_id: (optional) Unique model ID.
2731-
:param str language: (optional) ISO 639-1 code indicating the language of
2732-
the model.
2729+
:param str language: (optional) ISO 639-1 code that indicates the language
2730+
of the model.
27332731
:param str description: (optional) Model description.
27342732
:param str workspace_id: (optional) ID of the Watson Knowledge Studio
27352733
workspace that deployed this model to Natural Language Understanding.
@@ -2833,6 +2831,17 @@ def __ne__(self, other: 'Model') -> bool:
28332831
"""Return `true` when self and other are not equal, false otherwise."""
28342832
return not self == other
28352833

2834+
class StatusEnum(Enum):
2835+
"""
2836+
When the status is `available`, the model is ready to use.
2837+
"""
2838+
STARTING = "starting"
2839+
TRAINING = "training"
2840+
DEPLOYING = "deploying"
2841+
AVAILABLE = "available"
2842+
ERROR = "error"
2843+
DELETED = "deleted"
2844+
28362845

28372846
class RelationArgument():
28382847
"""
@@ -2988,7 +2997,7 @@ class RelationsOptions():
29882997
"""
29892998
Recognizes when two entities are related and identifies the type of relation. For
29902999
example, an `awardedTo` relation might connect the entities "Nobel Prize" and "Albert
2991-
Einstein". See [Relation
3000+
Einstein". For more information, see [Relation
29923001
types](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-relations).
29933002
Supported languages: Arabic, English, German, Japanese, Korean, Spanish. Chinese,
29943003
Dutch, French, Italian, and Portuguese custom models are also supported.
@@ -4351,8 +4360,8 @@ class TokenResult():
43514360
TokenResult.
43524361
43534362
:attr str text: (optional) The token as it appears in the analyzed text.
4354-
:attr str part_of_speech: (optional) The part of speech of the token. For
4355-
descriptions of the values, see [Universal Dependencies POS
4363+
:attr str part_of_speech: (optional) The part of speech of the token. For more
4364+
information about the values, see [Universal Dependencies POS
43564365
tags](https://universaldependencies.org/u/pos/).
43574366
:attr List[int] location: (optional) Character offsets indicating the beginning
43584367
and end of the token in the analyzed text.
@@ -4371,7 +4380,7 @@ def __init__(self,
43714380
43724381
:param str text: (optional) The token as it appears in the analyzed text.
43734382
:param str part_of_speech: (optional) The part of speech of the token. For
4374-
descriptions of the values, see [Universal Dependencies POS
4383+
more information about the values, see [Universal Dependencies POS
43754384
tags](https://universaldependencies.org/u/pos/).
43764385
:param List[int] location: (optional) Character offsets indicating the
43774386
beginning and end of the token in the analyzed text.
@@ -4441,8 +4450,8 @@ def __ne__(self, other: 'TokenResult') -> bool:
44414450

44424451
class PartOfSpeechEnum(Enum):
44434452
"""
4444-
The part of speech of the token. For descriptions of the values, see [Universal
4445-
Dependencies POS tags](https://universaldependencies.org/u/pos/).
4453+
The part of speech of the token. For more information about the values, see
4454+
[Universal Dependencies POS tags](https://universaldependencies.org/u/pos/).
44464455
"""
44474456
ADJ = "ADJ"
44484457
ADP = "ADP"

ibm_watson/personality_insights_v3.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
class PersonalityInsightsV3(BaseService):
5252
"""The Personality Insights V3 service."""
5353

54-
DEFAULT_SERVICE_URL = 'https://gateway.watsonplatform.net/personality-insights/api'
54+
DEFAULT_SERVICE_URL = 'https://api.us-south.personality-insights.watson.cloud.ibm.com'
5555
DEFAULT_SERVICE_NAME = 'personality_insights'
5656

5757
def __init__(

0 commit comments

Comments
 (0)