Documentation/AnalysisTool: Unterschied zwischen den Versionen

Aus Semantic CorA
Wechseln zu: Navigation, Suche
Zeile 1: Zeile 1:
 
This page describes AnalysisTool implementation, version two. Several improvements by the last version which extend SMW search result capabilities.
 
This page describes AnalysisTool implementation, version two. Several improvements by the last version which extend SMW search result capabilities.
In regular SMW, it is not possible to display properties (printouts) defined at the different levels on the same nested query. The printout properties should belong only to the outer query.  
+
In regular SMW, it is not possible to display properties (printouts) defined at the different levels on the same nested query. In these queries, the printout properties should belong only to the outer query. Even it is possible to add printouts at different levels, those defined at inner levels have not been displayed.
  
 
Example:
 
Example:
Zeile 8: Zeile 8:
 
|?Relevat for project|?Lemma title|?Year of Publication|?Tag|?ImageAnnotationText|format = table}}</pre>
 
|?Relevat for project|?Lemma title|?Year of Publication|?Tag|?ImageAnnotationText|format = table}}</pre>
  
More, the ImageAnnotation entity is not directly linked to Lemma entity.  
+
In the previous query, only Relevat for project, Lemma title and Year of Publication will be displayed.
 +
 
 +
In Cora wikis, there are some other drawback that would be desirable to overcome. One example is created by the situation in which the ImageAnnotation entity is not directly linked to Lemma entity. This situation is solved at the AnalysisTool extension level.
  
 
== Tool configuration ==
 
== Tool configuration ==

Version vom 20. November 2014, 15:06 Uhr

This page describes AnalysisTool implementation, version two. Several improvements by the last version which extend SMW search result capabilities. In regular SMW, it is not possible to display properties (printouts) defined at the different levels on the same nested query. In these queries, the printout properties should belong only to the outer query. Even it is possible to add printouts at different levels, those defined at inner levels have not been displayed.

Example:

{{#ask: [[Category:Lemma]][[Relevant for project::Helden und Denker]][[Year of Publication::<1900]]
[[Has Annotation::<q>[[Category:ImageAnnotation]][[Tag::~*zz*]]</q>]]
|?Relevat for project|?Lemma title|?Year of Publication|?Tag|?ImageAnnotationText|format = table}}

In the previous query, only Relevat for project, Lemma title and Year of Publication will be displayed.

In Cora wikis, there are some other drawback that would be desirable to overcome. One example is created by the situation in which the ImageAnnotation entity is not directly linked to Lemma entity. This situation is solved at the AnalysisTool extension level.

Tool configuration

To outcome these, we inserted two virtual properties:

  • Is annotation of article
  • Has Annotation

At the LocalSettings.php level, certain global variables should be configured:

$atFullImagePath = '/var/www/mediawiki/hosteurope_testwiki/upload/';
$atAnnotationCategory = 'ImageAnnotation';
$atImageAnnotationNamespace = 'ImageAnnotation';
$atImagePathProperty = 'SIAannotatedImage';
$atVirtualProp = array('Is annotation of article'=>
                     array("property" =>"Part of Article",
                           "direction" =>"LTR",
                           "link" => $atImagePathProperty,
                           "inverse" => "Has Digital Image",
                            "prefix"=> "File:"),
                        'Has Annotation' =>
                     array("property" =>"Has Digital Image",
                           "direction" =>"RTL",
                           "link" => $atImagePathProperty,
                           "inverse" => "Part of Article",
                           "prefix"=> "File:")
                       );

Legend:

$atFullImagePath = is the physical server path to the image repository. It depends on the MediaWiki version and admin settings.

$atAnnotationCategory = category for annotations.

$atImageAnnotationNamespace = the namespace for annotations.

$atImagePathProperty = semantic property name that defines the annotation - image relationship.

$atVirtualProp = array which describes a relationship graph. There are a correspondent entry for each of virtual property.


These global variables should be configured by wiki administrator.

Use cases for Has Annotation virtual property

  1. Give me all lemmata created before 1900 and relevant for project Helden und Denker, with a specified substring in Tag property.

Give me all lemmata created before 1900 and relevant for project Helden und Denker, with a specified substring in Tag.

Users could choose properties from both categories: Lemma and ImageAnnotations. The ResultSet is as follows:

Result Set with AT

Use cases for Is annotation of article virtual property

The following example requires properties defined at 3 levels: ImageAnnotation, Lemma and Person.

{{#ask: [[Category:ImageAnnotation]][[Tag::~*Platon*]][[Is annotation of article::<q>[[Category:Lemma]]
 [[Relevant for   project::~*Helden*]][[Year of Publication::>1900]][[Author::<q>[[Category:Person]][[Religion::~*Kat*]]</q>]]</q>]] 
 | ?Project|?Tag|?ImageAnnotationText|?SIAcreatedBy|?Relevant for project|?Year of Publication|
 ?Author|?First Name|?Last Name|?Geburtsdatum|? Geburtsort|?Religion|format=Table }}

Query - first part

Query - second part

Users could choose properties from three categories: Lemma, Person and ImageAnnotations. The ResultSet is as follows:


Query Result