You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: natural-language-classifier/v1-generated.ts
+81-4Lines changed: 81 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -97,6 +97,49 @@ class NaturalLanguageClassifierV1 extends BaseService {
97
97
returncreateRequest(parameters,_callback);
98
98
};
99
99
100
+
/**
101
+
* Classify multiple phrases.
102
+
*
103
+
* 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.
104
+
*
105
+
* @param {Object} params - The parameters to send to the service.
106
+
* @param {string} params.classifier_id - Classifier ID to use.
107
+
* @param {ClassifyInput[]} params.collection - The submitted phrases.
108
+
* @param {Function} [callback] - The callback that handles the response.
@@ -107,8 +150,8 @@ class NaturalLanguageClassifierV1 extends BaseService {
107
150
* Sends data to create and train a classifier and returns information about the new classifier.
108
151
*
109
152
* @param {Object} params - The parameters to send to the service.
110
-
* @param {NodeJS.ReadableStream|FileObject|Buffer} params.metadata - Metadata in JSON format. The metadata identifies the language of the data, and an optional name to identify the classifier.
111
-
* @param {NodeJS.ReadableStream|FileObject|Buffer} params.training_data - Training data in CSV format. Each text value must have at least one class. The data can include up to 15,000 records. For details, see [Using your own data](https://console.bluemix.net/docs/services/natural-language-classifier/using-your-data.html).
153
+
* @param {NodeJS.ReadableStream|FileObject|Buffer} params.metadata - Metadata in JSON format. The metadata identifies the language of the data, and an optional name to identify the classifier. Specify the language with the 2-letter primary language code as assigned in ISO standard 639. Supported languages are English (`en`), Arabic (`ar`), French (`fr`), German, (`de`), Italian (`it`), Japanese (`ja`), Korean (`ko`), Brazilian Portuguese (`pt`), and Spanish (`es`).
154
+
* @param {NodeJS.ReadableStream|FileObject|Buffer} params.training_data - Training data in CSV format. Each text value must have at least one class. The data can include up to 20,000 records. For details, see [Data preparation](https://console.bluemix.net/docs/services/natural-language-classifier/using-your-data.html).
112
155
* @param {Function} [callback] - The callback that handles the response.
/** Parameters for the `classifyCollection` operation. */
330
+
exportinterfaceClassifyCollectionParams{
331
+
/** Classifier ID to use. */
332
+
classifier_id: string;
333
+
/** The submitted phrases. */
334
+
collection: ClassifyInput[];
335
+
}
336
+
286
337
/** Parameters for the `createClassifier` operation. */
287
338
exportinterfaceCreateClassifierParams{
288
-
/** Metadata in JSON format. The metadata identifies the language of the data, and an optional name to identify the classifier. */
339
+
/** Metadata in JSON format. The metadata identifies the language of the data, and an optional name to identify the classifier. Specify the language with the 2-letter primary language code as assigned in ISO standard 639. Supported languages are English (`en`), Arabic (`ar`), French (`fr`), German, (`de`), Italian (`it`), Japanese (`ja`), Korean (`ko`), Brazilian Portuguese (`pt`), and Spanish (`es`). */
/** Training data in CSV format. Each text value must have at least one class. The data can include up to 15,000 records. For details, see [Using your own data](https://console.bluemix.net/docs/services/natural-language-classifier/using-your-data.html). */
341
+
/** Training data in CSV format. Each text value must have at least one class. The data can include up to 20,000 records. For details, see [Data preparation](https://console.bluemix.net/docs/services/natural-language-classifier/using-your-data.html). */
assert.equal(result.images[0].faces.length,1,'There should be exactly one face detected');// note: the api was sometimes failing to detect any faces right after the release
assert.equal(result.images[0].faces.length,1,'There should be exactly one face detected');// note: the api was sometimes failing to detect any faces right after the release
0 commit comments