Practical Semantic Mediawiki: Difference between revisions
No edit summary |
|||
Line 1: | Line 1: | ||
<blockquote>This hands-on session for non technical users emphasizes the "need to know" aspects of Web publishing, wikis, information design and Semantic Mediawiki. It is not expected participants will become experts in all these topics, but will be able to create a site, and have an overview of what can be done as a basis of progressive learning.</blockquote> | <blockquote>This hands-on session for non technical users emphasizes the "need to know" aspects of Web publishing, wikis, information design and Semantic Mediawiki for flexible, structured, practical re-usable content that fits into the Web of Data. It is not expected participants will become experts in all these topics, but will be able to create a site, and have an overview of what can be done as a basis of progressive learning.</blockquote> | ||
= Acronyms = | = Acronyms = | ||
Line 65: | Line 65: | ||
* Add semantic classes for reusable data | * Add semantic classes for reusable data | ||
* Guide users of the site | * Guide users of the site | ||
** Viewer | |||
** Casual editor | |||
** Advanced editor, gardener | |||
** Semantic coder | |||
== Creating pages == | == Creating pages == | ||
Line 99: | Line 103: | ||
* <nowiki>{{{1}}}</nowiki> — SMW variable, in this case the first value passed to a template | * <nowiki>{{{1}}}</nowiki> — SMW variable, in this case the first value passed to a template | ||
* Finding pages | |||
* Starting new pages | |||
* Proactive linking | * Proactive linking | ||
** Brainstorm using links | ** Brainstorm using links | ||
{{Activity|Create a new page that's a unique place, include a link to another page and another site.}} | |||
* Categories | * Categories | ||
** Subcategories | ** Subcategories | ||
{{Activity|Put your page in a category, put that category in a sub-category}} | |||
* Uploading images and files | * Uploading images and files | ||
* Moving pages | * Moving pages | ||
** Moving preserves the original link, can be useful for "also known as" | |||
{{Activity|Move your page to a longer description, observe [[Special:RecentChanges]]}} | |||
* Deleting pages | * Deleting pages | ||
* Templates - used for consistently reused content | * Templates - used for consistently reused content | ||
Line 118: | Line 136: | ||
* Re-using styles [[MediaWiki:Common.css]] | * Re-using styles [[MediaWiki:Common.css]] | ||
* Hiding MW's menus and changing the 'skin' | * Hiding MW's menus and changing the 'skin' | ||
{{Activity|Add <nowiki><div class="noticebox">...</div></nowiki> to some page content}} | |||
= Semantic Mediawiki = | = Semantic Mediawiki = | ||
Line 123: | Line 143: | ||
[[File:SMW_logo_180px.png|right]] | [[File:SMW_logo_180px.png|right]] | ||
''SMW is an extension ecology of MW that allows marking up content for re-use and | ''SMW is an extension ecology of MW that allows marking up content for re-use and creating easier to use forms and views.'' | ||
* Meaning through annotations and relationships | * Meaning through annotations and relationships | ||
** Triples | ** You define the relationships for your application | ||
** Triples — subject, predicate, object | |||
*** Subject — what we're talking about | |||
*** Predicate — the relationship type | |||
*** Object - what the subject is being related to | |||
** Combine them and you can flexibly describe anything | |||
** Montréal is a place | |||
** Montréal has population 1,906,811 | |||
** Montréal has geographic coordinates 45.5088889, -73.5541667 | |||
* What properties does your content need to be useful? | * What properties does your content need to be useful? | ||
Line 134: | Line 165: | ||
<nowiki>[[Date::Jan 1, 2011]]</nowiki> | <nowiki>[[Date::Jan 1, 2011]]</nowiki> | ||
Or combinations: | |||
---- | |||
Page: Montreal | |||
* <nowiki>[[A::Place]]</nowiki> | |||
* <nowiki>[[Population::1,906,811]]</nowiki> | |||
* <nowiki>[[Geographic coordinates::45.5088889, -73.5541667]]</nowiki> | |||
---- | |||
* [http://semantic-mediawiki.org/wiki/Help:Properties_and_types#List_of_data_types Built-in types] | * [http://semantic-mediawiki.org/wiki/Help:Properties_and_types#List_of_data_types Built-in types] | ||
Line 140: | Line 181: | ||
* Subtypes | * Subtypes | ||
* [[Special:Ask|Queries]] | * [[Special:Ask|Queries]] | ||
** <nowiki>{{ #ask: [[A::Place]] }}</nowiki> | |||
** <nowiki>{{ #ask: [[Category:City]] }}</nowiki> | |||
== Classes == | == Classes == | ||
Line 146: | Line 189: | ||
** One topic per page | ** One topic per page | ||
** Formlink <nowiki>{{#formlink:Comment|comment||Comment[Topic]={{PAGENAME}}}}</formlink></nowiki> | ** Formlink <nowiki>{{#formlink:Comment|comment||Comment[Topic]={{PAGENAME}}}}</formlink></nowiki> | ||
* Class templates will often contain queries that show linked classes | |||
== Views == | == Views == | ||
== Basic inference== | == Basic inference== | ||
''Inference is used to derive information from basic information.'' | |||
<nowiki>{{#ifexpr: {{{Population|}}} > 50000 | |||
| [[Category:City]] }} | |||
</nowiki> | |||
''If the page's population is greater than 50000, then put it in the category of city.'' | |||
This is a simple form of artificial intelligence, that be very useful for large sets of pages for arbitrary classifications. | |||
== Future directions== | == Future directions== |
Revision as of 16:45, 25 November 2010
This hands-on session for non technical users emphasizes the "need to know" aspects of Web publishing, wikis, information design and Semantic Mediawiki for flexible, structured, practical re-usable content that fits into the Web of Data. It is not expected participants will become experts in all these topics, but will be able to create a site, and have an overview of what can be done as a basis of progressive learning.
Acronyms
- SMW = Semantic Mediawiki
- MW = Mediawiki
- CC = Creative Commons
Web publishing
Access models
- Fully open, no login required
- Require login for editing
- Require created accounts to edit (closed editing)
- Require created accounts to access (fully private)
- Encryption to avoid snooping
Access models can be changed over time; avoid starting a wiki with jargon or unsympathetic content.
Site users
- Levels
- De-emphasize control, make it as flat as possible
- Bureaucrats still exist
- OpenID signin
Accessibility
Here, accessibility refers to supporting people with vision, keyboard control or cognitive difficulties.
- Making sites accessible generally increases usability
- Works on more devices from text browser to handheld
- Typically more straightforward navigation
- Accessible hot keys can be used by any expert user
- The curb cuts principle
- Mediawiki is accessible, SMW has issues (forms)
- Value content over appearance
- Good tags for images, image maps
Terms of use
- Creative Commons - share with options for attribution, non-commercial, changes
- Traditional copyright - by permission only
- Re-using content
Using Mediawiki
Mediawiki is the underlying software of Wikipedia. It is robust, supported by a large community and supports hundreds of useful extensions.
Progressive uses
- Basic site with pages and categories
- You just need to know a few things for your wiki to be as useful as most Web sites
- Add widgets for more interactivity
- Wiki gardening to reorganize content
- Add semantic classes for reusable data
- Guide users of the site
- Viewer
- Casual editor
- Advanced editor, gardener
- Semantic coder
Creating pages
- How to name pages
- One topic per page
- Short, avoid special symbols, sentence form
- Code and matching brackets
Basic markup
Rather than using a rich text editor, Mediawiki uses a progressively learned set of markup, that's designed to be human-readable, consistent and enforces meaning over appearance. It's not dependant on special programs, and could be carved into a park bench and retain its meaning.
- ''Italic'', '''Bold'''
- * List heading level one — use # for numbered list
- ** List level two — ## for numbered list
- ...
- ** List level two — ## for numbered list
- =Heading one=
- ==Heading two==
- ...
- ==Heading two==
- [[Mypage]] — A wiki link
- [[File:Mypicture.png]] — Media (inline or link)
- [[Mypage|This is my page]] Alternate link text (using pipe symbol)
- [http://theirsite.com] — A non-wiki link
- Use a space after the link to use your own link text. [http://theirsite.com Their site].
- {{My Template}} — A template (reusable content, function or variable)
- Don't Repeat Yourself
- Pipe symbol is used to pass parameters — {{Show Something|Something}}
- {{ #geocode: Montréal, Quebec}} — Template function, in this case geocode turns a place name into geographic coordinates
- {{{1}}} — SMW variable, in this case the first value passed to a template
- Finding pages
- Starting new pages
- Proactive linking
- Brainstorm using links
{{#set_internal:Activity |Name={{{Name}}} |URL={{{URL}}} |Start date={{{Start date}}} }}
- Categories
- Subcategories
{{#set_internal:Activity |Name={{{Name}}} |URL={{{URL}}} |Start date={{{Start date}}} }}
- Uploading images and files
- Moving pages
- Moving preserves the original link, can be useful for "also known as"
{{#set_internal:Activity |Name={{{Name}}} |URL={{{URL}}} |Start date={{{Start date}}} }}
- Deleting pages
- Templates - used for consistently reused content
Making pages look good
CSS is the style system of Web pages and can also be used in Mediawiki. Like wiki markup, learning can be progressive.
Placeography | Biofuel Visions
- Re-using CSS styling <div style="background: orange">Hello world</div>
- Avoid losing meaning (don't use <big> for headers), keep it simple
- Re-using styles MediaWiki:Common.css
- Hiding MW's menus and changing the 'skin'
{{#set_internal:Activity |Name={{{Name}}} |URL={{{URL}}} |Start date={{{Start date}}} }}
Semantic Mediawiki
SMW is an extension ecology of MW that allows marking up content for re-use and creating easier to use forms and views.
- Meaning through annotations and relationships
- You define the relationships for your application
- Triples — subject, predicate, object
- Subject — what we're talking about
- Predicate — the relationship type
- Object - what the subject is being related to
- Combine them and you can flexibly describe anything
- Montréal is a place
- Montréal has population 1,906,811
- Montréal has geographic coordinates 45.5088889, -73.5541667
- What properties does your content need to be useful?
Inline property annotation
Single instances of data can be marked-up using annotations.
[[Date::Jan 1, 2011]]
Or combinations:
Page: Montreal
- [[A::Place]]
- [[Population::1,906,811]]
- [[Geographic coordinates::45.5088889, -73.5541667]]
- Built-in types
- Geographic coordinate
- Viewing all properties
- Subtypes
- Queries
- {{ #ask: [[A::Place]] }}
- {{ #ask: [[Category:City]] }}
Classes
- Creating a class (template, properties, forms)
- One topic per page
- Formlink {{#formlink:Comment|comment||Comment[Topic]={{PAGENAME}}}}</formlink>
- Class templates will often contain queries that show linked classes
Views
Basic inference
Inference is used to derive information from basic information.
{{#ifexpr: {{{Population|}}} > 50000 | [[Category:City]] }}
If the page's population is greater than 50000, then put it in the category of city.
This is a simple form of artificial intelligence, that be very useful for large sets of pages for arbitrary classifications.
Future directions
- Relating ontologies
- Reusing content
- Creating a big picture where anyone can ask questions and add their data
Mediawiki Widgets
Mediawiki Widgets allow embedding third-party site content for rich media (Youtube, photo sites, etc) and interactive discussions (DISQUS, Twitter, etc) without needing to set it up or host it on your site.
- DISQUS discussion
- Register with DISQUS
- Get key
- Create widget
- Embed widget on pages
Converting content or sites
- Pandoc
- Convertors for Open Office, Microsoft Word
Hosting
- Export a site, modularize by category
- Complete site export
- Special:Version
- Free light/startup hosting
- Inexpensive Mediawiki with SMW option
- Wikia
- Self-hosting
Getting help
- Mediawiki community
- Semantic mediawiki community
- If it's for an open cause, ask me
- Let's form a user group