CG Operations GUI

 

by Adil Kabbaj *

 

Last update: January 2008

Last version: Amine 5

 

 

 

 

Introduction

Getting Started

Online Demo

CGOperations GUI "in action"

Examples

Update of this GUI

 

* The first version of this document, presented in the web site of Amine Platform 1.0, has been prepared with the collaboration of Karim Bouzoubaa. The current version takes into account the update of the GUI and also the content and the organization of the new web site.

 

 

 

Introduction

CG Operations GUI gives the user the opportunity to activate directly CG operations without dealing with CG and CGOperations APIs (for those who are not Java programmers). CG operations that are considered by CGOperations GUI are: Equal, Maximal join, Generalize, Subsume, Subsume with result, Expand, and isCanonic. Multi-lingua and multi-notations CG editors are integrated to CGOperations GUI, providing the user the possibility to express his/her CGs in different languages and notations. See CGNotations GUI for more detail on CG editors.

This document describes the main components and functionalities of CG Operations GUI.

 

 

Getting Started

At the beginning (Figure 1), the user has to activate the action Ontology/Load to load the ontology that will be used to manipulate CGs (by parsers, generators, and CG operations).

 

                           

 Figure 1: Getting Started by loading an Ontology

 

Once the selected ontology is loaded, the main frame of the CGOperations GUI is displayed (Figure 2). It is composed of a main split pane: its top pane contains the two input CGs and its bottom pane contains both the output CG and buttons for CG operations. The top pane is itself a split pane: its left pane contains the first input CG and the right pane the second input CG. Hence, three multi-lingua/multi-Notations CG editors are integrated in CGOperations GUI for the edition of the two input CGs and the one output CG.

Let us consider now the composition of an input CG panel: beside the multi-lingua/multi-Notations CG editors component (in Figure 2, we have two languages panels: English and French, because the current ontology has these two languages), the CG input panel contains a menu bar that contains a label ("input CG1" or "input CG2"), two buttons (GetCS and SetCS), and a text field for the optional entry concept. Specification of entry concept is not mandatory. See CGOperations for more detail on the meaning of entry concept. In Figure 2, we enter two input CGs with entry concepts for the two.

Buttons GetCS and SetCS: user can enter a new CG, or open a CG file with the action File/Open, or (s)he can use the button GetCS to access the current ontology to get a specific Conceptual Structure (a concept type definition, a relation type definition, the description of an individual, a canon, or a situation). Moreover, (s)he can change the description of the structure and then use the button SetCS to set the new version in the current ontology. We present examples of these possibilities below.

 

Note: The idea to incorporate buttons GetCS/SetCS in the three components to allow a direct access to the current ontology has been proposed by Henrik Scharfe, from Aalborg, Danish. Other ideas from Henrik and Peter Ohrstrom (i.e. to check CG canonicity, to allow a direct and rapid access to the current ontology in order to update it, etc.) have been incorporated in this GUI.

 

Let us consider now the bottom part of the main frame, this part concerns the output CG (if the operation returns a CG) and buttons for CG matching-based operations. See CGOperations for detail on these operations. CG operations can be activated by these buttons or from the menu CG Operations. Figure 2 shows the result of the maximalJoin on the two input CGs. The result can be saved in a CG file with the action File/Save or File/SaveAs, or it can be stored in the current ontology as a CS (using the button Set CS).

 

Figure 2: CGOperations GUI

 

General functionalities of CGOperations GUI

CGOperations GUI and CGNotations GUI have in common the main frame and functionalities: menus File (New, Open, Save, SaveAs, Close), Edit (Undo, Redo, Cut, Copy, Past), Font (Bold, and the possibility to choose different sizes), and Search (Find, FindAgain, Replace, ReplaceAll), Parameters, and Ontology. Actions of menus File, Edit, Font and Search are applied according to the current active CG editors (the first input CG, the second input CG, or the output CG). Two actions have been added to menu Edit: Clear to clear the content of the current active CG editors, and ClearAll to clear the three CG editors.

We repeat here the description of menus Ontology and Parameters that are provided also by CGNotations GUI:

- Actions Ontology/Close and Ontology/Load enable the user to close the current ontology and to load a new one. During the edition of CGs, the user needs very often to browse, consult, or update the current ontology (to change the identifier of a type, to add a new type, etc.). To respond to these needs, the menu Ontology provides the action Ontology/Run LexiconsOntology GUI which activates LexiconsOntology GUI for the current ontology (user has not to load the current ontology in LexiconsOntology GUI, it is done implicitly). Consultation and changes of the current ontology can be done with LexiconsOntology GUI which is used in this case as an extension of CGOperations GUI. Two additional actions have been added to the menu Ontology in CGOperations GUI: Save and SaveAs. They are useful since after the activation of SetCS button(s), user may want to save these additions in the current ontology.

 

- Menu Parameters specifies several boolean parameters:

- Mixed Language: this parameter allows for a mixed description. See CGNotations GUI for more detail. It is associated to the ontology. See Ontology for more detail.

- Ignore Case: if this parameter is true, Amine ignores case. If it is false, Amine becomes case sensitive. This parameter is associated to Identifier. See Lexicon and especially Identifier API for more detail.

- Functional CG: In CGOperations GUI, this parameter is true by default and its value can not be changed. The reason is that CG operations are defined on functional CG only. See CGOperations for more detail.

- CG Canonicity: if this parameter is true, only canonic CGs are allowed. If it is false, user is free to specify any CG. This parameter is associated to CG. See CG for more detail.

 

Online Demo

All On-Line Demonstrations are reduced to the activation of AminePlatformSuite GUI: all Amine's GUIs can be activated from this main GUI. This later provides also a menu (Ontologies) for the activation of all the available ontology samples and a menu (Tests) for the activation of all the available tests.

 

CGOperations GUI "in action"

This section presents some examples that illustrate how CGOperations GUI can be used and exploited.

 

-> Example 1: Entry concept

As noted in the introduction, the specification of entry concept is not necessary. Figure 2 presents the call of maximalJoin on two CGs with two entry concepts. Figures 3 and 4 present two different calls to maximalJoin on the same CGs as those used in Figure 2. In Figure 3, other entry concepts are considered (these examples illustrate the fact that entry concept are not fixed and associated for ever to a CG. They are parameters for the CG operation. See CGOperations for more detail). In Figure 4, entry concepts are not given. This example illustrates also some features of CGNotations GUI: CG can be expressed in different languages (of the current ontology) and different notations (LF or CGIF, Diagram/Graphic form will be available in the next version). Hence, Figure 3 shows the first input in English and in LF, the second input in French and in LF, and the output in English and in CGIF. Another "configuration" in the formulation of CGs is presented in Figure 4.

 

           

Figure 3: same CGs like in Figure 2 but with different entry concepts

 

       

Figure 4: same CGs like in Figures 2 & 3 but without entry concepts

 

-> Example 2: Different sources for input CGs

Figures 5 and 6 illustrate the possibility to load a CG from a CG file, the possibility to get a CG from the current ontology, and the possibility to store a CG as a description of a CS in the current ontology. For instance, the first input CG in Figure 5 has been loaded from file "C:\simpleCG1.lnf" with the action File/Open. The second input CG will be fetched from the current ontology due to the activation of the button  Get CS (Figure 5). Activation of this button produces a dialog frame that prompts the user to specify the type/individual identifier of interest, the language in which the identifier is expressed, and what type of CS required (individual, definition, canon, or situation). In our example (Figure 5), user wants to get a situation for the type Man. Result of this interaction is shown in Figure 6.

 

Figure 5: Different sources for the input CGs

 

Figure 6 shows the result of the application of the operation generalize on the two input CGs. The Figure illustrates also the possibility to store the result as a description of a CS in the current ontology. In our example, user selects the button Set CS associated to the output CG panel. Its activation produced a dialog frame and the user specified that the result should be stored as a canon for concept type "ConsomableObject". Of course, the result can be stored also in a CG file, by using the action File/Save or File/SaveAs.

 

Figure 6: Store the result as a description of a CS in the current ontology

 

 

Examples

To get familiarity with CG operations and CGOperations GUI, and also to be able to test most of the examples given in CGOperations, we reproduce here these examples, each example is organized in a table where the two input CGs are given. Reader can run CGOperations GUI and then, for each example, copy the two input CGs from the table and activate the CG operation.

Note: The action Edit/ClearAll can be used to clear the content of all the editors in order to consider a new example.

 

Maximal Join

Example 1:

[Drive]-

   -obj->[Car],

   -agnt->[Person:{Bob, Andre}]

[Drive]-

   -manr->[Fast],

   -agnt->[Boy : {John, Bob, Sam}]

 

Example 2:

[Drive]-

    -obj->[Car],

    -agnt->[Person: Andre]

[Drive]-

    -manr->[Fast],

    -agnt->[Boy : {John, Bob, Sam}]

 

 

 Example 3:

[Drive]-

   -obj->[Car],

   -agnt->[Person: Mary]

[Drive]-

   -manr->[Fast],

   -agnt->[Boy : {John, Bob, Sam}]

 

 

 Example 4:

[Begin]-
   -obj->[Session],

   -srce->[Proposition = [Press]-
                            -obj->[Key : enter]-partOf->[Keyboard],
                            -agnt->[Person : John]],

   -agnt->[Person : John]

[Begin]-
   -srce->[Proposition = [Press]-
                            -obj->[Key],
                            -manr->[Fast],
                            -agnt->[Person]],
   -agnt->[Man]

 

 

 Example 5:

[Begin]-
  -obj->[Session]  

  -srce->[Proposition = [Press]-
                           -obj->[Key : enter]-
partOf->[Keyboard],

                           -agnt->[Person]],

  -agnt->[Person]

[Begin]-
  -srce->[Proposition = [Look]-
                           -dest->[Person],

                           -pat->[Person]],
  -agnt->[Man]

 

 

 Example 6:

[Begin]-
    -obj->[Session],
    -srce->[Proposition = [Press]-
                              -obj->[Key : enter]-
partOf->[Keyboard],
                              -agnt->[Person
?x]],
    -agnt->[Person *x]

[Begin]-
    -srce->[Proposition = [Look]-
                             -dest->[Person],
                             -pat->[Person]],
    -agnt->[Man]

 

Generalize

Example 7:

[Drive]-
     -obj->[Car]-chrc->[Color : red],
     -agnt->[Boy : John]

[Drive]-
      -obj->[Truck],
      -manr->[Fast],
      -agnt->[Girl : Sue]

 

 

 Example 8:

[Person:{John,Sam,Sue,Mary}]<-agnt-[Drive]-obj->[Car]-chrc->[Color:red]

[Girl : {Sue, Mary}]<-agnt-[Drive]-

                               -obj->[Truck],

                               -manr->[Fast]

 

 

 Example 9:

[Person:{John,Sam,Sue,Mary}]<-agnt-[Drive]-obj->[Car]-chrc->[Color : red]

[Girl : Sue]<-agnt-[Drive]-

                     -obj->[Truck],

                     -manr->[Fast]

 

Example 10:

[Person *x]<-agnt-[Begin]-

                    -obj->[Session],

                    -srce->[Proposition = [Press]-

                                   -obj->[Key : enter]-partOf->[Keyboard],

                                   -agnt->[Person ?x] ]

[Man]<-agnt-[Begin]

               -srce->[Proposition = [Boy]<-agnt-[Action]-dest->[Person] ]

 

 

Example 11:

[Person:x]<-agnt-[Begin]-
                    -obj->[Session]
,

                    -srce->[Proposition=[Press]-
                              
        -obj->[Key:enter]-partOf->[Keyboard],

                                      -agnt->[Person : x] ]

[Man:y]<-agnt-[Begin]-

              -srce->[Proposition=[Boy]<-agnt-[Action]-dest->[Person : y] ]

 

Subsume and Subsume with result

Example 12:

[Person]-child->[Person]

[Man:John]-child->[Boy:Bob]<-agnt-[Love]-obj->[Girl:Mary]

 

Example 13: 

[Person]-child->[Person : {John, Sam}]

[Man:John]-child->[Boy:{Bob,John,Andre,Sam}]<-agnt-[Love]-obj->[Girl: Mary]

 

Example 14:

[Person]-child->[Person : {John, Sam}]

[Man:John]-child->[Boy:{Bob,John,Andre}]<-agnt-[Love]-obj->[Girl:Mary]

 

Example 15:

[Person]<-agnt-[Begin]-

   -srce->[Proposition=[Person]<-agnt-[Action]-obj->[Object]]

[Man]<-agnt-[Begin]-

             -obj->[Session],

             -srce->[Proposition =

                   [Boy]<-agnt-[Press]-obj->[Key:enter]-partOf->[Keyboard]]

 

Example 16:

[Person:x]<-agnt-[Begin]-

   -srce->[Proposition=[Person:x]<-agnt-[Action]-obj->[Object]]

[Man]<-agnt-[Begin]-

             -obj->[Session],

             -srce->[Proposition =

                [Boy]<-agnt-[Press]-obj->[Key:enter]-partOf->[Keyboard]]

 

 

Equal

 

           

 

 

Expand

Expand has one input CG, the other argument is the concept/relation to expand. Figure 7.a shows an example of concept expansion: only the first input CG panel is used and the concept to expand is specified in the text field for entry concept (Figure 7.a). The result of the expansion is shown in the output panel. Figure 7.b shows an example of relation expansion: the relation type to expand is specified in the text field for the entry concept (Figure 7.b). Of course, in both cases, expansion is possible only if the definition for the specified type exists already in the ontology !

 

 

                    (a) Expand concept                                                    (b) Expand relation

Figure 7: Expand concept and relation

 

IsCanonic

If the parameter specified at Parameter/CG Canonicity is true, then automatic check of CG canonicity is done (by LF and CGIF parser). If it is false, the operation IsCanonic can be activated to check the canonicity of a CG (the first input CG).

 

 

Update of this GUI

 

CGOperations GUI has been updated to include the new CG operations (available with Amine 3): buttons for contract, analogy and compare operations have been added. This new update includes also the update of "CG Editors Panel"; CG graphic editor and CG drawing are now functional.