This tutorial will explain how to access some of the most useful memory
elements in NL-Soar and what they represent.
Useful commands include:
-
p(rint): print out the values of a working memory element to a depth
of 1
-
p2: prints attributes to a depth of 2, and p3 prints attributes to a depth
of 3
The top state is the highest state on the goal hierarchy, and contains
many useful attributes. The top state is created automatically by Soar
when a sentence is run in NL-Soar. Usually the top state is named s1. To
see the contents of s1, simply use the p command:
p s1
This command can also be used for seeing operators and other types of
Soar memory attributes.
Working memory elements (wme's) are of two basic types:
-
single-value attributes: only one value is possible
for this attribute at any time
-
multi-value attributes: more than one value is
possible for this attribute at any time
The main attributes in s1 are the following:
-
^attended-auditory-input : contains words that the system has "heard" and
processed
-
^type: indicates that this wme is a state
-
^build-semantics: tells whether semantics should be built or not (controlled
by the user)
-
^top-state s1 and superstate nil : indicates that s1 is the top state,
and that there is no state above it
-
^ordering-info: preserves the order of the words in the sentence
-
^for-formatting contains information that will be displayed on the syntax
grapher window.
-
^for-sem-formatting contains information that will be displayed on the
semantics grapher window.
-
^io contains information that comes into Soar from the outside world and
that Soar sends to the outside world.
-
^assigners, ^receivers: contains information about what syntactic words
and phrases can combine together, and how
-
^semassigners, ^semreceivers: contain information about what semantic concepts
and relationships can combine together, and how
-
^operator contains the operator(s) associated with this state
-
^sentence is one of the most important elemets for NL-Soar. It is a multi-value
attribute, and each value represents a separate word in the input sentence.
Thus if a sentence has three words and a period, there will be four sentence
values on the top state, one for each word.
Each sentence attribute has several layers of information underneath it;
without describing all of them in detail, here are a few of the most important:
-
^sentence has attributes like ^profiles (syntactic information), ^semprofiles
(semantic information), ^word-id (words and their timestamps), ^zero-nodes
(the basic category nodes), ^annotation (tracking progress), and
^wnetdata (WordNet-related information).
-
^io has auditory buffer information including when words entered it, a
specification of the attention span and decay rate, etc.
Other wme's are useful for other NL-Soar tasks: non-English language
versions (^language-flag), discourse understanding (^conversational-record,
^private, and ^dialogue-planning-model), generation (^xval), and task integrations
(^nl-radio, ^ll-blippability-selection).
Of course, other states and substates (and also operators) also have
several attributes which are too numerous to describe here. They all can
be accessed in exactly the same way.