Bulk Import
The Bulk import feature of Teneo Studio allows users to create Language Objects, Entities or Question and Answers (Q&A) pairs outside Teneo Studio in csv file format and later import these into a solution.
This page describes the file format as well as the rules for Bulk Import; to learn how to perform a bulk import in Teneo Studio, please see here
Format
The Bulk Import works with the csv (comma delimited) file format; these files can be created with Excel or any other compatible editor.
The supported encoding is UTF-8 and UTF-8-BOM.
Rules
For each document type (i.e. Language Objects, Entities, Question and Answer pairs) there are different rules or specifications which applies to the csv file however, some general rules are shared among the documents:
- Fields are separated by commas (,) or semicolon (;)
- Start tags are prefixed with the number sign (#)
- New line / carriage returns / extra delimiters are ignored
- New lines starting with #ignore allows to omits the entire line during bulk import in Studio providing the option to write headers / comments in the csv file
In the below tabs, please find the rules per document type; the Details section further below provides detailed information of each tag and field.
Quotes
For Language Objects and Q&A pairs, when creating the csv file in a text editor or similar, the usage of quotes needs a special treatment, where double quotes ("") must be escaped with an extra set of double quotes and, in addition, the entire field must be double quoted.
Example TLML Syntax
"Anderson>>""&"">>(co/company)"
String NLU Variable values
"""New York"""
For string NLU Variable values, Groovy also permits single quotes and they can be added to the csv file without having to be escaped.
'New York'
Both of the above examples of quotes are displayed in Teneo Studio as visualized in the below image.
Details
This section describes in more details the tags and fields for each of the document types.
Examples
In the below tabs, please find examples for each of the documents types on how the files for bulk import can be set up. The information in the code blocks can be copied/pasted into an editor which can then be saved in .csv format and bulk imported into Studio. Please, the below examples are only created as examples to help understand how to set up the csv files for bulk import.
If copying/pasting into Excel, select the data and then go to Data and click Text to Columns, in the Convert Text to Columns Wizard leave the setting at Delimited click Next, choose Comma and click Next again and last click "Finish", the data is now available in the appropriate fields and can be edited/updated as wanted. Remember to save the file again in the csv (comma delimited) format before performing the bulk import.