Documentation/AnalysisTool: Unterschied zwischen den Versionen
(19 dazwischenliegende Versionen von 2 Benutzern werden nicht angezeigt) | |||
Zeile 1: | Zeile 1: | ||
− | This page describes AnalysisTool implementation, version two. | + | == Generalities == |
− | In regular SMW, it is not possible to display properties (printouts) defined at the different levels on the same nested query. | + | The '''AnalysisTool''' extension is a group of extensions for [[Extension:Semantic_MediaWiki|Semantic MediaWiki]]. This group of extensions provides an user interface that allows to interactively create semantic queries using a hierarchical defined ontology (taxonomy): book, volume, article, physical representation of book page as image, image annotations, tags, etc. |
+ | |||
+ | Example of such an ontology: | ||
+ | * Book (Lexicon) | ||
+ | * Volume | ||
+ | * Article (Lemma) | ||
+ | * Page as images | ||
+ | * Image annotations | ||
+ | * Tags | ||
+ | * Persons | ||
+ | * Places. | ||
+ | Components: | ||
+ | # The first component extension allows users to simply edit the ontology using a special page component. [http://smw-cora.org/index.php/Documentation/AnalysisToolSpecial AnalysisToolSpecial] | ||
+ | # The second component allows for interactively edit of semantic queries. The result set will evaluated inline and the result displayed to the user interface. Complex semantic queries could be addressed using this interface. In a regular semantic wiki, nested semantic queries are possible, but not all semantic properties values are shown. | ||
+ | |||
+ | == Extension versions == | ||
+ | |||
+ | This page describes AnalysisTool implementation, version two. Documentation for the first version is [http://smw-cora.org/index.php/Documentation/AnalysisTool/First_version here]. | ||
+ | |||
+ | == Use cases == | ||
+ | |||
+ | 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 are restricted to outer queries. Even it is possible to add printouts at different levels, those defined at inner levels are not displayed. | ||
Example: | Example: | ||
− | <pre>{{#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}}</pre> | + | <pre>{{#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}}</pre> | ||
− | + | In the previous query, only "Relevant for project", "Lemma title" and "Year of Publication" will be displayed. | |
+ | |||
+ | Further a drawback of the VFU-ELF is adressed: the ImageAnnotation entity is not directly linked to Lemma entity. This problem is solved in the AnalysisTool by creating virtual properties. | ||
== Tool configuration == | == Tool configuration == | ||
Zeile 13: | Zeile 38: | ||
* Is annotation of article | * Is annotation of article | ||
* Has Annotation | * Has Annotation | ||
− | At the LocalSettings.php level, certain global variables should be | + | At the LocalSettings.php level, certain global variables should be configured: |
<pre> | <pre> | ||
$atFullImagePath = '/var/www/mediawiki/hosteurope_testwiki/upload/'; | $atFullImagePath = '/var/www/mediawiki/hosteurope_testwiki/upload/'; | ||
Zeile 35: | Zeile 60: | ||
</pre> | </pre> | ||
− | + | '''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 == | ||
+ | |||
+ | # Give me all lemmata created before 1900 and relevant for project Helden und Denker, with a specified substring in Tag property. | ||
[[File:AT 01.jpeg| Give me all lemmata created before 1900 and relevant for project Helden und Denker, with a specified substring in Tag.]] | [[File:AT 01.jpeg| 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: | + | Users could choose properties from both categories: Lemma and ImageAnnotations. |
The ResultSet is as follows: | The ResultSet is as follows: | ||
[[File:AT 02.jpeg| Result Set with AT]] | [[File:AT 02.jpeg| Result Set with AT]] | ||
− | + | ||
− | ?Project|?Tag|?ImageAnnotationText|?SIAcreatedBy|?Relevant for project|?Year of Publication|?Author|?First Name|?Last Name|?Geburtsdatum|? Geburtsort|?Religion|format=Table }}</ | + | == Use cases for '''Is annotation of article''' virtual property == |
+ | |||
+ | The following example requires properties defined at 3 levels: ImageAnnotation, Lemma and Person. | ||
+ | |||
+ | <nowiki>{{#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 }}</nowiki> | ||
+ | |||
+ | [[File:AT 03.jpg | Query - first part]] | ||
+ | |||
+ | [[File:At 04.jpg| Query - second part]] | ||
+ | |||
+ | Users could choose properties from three categories: Lemma, Person and ImageAnnotations. | ||
+ | The ResultSet is as follows: | ||
+ | |||
+ | |||
+ | [[File:At 05.jpg| Query Result]] | ||
+ | [[Category:Documentation]] |
Aktuelle Version vom 27. November 2014, 16:25 Uhr
Generalities
The AnalysisTool extension is a group of extensions for Semantic MediaWiki. This group of extensions provides an user interface that allows to interactively create semantic queries using a hierarchical defined ontology (taxonomy): book, volume, article, physical representation of book page as image, image annotations, tags, etc.
Example of such an ontology:
- Book (Lexicon)
- Volume
- Article (Lemma)
- Page as images
- Image annotations
- Tags
- Persons
- Places.
Components:
- The first component extension allows users to simply edit the ontology using a special page component. AnalysisToolSpecial
- The second component allows for interactively edit of semantic queries. The result set will evaluated inline and the result displayed to the user interface. Complex semantic queries could be addressed using this interface. In a regular semantic wiki, nested semantic queries are possible, but not all semantic properties values are shown.
Extension versions
This page describes AnalysisTool implementation, version two. Documentation for the first version is here.
Use cases
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 are restricted to outer queries. Even it is possible to add printouts at different levels, those defined at inner levels are not 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 "Relevant for project", "Lemma title" and "Year of Publication" will be displayed.
Further a drawback of the VFU-ELF is adressed: the ImageAnnotation entity is not directly linked to Lemma entity. This problem is solved in the AnalysisTool by creating virtual properties.
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
- Give me all lemmata created before 1900 and relevant for project Helden und Denker, with a specified substring in Tag property.
Users could choose properties from both categories: Lemma and ImageAnnotations. The ResultSet is as follows:
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 }}
Users could choose properties from three categories: Lemma, Person and ImageAnnotations. The ResultSet is as follows: