Text recognition

Recognising text

At the heart of our bot is a text recognition engine using a bot model that you can modify. This model contains a text recognition tree.

The diagram illustrates a simplified fraction of the tree. The tree matches words as they are sent from the user.

The tree can contain words to be matched, concepts to be matched or values to be extracted.

Each path from the root to a leaf represents a sequence of words, concepts or values to be found in the text.

If a phrase matches, any data values are extracted and a mini-ruleset you can edit is triggered. This decides what to do next.

Choices of action are to just return some text, storing any data, or to call one of the rulesets in your account.

Concepts instead of words

Generating every possible word sequence that a user might employ is a real drag.

To make the whole process much easier you can specify concepts. These are derived from WordNet, which is a model of language usage and meaning with similarities to both a dictionary and a thesaurus.

Our system helps you to find a matching meaning for a given word, and when you select a meaning, all words that have that same meaning will trigger the text engine in that place in the sequence.

Not only that, but all nouns or verbs that "are a kind of" that concept will trigger too.

To give a simple example:

The sequence "I" "have" "[horse]", where [horse] is the concept for a horse and not the word, will match:

I have a pony
I have a palamino
I have a race horse
and so on...

Extracting values

In the unguided part of processing users may spontaneously tell you things, or make a request that contains one or more values that you will need later.

You can insert value placeholders into the text processing tree to catch this data.

You can specify the type of data, so for instance a number, a date, a text string and so on.

If our bot engine can't convert the text to that data type the match fails.

Handling "don't know"

Your bot can't handle everything. To make life simpler you can specify a default tag anywhere in a text processing tree.

As the system parses the users text it traverses the tree and keeps track of the last default tag it passed.

If a match can't be found, the last default tag is returned instead.

This means that rather than producing a generic "Don't know"" response, you can be much more specific and even elicit data from the user.