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 the Add Domains button is disabled, you are probably looking at a project version. You can only add domains to the current working version (that is, master). See Working with project versions for more information.

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.

A few things to keep in mind...

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 time

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

Like uploading a TRSX file, importing a prebuilt domain into your project is an additive operation: any new data will be added, and each duplicate sample that exists in both your current project and in the imported prebuilt domain will be counted.

Here are the current limits for the Mix projects:

Data Limit
Number of samples sentences in your model 60,000
Characters per sample* 500
Number of literals per entity 55,000
Number of entity literals per model 100,000

For all data except characters per sample, even if you reach one or more of these limits, you can continue to add them, work in your model, train the model, import data from the Discover tab, and make new configurations. However, you will not be able to create a version of the model if it has exceeded one or more limits.

For the characters per sample, you will not be able to add the sample if you exceed the character count limit. In addition, if you import a TRSX file that includes a sample that exceeds the character count, the sample will not be imported.

Depending on your project and the size of the prebuilt domain, it's good practice to check the Details tab, under the Content section, to keep track of values for your project.

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

download icon

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

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 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:

date_projectname_locale.trsx

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:

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:

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 or drag and drop the file on the file type.
    For example, to import a complete NLU model, click the upload icon for the .trsx file.
  3. When importing:
    • Entity literals, specify the entity for which to import literals.
    • NLU samples, specify the intent for which to import samples.
  4. Select the locale for which to import data.

Note: If the import icons are disabled, you are probably looking at a project version. You can only import data to the current working version (that is, master). See Working with project versions for more information.

A dialog similar to the following is displayed:

Import feedback dialog

It 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 example: elipsis icon.
For the list of error and warning messages, see Import 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.
samplesCount Number of samples imported.
intents Number of intents imported. Click the arrow to get the names of the intents imported.
concepts Number of entities imported. Click the arrow to get the names of the entities imported. (Note that the TRSX file still refers to entities as concepts).
relations Number of relations imported. Click the arrow to get the names of the relations imported.
sources Number of sources imported. Click the arrow to get the names of the sources imported.
jobs Currently not used.

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.

Note: If the import icons are disabled, you are probably looking at a project version. You can only import data to the current working version (that is, master). See Working with project versions for more information.

A dialog similar to the following is displayed:

Import feedback dialog

It describes the dialog data that was imported. See Dialog Application Specification for details.

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.

You can import a TRSX file to add data to an existing model: Upload it using the Import/Export tab on Mix.dashboard or from the Mix.nlu Develop tab.

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 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.

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.

In projects that include multiple languages, values are shared across all languages. When you import a new value, the first literal-value combination for that value will apply to all languages in your project. If you import literals for values that already exist, the literals will be added to the specified language only.

For example, consider a coffee application with two languages, en-GB and fr-FR. When you first import the following coffee_size_en-GB.nmlist file for the en-GB locale:

 
medium|md
small|sm
large|lg
tall|lg

The following happens:

When you next import the following coffee_size_fr-FR.nmlist file for the fr-FR locale:

 
moyen|md
petit|sm
grand|lg

The literals "moyen", "petit", "grand" will be added to fr-FR only, since the "md", "sm", and "lg" values already exist. You can then use Mix.nlu to remove the literals that do not apply to the language. See Defining literal-value pairs per language for more information.

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 the Unassigned Samples. Don't forget to annotate these samples with entities before training your model!

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.