From: <ku...@us...> - 2011-11-21 15:13:02
|
Revision: 3422 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=3422&view=rev Author: kurzum Date: 2011-11-21 15:12:51 +0000 (Mon, 21 Nov 2011) Log Message: ----------- replaced the sparql component with a conf file Modified Paths: -------------- trunk/examples/sparql/new_approach.conf Modified: trunk/examples/sparql/new_approach.conf =================================================================== --- trunk/examples/sparql/new_approach.conf 2011-11-21 14:43:55 UTC (rev 3421) +++ trunk/examples/sparql/new_approach.conf 2011-11-21 15:12:51 UTC (rev 3422) @@ -4,22 +4,28 @@ ks1.type = "OWL File" ks1.url = "http://dbpedia.org/sparql" ks1.defaultGraphURIs= {"http://dbpedia.org"} -ks1.sparql = " Construct { ?s1 ?p1 ?o1. ?o1 ?p2 ?o2 . ?p1 a owl:ObjectProperty . ?p2 a owl:ObjectProperty . ?s1 a owl:Thing . ?o1 a owl:Thing . ?o2 a owl:Thing . } { ?s1 ?p1 ?o1. OPTIONAL{ ?o1 ?p2 ?o2.} Filter (! (?p1 IN (rdf:type , <http://purl.org/dc/terms/subject>, owl:sameAs, <http://dbpedia.org/ontology/wikiPageExternalLink> ) )) . Filter (! (?p2 IN (rdf:type , <http://purl.org/dc/terms/subject>, owl:sameAs, <http://dbpedia.org/ontology/wikiPageExternalLink> ) )) . Filter (!isLiteral(?o1) && !isLiteral(?o2) ) . Filter ( ?s1 IN (<http://dbpedia.org/resource/London> , <http://dbpedia.org/resource/Berlin>)) } " +ks1.sparql = " Construct { ?s1 ?p1 ?o1. ?o1 ?p2 ?o2 . ?p1 a owl:ObjectProperty . ?p2 a owl:ObjectProperty . ?s1 a owl:Thing . ?o1 a owl:Thing . ?o2 a owl:Thing . } { ?s1 ?p1 ?o1. OPTIONAL{ ?o1 ?p2 ?o2.} . Filter (! (?p1 IN (rdf:type , <http://purl.org/dc/terms/subject>, owl:sameAs, <http://dbpedia.org/ontology/wikiPageExternalLink>, <http://dbpedia.org/ontology/thumbnail>, <http://dbpedia.org/property/website>, <http://xmlns.com/foaf/0.1/homepage> ,<http://xmlns.com/foaf/0.1/depiction>, <http://xmlns.com/foaf/0.1/page> ) )) . Filter (! (?p1 IN (rdf:type , <http://purl.org/dc/terms/subject>, owl:sameAs, <http://dbpedia.org/ontology/wikiPageExternalLink>, <http://dbpedia.org/ontology/thumbnail>, <http://dbpedia.org/property/website>, <http://xmlns.com/foaf/0.1/homepage> ,<http://xmlns.com/foaf/0.1/depiction>, <http://xmlns.com/foaf/0.1/page> ) )) . Filter (!isLiteral(?o1) && !isLiteral(?o2) ) . Filter ( ?s1 IN (<http://dbpedia.org/resource/London> , <http://dbpedia.org/resource/Berlin>)) . } " ks2.type = "OWL File" ks2.url = "http://dbpedia.org/sparql" ks2.defaultGraphURIs= {"http://dbpedia.org"} -ks2.sparql = "Construct { ?s1 a ?cl1 . ?s1 a owl:Thing . ?cl1 a owl:Class . ?o2 a ?cl2. ?o2 a owl:Thing . ?cl2 a owl:Class . } { ?s1 ?p1 ?o1 . OPTIONAL { ?o1 ?p2 ?o2. } Filter (! (?p1 IN (rdf:type , <http://purl.org/dc/terms/subject> ) )) . Filter (! (?p2 IN (rdf:type , <http://purl.org/dc/terms/subject> ) )) . Filter (!isLiteral(?o1) && !isLiteral(?o2) ) . ?s1 a ?cl1 . OPTIONAL {?o2 a ?cl2. } Filter ( ?cl1 LIKE <http://dbpedia.org/ontology/%> ) . Filter ( ?cl2 LIKE <http://dbpedia.org/ontology/%> ) . } " +ks2.sparql = "Construct { ?s a ?class . ?s a owl:Thing . ?class a owl:Class . ?class rdfs:subClassOf ?super . ?super a owl:Class . } { ?s a ?class . OPTIONAL { ?class rdfs:subClassOf ?super . } . Filter ( ?s IN (<http://dbpedia.org/resource/London> , <http://dbpedia.org/resource/Berlin>)) . Filter ( ?class LIKE <http://dbpedia.org/ontology/%> ) . } " -ks2.type = "OWL File" -ks2.url = "http://dbpedia.org/sparql" -ks2.defaultGraphURIs= {"http://dbpedia.org"} -ks2.sparql = "Construct { ?s1 a ?cl1 . ?s1 a owl:Thing . ?cl1 a owl:Class . ?o2 a ?cl2. ?o2 a owl:Thing . ?cl2 a owl:Class . } { ?s1 ?p1 ?o1 . OPTIONAL { ?o1 ?p2 ?o2. } Filter (! (?p1 IN (rdf:type , <http://purl.org/dc/terms/subject> ) )) . Filter (! (?p2 IN (rdf:type , <http://purl.org/dc/terms/subject> ) )) . Filter (!isLiteral(?o1) && !isLiteral(?o2) ) . ?s1 a ?cl1 . OPTIONAL {?o2 a ?cl2. } Filter ( ?cl1 LIKE <http://dbpedia.org/ontology/%> ) . Filter ( ?cl2 LIKE <http://dbpedia.org/ontology/%> ) . } " +ks3.type = "OWL File" +ks3.url = "http://dbpedia.org/sparql" +ks3.defaultGraphURIs= {"http://dbpedia.org"} +ks3.sparql = "Construct { ?o a ?class . ?o a owl:Thing . ?class a owl:Class . ?class rdfs:subClassOf ?super .?super a owl:Class . } { ?s ?p ?o . ?o a ?class . OPTIONAL { ?class rdfs:subClassOf ?super . } . Filter ( ?s IN (<http://dbpedia.org/resource/London> , <http://dbpedia.org/resource/Berlin>)) . Filter ( ?class LIKE <http://dbpedia.org/ontology/%> ) . } " +ks4.type = "OWL File" +ks4.url = "http://dbpedia.org/sparql" +ks4.defaultGraphURIs= {"http://dbpedia.org"} +ks4.sparql = "Construct { ?o a ?class . ?o a owl:Thing . ?class a owl:Class . ?class rdfs:subClassOf ?super . ?super a owl:Class . } { ?s ?p1 ?o1 . ?o1 ?p2 ?o . ?o a ?class . OPTIONAL { ?class rdfs:subClassOf ?super . } . Filter ( ?s IN (<http://dbpedia.org/resource/London> , <http://dbpedia.org/resource/Berlin>)) . Filter ( ?class LIKE <http://dbpedia.org/ontology/%> ) . } " + + reasoner.type = "fast instance checker" -reasoner.sources = {ks1, ks2} +reasoner.sources = {ks1, ks2, ks3, ks4 } lp.type = "posNegStandard" lp.positiveExamples = {"http://dbpedia.org/resource/Berlin"} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |