Laboratory 7ана Semantic Web Applications: Semantic Wikis

Transkrypt

Laboratory 7ана Semantic Web Applications: Semantic Wikis
 Laboratory 7 ­ Semantic Web Applications: Semantic Wikis Łukasz Potępa, Monika Rakoczy 2.12.2014 1. Semantic Wikis ­ Introduction 2. Semantic Wikis ­ Categories 1. http://loki.ia.agh.edu.pl/lokidev/users:mraluc My name is Mraluc and I am a [[category:student]]. I am 47 years old. Currently I study at AGH UST, faculty of electrical engineering. I belong to group ­ tuesday 9.30. The other members of my group are: * Gonzo * Cookie Monster * Elmer Fudd 2. http://loki.ia.agh.edu.pl/lokidev/university:subjects:semwebmraluc This page is dedicated for: [[category:University subject]]. 3. Semantic Wikis ­ Properties My name is [[name:=Mra Luc]] and I am a [[category:student]]. I am [[age:=47]] years old. Currently I study at AGH UST, faculty of electrical engineering. I belong to group [[group:=2]]. The other members of my group are: * Gonzo * Cookie Monster * Elmer Fudd This page is dedicated for: [[category:SemWeb]]. * Led by: [[led by::persons:Krzysztof Kutt]] * Room: [[room::C3 216]] * Duration: [[duration:=90]] min 4. Semantic Wikis ­ Inline queries {{#ask: [[category:student]] [[group:=2]] | format=ul | ?name=Members}} My name is [[name:=MraLuc]] and I am a [[category:student]]. I am [[age:=47]] years old. Currently I study at AGH UST, faculty of electrical engineering. I belong to group [[group:=2]]. The other members of my group are: {{#ask: [[category:student]] [[group:=2]] | format=ul | ?name=Members}} {{#ask: [[category:student]] [[group:=2]] | format=table | sort=name | default=noname | ?name=Members}} My name is [[name:=MraLuc]] and I am a [[category:student]]. I am [[age:=47]] years old. Currently I study at AGH UST, faculty of electrical engineering. I belong to group [[group:=2]]. The other members of my group are: {{#ask: [[category:student]] [[group:=2]] | format=ul | ?name=Members}} Members as sorted table: {{#ask: [[category:student]] [[group:=2]] | format=table | sort=name | default=noname | ?name=Members}} 5. Loki ­ Use Case 1. Copy the wiki pages sources and paste them into the report. | 7 | Potepa, Rakoczy | [[http://loki.ia.agh.edu.pl/lokidev/movies:godfather_the | The Godfather]] | [[http://loki.ia.agh.edu.pl/lokidev/persons:francis_ford_coppola | Francis Ford Coppola]] | Link: http://loki.ia.agh.edu.pl/lokidev/persons:diane_keaton [[name:=Diane Keaton]], właśc. '''Diane Hall''' (ur. [[5 stycznia]] [[1946]] w [[Santa Ana (Kalifornia)|Santa Ana]] w [[Kalifornia|Kalifornii]]) – [[Stany Zjednoczone|amerykańska]] aktorka, reżyserka i producentka filmowy. Swoją karierę zaczynała jako aktorka sceniczna, na ekranie zadebiutowała w 1970 roku. Jej pierwszą poważną rolą była postać [[Kay Adams]] w ''[[http://loki.ia.agh.edu.pl/lokidev/movies:godfather_the | Godfather]]'' z 1972 roku. Popularność zdobyła dzięki filmom [[Woody Allen|Woody'ego Allena]]. Za rolę w filmie ''[[Annie Hall]]'' z 1977 roku otrzymała [[Nagroda Akademii Filmowej|Oscara]] w kategorii Oscar dla najlepszej aktorki pierwszoplanowej|Najlepsza aktorka pierwszoplanowa. ====Details==== Gender: [[gender:=F]] Birth: [[birth_date:=1946­01­05]] {{#ask: [[category:movie]] [[[supporting_role::persons:Diane Keaton]] |?title | ?production_year |sort=production_year |}} Source: [[http://pl.wikipedia.org/wiki/Diane_Keaton | Wikipedia]] 6. Loki ­ Semantic Web Standards 1. Put the queries into the report. <pl format="sparql"> PREFIX wiki: <> SELECT ?directed_by ?production_year WHERE { ?movie wiki:directed_by ?directed_by. ?movie wiki:production_year ?production_year. FILTER (?production_year>1991) } ORDER BY INC(?directed_by) </pl> <pl format="sparql"> PREFIX wiki: <> ASK { ?movie wiki:production_year ?production_year. FILTER ( ?production_year!=1994) } </pl> <pl format="sparql"> PREFIX wiki: <> DESCRIBE ?movie WHERE { ?movie a "movie" ; wiki:production_year "2011" ; wiki:genre "drama". } </pl> 2. Export the page about a movie that you worked on. Analyze the exported file. Find the category, relations and attributes that you entered ­ how are they represented? Answer in the report. RDF of The Godfather: All the relations and attributes are represented by their own tag, it’s defined in the begginning ­ lokirel and lokat (eg. production_year). The rest is represented as usual using rdf and owl tags. <?xml version="1.0"?> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22­rdf­syntax­ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf­schema#" xmlns:owl="http://www.w3.org/2002/07/owl#" xmlns:lokirel="http://loki.ia.agh.edu.pl/lokidev/special:uriresolve:special:relation:" xmlns:lokiatt="http://loki.ia.agh.edu.pl/lokidev/special:uriresolve:special:attribute:"> <!­­ exported page data ­­> <rdf:Description rdf:about="http://loki.ia.agh.edu.pl/lokidev/special:uriresolve:movies:godfather_the"> <rdfs:label>godfather_the</rdfs:label> <rdf:type rdf:resource="http://loki.ia.agh.edu.pl/lokidev/special:uriresolve:special:category:movie"/> <lokiatt:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string">The Godfather</lokiatt:title> <lokiatt:production_year rdf:datatype="http://www.w3.org/2001/XMLSchema#string">1972</lokiatt:production_year> <lokiatt:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string">The Godfather</lokiatt:title> <lokiatt:language rdf:datatype="http://www.w3.org/2001/XMLSchema#string">English</lokiatt:language> <lokiatt:language rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Sicilian</lokiatt:language> <lokiatt:production_year rdf:datatype="http://www.w3.org/2001/XMLSchema#string">1972</lokiatt:production_year> <lokiatt:production_year rdf:datatype="http://www.w3.org/2001/XMLSchema#string">2013</lokiatt:production_year> <lokiatt:engine rdf:datatype="http://www.w3.org/2001/XMLSchema#string">8.4 L V10</lokiatt:engine> <lokirel:produced_in_country rdf:resource="http://loki.ia.agh.edu.pl/lokidev/special:uriresolve:countries:usa"/> <lokirel:directed_by rdf:resource="http://loki.ia.agh.edu.pl/lokidev/special:uriresolve:person:francis_ford_coppola"/
> <lokirel:screenplay rdf:resource="http://loki.ia.agh.edu.pl/lokidev/special:uriresolve:person:mario_puzo"/> <lokirel:screenplay rdf:resource="http://loki.ia.agh.edu.pl/lokidev/special:uriresolve:person:francis_ford_coppola"/
> <lokirel:main_role rdf:resource="http://loki.ia.agh.edu.pl/lokidev/special:uriresolve:person:marlon_brando"/> <lokirel:main_character rdf:resource="http://loki.ia.agh.edu.pl/lokidev/special:uriresolve:person:vito_corleone"/> <lokirel:produced_in_country rdf:resource="http://loki.ia.agh.edu.pl/lokidev/special:uriresolve:countries:usa"/> <lokirel:screenplay rdf:resource="http://loki.ia.agh.edu.pl/lokidev/special:uriresolve:persons:mario_puzo"/> <lokirel:screenplay rdf:resource="http://loki.ia.agh.edu.pl/lokidev/special:uriresolve:persons:francis_ford_coppola"
/> <lokirel:directed_by rdf:resource="http://loki.ia.agh.edu.pl/lokidev/special:uriresolve:persons:francis_ford_coppola"
/> <lokirel:main_role rdf:resource="http://loki.ia.agh.edu.pl/lokidev/special:uriresolve:persons:marlon_brando"/> <lokirel:main_role rdf:resource="http://loki.ia.agh.edu.pl/lokidev/special:uriresolve:persons:al_pacino"/> <lokirel:supporting_role rdf:resource="http://loki.ia.agh.edu.pl/lokidev/special:uriresolve:persons:james_caan"/> <lokirel:supporting_role rdf:resource="http://loki.ia.agh.edu.pl/lokidev/special:uriresolve:persons:richard_castellano"/> <lokirel:supporting_role rdf:resource="http://loki.ia.agh.edu.pl/lokidev/special:uriresolve:persons:robert_duvall"/> <lokirel:supporting_role rdf:resource="http://loki.ia.agh.edu.pl/lokidev/special:uriresolve:persons:sterling_hayden"/> <lokirel:supporting_role rdf:resource="http://loki.ia.agh.edu.pl/lokidev/special:uriresolve:persons:john_marley"/> <lokirel:supporting_role rdf:resource="http://loki.ia.agh.edu.pl/lokidev/special:uriresolve:persons:richard_conte"/> <lokirel:supporting_role rdf:resource="http://loki.ia.agh.edu.pl/lokidev/special:uriresolve:persons:diane_keaton"/> <rdfs:isDefinedBy rdf:resource="http://loki.ia.agh.edu.pl/lokidev/movies:godfather_the?do=exportrdf"/> </rdf:Description> <!­­ related ontology data ­­> <owl:Class rdf:about="http://loki.ia.agh.edu.pl/lokidev/special:uriresolve:special:category:movie"> <rdfs:label>movie</rdfs:label> <rdfs:isDefinedBy rdf:resource="http://loki.ia.agh.edu.pl/lokidev/special:category:movie?do=exportrdf"/> </owl:Class> <owl:ObjectProperty rdf:about="http://loki.ia.agh.edu.pl/lokidev/special:uriresolve:special:relation:produced_in_cou
ntry"> <rdfs:label>produced_in_country</rdfs:label> <rdfs:isDefinedBy rdf:resource="http://loki.ia.agh.edu.pl/lokidev/special:relation:produced_in_country?do=export
rdf"/> </owl:ObjectProperty> <owl:ObjectProperty rdf:about="http://loki.ia.agh.edu.pl/lokidev/special:uriresolve:special:relation:directed_by"> <rdfs:label>directed_by</rdfs:label> <rdfs:isDefinedBy rdf:resource="http://loki.ia.agh.edu.pl/lokidev/special:relation:directed_by?do=exportrdf"/> </owl:ObjectProperty> <owl:ObjectProperty rdf:about="http://loki.ia.agh.edu.pl/lokidev/special:uriresolve:special:relation:screenplay"> <rdfs:label>screenplay</rdfs:label> <rdfs:isDefinedBy rdf:resource="http://loki.ia.agh.edu.pl/lokidev/special:relation:screenplay?do=exportrdf"/> </owl:ObjectProperty> <owl:ObjectProperty rdf:about="http://loki.ia.agh.edu.pl/lokidev/special:uriresolve:special:relation:main_role"> <rdfs:label>main_role</rdfs:label> <rdfs:isDefinedBy rdf:resource="http://loki.ia.agh.edu.pl/lokidev/special:relation:main_role?do=exportrdf"/> </owl:ObjectProperty> <owl:ObjectProperty rdf:about="http://loki.ia.agh.edu.pl/lokidev/special:uriresolve:special:relation:main_character"> <rdfs:label>main_character</rdfs:label> <rdfs:isDefinedBy rdf:resource="http://loki.ia.agh.edu.pl/lokidev/special:relation:main_character?do=exportrdf"/> </owl:ObjectProperty> <owl:ObjectProperty rdf:about="http://loki.ia.agh.edu.pl/lokidev/special:uriresolve:special:relation:supporting_role"> <rdfs:label>supporting_role</rdfs:label> <rdfs:isDefinedBy rdf:resource="http://loki.ia.agh.edu.pl/lokidev/special:relation:supporting_role?do=exportrdf"/> </owl:ObjectProperty> <owl:DatatypeProperty rdf:about="http://loki.ia.agh.edu.pl/lokidev/special:uriresolve:special:attribute:title"> <rdfs:label>title</rdfs:label> <rdfs:isDefinedBy rdf:resource="http://loki.ia.agh.edu.pl/lokidev/special:attribute:title?do=exportrdf"/> </owl:DatatypeProperty> <owl:DatatypeProperty rdf:about="http://loki.ia.agh.edu.pl/lokidev/special:uriresolve:special:attribute:production_year"
> <rdfs:label>production_year</rdfs:label> <rdfs:isDefinedBy rdf:resource="http://loki.ia.agh.edu.pl/lokidev/special:attribute:production_year?do=exportrdf"/
> </owl:DatatypeProperty> <owl:DatatypeProperty rdf:about="http://loki.ia.agh.edu.pl/lokidev/special:uriresolve:special:attribute:language"> <rdfs:label>language</rdfs:label> <rdfs:isDefinedBy rdf:resource="http://loki.ia.agh.edu.pl/lokidev/special:attribute:language?do=exportrdf"/> </owl:DatatypeProperty> <owl:DatatypeProperty rdf:about="http://loki.ia.agh.edu.pl/lokidev/special:uriresolve:special:attribute:engine"> <rdfs:label>engine</rdfs:label> <rdfs:isDefinedBy rdf:resource="http://loki.ia.agh.edu.pl/lokidev/special:attribute:engine?do=exportrdf"/> </owl:DatatypeProperty> </rdf:RDF> 7. Reflection Many of the stuff unused unfortunately ­ all in all very good idea but also it’s unpopular so it’s kinda dying.