Situations Integration Process
by
Adil KABBAJ
Situations Generalization-Based Integration Process
Situations Classification-Based Integration Process
Situations Integration Process API
Situations Integration Process and Dynamic Ontology GUI
Situations Integration Process is suited in the case of situation-based KB/memory; when knowledge to integrate corresponds only to situations (and not definitions) and rules optionaly. In the case of a comparison between a situation and a rule, the situation is compared to the antecedent part of the rule. Note also that a situation is not compared to the definition of a type; types definition are not considered in situation integration process.
The next two sub-sections illustrate the two modes of situations integration.
Situations Generalization-Based Integration Process
If the comparison between the new situation to integrate and the current description (a situation or the antecedent of a rule) shows that they have only some information in common, then a new node is created with the common information in content. Let us consider now the following example (Figures 1-3). The example uses the ontology "Samples/Ontology/Sowa_CG_Generalization_Hierarchy.xml". Situations used in this example are taken from J. Sowa (Sowa's example is drawn in Figure 1.b) and they are stored in the file dataForDynamicMemory/Sowa1_CGs.txt. To run this example with Dynamic Ontology GUI, see Dynamic Ontology GUI. Figure 1.a presents the initial content of the ontology. The following three situations (SIT #0, SIT #1 and SIT #2) will be integrated in turn:
SIT#0: [Robot]<-agnt-[Wash]-thme->[Truck] with pertinent types: Robot, Wash. The result of this integration is the indexation of SIT#0 under Robot and Wash (Figure 1.b).
SIT#1: [Human]<-agnt-[Chase]-
-thme->[Human],
-arnd->[Desk] with pertinent types: Human and Chase.
The result of this integration is the indexation of SIT#1 under Human and Chase (Figure 1.b and Figure 2.a).
Note: In Figure 2 (and in the following Figures) we show the change and update of the ontology using "ontology drawing view", instead of the "tree view". The Draw view presents explicitly the graph structure of the ontology.
SIT#2: [Cat:Yojo]<-agnt-[Chase]-
-manr->[Vigorous],
-thme->[Mouse]-attr->[Brown] with pertinent types: Cat, Chase and Mouse.
SIT#2 is indexed under Individual Yojo and under type Mouse. Also and due to the integration of SIT#2 via the node Chase, it is compared to SIT#1. The two situations have a common information which constitutes the description of a new situation (SIT#3 in Figure 1.b): [Animal]<-agnt-[Chase]-thme->[Animal]. Figure 1.b shows this update.
(a) Ontology before the integration (b) Ontology after the integration of SIT #0, #1 & #2
Figure 1: Incremental Dynamic Integration. An example
The next situation to integrate is SIT#4: [Cat:Tigerlily]<-agnt-[Chase]-thme->[Mouse]-attr->[Gray] with entry points: Cat, Chase and Mouse. Due to the integration of SIT#4 via the node Chase, it is compared to situation SIT#3 (Figure 2.b): [Animal]<-agnt-[Chase]-thme->[Animal]. Since SIT#4 is more specific than SIT#3, it is compared to the children of SIT#3 (i.e. SIT#1 and SIT#2). SIT#4 and SIT#1 are incomparable since what they have in common is the description of the common father node (SIT#3). The comparison of SIT#4 with SIT#2 shows that they have common information which constitutes the description of a new situation (Figure 2.c illustrates this update):
[Cat]<-agnt-[Chase]-
-thme->[Mouse],
-Attr->[Attribute]
The integration of SIT#4 via Mouse has no impact.
Figure 2: updates of the ontology due to incremental dynamic integration of situations
The next situation to integrate is SIT#5: [Dog:Macula]<-agnt-[Chase]-thme->[Chevrolet] with entry points: Dog, Chase and Chevrolet. SIT#5 is indexed under Dog and Chevrolet and due to the integration of SIT#5 via the node Chase, it is compared to situation SIT#3 (Figure 2.c): [Animal]<-agnt-[Chase]-thme->[Animal]. The comparison of SIT#5 with SIT#3 shows that they have a common information which constitutes the description of a new situation: [Animal]<-agnt-[Chase]-thme->[Entity]. The result of the integration is shown in Figure 3.a.
Figure 3: Incremental Dynamic Integration. An example (continue)
The last situation to integrate is SIT#6:
[President]<-agnt-[Chase]-
-thme->[Intern],
-arnd->[Desk] with entry points: President, Chase and Intern.
SIT#6 is indexed under President and Intern and due to the integration of SIT#6 via the node Chase, it is compared to the situation “Animal Chase Entity” (Figure 3.a). SIT#6 is more specific and so, it is compared to the situation “Animal Chase Animal”. SIT#6 is still more specific and so, it is compared to the situation “Cat Chase Mouse” and to the situation “Human Chase Human”. SIT#6 is incomparable with “Cat Chase Mouse” since what they have in common is the description of the common father. Since SIT#6 is more specific than the situation “Human Chase Human” and since this situation has no child, SIT#6 is placed as its child (Figure 3.b).
Situations Classification-Based Integration Process
In classification-based integration, we consider only the following cases: new description is more specific than the current description, new description is more general than the current description, and new description is equal to current description. Let us illustrate situation classification-based integration process with the following simple example (Figures 4-6). Figure 4 presents the ontology before the classification process and presents also the setting for the classification of a new situation (i.e. selection of the integration mode: Classification in our case, and then the selection of the type of CS to integrate).
Figure 4: The Ontology before the classification process
Figure 5 shows the frame for the integration of a new situation. It shows also the pertinent types selected by the user.
Figure 5: Integration/Classification Situation Frame
The second situation to classify is: [Mouse]<-agnt-[Eat].
The third situation to classify is: [Cat]<-agnt-[Eat]-obj->[Mouse].
The result of the classification is shown in Figure 6. Note that in classification, no common generalization is considered. For instance, the common generalization between [Cat]<-agnt-[Eat] and [Mouse]<-agnt-[Eat] is not considered.
Figure 6: The result of the Classification
Situations Integration Process API
Situations Integration Process can be activated from Dynamic Ontology GUI, or by the use of the Situation Integration Process API (described below).
Constructors
public IntegrateSituation(Ontology ont)
public IntegrateSituation(Ontology ont, Lexicon lex)
public IntegrateSituation(Ontology ont, Lexicon lex, JTextArea txtArea)
Member Methods for the three kinds/modes of situation integration process
public IntegrationResult classify(Object situationDescr, AmineList pertinentTypes)
Example:
IntegrateSituation integrateSituation = new IntegrateSituation(ontology, lexicon);
CG situationDescr = CG.parseLF("[Cat]<-agnt-[Eat]-obj->[Mouse]", lexicon);
Type typeCat = lexicon.getTypeCS(Identifier.wrap("Cat")); // assume that Cat is a pertinent type
Type typeEat = lexicon.getTypeCS(Identifier.wrap("Eat")); // assume that Eat is a pertinent type
AmineList pertinentTypes = new AmineList(); // construction of the pertinentTypes
pertinentTypes.add(typeCat);
pertinentTypes.add(typeEat);
IntegrationResult integrRslt = integrateSituation.classify(situationDescr, pertinentTypes);
public IntegrationResult classify(Object situationDescr, AmineList pertinentTypes, AmineList superTypesPertinentTypes)
public IntegrationResult generalize(Object situationDescr, AmineList pertinentTypes)
public IntegrationResult generalize(Object situationDescr, AmineList pertinentTypes, AmineList superTypesPertinentTypes)
public IntegrationResult ask(Object situationDescr, AmineList pertinentTypes)
public IntegrationResult ask(Object situationDescr, AmineList pertinentTypes, AmineList superTypesPertinentTypes)
Static Methods for the three kinds/modes of situation integration process
public static IntegrationResult classify(Ontology ontology, Object situationDescr, AmineList pertinentTypes)
public static IntegrationResult classify(Ontology ontology, Object situationDescr)
public static IntegrationResult generalize(Ontology ontology, Object situationDescr, AmineList pertinentTypes)
public static IntegrationResult generalize(Ontology ontology, Object situationDescr)
public static IntegrationResult ask(Ontology ontology, Object situationDescr, AmineList pertinentTypes)
public static IntegrationResult ask(Ontology ontology, Object situationDescr)
Situations Integration Process and Dynamic Ontology GUI
See Dynamic Ontology GUI for this section.