def create_classifier(self, metadata, training_data, **kwargs):
        """
        Create classifier.

        Sends data to create and train a classifier and returns information about the new
        classifier.

        :param file 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`).
        :param file training_data: Training data in CSV format. Each text value must have
        at least one class. The data can include up to 3,000 classes and 20,000 records.
        For details, see [Data
        preparation](https://cloud.ibm.com/docs/services/natural-language-classifier/using-your-data.html).
        :param dict headers: A `dict` containing the request headers
        :return: A `DetailedResponse` containing the result, headers and HTTP status code.
        :rtype: DetailedResponse
        """

        if metadata is None:
            raise ValueError('metadata must be provided')
        if training_data is None:
            raise ValueError('training_data must be provided')

        headers = {}
        if 'headers' in kwargs:
            headers.update(kwargs.get('headers'))
        sdk_headers = get_sdk_headers('natural_language_classifier', 'V1',
                                      'create_classifier')
        headers.update(sdk_headers)

        form_data = {}
        form_data['training_metadata'] = (None, metadata, 'application/json')
        form_data['training_data'] = (None, training_data, 'text/csv')

        url = '/v1/classifiers'
        response = self.request(
            method='POST',
            url=url,
            headers=headers,
            files=form_data,
            accept_json=True)
        return response
def create_classifier ( self , metadata , training_data , ** kwargs ) : if metadata is None : raise ValueError ( 'metadata must be provided' ) if training_data is None : raise ValueError ( 'training_data must be provided' ) headers = { } if 'headers' in kwargs : headers . update ( kwargs . get ( 'headers' ) ) sdk_headers = get_sdk_headers ( 'natural_language_classifier' , 'V1' , 'create_classifier' ) headers . update ( sdk_headers ) form_data = { } form_data [ 'training_metadata' ] = ( None , metadata , 'application/json' ) form_data [ 'training_data' ] = ( None , training_data , 'text/csv' ) url = '/v1/classifiers' response = self . request ( method = 'POST' , url = url , headers = headers , files = form_data , accept_json = True ) return response
Create classifier.

        Sends data to create and train a classifier and returns information about the new
        classifier.

        :param file 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`).
        :param file training_data: Training data in CSV format. Each text value must have
        at least one class. The data can include up to 3,000 classes and 20,000 records.
        For details, see [Data
        preparation](https://cloud.ibm.com/docs/services/natural-language-classifier/using-your-data.html).
        :param dict headers: A `dict` containing the request headers
        :return: A `DetailedResponse` containing the result, headers and HTTP status code.
        :rtype: DetailedResponse