CG Operations GUI



Adil Kabbaj *




* 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.




Getting Started

Online Demo

CGOperations GUI "in action"


Animation of CG Operations




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 3 presents the call of contraction operation.


Figure 3: Entry point


-> 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




To get familiarity with CG operations and CGOperations GUI, and also to be able to test most of the examples given in CGOperations, we provide samples for CG operations in directory "aminePlatform\samples\cgOperations" (Figure 7). Each example is presented with the two input CG (g1 and g2), except for monadic CG operation (like contract or expand). The user can use CGOperations GUI, load the first CG g1 in the first panel, the second CG g2 in the second panel and launch the desired operation.


Figure 7: Examples of CGOperations


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



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



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).


Animation of CG Operations

CGOperations GUI provides a possibility to see an animation of the operation. Two modes of animation are available: "continues animation" or "step by step animation", i.e. a possibility to see the application of the operation step by step on the drawing of the two CGs. Animation enables user to see how the progressive matching of concepts and relations produces the new CG that results from the matching. Of course, it is worth seeing the animation than reading a description of it ! Meanwhile, here is some snapshots of a simple example to give the reader an idea of this pedagogical feature.

To run the following example, load first the Ontology "samples/ontology/ManOntology2.xml". Figure 8 shows two CGs G1 and G2 and the activation of the option "StepByStep Animation". Figure 9 shows some snapshots of the animation of the generalization operation. Note that animation concerns the graphical view of CG; so you should select CG Graphic Editor for the two input CGs, as well as for the output CG.


Figure 4: Activation of Animation option


(a) The two matched concepts ([Eat] in G1 and [Eat] in G2) are highlighted first with red color (not shown in this snapshot) then they are visualized with blue color (to differentiate them from no matched concepts)



(b) match the two relations of type agnt: first match their target concepts



(c) Now, the three parts of the two relations (source and target concepts, and relation types) are matched, note that the relation segments and names are highlighted first with red color (not shown in this snapshot) then they are visualized with blue color (to differentiate them from no matched relations)


The same process continues until the termination of the operation.

"Continues Animation" option enables an animation of the CG operation but without control from the user (the Message "Click On Ok to continue" does not appear).