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
Note:
- When importing a TRSX file, if a sample has an intent and annotations the sample is marked Annotation-assigned. If there is an intent but no annotation, it is marked as Intent-assigned. Unassigned and unspecified samples are not assigned.
- Importing a TRSX file is an additive operation. This means that any new data will be added, and that duplicate samples that exist in both the current model and the TRSX file will have their count increased by the count of the samples in the TRSX file.
- Concepts were renamed to entities in Nuance Mix. The TRSX specification has not been updated yet to reflect this change. Therefore,
concept
elements in a TRSX file correspond to entities in Mix.
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:
-
Prepare the grammar file as described in Understanding grammar files.
-
Specify the name and relative location of the grammar in the TRSX file, in attribute
ruleGrammarFileName
for the appropriate entity. -
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:
-
In the Mix dashboard, select the project and click the Import/Export tab.
-
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.
-
Either click to select a file from your computer, or drag and drop the file in the input field.
-
If your project includes multiple languages/locales, click Next Step, and select the locale for which to import data.
-
Click Upload.
A message notifying you that your file was successfully uploaded, or an error occurred, is shown.
-
(Optional) Click See report to see import information.
-
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.
Below is a sample report showing warnings.
This table describes the information detailed into the report. (Click the arrow next to an item to obtain more information.)
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. |
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.