The Phrase Library and the Backus-Naur Form

The Phrase Library

Secondary Concept Phrases are drawn from the Phrase Library. Our Phrase Library is empty at the moment so we need to enter all the phrases we may want to use.

  1. Right click on the Phrase Library
  2. Click on the word "Phrases" in the box that pops up.
  3. The Phrase Library will open. Type in the following phrases.
    • ball
    • bell
    • bird cage
    • bird seed
    • brush
    • cage
    • dried fruit
    • exercise
    • flea dip
    • food
    • food for
    • jerky
    • pellets
    • to eat
    • to feed
    • to wash
    • mirror
    • wheel

Backus-Naur Form

When you enter Phrases in the Phrase Library it is a good idea to use Backus-Naur Form Backus-Naur Form is a simplified way to add Phrases with multiple variations. You can use Backus-Naur Form anywhere you need to enter Phrases. Backus-Naur Form is especially helpful in the Natural Language Module because there are so many Phrases to enter. For instructions on using basic Backus-Naur Form, click on the Index tab of the Help and type in "Backus-Naur Form.", or BNF. Backus-Naur Form is a system by which you can easily enter multiple variations on the same idea within a single phrase. You can use Backus-Naur Form anywhere you need to enter Phrases, but it is especially helpful in the Natural Language Module because there are so many phrase variations to enter.

Here is a very basic lesson for using Backus-Naur Form:

For example, the phrase [I] (would like|want|need|am looking for) can mean any of the following:

The "I" is in brackets [ ] and therefore is optional. The words "would like", "want", "need", "am looking for" will be included because they are within parenthesis. The pipes function like saying "or," so (would like|want|need|am looking for) if read as "would like" or "want" or "need" or "am looking for".

So let's add some more phrases to the Phrase Library, using the BNF.

  1. Your phrase library should still be open. If it is not, open it now by right clicking on the Phrase Library and clicking on the word "Phrases" when it pops up.
  2. Type in the following:
    • (chew|gnaw) on
    • [dog|doggy|puppy] (food|chow)
    • [stuffed|squeak|squeaky|rubber|plastic|plush] toy

The Phrase Library (Part 2)

The phrases you need for Secondary Concepts are all entered, but the Phrase Library also holds words that should be ignored by the system. In this case, these include Phrases such as "I would like" and "for my". The system will recognize these phrases but will ignore them when it is trying to determine what was said. The more words and phrases recognized, the better the system will run.

  1. Type in the following:
    • do you have
    • for [my|a]
    • something
    • [I] (would like|want|need|am looking for)
    • [I�d] like
    • to buy

    So if someone called in and said "I would like something for my dog to chew on", the system would break the sentence apart as follows:

    • "I would like" (ignored)
    • "to buy" (ignored)
    • "something" (ignored)
    • "for my" (ignored)
    • "dog" (Primary concept - dog)
    • "to chew on" (Secondary Concept- toy)

    The system would then direct the caller to the Response for "Dog"-"Toy" and would not be confused by any unrecognized words.

  2. When you are done entering all the phrases, click "OK"

Adding phrases to Secondary Concepts

  1. Now you need to add phrases to the Secondary Concepts. To do so, expand the "Dog" Primary Concept and each of the Secondary Concepts under it. Right click on the word "Phrases" under the secondary concept "Toy" and select "Phrases", A Select Phrases box should appear like this:
  2. Select the phrases correlating to Dog-Toy by clicking on the phrase. You can add multiple phrases by clicking on each one separately to highlight them. To de-select, click on the phrase again.
  3. For the Primary Concept "Dog" and the Secondary Concept "Toy" appropriate phrases are (chew|gnaw) on, ball and [stuffed|squeak|squeaky|rubber|plastic|plush] toy.
  4. After you have selected the appropriate phrases, click OK to apply them.
  5. Set up phrases for each of the remaining Secondary Concepts under "Dog", and also under "Bird" and "Rodent"

Remember, each Secondary Concept is unique to its Primary Concept. Expand the phrases under "Bird"-"Food" and "Dog"-"Food" so you can compare them.

You�ll notice that even though the Secondary Concept is "Food" for both, the phrases each one uses is different.

You can see how useful the Backus-Naur Form is by clicking once on the phrase "[dog|doggy|puppy] (food|chow)".

If you look in the Properties Table, you�ll notice that there are eight variations on how this single phrase can be interpreted:"Dog food", "Doggy Food" , "Puppy Food" , "Dog Chow", "Doggy Chow", "Puppy Chow" , "Food" , and "Chow".

Once you have finished entering phrases into the Phrase Library, you can always go back and add or modify them. To do so, right click on the Phrase Library and select "Phrases". Now, you can add another phrase, or delete/modify one that has already been entered.

Save your changes by clicking File > Save.

© 2012 LumenVox LLC. All rights reserved.