Vocabulary edition

Overview

CoGui vocabulary editors allows end users to navigate through vocabulary and edit graphically its structure and contents.

In conceptual graphs concepts, relations and nested graphs must have a type. Vocabulary holds respectively three sets of types: concept types, relation types and nesting types. In accordance with underlying CG model, these structures consists in partially ordered sets with a greatest element. CoGui controls the vocabulary and, if necessary, provides tools to correct it.

Types structures respect the same rules in the three sets of types. Graphically, types are displayed as vertices. An Arc connecting vertex A to vertex B means that the type A is a kind of type B:

concept types
relation types
nesting types
arc means that dog is a kind of animal
grazing is a way to eat
praise is a sort of criticism

In many case the ordered set looks like this:

classical ordered set of concept types

In this case, the hierarchical structure is a tree. But model accepts extra connections. Two examples below illustrate non arborescent hierarchies:

   

Edition is not heavily constrained by model, in practice, the only critical error occurs when a circuit is detected. More details can be found in edition chapters.

Open, create and save vocabulary

CoGui stores data in XML format file named COGXML. COGXML documents can contain a vocabulary definition or a set of conceptual graphs or both sections. Menu file and main toolbar contain the folowing commands:

New Create a new document. Initial vocabulary consists in a type for each hierarchy and a graph set containing one empty graph
Open... Open existing COGXML document. If vocabulary and graphs are stored in separate files, the command must be used for each files. Vocabulary must be opened before graphs file.
Save Directly save current document: if vocabulary and conceptual graphs are stored in separate files, command respects initial organisation. Applicative profile can hide vocabulary or graphs, in this case the hidden part of the file is rewritten without any modification.
Save As... Create a new file and save vocabulary and graphs.

How to browse through vocabulary

When document is opened (or created) a vocabulary panel appears on left part of main window. Concept types, relation types and nesting types are displayed in three separated tabbed panels. An arborescent representation containing every path beetween maximal type and others. Nodes are alphabetically sorted, relation types are also sorted by arity

concept types
relation types
nesting types

The tree representation is usefull to create vertices in conceptual graphs by dragging types into graph editor (see Graph Edition chapter). But remember that the type's order is not necessarily arborescent. That's why same type may be retrieved several times in the tree. For same reasons an empty panel is displayed if hierarchy contains at least one circuit.Fortunately CoGui provides another graphical representation for each hierarchy.

Click right button and choose 'Edit hierarchy' option
Directly run command from menu File

A double click inside vocabulary tree have the same effect: open hierarchy in right panel, select highlighted type and scroll if necessary to make vertex visible:

two displaying modes for concept type hierarchy

Unless you decide to improve speed with big vocabulary (see below: How to work with big vocabulary), tree and graph are being kept in synchronization and you can navigate between both representations:

* a simple double click on a node in left panel select and show the (unique) corresponding vertex in hierarchy view

* a right click on vertex displays a popup menu: the 'Show type in tree' action selects (and scrolls if necessary) the corresponding node(s) on left panel.

Select 'Show type in tree'
Corresponding nodes are selected in tree

Two others options show parents or children inside graph (and scroll to them if necessary).

Shows corresponding nodes on left panel
Shows parent nodes in graph and select them
Shows children nodes in graph and selected them

A search tool is provided to retrieve a type by name. 'Search type' action in Edit menu display a dialog box. Press OK button and founded type is shown in both representations.

A search tool for each type hierarchy
every relation types begining by letter 'H' are displayed (not case sensitive)

 

 

type is shown on both representations

 

Concept type edition

A newly created concept type hierarchy contains only one type arbitrary named 'Top' . A new concept type can be inserted with 'Graph/Insert vertex/Insert concept type' in main menu. A button placed on local toolbar have same effect. 'Insert concept type' on popup menu insert type at mouse location. Following vertex is displayed: . Click twice on vertex to edit type name. Concept types can be renamed directly on vocabulary tree using 'Rename' action.

rename on graph
rename on tree

Naming conventions

Homonymous types are not allowed in same type hierarchy. Case is respected but comparisons are case unsensitive. For instance user can decide to write 'Dog' or 'dog' but can't define both words in concept type hierarchy. Blanck spaces are allowed.

rename control

A Vertex is moved by dragging box with mouse. Several vertices can be selected and moved at same time. Another way to place vertices is to run an automatic arrangement with Sugiyama layout algorithm. 'View/Arrange horiz.' and'View/Arrange vertic.' in main menu are also placed in local toolbar. Feel free to try automatic arrangements, Undo command can moved vertices at original positions.

vertical layout
horizontal layout

Concept type hierarchy control

A control command on local toolbar controls concept types hierarchy. Another command (same button on main toolbar and Tools/Control on main menu) controls all hierarchies and attached graph set.

Only one critical error can occur with graph structure: the detection of a circuit. Suppose 2 types A and B on a circuit: a path exist from A to B and another exist from B to A. It means A is a kind of B and B is a kind of A...

 

CoGui control detects circuits: all the animals are not dogs

Another model constraint is maximal concept type. By default CoGui names it 'Top', feel free to change its name or to choose another vertex as maximal. A warning message occurs if hierarchy contains more than one maximal element. A tool could automatically adds a maximal abstract type to hierarchy but it is recommended to respect this constraint.

A single maximal type is required

Anoter warning can occur when user draws redundant arc. If A is a kind of B and B a kind of C, by transitivity CoGui 'knows' that A is kind of C, an arc beetween A and C is correct but redundant. This extra arcs can obstruct graph view but extra entries on tree representation could be used as sort of shortcuts for often used types...That why CoGui accepts and stores redundant arcs. They can be removed one by one from warning popup menu. Another command named 'Transitive reduction' remove all redundant arcs.

redundant arcs can be removed one by one or together with transitive reduction

 

Relation type edition

Newly created relation type hierarchy holds an unique binary relation named ''.

A newly created relation type hierarchy contains only one binary type arbitrary named 'Binary_rel' . A new concept type can be inserted with 'Graph/Insert vertex/Insert relation type' in main menu. A button placed on local toolbar have same effect. 'Insert relation type' on popup menu insert type at mouse location. Following vertex is displayed: . Click twice on vertex to edit type name. Relation types can be renamed directly on vocabulary tree using 'Rename' action.

rename on graph
rename on tree

Naming conventions

Homonymous types are not allowed in same type hierarchy. Case is respected but comparisons are case unsensitive. For instance user can decide to write 'Binary_rel' or 'binary_rel' but can't define both words in relation type hierarchy. Blanck spaces are allowed.

homonymous relation types are not allowed

 

See previous chapter about vertices arrangement (same features are provided for each hierarchy).

Relation types signature

A signature must be associated with each relation type. A signature is an ordered list of concept types (numbered from 1 to arity). Arity is the length of the list.

Signature can be edited with 'Edit signature' command on popup menu. Signature dialog box offers ability to change arity and specialize related concept types.

select a relation type and choose 'edit signature' on popup menu
signature dialog box

Press assistant button and choose arity or direct edit arity number and press 'Apply' button to confirm. lines are added or removed from table. Each concept type can be changed directly or with assisted button.

choose arity
Apply button adds or removes lines in signature table

A fastest way to obtain signature is to drag from left vocabulary panel an existing relation type and drop into editor. Copy and paste do same action. A new relation type is created which have same signature.

Relation type hierarchy control

Such like in concept type hierarchy, circuits are forbidden. The only difference with concept type hierarchy is due to signatures. The constraints are:

1) relation types are grouped by arity. Each 'arity family' must have a maximal element.It means that graph is separated by sort of arity and a unique maximal element is required for each of these branches.

2) on same arity branch if a relation type A is kind of relation type B, it means that every concept type in A signature is respectively a kind of concept type in B signature. For example if graze(herbivore,plant) is kind of eat(animal,food) their signatures respect compatibility if herbivore is a kind of animal and if plant is a kind of food

 

 
CoGui verify signature's compatibility and gives concept type number when error is detected
 

Nesting type edition

Newly created nesting type hierarchy holds an unique nesting type named 'Nesting'.

Naming conventions and structure restrictions are exactly same as concept types hierarchy, consult 'Concept type edition' paragraph. Of course homonymous types are allowed through different hierarchies but not recommended (suppose future function transforming nested graphs).

How to work with big vocabulary

Future release of CoGui will provide a reduced mode edition such like conceptual graph editor. At this time whole hierarchy is edited.

If out of memory error occurs, change java command line options. For example -Xmx128m set maximal java heap size to 128 Mo (default is 64).

If edit actions on graph take a long time, speed can be improved by stopping synchronization between the both representation. Hierarchy tree is no more updated until each action. To retrieve some lost browsing facilities, a control will synchronize again on demand. Select Tools/Preferences menu option. In general/voc.editor section uncheck 'update vocabulary during edition'.

Synchronization between tree and graph can be stopped

Preferences

 


 
User Guide , Previous chapter , Next chapter