Machine Learning Platform for AI provides the text classification template. This topic describes the scenarios and data structure of the template.

Text classification

Text classification is used to find one or more labels from a set of labels to match the content of the input text and attach the labels to the text. The category template supports single-label and multi-label text classification.

  • Scenarios

    News recommendation, knowledge management, and junk content filtering.

  • Data structure
    • Input data
      Each row in the manifest file contains a topic. The topic must contain the content field.
      {"data":{"content":"Welcome to Machine Learning Platform for AI! "}}
    • Output data
      Each row in the manifest file contains a topic and the labeling result. The following code provides an example of the JSON string in each row:
      {
        "data": {
          "content": "Welcome to Machine Learning Platform for AI! "
        },
        "label-p9fypszvupm9bh****": {
          "results": [{
            "data": [{
              "data": "Positive content",
              "id": 112****,
              "type": "survey/value"
            }],
            "id": "112****",
            "type": "survey"
          }]
        }
      }