Import NLU model

When importing data, you must first prepare the input file.

If you are importing data for a project that contains multiple locales, you must prepare one file per locale.

Prepare NLU data (TRSX)

A TRSX file is tRSX, or Training Set XML, is a specification defined, owned, and maintained by Nuance to enable developers to manage an entire model in a single file outside of Mix and import the model into a Mix.nlu project. You can also manage training data in separate TRSX files and import them individually.

To add data to an existing model, you can export either:

  • The TRSX file only
  • A ZIP file that contains:
    • TRSX file
    • (If applicable) GrXML files for the rule-based grammars specified in the TRSX file

See Prepare rule-based entities (GrXML) for information on preparing GrXML files.

When importing a TRSX file, note the following:

  • Metadata will be linked to the model
  • Intents will be created
  • Entities will be created, and their types (List, Relationship, Freeform) will be assigned
  • Entities will be linked to the appropriate intents
  • Entity relationships will be created
  • Literals will be associated with entities
  • Samples will be created, both annotated and unannotated, and either included or excluded
  • Samples that already exist will have their counts increased

Prepare rule-based entities (GrXML)

The ability to import rule-based entities is currently available only to Nuance Professional Services users. To use this feature in your project, contact your Nuance Mix representative.

To import rule-based entities:

  1. Prepare the grammar file as described in Understanding grammar files.

  2. Specify the name and relative location of the grammar in the TRSX file, in attribute ruleGrammarFileName for the appropriate entity.

  3. Prepare the ZIP file by including both the TRSX and GrXML files, making sure that the directory structure in the ZIP file matches the relative URL and name specified in the TRSX file.

For example, consider the CARD_TYPE.grxml grammar file, which is located in the /grammars/CARD_TYPE directory. This grammar file would be defined in the coffee_app.trsx file as follows:

<concept name="CARD_TYPE" ruleGrammarFileName="grammars/CARD_TYPE/CARD_TYPE.grxml"/>

These files would be packaged in the ZIP file as follows:

  • coffee_app.trsx
  • grammars/CARD_TYPE/CARD_TYPE.grxml

Import NLU data

Note that during the import of a TRSX file, all other import types are blocked until the import is complete.

To import NLU data:

  1. In the Mix dashboard, select the project and click the Import/Export tab.

  2. Click the file type in the Import area.

    For example, to import a complete NLU model, click the upload icon for a TRSX, XML, or ZIP file.

    The Upload a file window appears.

  3. Either click to select a file from your computer, or drag and drop the file in the input field.

    Select a file

  4. If your project includes multiple languages/locales, click Next Step, and select the locale for which to import data.

    Select a locale

  5. Click Upload.

    A message notifying you that your file was successfully uploaded, or an error occurred, is shown.

  6. (Optional) Click See report to see import information.

  7. Click Close to close the import window.

When importing a TRSX file or ZIP file you will see the following status updates in the import window:

  • Processing—The file is being processed. NLU data (intents, entities, samples) are being extracted from the TRSX file.
  • Uploaded or Failed—The file imported successfully, or the import failed.

View report

To see all import details, click View report.

TRSX file successfully imported with feedback

Below is a sample report showing warnings.

import view report

This table describes the information detailed into the report. (Click the arrow next to an item to obtain more information.)

Report details
Field Description
errors Number of errors, if any, that occurred during the import. For the list of error and warning messages, see Import errors.
warnings Number of warnings, if any, that occurred during the import. For the list of error and warning messages, see Import errors.
entities Number of entities imported.
intents Number of intents imported.
sources Number of sources imported.

To see the entire import feedback, you must have 0 warnings and 0 errors.

Download logs

Click Download logs to download import information. Download logs are in CSV file format.

Download logs contain the following additional information:

Parameter Description
addedToExistingSampleCount Number of the samples imported that already existed in the project.
errors Any errors in the import.
sampleIncrementedCount Number of existing samples in the project that incremented the counter.
samples_count Number of new samples created during import.