NAV Navbar

Import project data

You can import the following data in your project:

Importing prebuilt domains

The Domains tab lists the prebuilt domains that are available to use in your project.

Domains represent areas of knowledge or activity, for example, TV, Weather, or News. When you import a prebuilt domain, the intents, samples, entities, and so on, that the domain contains become part of your model. (The data in the prebuilt domain comes from a TRSX file stored on the Nuance cloud.)

You can select prebuilt domains to import by language.

Customizing the domain

Once a domain is imported into your project, you can customize it just as you would your own project. Because you'll see the full ontology of the prebuilt domain in your project, you'll be able to:

At runtime

It's likely that prebuilt domains will include some of the same samples, similarly-worded samples, or both as the samples assigned to your intents.

Import a prebuilt domain

To import a prebuilt domain in your project:

  1. In Mix.dashboard, click the Projects icon, select the project, and click the Domains tab.
    The list of available domains is displayed. You can filter the list by typing in the Search field or selecting a category.
  2. Click the checkbox for the domain(s) you want to import.
  3. Click Add Domains.

Note: If you select a very large domain, you might see a warning that you'll exceed the limit for number of samples in your model, a warning that you'll exceed the number of Literals, or both warnings (see Limits below).

The domains added are now listed in the Details tab, under Sources. You can use the intents and entities in the Mix.nlu models.

In Mix.nlu, on the Develop tab, under Intents > Mix Domain Intents, you'll see the intents and entities from the prebuilt domain that you imported. You can work with these intents and entities as you'd work with the intents and entities that you defined in your model.

Before training your model, especially if it's large, see the options described below about Training Time. You can save time by selecting which, if any, imported domain(s) you want to train with.

Training time

Some prebuilt domains are quite large and complex. It's important to be aware of the size of the prebuilt domain and its impact on the size of your model.

Training a large domain can take a while. However, to have a rapid turnaround while working on your own intents, you can selectively exclude a prebuilt domain from training. Then when you're ready to test everything together, you can include the prebuilt domain.

If you've imported a prebuilt domain, before you train your model a pop-up will display a list of imported prebuilt domains; use the checkboxes to include or exclude prebuilt domains to train with. See Train your model for the procedure.

Note that if you exclude a prebuilt domain from training, then the accuracy won't necessarily reflect the accuracy of your model in production, when all domains are included. This is because the NLU model will make decisions based on all of the data (prebuilt domains plus your own intents), so an utterance could be classified differently when all the data are considered compared to when only your intents are included.

Limits

This section was moved to Limits.

Importing and exporting data

The Mix project dashboard allows you to import and export data. The types of data that you can import and export include:

Export data

You can export NLU data and dialog data.

Export NLU data

Export TRSX

When exporting NLU data, you can export the complete NLU model or export your NLU ontology, entity literals, and samples separately.

You can export either:

If your project includes multiple languages, one file is created per language.

To export NLU data:

  1. Click the download icon download icon for the Mix.nlu TRSX or ZIP file.
  2. Select the locale for which to export data.
    To export data for all locales, select All locales.
  3. Select the data to export and click Export.

One file is created per locale specified, with the following naming convention:

projectID_date_projectname_locale.trsx/zip

For example:

Export dialog data

To export dialog data:

  1. In Mix.dashboard, select the project and click the Import/Export tab.
  2. Click the download icon download icon for the Mix.dialog JSON file.

A single file is downloaded, even if your project includes multiple locales.The file has the following naming convention:

projectID_date_projectname.json

For example:

Import data

When importing data, first prepare the file to import according to the type of data to import. See the following sections for more information about how to format each type of data:

Data type Import file type
Complete NLU models .trsx, .xml, .zip
Rule-based entities .grxml
NLU entity literals .list, .nmlist
NLU samples .txt
Dialog application (JSON file) .json

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

Import NLU data

To import NLU data:

  1. In 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 an TRSX, XML, or ZIP file.
    The Upload a file window appears.
  3. Click to select a file from your computer or drag and drop the file on the file type.
  4. Select a 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 with your import 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 two statuses in the import window:

TRSX file successfully imported with feedback

View import details

To see all import details, click View report. A report similar to the following is displayed:

import view report

The report provides the following information:

Field Description
errors Number of errors, if any, that occurred during the import. Click the arrow to get details about the error. For the list of error and warning messages, see Import errors.
Note: To see the whole import feedback, you must have 0 errors.
warnings Number of warnings, if any, that occurred during the import. Click the arrow to get details about the warning. For the list of error and warning messages, see Import errors.
Note: To see the whole import feedback, you must have 0 warnings.
entities Number of entities imported. Click the arrow to get the names of the entities imported.
intents Number of intents imported. Click the arrow to get the names of the intents imported.
sources Number of sources imported. Click the arrow to get the names of the sources imported.

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

Download logs contain the following 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.
samplesCount Number of new samples created during import.
warnings Any warnings in the import.

Import dialog data

To import dialog data:

  1. In Mix.dashboard, select the project and click the Import/Export tab.
  2. Click the upload icon for the JSON file.
    The Upload a file window appears.
  3. Click to select a file from your computer or drag and drop the file on the file type.
  4. Click Upload.
  5. Click Close to close the import window.

Importing complete NLU models (TRSX files)

TRSX (TRaining Set XML) is an XML-based file format that represents an entire NLU model in a single file. It can be used to upload a complete model or individual parts of a model. For example, you can upload a list of intents without any samples, new literals for an entity, or annotated samples for a single intent. Check out the TRSX Reference for more information and some samples.

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

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

When importing a TRSX file, note the following:

Importing rule-based entities

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:

Importing entity literals

Entity literals are specific words or phrases that belong to a list-type entity. You can upload entity literals using one of the following types of files:

When you import entity literals, you are asked to specify the entity to which the literals apply.

To import NLU entity literals:

  1. In Mix.dashboard, select the project and click the Import/Export tab.
  2. Click the import icon for a LIST or NMLIST file.
    The Upload a file window appears.
  3. Click to select a file from your computer or drag and drop the file on the file type.
  4. Click Next step.
  5. Under Upload to a specific entity, select an entity.
  6. Click Upload.
  7. Click Close to close the import window.

LIST - Standard list files

Sample flavors.list file

  vanilla
  chocolate
  cookies and cream

A LIST file is a newline-separated list of words or phrases, where the literal word or phrase and its value are the same.

For LIST files, this means that the literal and the value will both be assigned to the literal value. For example, consider sample flavors.list file to the right. The literal "vanilla" will get the value "vanilla" as well. If you want to assign a different value to these literals, use the NMLIST file type instead.

Please note that LIST files must be terminated with a newline character at the end of the file.

Download the sample flavors.list file

NMLIST - Named list files

Sample colors.nmlist file

  red|#f00
  green|#0f0
  blue|#00f

An NMLIST file is a newline-separated list of items, where the literal item and its value are pipe-delimited, as shown in the code sample.

Please note that NMLIST files must be terminated with a newline character at the end of the file.

Download the sample colors.nmlist file

Importing samples

Examples in a .txt file (one example per line)

  i would like 1 scoop of vanilla ice cream and some hot fudge
  i'll get a chocolate ice cream on a cone
  give me a strawberry smoothie

When developing an NLU model, you can import examples of the types of things your users might say to train the model. These examples, called samples, must be stored in a TXT file. The TXT file must have one sample per line. Each sample must not include more than 500 characters, otherwise you will get an error and the sample will not be imported.

Upon importing, you can select which intent you would like to assign these samples to. If you do not select an intent, they will be imported to Unassigned Samples. Don't forget to annotate these samples with entities before training your model!

To import NLU samples:

  1. In Mix.dashboard, select the project and click the Import/Export tab.
  2. Click the import icon for a TXT file.
    The Upload a file window appears.
  3. Click to select a file from your computer or drag and drop the file on the file type.
  4. Click Next Step.
  5. When uploading NLU samples, you have two options:
    NLU samples import modal
    • Upload to a specific intent: Upload the samples to a specific intent
    • Auto-intent: Import a set of samples and apply Auto-intent to suggest, for each sample, either an existing intent or a newly detected intent (by selecting Identity new intents). For more information on auto-intent, see apply automation.
  6. (If using Auto-intent) Click Next Step.
    When Auto-intent is initiated, Mix.nlu runs a health check of the training sample, model, and data sent for automation. For more information, see health checks.
  7. Click Upload (or Upload & automate if using Auto-intent).
    A report of the import appears.
  8. (Optional) Click Download logs to download import information.
  9. Click Close to close the import window.

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

Download the sample sample.txt file

Importing complete dialog applications

A dialog model is stored in a JSON file. Importing a dialog model is useful when you want to reuse an existing dialog model. Simply export it first, and then re-import it in a new project.

Check out the Dialog Application Specification for more information and a sample.