Configuring Data

Text Generation supports three types of data. You can select a specific type of documents based on the data type.

The data configured on the Data page is only used to assist in creating a document and test whether the text generation result meets your expectation. It is recommended that you do not configure excessive data.

Configuring Data

  1. Log in to the LG console of NLP, and click the Beta Services tab.
  1. Click Access Text Generation Console. The Text Generation page is displayed.
  2. Click a project name to go to the specific project page.
  3. Click a document and the Data page is displayed.
  4. Enter the data information according to the data type.
    • JSON data

      Select JSON data when the input data structure is loose.

    • Table data

      Enter the information based on your needs.

    • Knowledge graph data

      The knowledge graph data is from the Knowledge Graph (KG) service of NLP. So you need to create a knowledge graph on the KG console before using the data.

      When the graph data is used as the input data for text generation, you need to construct related query statements. You can combine the query statements and JSON data to form dynamic graph data.

      1. Enter a Gremlin query statement and click the query button.

        Currently, only the Gremlin query statement can be entered on the Data page.

        Figure 1 Entering a query statement
      2. Ensure that the query statement is correct, and then click to insert the query statement.

        If you want to combine JSON data, enter dynamic data items in the JSON text box and set the data name based on the query statement.

        Figure 2 Inserting a query statement
      1. Click Run to obtain the complete graph data.

        kg_data contains the dynamic execution results of each query statement.

        Figure 3 Viewing the query execution results