Importing Traits
From version 5.0 Oscova supports importing of Traits (list of expressions) from a CSV file or text. To Import Traits use the method ImportTraitsFromFile
if you have a CSV file containing the data or ImportTraitsFromText
if the CSV data is available as string.
The format of the CSV data should be <Trait>, <Expression>
. Headers are required in the CSV file or text as shown in the example below.
Example 1
Trait, Expression
#greeting, Hi there
#book_ticket, I want to book a ticket
A single Trait type name can have multiple expressions attached to it. For this simply leave the trailing trait names empty and Oscova will automatically assign the Expression to the previously mentioned Trait type.
Example 2
Trait, Expression
#greeting, Hi there
, Hey
, How are you?
#book_ticket, I want to book a ticket.
This would look something like the following in a spreadsheet.
In the example above the expressions Hi there
, Hey
and How are you?
get assigned to the #greeting
trait.
Fields
with Key=Value
pairs can also be mentioned just like any other trait expression declaration.
Example 3
Trait, Expression
#booking, I would like to book a $ITEM
, please help me book a $ITEM
, I need assistance in booking a $ITEM