Web Interaction


Populating the ontology by dragging information from web pages and "bookmarking" them

Semantic Turkey offers a few drag&drop gestures for easily acquiring information from web pages and use them to populate/enrich the ontologies.

The drag&drop gestures fire actions like the creation of new classes, or istances of classes, or relantionships between entities. Also, a reference to the web page (or even to the specific portion of text which has been selected) where the information has been acquired is stored.

The above actions usually involve the generation of 4 to 7 RDF triples, and thus represent useful shortcuts for acquiring knowledge from the Web. Moreover, with these shortcuts Semantic Turkey can be easily used for data entry, by people with no RDF nor ontology-modeling background.

In the following section, the more common gestures are listed and described:

Drag&drop of text over a class

It is possible to drag and drop a selection of text from a web page on the icon of a class.

drag and drop text to create and instance

The following window will open:

actions following text dragged over a class

The following options are available:

Create a new instance

In the first case, an instance is thus created and shown in the instance list widget under the class tree. A context-menu option allows to access the web pages which are associated to that istance.

weblinks option

By selecting the "WebLinks" option, a window like the one below will open, showing all the web pages which contain mentions of that individual.


The linking between objects and web pages is registered in the ontology repository, and its elements are defined according to the Annotation ontology of Semantic Turkey, which is hidden to the user (classes mentioned of this ontology, and their instances, that is the annotations, can be made explicitly visible as RDF entities through the menu option "Tools-->Semantic Turkey-->Visualization Level-->debug", otherwise they are available through these dedicated windows).

Create a property value for the class

The second option allows to create a property value for the entity where the text has been dropped over (in this case, the class foaf:Person). We will show an analogous example in the drag&drop of text over an instance

Create a new annotation for the class

The second option allows to create a further annotation for the entity where the text has been dropped over (in this case, the class foaf:Person). We will show an analogous example in the drag&drop of text over an instance

Drag&drop of text over an instance

Analogously to the case for classes, it is possible to drag&drop text over instances.

In the example, the research interest: "Knowledge Based Systems" is being dragged over the individual: "Armando Stellato".

drag and drop text over an instance to add/create a datatype property value

Again, a dialog, like the previous one, will prompt the user to choose which action to undertake:


The options this time are two, as the first one for the classes (i.e. "create an instance for the class") is obviously not available.

Create a property value for the class

By selecting the first option, a list of properties will be shown. Note that these properties are "proposed properties", filtered from the full list of properties on the basis of their domain (e.g. all properties which have in their domain any of the classes to which the instance where the text has been dropped over belongs). Note however the "Show all properties" option, which allows to show all properties in the managed dataset. Knowledge modeling in OWL follows in fact an inferential approach, in which we are not necessarily restricted by constraints and by the knowledge we have about certain entities. On the contrary, we may "infer" that the instance "Armando Stellato" belongs to a further class it was not declared for, because it is bound to a value through a property with the domain set in that class.

individual description

For this example, we have coined a new property, called :interest. FOAF has also a property with the same name (i.e. foaf:interest), but it is (quite weirdly, erm...) not meant to be associated to interests, but to "documents about interests", while we want to represent interests on their own, and then eventually associated web pages to them. We have thus defined our own property with domain still set on foaf:Person, but range on skos:Concept (it is common practice to represent topics of interest as skos:Concepts in a concept scheme).

so, after double clicking on the property, or selecting it and then clicking on the annotate instance button, the following window will appear:

selecting or creating a target instance

The :interest property is an object property, thus a further step is required: choose an existing instance (bottom right button), or create a new one (bottom left button). As for the filter on the property selection, in this case the classes are filtered by rooting the tree on the class(es) in the range of the :interest property, but, same as for the previous case, it is possible to see all classes by clicking on the "Show all classes" option.

In this case, since there are no existing topics in the skos:Concept class still, we select to create a new topic through the button on the left. A new instance of skos:Concept (or, shortly, a new concept) will be created, with the name taken after the selected text, and containing a reference to the web page where the annotation has been taken.

By double clicking on the "Armando Stellato" instance, it is possible to see that the :Knowledge Based Systems object is now linked to it through the :interest property.

selecting or creating a target instance

Also, this time the annotation (the web link) will be related to the linked object (:Knowledge Based Systems) and not to the subject (:Armando Stellato)

Note that it is possible to choose different kind of properties.

Object properties (in blue, with a white vertical stripe) are called Object Properties and express relationships between existing objects of your domain. The previous example was based on an object property.

Datatype properties (in green) bind objects to simple literals. Wrt previous case, once the property is selected, a simple literal value with its content equal to the selected text is linked through ther selected property to the entity where the text has been dropped.

Annotation properties (in yellow) can be used to provide useful annotations about your ontology/data; their values can be characterized by the language in which they are expressed (which is prompted for by the application): you can use, for example, "rdfs:comment" to add documentation about the intention of a given class, by acquiring the definition from a web page, or "rdfs:label" to provide additional linguistic descriptors for the same object (synonyms, translations).

Add a further annotation

We show this directly through the following example:

after opening the page: http://www.ingegneria-online.it/?q=node/12, drag again, as done in the previous cases, the text "ARMANDO STELLATO" over the homonimous existing instance

drag and drop text over an instance to add a further annotation

now, when the dialog below appears, choose the second option (third in the case of a drag&drop over a class) from the radio buttons: "Create a new annotation for the instance (class)".

With this action, a further weblink has been added to the individual "Armando Stellato", which can be inspected, as usual, from the "WebLinks" view shown above.

Linking skos:Concepts as topics for a page

skos:Concepts are often used to represent "topics of interest". For this reason, we have provided a very broad annotation mechanism which works with a gesture which has been "inverted" with respect to those seen so far. Whenever a SKOS or SKOS-XL project has been loaded in ST, it is possible to drag a concept from the concept tree inside the currently browsed page, as in figure below, where the "Galaxy Formation" concept (from the Unified Astronomy Thesaurus) is being dragged over the page of wikipedia describing the formation of galaxies

associating a topic to a web page

By opening that concept after performing the action above, it is possible to see the page associated to that topic

associating a topic to a web page

Customizing the Annotation Actions

The set of actions which are associated to each gesture is configurable and also extensible. See more details on the docs about the Options Menu.