Your SlideShare is downloading. ×
0
Aswc2009 Smw Tutorial Part 2 Froms Etc From Yaron
Aswc2009 Smw Tutorial Part 2 Froms Etc From Yaron
Aswc2009 Smw Tutorial Part 2 Froms Etc From Yaron
Aswc2009 Smw Tutorial Part 2 Froms Etc From Yaron
Aswc2009 Smw Tutorial Part 2 Froms Etc From Yaron
Aswc2009 Smw Tutorial Part 2 Froms Etc From Yaron
Aswc2009 Smw Tutorial Part 2 Froms Etc From Yaron
Aswc2009 Smw Tutorial Part 2 Froms Etc From Yaron
Aswc2009 Smw Tutorial Part 2 Froms Etc From Yaron
Aswc2009 Smw Tutorial Part 2 Froms Etc From Yaron
Aswc2009 Smw Tutorial Part 2 Froms Etc From Yaron
Aswc2009 Smw Tutorial Part 2 Froms Etc From Yaron
Aswc2009 Smw Tutorial Part 2 Froms Etc From Yaron
Aswc2009 Smw Tutorial Part 2 Froms Etc From Yaron
Aswc2009 Smw Tutorial Part 2 Froms Etc From Yaron
Aswc2009 Smw Tutorial Part 2 Froms Etc From Yaron
Aswc2009 Smw Tutorial Part 2 Froms Etc From Yaron
Aswc2009 Smw Tutorial Part 2 Froms Etc From Yaron
Aswc2009 Smw Tutorial Part 2 Froms Etc From Yaron
Aswc2009 Smw Tutorial Part 2 Froms Etc From Yaron
Aswc2009 Smw Tutorial Part 2 Froms Etc From Yaron
Aswc2009 Smw Tutorial Part 2 Froms Etc From Yaron
Aswc2009 Smw Tutorial Part 2 Froms Etc From Yaron
Aswc2009 Smw Tutorial Part 2 Froms Etc From Yaron
Aswc2009 Smw Tutorial Part 2 Froms Etc From Yaron
Aswc2009 Smw Tutorial Part 2 Froms Etc From Yaron
Aswc2009 Smw Tutorial Part 2 Froms Etc From Yaron
Aswc2009 Smw Tutorial Part 2 Froms Etc From Yaron
Aswc2009 Smw Tutorial Part 2 Froms Etc From Yaron
Aswc2009 Smw Tutorial Part 2 Froms Etc From Yaron
Aswc2009 Smw Tutorial Part 2 Froms Etc From Yaron
Aswc2009 Smw Tutorial Part 2 Froms Etc From Yaron
Aswc2009 Smw Tutorial Part 2 Froms Etc From Yaron
Aswc2009 Smw Tutorial Part 2 Froms Etc From Yaron
Aswc2009 Smw Tutorial Part 2 Froms Etc From Yaron
Aswc2009 Smw Tutorial Part 2 Froms Etc From Yaron
Aswc2009 Smw Tutorial Part 2 Froms Etc From Yaron
Aswc2009 Smw Tutorial Part 2 Froms Etc From Yaron
Aswc2009 Smw Tutorial Part 2 Froms Etc From Yaron
Aswc2009 Smw Tutorial Part 2 Froms Etc From Yaron
Aswc2009 Smw Tutorial Part 2 Froms Etc From Yaron
Aswc2009 Smw Tutorial Part 2 Froms Etc From Yaron
Aswc2009 Smw Tutorial Part 2 Froms Etc From Yaron
Aswc2009 Smw Tutorial Part 2 Froms Etc From Yaron
Aswc2009 Smw Tutorial Part 2 Froms Etc From Yaron
Aswc2009 Smw Tutorial Part 2 Froms Etc From Yaron
Aswc2009 Smw Tutorial Part 2 Froms Etc From Yaron
Aswc2009 Smw Tutorial Part 2 Froms Etc From Yaron
Aswc2009 Smw Tutorial Part 2 Froms Etc From Yaron
Aswc2009 Smw Tutorial Part 2 Froms Etc From Yaron
Aswc2009 Smw Tutorial Part 2 Froms Etc From Yaron
Aswc2009 Smw Tutorial Part 2 Froms Etc From Yaron
Aswc2009 Smw Tutorial Part 2 Froms Etc From Yaron
Aswc2009 Smw Tutorial Part 2 Froms Etc From Yaron
Aswc2009 Smw Tutorial Part 2 Froms Etc From Yaron
Aswc2009 Smw Tutorial Part 2 Froms Etc From Yaron
Aswc2009 Smw Tutorial Part 2 Froms Etc From Yaron
Aswc2009 Smw Tutorial Part 2 Froms Etc From Yaron
Aswc2009 Smw Tutorial Part 2 Froms Etc From Yaron
Aswc2009 Smw Tutorial Part 2 Froms Etc From Yaron
Aswc2009 Smw Tutorial Part 2 Froms Etc From Yaron
Aswc2009 Smw Tutorial Part 2 Froms Etc From Yaron
Aswc2009 Smw Tutorial Part 2 Froms Etc From Yaron
Aswc2009 Smw Tutorial Part 2 Froms Etc From Yaron
Aswc2009 Smw Tutorial Part 2 Froms Etc From Yaron
Aswc2009 Smw Tutorial Part 2 Froms Etc From Yaron
Aswc2009 Smw Tutorial Part 2 Froms Etc From Yaron
Aswc2009 Smw Tutorial Part 2 Froms Etc From Yaron
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Aswc2009 Smw Tutorial Part 2 Froms Etc From Yaron

938

Published on

Part 2 of our semantic wiki tutorial for ASWC 2009. This part is from Yaron Koren.

Part 2 of our semantic wiki tutorial for ASWC 2009. This part is from Yaron Koren.

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
938
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
31
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1.  
  • 2. We have the following statement: Barcelona is a city in Spain, with population 1,600,0000. In MediaWiki: Barcelona is a city in [[Spain]], with population 1,600,0000.
  • 3. In Semantic MediaWiki: Barcelona is a city in [[Has country::Spain]], with population [[Has population::1,600,0000]]. This adds to the database the two triples: Barcelona Has country Spain Barcelona Has population 1,600,0000 On the page is displayed: Barcelona is a city in Spain , with population 1,600,0000.
  • 4. <ul><li>In the page &quot;Property:Has country&quot;: </li></ul><ul><li>[[Has type::Page]] </li></ul><ul><li>In the page &quot;Property:Has population&quot;: </li></ul><ul><li>[[Has type::Number]] </li></ul>
  • 5. <ul><li>&quot;Has type&quot; is a &quot;special property&quot;, i.e. a pre-defined property for meta-data. There are several other special properties. </li></ul>
  • 6. <ul><li>In a page called &quot;Property:Has priority&quot;: </li></ul><ul><li>[[Has type::String]] </li></ul><ul><li>[[Allows value::Low]], [[Allows value::Medium]], [[Allows value::High]] </li></ul>
  • 7. <ul><li>Page, String, Text, Number, Date, URL, Email, Geographic coordinate, Temperature </li></ul>
  • 8. <ul><li>Shows the set of data defined on a single page </li></ul>
  • 9. <ul><li>Possible solution: </li></ul><ul><li>Barcelona is a [[Is a::city]] in [[Has country::Spain]], with population [[Has population::1,600,0000]]. </li></ul>
  • 10. ...this is not done. Instead, category is used: Barcelona is a city in [[Has country::Spain]], with population [[Has population::1,600,000]]. [[Category::Cities]] Categories are used for defining class because they allow for inheritance. Example - a member of category &quot;Cities&quot; would also be a member of category &quot;Locations&quot;, if &quot;Cities&quot; is a subcategory of &quot;Locations&quot;.
  • 11. <ul><li>Once the data is stored, we can query it! </li></ul><ul><li>Querying is done using the #ask parser function. </li></ul>
  • 12. <ul><li>To display all the places in Spain: </li></ul><ul><li>{{#ask:[[Has country::Spain]]}} </li></ul><ul><li>All cities in Spain: </li></ul><ul><li>{{#ask:[[Category:Cities]][[Has country::Spain]]}} </li></ul>
  • 13. <ul><li>Get all cities in Spain with population greater than 1,000,000: </li></ul><ul><li>{{#ask: </li></ul><ul><li>[[Category:Cities]] </li></ul><ul><li>[[Has country::Spain]] </li></ul><ul><li>[[Has population::>1,000,000]] </li></ul><ul><li>}} </li></ul>
  • 14. <ul><li>A table of cities in Spain with population greater than 1,000,000, that shows both city names and their population: </li></ul><ul><li>{{#ask: </li></ul><ul><li>[[Category:Cities]] </li></ul><ul><li>[[Has country::Spain]] </li></ul><ul><li>[[Has population::>1,000,000]] </li></ul><ul><li>|? Has population </li></ul><ul><li>}} </li></ul>
  • 15.  
  • 16. <ul><li>Wikipedia has thousands of category and list pages, that could be replaced by queries </li></ul>
  • 17.  
  • 18.  
  • 19. <ul><li>{{#ask:[[Category:Cities]][[Has country::Spain]][[Has population::>1,000,000]]|format=ol}} </li></ul><ul><li>This displays a numbered list, i.e. the <ol> tag: </li></ul><ul><li>1. Madrid </li></ul><ul><li>2. Barcelona </li></ul>
  • 20. <ul><li>list, table, ol, ul, template </li></ul>
  • 21. <ul><li>Timeline format: </li></ul>
  • 22.  
  • 23.  
  • 24.  
  • 25. <ul><li>Another extension, &quot;Semantic Maps&quot;, exists just for maps </li></ul><ul><li>Each page queried must have a property of type &quot;Geographic coordinates&quot;. </li></ul>
  • 26.  
  • 27.  
  • 28. Another extension, &quot;Semantic Compound Queries&quot; lets you display more than one query at the same time This is especially useful for maps - each query can get its own icon.
  • 29.  
  • 30. <ul><li>Query formats exist for exporting data in the following formats: </li></ul><ul><li>CSV </li></ul><ul><li>JSON </li></ul><ul><li>RSS </li></ul><ul><li>iCalendar </li></ul><ul><li>vCard </li></ul><ul><li>BibTeX </li></ul>
  • 31. <ul><li>Data can also be exported via RDF, RDFa and XML using various extensions. </li></ul>
  • 32. <ul><li>What if we want to have a page for every city? </li></ul><ul><li>Instead of repeating the same text and semantic tags in each page, we can use MediaWiki templates to make the process easier. </li></ul>
  • 33. In page &quot;Template:City&quot;: {{PAGENAME}} is a city in [[Has country::{{{Country}}}]], with population [[Has population::{{{Population}}}]]. [[Category:Cities]] In page &quot;Barcelona&quot;: {{City |Country=Spain |Population=1,000,000}}
  • 34. <ul><li>From “Shanghai” Wikipedia page: </li></ul>
  • 35.  
  • 36. <ul><li>Hide semantic markup from users </li></ul><ul><li>Allow for a consistent data structure for pages of the same type </li></ul><ul><li>Pre-define the display </li></ul>
  • 37. But even editing of template calls might be too hard for most users! Another extension, Semantic Forms, lets you create forms to edit those template calls
  • 38.  
  • 39.  
  • 40.  
  • 41. <ul><li>Allow for entering a table of data in a form. </li></ul>
  • 42. <ul><li>In the page &quot;Category:Cities&quot;: </li></ul><ul><li>[[Has default form::City]] </li></ul><ul><li>(There are other ways, but this is the standard one) </li></ul>
  • 43.  
  • 44. <ul><li>Semantic Forms supports different input types, depending on the type of the property associated with the field. </li></ul><ul><li>String, Page, Number – text entry </li></ul><ul><li>Text – textarea </li></ul><ul><li>Boolean – checkbox </li></ul><ul><li>Date – date input or Javascript datepicker </li></ul><ul><li>“ Enumeration” (Page or String with “allowed values”) - dropdown or radiobutton </li></ul><ul><li>list of &quot;Enumerations&quot; - listbox or checkboxes </li></ul>
  • 45. <ul><li>Used for properties of type &quot;Geographic coordinates&quot;. </li></ul>
  • 46. <ul><li>support for autocompletion on both single-value and multiple-value fields </li></ul><ul><li>makes standardizing on names easier, prevents spelling mistakes </li></ul>
  • 47.  
  • 48.  
  • 49. Semantic Forms also provides “helper forms”
  • 50.  
  • 51.  
  • 52.  
  • 53.  
  • 54.  
  • 55. <ul><li>Certain pieces of information can't be stored using simple semantic triples. </li></ul><ul><li>Example: &quot;This cake recipe requires 2 cups of flour&quot;. </li></ul>
  • 56. This data can't be stored as a triple... instead, it requires an &quot;anonymous object&quot;: Cake recipe Requires X X Has quantity 2 X Has unit Cup X Has ingredient Flour
  • 57. <ul><li>Defines a function, #set_internal, that creates an “anonymous object”. </li></ul><ul><li>In a page called &quot;Cake recipe&quot;: </li></ul><ul><li>{{#set_internal: </li></ul><ul><li>Is part of recipe </li></ul><ul><li>|Has quantity=2 </li></ul><ul><li>|Has unit=Cup </li></ul><ul><li>|Has ingredient=Flour </li></ul><ul><li>}} </li></ul>
  • 58. <ul><li>{{#ask:[[Is part of recipe::Cake recipe]] </li></ul><ul><li>|? Has quantity </li></ul><ul><li>|? Has unit </li></ul><ul><li>|? Has ingredient </li></ul><ul><li>}} </li></ul>
  • 59. <ul><li>Provides a drill-down, “slice-and-dice” interface to semantic data. </li></ul>
  • 60.  
  • 61. <ul><li>Provides a similar slice-and-dice interface, using Javascript </li></ul>
  • 62.  
  • 63. <ul><li>Two ways to use data from the outside: </li></ul><ul><li>Import data </li></ul><ul><li>Query data, keeping it in its original location </li></ul>
  • 64. <ul><li>“ Data Transfer” extension </li></ul><ul><li>Allows importing of XML and CSV - will soon support Excel as well </li></ul><ul><li>Usually: each row of data is saved as a template call in a separate page </li></ul>
  • 65. <ul><li>&quot;External Data&quot; extension </li></ul><ul><li>Can query the following: </li></ul><ul><li>- web pages with data in XML, CSV or JSON format </li></ul><ul><li>- databases </li></ul><ul><li>- LDAP servers </li></ul><ul><li>Data can be queried and then displayed on the page, or even stored semantically. </li></ul>
  • 66.  
  • 67. <ul><li>Because SMW can export data in CSV and JSON formats, the External Data extension can be used by one SMW wiki to get the data from another one. </li></ul>
  • 68. <ul><li>semantic-mediawiki.org – Semantic MediaWiki homepage </li></ul><ul><li>smwforum.ontoprise.com – Ontoprise SMW+ user forum </li></ul><ul><li>referata.com – Referata – SMW wiki hosting </li></ul><ul><li>wikiworks.com – (shameless plug!) WikiWorks, an SMW-focused consulting company </li></ul>

×