Top Banner
Semantic MediaWiki A community database ... and more! Dan Bolser NETTAB 2010 workshop: Biological Wikis November 29th, 2010
83
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Semantic MediaWiki Workshop

Semantic MediaWiki

A community database... and more!

Dan Bolser

NETTAB 2010 workshop: Biological WikisNovember 29th, 2010

Page 2: Semantic MediaWiki Workshop

Do ask questions

!

Page 3: Semantic MediaWiki Workshop

Overview

What is SMW? Motivation Frontend

What you see as a user of SMW

Backend What you do as a

SMW site developer

Page 4: Semantic MediaWiki Workshop

Overview

What is SMW? Motivation Frontend

What you see as a user of SMW

Backend What you do as a

SMW site developer

Page 5: Semantic MediaWiki Workshop

What is SMW?

SMW is a regular wiki MediaWiki → Wikipedia

With some new features: Knowledge management Add 'facts' to pages New functionality

emerges

Page 6: Semantic MediaWiki Workshop
Page 7: Semantic MediaWiki Workshop
Page 8: Semantic MediaWiki Workshop
Page 9: Semantic MediaWiki Workshop
Page 10: Semantic MediaWiki Workshop
Page 11: Semantic MediaWiki Workshop
Page 12: Semantic MediaWiki Workshop
Page 13: Semantic MediaWiki Workshop
Page 14: Semantic MediaWiki Workshop
Page 15: Semantic MediaWiki Workshop
Page 16: Semantic MediaWiki Workshop
Page 17: Semantic MediaWiki Workshop
Page 18: Semantic MediaWiki Workshop
Page 19: Semantic MediaWiki Workshop
Page 20: Semantic MediaWiki Workshop
Page 21: Semantic MediaWiki Workshop
Page 22: Semantic MediaWiki Workshop
Page 23: Semantic MediaWiki Workshop
Page 24: Semantic MediaWiki Workshop
Page 25: Semantic MediaWiki Workshop
Page 26: Semantic MediaWiki Workshop

What is SMW?

SMW is a regular wiki MediaWiki → Wikipedia

With some new features: Knowledge management Add 'facts' to pages New functionality

emerges

Page 27: Semantic MediaWiki Workshop

Example 'facts'

Page 28: Semantic MediaWiki Workshop

Example 'facts'

Page 29: Semantic MediaWiki Workshop

Example 'facts'

Scottish writer

Novels, poetry, children's, historical, horror, short stories, travel.

Born Edinburgh, 1850. Died of cerebral hemorrhage, 1894.

Attended Edinburgh university.

Page 30: Semantic MediaWiki Workshop

Overview

What is SMW? Motivation Frontend

What you see as a user of SMW

Backend What you do as a

SMW site developer

Page 31: Semantic MediaWiki Workshop

Overview

What is SMW? Motivation Frontend

What you see as a user of SMW

Backend What you do as a

SMW site developer

Page 32: Semantic MediaWiki Workshop

SMW Demo

http://pgscdemo.referata.com

http://prodstat.referata.com

http://discoursedb.org

http://sandbox.referata.com

Page 33: Semantic MediaWiki Workshop

SMW Demo

Page 34: Semantic MediaWiki Workshop

SMW Demo

Page 35: Semantic MediaWiki Workshop

SMW Demo

Page 36: Semantic MediaWiki Workshop

SMW Demo

Page 37: Semantic MediaWiki Workshop

SMW Demo

Page 38: Semantic MediaWiki Workshop

SMW Demo

Page 39: Semantic MediaWiki Workshop

SMW Demo

Page 40: Semantic MediaWiki Workshop

SMW Demo

Page 41: Semantic MediaWiki Workshop

SMW Demo

Page 42: Semantic MediaWiki Workshop

SMW Demo

Page 43: Semantic MediaWiki Workshop

SMW Demo

Page 44: Semantic MediaWiki Workshop

SMW Demo

Page 45: Semantic MediaWiki Workshop

Overview

What is SMW? Motivation Frontend

What you see as a user of SMW

Backend What you do as a

SMW site developer

Page 46: Semantic MediaWiki Workshop

Overview

What is SMW? Motivation Frontend

What you see as a user of SMW

Backend What you do as a

SMW site developer

Page 47: Semantic MediaWiki Workshop

Overview

1) Data

2) Properties and types

3) Classes

4) Templates

5) Forms

6) Queries

Zzz...

Page 48: Semantic MediaWiki Workshop

Data

Triples are used for modelling data Similar to relational data models More generic

A triple has three parts: Subject – Predicate – Object

In SMW this is simplified to match the page model of the wiki (facts on a page):

Page – Property – Value

Page 49: Semantic MediaWiki Workshop

Properties

Properties are added to pages using very simple syntax:

Stan Bolton:

[[Has name::Stan]]

[[Has initials::SB]]

[[Has dob::16/02/78]

[[Has weight::90 kg]]

Page 50: Semantic MediaWiki Workshop

Properties

Properties are added to pages using very simple syntax:

Stan Bolton:

[[Has name::Stan]]

[[Has initials::SB]]

[[Has dob::16/02/78]

[[Has weight::90 kg]]

Page 51: Semantic MediaWiki Workshop

Example 'facts'

Scottish writer

Novels, poetry, children's, historical, horror, short stories, travel.

Born Edinburgh, 1850. Died of cerebral hemorrhage, 1894.

Attended Edinburgh university.

Page 52: Semantic MediaWiki Workshop

Example 'facts'

Scottish writer

Novels, poetry, children's, historical, horror, short stories, travel.

Born Edinburgh, 1850. Died of cerebral hemorrhage, 1894.

Attended Edinburgh university.

Robert Louis Stevenson:

[[born in:: Edinburgh]]

[[has dob::1850]]

[[died of:: cerebral hemorrhage]]

[[has dod::1894]]

[[attended university:: Edinburgh]]

Page 53: Semantic MediaWiki Workshop

Property types

Each property has its own page in the wiki

By setting the value of a 'special property' on the property's page, you set the type of the property

Page 54: Semantic MediaWiki Workshop

Property types

Each property has its own page in the wiki

By setting the value of a 'special property' on the property's page, you set the type of the property

Property:has name:[[has type::String]]

Property:has dob:[[has type::Date]]

Property:has weight:[[has type::Number]]

Page 55: Semantic MediaWiki Workshop

Property types

Allow the proper layout of values in a table

Allow queries to have proper range constraints

Allow forms to be validated against user input

Page 56: Semantic MediaWiki Workshop

Properties have simple types:string, date, number, etc.

How do we 'type' a page?

Classes

Page 57: Semantic MediaWiki Workshop

Classes

Pages can be 'typed' by defining them as members of a class

Class membership is determined by using wiki categories

Pages in a class are expected to carry a similar set of properties...

Page 58: Semantic MediaWiki Workshop

Classes

Pages can be 'typed' by defining them as members of a class

Class membership is determined by using wiki categories

Pages in a class are expected to carry a similar set of properties...

Car

SportsCar

BubbleCar

Page 59: Semantic MediaWiki Workshop

Classes

Car Top speed Doors Price ...

Page 60: Semantic MediaWiki Workshop
Page 61: Semantic MediaWiki Workshop
Page 62: Semantic MediaWiki Workshop

Property:works in:[[has type::Page]] [[has default form::

Institute]]

Page 63: Semantic MediaWiki Workshop

RDF

Page 64: Semantic MediaWiki Workshop

Overview

1) Data

2) Properties and types

3) Classes

4) Templates

5) Forms

6) Queries

Zzz!!!

Page 65: Semantic MediaWiki Workshop

Templates

A template is 'called' from any other page

Very useful feature

Used for common things

Used for data (presentation)

{{ car

| top speed = 200

| doors = 5

| price = 120000

| ...

}}

Page 66: Semantic MediaWiki Workshop

Templates

Ferrari 612 Scaglietti:

{{ Infobox Automobile

| name = Ferrari 612 Scaglietti

| manufacturer = Ferrari

| body_style = 2-door coupé

| production = 2004-present

| engine = 5.7 L

| length = 4902

| width=1956

| ...

}}

Page 67: Semantic MediaWiki Workshop

Templates

Used for data (presentation)

Can be reused for data definition...

Semantic Templates The place where facts

are defined

Page 68: Semantic MediaWiki Workshop

Templates

Used for data (presentation)

Can be reused for data definition...

Semantic Templates The place where facts

are defined

Template:Car:

[[Has top speed:: {{{top speed}}} ]]

[[Has doors:: {{{doors}}} ]]

[[Has price:: {{{price}}} ]]

...

[[ Category:Car ]]

Page 69: Semantic MediaWiki Workshop

factbox

Page 70: Semantic MediaWiki Workshop

Forms

Forms are used to edit templates Very useful feature in their own right

Typically, each class has one form Form fields edit template parameters

Template parameters set properties

Each field is automatically 'typed' according to it's property!

Fields auto complete based on existing property values!

Page 71: Semantic MediaWiki Workshop
Page 72: Semantic MediaWiki Workshop

Ask queries

Ask for all pages in a Class:

{{#ask: [[ Category: <my class> ]] }}

The same, but return some specific properties:

{{#ask: [[ Category: <my class> ]]

|? <my prop1> |? <my prop2> |? }}

Ask for some cheap goods:

{{#ask: [[ Price ::< 5 usd ]] }}

Page 73: Semantic MediaWiki Workshop
Page 74: Semantic MediaWiki Workshop

SMW provides new functionality

Structure

Forms for editing

Dynamic queries Visualization

Linked data

Navigation

Page 75: Semantic MediaWiki Workshop

Acknowledgements

Markus Krötzsch

Denny Vrandečić All SMW developers

NETTAB

Yaron Koren All SMW extension devs.

People who do what they love

Page 76: Semantic MediaWiki Workshop

Appendices

Page 77: Semantic MediaWiki Workshop

'Getting started'

1) Figure out your data structure Classes and properties

2) Create templates and properties

3) Create forms To add and edit the different page 'types'

4) Enable links to forms [[Has default form:: ... ]]

5) Add data!

Page 78: Semantic MediaWiki Workshop

BioWikis using SMW

SNPedia http://snpedia.org

SEQwiki http://seqwiki.org

NeuroLex http://neurolex.org

GeneWiki (?) http://genewiki.org

Many more...

http://nettab.referata.com/wiki/BioWiki

Page 79: Semantic MediaWiki Workshop

Systems similar to SMW

Dynamic page lists http://www.mediawiki.org/wiki/DynamicPageList

Table edit http://www.mediawiki.org/wiki/Extension:TableEdit

OmegaWiki http://www.omegawiki.org

Others... http://en.wikipedia.org/wiki/Semantic_wiki

Page 80: Semantic MediaWiki Workshop

References

SMW http://semantic-mediawiki.org

Properties with units: http://semantic-mediawiki.org/wiki/Custom_units

Classes

Templates http://www.mediawiki.org/wiki/Help:Templates

Page 81: Semantic MediaWiki Workshop

References

Forms http://www.mediawiki.org/wiki/

Extension:Semantic_Forms

Ask queries http://semantic-mediawiki.org/wiki/

Help:Inline_queries

Page 82: Semantic MediaWiki Workshop

Your semantic web!

Page 83: Semantic MediaWiki Workshop

He said what?