Skip to content

Commit beeb8a0

Browse files
committed
feat(nlu): nLU generated with new spec
1 parent ed54e99 commit beeb8a0

2 files changed

Lines changed: 11 additions & 18 deletions

File tree

natural-language-understanding/v1.ts

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* (C) Copyright IBM Corp. 2017, 2021.
2+
* (C) Copyright IBM Corp. 2017, 2022.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -1763,11 +1763,15 @@ namespace NaturalLanguageUnderstandingV1 {
17631763
models?: ClassificationsModel[];
17641764
}
17651765

1766-
/** Returns text classifications for the content. Supported languages: English only. */
1766+
/** Returns text classifications for the content. */
17671767
export interface ClassificationsOptions {
17681768
/** Enter a [custom
17691769
* model](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-customizing)
1770-
* ID of the classification model to be used.
1770+
* ID of the classifications model to be used.
1771+
*
1772+
* You can analyze tone by using a language-specific model ID. See [Tone analytics
1773+
* (Classifications)](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-tone_analytics)
1774+
* for more information.
17711775
*/
17721776
model?: string;
17731777
}
@@ -1919,10 +1923,7 @@ namespace NaturalLanguageUnderstandingV1 {
19191923

19201924
/** Analysis features and options. */
19211925
export interface Features {
1922-
/** Returns text classifications for the content.
1923-
*
1924-
* Supported languages: English only.
1925-
*/
1926+
/** Returns text classifications for the content. */
19261927
classifications?: ClassificationsOptions;
19271928
/** Returns high-level concepts in the content. For example, a research paper about deep learning might return
19281929
* the concept, "Artificial Intelligence" although the term is not mentioned.
@@ -1953,7 +1954,7 @@ namespace NaturalLanguageUnderstandingV1 {
19531954
/** Returns information from the document, including author name, title, RSS/ATOM feeds, prominent page image,
19541955
* and publication date. Supports URL and HTML input types only.
19551956
*/
1956-
metadata?: MetadataOptions;
1957+
metadata?: JsonObject;
19571958
/** Recognizes when two entities are related and identifies the type of relation. For example, an `awardedTo`
19581959
* relation might connect the entities "Nobel Prize" and "Albert Einstein". For more information, see [Relation
19591960
* types](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-relations).
@@ -2042,10 +2043,6 @@ namespace NaturalLanguageUnderstandingV1 {
20422043
models?: SentimentModel[];
20432044
}
20442045

2045-
/** Returns information from the document, including author name, title, RSS/ATOM feeds, prominent page image, and publication date. Supports URL and HTML input types only. */
2046-
export interface MetadataOptions {
2047-
}
2048-
20492046
/** Model. */
20502047
export interface Model {
20512048
/** When the status is `available`, the model is ready to use. */

test/unit/natural-language-understanding.v1.test.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* (C) Copyright IBM Corp. 2018, 2021.
2+
* (C) Copyright IBM Corp. 2022.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -176,10 +176,6 @@ describe('NaturalLanguageUnderstandingV1', () => {
176176
emotion: false,
177177
};
178178

179-
// MetadataOptions
180-
const metadataOptionsModel = {
181-
};
182-
183179
// RelationsOptions
184180
const relationsOptionsModel = {
185181
model: 'testString',
@@ -230,7 +226,7 @@ describe('NaturalLanguageUnderstandingV1', () => {
230226
emotion: emotionOptionsModel,
231227
entities: entitiesOptionsModel,
232228
keywords: keywordsOptionsModel,
233-
metadata: metadataOptionsModel,
229+
metadata: { 'key1': 'testString' },
234230
relations: relationsOptionsModel,
235231
semantic_roles: semanticRolesOptionsModel,
236232
sentiment: sentimentOptionsModel,

0 commit comments

Comments
 (0)