• No results found

Expand or Compile Expanding or Compiling

In document Verbot 4 Manual (Page 83-90)

4.9 The Teaching.vkb KnowledgeBase Who needs an Editor?

5.2.3 Expand or Compile Expanding or Compiling

Once you have a KnowledgeBase Template with associated CSV file ready to go, it's time to Compile it, Expand it, or you can do both. The following information describes the difference between

Expanding and Compiling.

Why should a KnowledgeBase be Expanded?

When a KnowledgeBase Template is Expanded a new .vkb file is created based on the

KnowledgeBase Template Rules and the loaded CSV file. Once the KnowledgeBase is Expanded and the new .vkb file is created, the new .vkb file can be loaded within the Verbot Scripting Editor for tweaking or to view the results.

How to Expand a KnowledgeBase Template

Why should a KnowledgeBase be Compiled?

Compiling a KnowledgeBase Template creates a new .ckb file which created based on the

KnowledgeBase Template Rules and the loaded CSV file. Once the KnowledgeBase is compiled a new .vkb file is created which can be loaded into the Free Verbot Player or the Verbot Standard Edition Player for testing or use. It is important to note that the Free Verbot Player can only load Compiled KnowledgeBases (.ckb). To share your KnowledgeBase with friends you'll need to provide them with this link to the Free Verbot Player and supply them with your KnowledgeBase Compiled (.ckb). How to Compile a KnowledgeBase Template

Verbot 4.0 Manual 83

Click the save button to begin the Expand process. Depending on the size of the CSV file and the amount of Template Rules it may be several seconds to Expand the KnowledgeBase Template. Once the Template is expanded you may load the resulting .vkb file into the Verbot Scripting Interface to see the results and tweak if needed.

How to Compile a KnowledgeBase Template

To compile a KnowledgeBase Template click on the Compile icon or click "Tools"-->"Compile KnowledgeBase" on the menu.

Once you have clicked "Compile" the process begins. (Note: no dialog box pops up. The file is automatically saved with the .ckb extension)

Depending on the size of the CSV file and the amount of Template Rules it may take several minutes to Compile the KnowledgeBase Template. Once the Template is compiled you may load the resulting .ckb file into the Verbot Player to interact with it. In order to view the results of a KnowledgeBase and CSV file you will need to Expand the KnowledgeBase.

Understanding What Variables do.

When a user first speaks with a Verbot, the Verbot doesn't know the user's name. For example, if you asked the Verbot "What is my name?" it would most likely respond with "Your name is Friend."

However, if you told the Verbot "My name is Mary" the Verbot would respond with "It's nice to meet you Mary."

The Verbot now knows that your name is Mary. If you were to ask "What is my name?" the Verbot would now respond "Your name is Mary."

What is my name?

Let's look at a sample response in which the Verbot does not know your name. "What is my name" Rule first - so we can see how the Verbot responds with "Friend" if it doesn't know your name. Rule Name: What is my name

Input: (what is) my name

Output: Your name is [name:Friend].

Note: (what is) <-- is a Synonym. Click Here to find out more about Synonyms

You might have noticed that before you tell the Verbot your name, it call you "Friend". The Verbot uses "Friend" because the Variable "name" is not set.

The following example shows a Variable with the default setting of "Friend". You can of course replace "Friend" with anything you like (or not use an alternate at all, which would return nothing).

Example:

Verbot 4.0 Manual 85

My name is [name]

We now know that if a variable is not set it will use alternate text if available, but how do we set the Variable? It's actually rather simple. Let's look at the Rule "My name is [name]."

Rule Name: My name is [name] Input: My name is [name]. Output: Good to meet you [name]!

Variables in Variables: "Joe's phone number is 555-5555"

There are times when you want to save information, such as recording your friend's telephone numbers. To do this, you need to use Variables inside other variables.

Verbot 4.0 Manual 87

Let's see what happens when you type the following Input: "Joe's phone number is 555-5555." First, thing that happens is "Joe" is stored within the Variable "[contactname]."

Now that "Joe" is stored within the Variable "[contactname]," the Verbot can then use "Joe" within another Variable. In this case, "[[contactname]s_phone]" is set to the Variable name of "Joes_phone" with the value of "555-5555".

So, here is what you end up with: contactname = "Joe"

joes_phone = "555-5555"

Note that is you typed in the same sentence using a different friend' information, you would get another unique variable. For example, if you typed in "Jenny's phone number is 555-8888." The Variables would be as follows:

contactname = "Jenny" jennys_phone="555-8888"

Notice that contactname is always set to the last Input (Jenny) but a unique variable is created (jennys_phone).

Retrieving the Variable: "What is Joe's phone number?"

Using the example above - we have two Variables available: joes_phone and jennys_phone. To access the Variables we create the following Rule:

Verbot 4.0 Manual 89

5.3.1

Internal Variables

In document Verbot 4 Manual (Page 83-90)

Related documents