1 / 8

SPARQL negation Rules of the Semantic Web Semantic MediaWiki

SPARQL negation Rules of the Semantic Web Semantic MediaWiki . NSWI140 24.11.2010 Jan D ědek. SPARQL negation - ! bound predicate. PREFIX rdf : http://www.w3.org/1999/02/22-rdf-syntax-ns# PREFIX rdfs : http://www.w3.org/2000/01/rdf-schema# PREFIX xsd : http://www.w3.org/2001/XMLSchema#

indiya
Download Presentation

SPARQL negation Rules of the Semantic Web Semantic MediaWiki

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. SPARQL negationRules of the Semantic WebSemantic MediaWiki NSWI140 24.11.2010 Jan Dědek

  2. SPARQL negation - ! bound predicate PREFIXrdf: http://www.w3.org/1999/02/22-rdf-syntax-ns# PREFIXrdfs: http://www.w3.org/2000/01/rdf-schema# PREFIXxsd: http://www.w3.org/2001/XMLSchema# PREFIXowl: http://www.w3.org/2002/07/owl# PREFIXowl2xml: http://www.w3.org/2006/12/owl2-xml# PREFIXstud: http://www.semanticweb.org/ontologies/NSWI140/Study.owl# SELECT?name?student?year?subject WHERE { ?studentastud:Student; stud:hasName?name; stud:hasStudyYear?year. OPTIONAL { ?studentstud:hasSubject?subject. ?subjectastud:DatabseSubject. } FILTER (?year > 1) FILTER ( ! bound(?subject) ) } ORDERBY?name

  3. Semantic WebStackLatest “layercake” diagram http://www.w3.org/2001/sw/layerCake.png

  4. Protege Rules Examples • SWRL - Semantic Web Rule Language • Rules saved as part of ontology • Increasing tool support: Bossam, R2ML, Hoolet, Pellet, KAON2, RacerPro • SWRLTab - Protégé 3, RulesView - Protégé 4 (Ontology views) http://protege.stanford.edu/conference/2009/slides/SWRL2009ProtegeConference.pdf Student(?s) , hasStudyYear(?s, ?y) , greaterThan(?y, "2"^^integer) -> Senior(?s) Room(?r) , hasName(?r, ?n) , startsWith(?n, "S") ->RoomMalaStrana(?r) Person(?p), hasSalaryInCZK(?p, ?czk), multiply(?eur, 24.7, ?czk) -> hasSalaryInEUR(?p, ?eur)

  5. Semantic MediaWiki (SMW) • Search • Selecting pages • Categories and property values • wildcards and comparators, not equal, like (regexp) • Distance queries • Unions • Subqueries and property chains • Templates and variables • Sorting results • Displaying information • Special:Ask, inline queries • Printing: property values, categories • Display format: Plain, types • Concepts (stored queries) • Inline queries: #ask, #show, Exporting query results: RSS, etc. • Query settings (strict comparators) • Editing • Categories (MW) • Properties (named links & values) • Data types • Custom units • Semantic templates (MW -> SMW) • Service links (links to online services: e.g. maps) • Semantic Web • RDF export • Reusing vocabulary from external ontologies • Importing ontologies • SPARQL query service • Inferencing: • Subcategories (MW), Subproperties, Equality of pages: (MW) redirects • Not supported: Transitivity, Inverse properties, Domain and range restrictions, Number restrictions and functional properties

  6. SMW Editing [[Category:Example category]] • Categories • Properties • Data types • Custom units • Semantic templates (MW -> SMW) • Service links (links to online services: e.g. maps) [[property name::value]] [[Is capital of::Germany]] [[population::3,396,990]] [[Has type::number]] Type:Temperature [[Corresponds to::1 W]] [[Corresponds to::0.001 kW]] [[Corresponds to::0.0013410220 hp]] IMDb|http://www.imdb.com/title/tt$1/ MediaWiki:Smw service online maps [[provides service::online maps]]

  7. SMW SearchSelecting pages • Categories and property values • wildcards and comparators, not equal, like (regexp) • Distance queries • Unions • disjunctions in values • Subqueries and property chains • Templates and variables [[Category:Actor]] [[born in::Boston]] [[height::180cm]] [[Address::~*Park Place*]] [[Category:Actor]] [[height::>1.89m]] [[height::!1.89m]] [[born in::Boston]] OR [[born in::New York]] [[Category:Musical actor||Theatre actor]] [[Category:Actor]] [[born in:: <q>[[Category:City]] [[located in::Italy]]</q>]] [[Category:Event]] [[end date::>{{CURRENTYEAR}}-{{CURRENTMONTH}}-{{CURRENTDAY}}]]

  8. SMW Search [[Category:City]] [[has location country.population::+]] • Sorting results • Displaying information • Special:Ask, inline queries • Printing: property values, categories • Display format: Plain, types • Concepts (stored queries) • Inline queries: #ask, #show,Exporting query results: RSS, etc. • Query settings (strict comparators) {{#ask: [[Category:City]] |?Average rainy days |?Located in=Country |sort=Located in,Average rainy days |order=ASC,DESC }} ?Population ?height#cm {{#ask: [[Category:City]] [[located in::Germany]] | ?population | ?area#km² = Size in km² }} {{#show: Berlin | ?population}}

More Related