Rules Integration Process
by
Adil KABBAJ
Comparison of Rule and Situation
Rules Generalization-Based Integration Process
Rules Classification-Based Integration Process
Rules Integration Process and Dynamic Ontology GUI
Rules Dynamic Integration Process is suited in the case of axiomatic/constraint-Based ontology or rules-based KB/memory; when knowledge to integrate includes rules.
It is important to note that, in general, comparison of a rule with another rule (or with a situation) concerns only the antecedent part of the rule. Note also that a rule is not compared to the definition of a type; types definition are not considered in rules dynamic integration process.
There is a special treatment concerning the comparison of a Rule with a Situation. The next section discuss this point. The next three sections illustrate the two modes of rules integration.
Comparison of Rule and Situation
Comparison of a situation with another situation has been treated in Dynamic Ontology. Also and as noted above, comparison of a rule with another rule corresponds to the comparison of their antecedents, which is equivalent to comparison of two situations. The problem concerns the comparison of a rule with a situation (and a situation with a rule). In general, the comparison of a rule with a situation is accomplished by comparing the antecedent of the rule with the situation (except for abductive inference). But the comparison should take into account the nature of compared knowledge (Rule and Situation).
We summarize in what follows our current interpretation of comparing Rule and Situation:
If ant(R) < S => R < S; If the antecedent of a rule R IsMoreSpecificThan a situation S Then R IsMoreSpecificThan S
If ant(R) ≈ S => R < S; If the antecedent of a rule R IsEqualWith a situation S Then R IsMoreSpecificThan S; since R IsMoreSpecificThan its antecedent
If ant(R) > S (If the antecedent of a rule R IsMoreGeneralThan a situation S) => R and S have ant(R) in Common. However, currently this common information is ignored and we consider that R and S are incomparable
If ant(R) п S (If the antecedent of a rule R and a situation S have only some information in common) => R and S have common information. However, currently this common information is ignored and we consider that R and S are incomparable
If ant(R) ≠ S => R ≠ S; If the antecedent of a rule R IsIncomparableWith a situation S Then R IsIncomparableWith S
If S ≈ ant(R) => S > R; If a situation S IsEqualWith the antecedent of a rule R Then S IsMoreGeneralThan R
If S > ant(R) => S > R; If a situation S IsMoreGeneralThan the antecedent of a rule R Then S IsMoreGeneralThan R
If S < ant(R) => S and R have ant(R) in Common. However, currently this common information is ignored and we consider that S and R are incomparable
If S п ant(R) => S and R have common information. However, currently this common information is ignored and we consider that S and R are incomparable
If S ≠ ant(R) => S ≠ R
Rules Generalization-Based Integration Process
In rules generalization-based integration process, if comparison of two rules (a new rule to integrate and a rule that exists already in the ontology/KB/memory) shows that they have only some information in common, then a new node (i.e. a situation node) is created with the common information in content.
Let us illustrate Rule Generalization-Based Integration Process with the following simple example. Figure 1 shows the state of the Ontology/KB/Memory (the ontology "CatMouse.xml") before the integration process and presents also the setting for the integration/generalization of a new CSRule (i.e. selection of the integration mode: Generalization in our case, and then the selection of the type of CS to integrate: CSRule in our case).
Figure 1: The Ontology/KB/Memory before Rule Integration Process
Figure 2 illustrates the edition of a new rule to integrate. The frame "Generalization Based Integration of Rule" is activated due to the selection of Generalization followed by CSRule. The user is then asked to select the pertinent types (in the antecedent part of the rule).
Figure 2: First steps in the Integration of a new Rule
Figure 3 shows the result of the integration.
Figure 3: Result of the Integration of the new Rule
A second rule has been integrated in the same way:
[Mouse]<-agnt-[Eat] => [Mouse]<-agnt-[Eat]-obj->[Mammal]
Figure 4 shows the result of the integration of the second rule. Please note the creation of a situation node that contains the common generalization between the antecedent of the two rules, and the indexation of the two rules under this situation node. The content of the second rule and of the situation node are displayed in Figure 4.
Figure 4: Result of the Integration of the third Rule
Figure 5 shows the result of the integration of the third rule which is more specific than the second rule, according to their antecedent parts. The content of the third rule is displayed in Figure 5.
Figure 5: Result of Integration of a third rule
Rules Classification-Based Integration Process
Like situations classification-based integration process, in rules classification-based integration, we consider only the following cases: new rule is more specific than the current description, new rule is more general than the current description, and new rule is equal to current description.
To illustrate Rule Classification-Based Integration Process, we consider the classification of the same three rules, used in the above example. Figure 6 shows the result of the classification process. As it can be noted from Figure 6, no common generalization is created in this case.
Figure 6: Result of the Classification of the three rules
KnowledgeBase provides anothe example of rule dynamic integration.
Rules Integration Process can be activated from Dynamic Ontology GUI, or by the use of the Rules Integration Process API (described below).
Constructors
public IntegrateCSRule(Ontology ont)
public IntegrateCSRule(Ontology ont, Lexicon lex)
public IntegrateCSRule(Ontology ont, Lexicon lex, JTextArea txtArea)
Member Methods for the three kinds/modes of rule integration process
public IntegrationResult classify(Object newCSRule, AmineList pertinentTypes)
Example:
IntegrateCSRule integrateCSRule = new IntegrateCSRule(ontology, lexicon);
CG ante = CG.parseLF("[Cat]<-agnt-[Eat]-obj->[Mouse]", lexicon);
CG consq = CG.parseLF("[Cat]<-agnt-[Hunt]-obj->[Mouse]", lexicon);
CSRule csRule = new CSRule(ante, consq);
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 = integrateCSRule.classify(csRule, pertinentTypes);
public IntegrationResult classify(Object newCSRule, AmineList pertinentTypes, AmineList superTypesPertinentTypes)
public IntegrationResult generalize(Object newCSRule, AmineList pertinentTypes)
public IntegrationResult generalize(Object newCSRule, AmineList pertinentTypes, AmineList superTypesPertinentTypes)
public IntegrationResult ask(Object newCSRule, AmineList pertinentTypes)
public IntegrationResult ask(Object newCSRule, AmineList pertinentTypes, AmineList superTypesPertinentTypes)
Static Methods for the three kinds/modes of rule integration process
public static IntegrationResult classify(Ontology ontology, Object newCSRule, AmineList pertinentTypes)
public static IntegrationResult classify(Ontology ontology, Object newCSRule)
public static IntegrationResult generalize(Ontology ontology, Object newCSRule, AmineList pertinentTypes)
public static IntegrationResult generalize(Ontology ontology, Object newCSRule)
public static IntegrationResult ask(Ontology ontology, Object newCSRule, AmineList pertinentTypes)
public static IntegrationResult ask(Ontology ontology, Object newCSRule)
Rules Integration Process and Dynamic Ontology GUI
See Dynamic Ontology GUI for this section.