Skip to content

Commit c3812e3

Browse files
Merge pull request #388 from watson-developer-cloud/codegen/nlc
Regenerate natural language classifier
2 parents 074b61b + aa092b1 commit c3812e3

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

watson_developer_cloud/natural_language_classifier_v1.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,14 +67,13 @@ def __init__(self, url=default_url, username=None, password=None):
6767
use_vcap_services=True)
6868

6969
#########################
70-
# naturallanguageclassifier
70+
# Classify text
7171
#########################
7272

7373
def classify(self, classifier_id, text):
7474
"""
7575
Returns label information for the input. The status must be `Available` before you
76-
can use the classifier to classify text. Use `Get information about a classifier`
77-
to retrieve the status.
76+
can use the classifier to classify text.
7877
7978
:param str classifier_id: Classifier ID to use.
8079
:param str text: The submitted phrase.
@@ -92,6 +91,10 @@ def classify(self, classifier_id, text):
9291
method='POST', url=url, json=data, accept_json=True)
9392
return response
9493

94+
#########################
95+
# Manage classifiers
96+
#########################
97+
9598
def create_classifier(self,
9699
metadata,
97100
training_data,
@@ -103,8 +106,8 @@ def create_classifier(self,
103106
Sends data to create and train a classifier and returns information about the new
104107
classifier.
105108
106-
:param file metadata: Metadata in JSON format. The metadata identifies the language of the data, and an optional name to identify the classifier. For details, see the [API reference](https://www.ibm.com/watson/developercloud/natural-language-classifier/api/v1/#create_classifier).
107-
:param file 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://www.ibm.com/watson/developercloud/doc/natural-language-classifier/using-your-data.html).
109+
:param file metadata: Metadata in JSON format. The metadata identifies the language of the data, and an optional name to identify the classifier.
110+
:param file 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).
108111
:param str metadata_filename: The filename for training_metadata.
109112
:param str training_data_filename: The filename for training_data.
110113
:return: A `dict` containing the `Classifier` response.

0 commit comments

Comments
 (0)