Help:Semantic MediaWiki

From Semantic Portal Wiki

Jump to: navigation, search

This tutorial discusses frequently used features of Semantic MediaWiki

Contents

How to Edit

declare a category

example:

  [[Category:Document]]

notes:

  • if the namespace of this page is "Category" (indicating this page refers to an OWL class), then this syntax creates a subclass triple
 (THIS-PAGE, rdfs:subClassOf, Document)

otherwise (indicating this page refers to an OWL individual), this syntax creates a class triple

 (THIS-PAGE, rdf:type, Document)
  • this syntax does not display anything on wiki page

exercise:

What triple can be generated by the following three SMW syntax

   [[Category::University]]
   [[Category:University]]
   [[:Category:University]]

add a triple

the conventional way (this will hide the property)

[[test property::test page]]

test page

use parser functions (this will hide both property and value)

{{#set:test property=test page}}


annotate triple whose value has bracket [ (not yet working)

{{#Property:test propeerty2|[(+/-)-trans-1,3,4,4a,5,10b-hexahydro-4-propyl-2H-[1]benzopyrano[3,4-b]-pyridin-9-ol]}}

{{#Property:test propeerty2|[(+/-)-trans-1,3,4,4a,5,10b-hexahydro-4-propyl-2H-[1]benzopyrano[3,4-b]-pyridin-9-ol]}}

reference

How to Query

basic query

query pages in category

{{#ask:[[Category:Person]]}}

query pages in category, but do not include pages having namespace, e.g. subclass of this category

{{#ask:[[Category:Person]][[:+]]}}

query pages in category, only include pages having Category namespace

{{#ask:[[Category:Person]][[:Category:+]]}}


query pages whose property has value

{{#ask:[[Category:Person]][[last name::+]]}}

query pages whose property has certain value

{{#ask:[[Category:Person]][[last name::Ding]]}}

query with Boolean operators

"AND" - conjunctive query This is the default semantics that connects query constraints

{{#ask:[[first_name::Li]][[last_name::Ding]]}}

result: Li Ding


{{#ask:[[Category:smwbp_instance_templates]][[Category:smwbp_foundation_templates]]}}
  • result:
  • total: 0

"OR" - disjunctive query

{{#ask:[[last_name::Ding||Bao]]}}

result: Jie Bao, Li Ding, Zhongli Ding


{{#ask:[[Category:smwbp_instance_templates||smwbp_foundation_templates]]}}

"NOT" - negation

{{#ask:[[last_name::!Ding]]}}

result: A. Krishna Sinha, Abdelmounaam Rezgui, Aditya Kalyanpur, Akshay Java, Alain Leger, Alberto H. F. Laender, Alessandro Sette, Alex Borgida, Alex Sim, Alexander P. Morgan, Allan Hollander, Alyssa Glass, Amedeo Cesta, Amit P. Sheth, Anat Levin, Andre O. Falco, Andrea M. Simon, Andrew J. Cowell, Andrew Maffei, Andrew Schain, Andriy Parafiynyk, Andrzej Nowak, Ankesh Khandelwal, Ann L. Chervenak, Anne Wilson, Annie Hui, Anton Rebgunsy, Anupam Joshi, Arie Shoshani, Ashwin Ram, Asma Ounnas, Atilla Aydin, Bernadette Hyland, Bernardo Cuenca-Grau, Bertram Ludäscher, Bhavesh Shrestha, Bijan Parsia, Biplav Srivastava, Bir Bhanu, Bjoern Peters, Bjorn Olstad, Boanerges Aleman-Meza, Bob Drach, Boris Motik, Boyan Brodaric, Brian Kettler, Brian Milch, Brian Wilson, Calvin Barnes, Carl Kesselman … further results


{{#ask:[[Category:!Person]]}}

unfortunately, this kind of query (query pages not belonging to a category) is not supported SMW

query chain of properties

query softwares produced by a person whose last name is "Ding"

{{#ask:[[author.last_name::Ding]]}}

A bayesian network approach to ontology mapping, A comparison of the opm and pml provenance models, A hierarchical component-based webgis and its key technologies, Acronym, Admin Note (2008-08-30), Air language tutorial, An ensemble learning and problem solving architecture for airspace management, An initial investigation on evaluating semantic web instance data, Annotating and embedding provenance in science data repositories to enable next generation science applications, Boosting semantic web data access using swoogle, Characterizing and detecting integrity issues in owl instance data, Characterizing the semantic web on the web, Computing trust from revision history, Coordinator, Enhancing web privacy protection through declarative policies, Explaining semantic web applications, Explanation interfaces for the semantic web: issues and models, F.print.formfoot, F.print.section, F.print.vbar, F.show, F.smwbp, F.tag, Finding and ranking knowledge on the semantic web, Fit.sbp, Fit.section, Fit.tag, Fit.vbar, How the semantic web is being used: an analysis of foaf documents, I.event, I.location, I.news, I.person, I.person.photo, I.person.plain, I.person.relation, I.presentation, I.presentation.plain, I.project, I.publication, I.publication.bibtex, I.publication.plain, I.software, Image url, Inference web in action: lightweight use of the proof markup language, Instance data evaluation for semantic web-based knowledge management systems, Integrating ecoinformatics resources on the semantic web, Investigations into trust for collaborative information repositories: a wikipedia case study, Module, Name … further results

reference

Personal tools
Semantic Web Community
Tetherless World constellation
maintenance