You can subscribe to this list here.
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(120) |
Sep
(36) |
Oct
(116) |
Nov
(17) |
Dec
(44) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
(143) |
Feb
(192) |
Mar
(74) |
Apr
(84) |
May
(105) |
Jun
(64) |
Jul
(49) |
Aug
(120) |
Sep
(159) |
Oct
(156) |
Nov
(51) |
Dec
(28) |
2009 |
Jan
(17) |
Feb
(55) |
Mar
(33) |
Apr
(57) |
May
(54) |
Jun
(28) |
Jul
(6) |
Aug
(16) |
Sep
(38) |
Oct
(30) |
Nov
(26) |
Dec
(52) |
2010 |
Jan
(7) |
Feb
(91) |
Mar
(65) |
Apr
(2) |
May
(14) |
Jun
(25) |
Jul
(38) |
Aug
(48) |
Sep
(80) |
Oct
(70) |
Nov
(75) |
Dec
(77) |
2011 |
Jan
(68) |
Feb
(53) |
Mar
(51) |
Apr
(35) |
May
(65) |
Jun
(101) |
Jul
(29) |
Aug
(230) |
Sep
(95) |
Oct
(49) |
Nov
(110) |
Dec
(63) |
2012 |
Jan
(41) |
Feb
(42) |
Mar
(25) |
Apr
(46) |
May
(51) |
Jun
(44) |
Jul
(45) |
Aug
(29) |
Sep
(12) |
Oct
(9) |
Nov
(17) |
Dec
(2) |
2013 |
Jan
(12) |
Feb
(14) |
Mar
(7) |
Apr
(16) |
May
(54) |
Jun
(27) |
Jul
(11) |
Aug
(5) |
Sep
(85) |
Oct
(27) |
Nov
(37) |
Dec
(32) |
2014 |
Jan
(8) |
Feb
(29) |
Mar
(5) |
Apr
(3) |
May
(22) |
Jun
(3) |
Jul
(4) |
Aug
(3) |
Sep
|
Oct
|
Nov
|
Dec
|
From: <jen...@us...> - 2011-12-07 15:18:34
|
Revision: 3482 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=3482&view=rev Author: jenslehmann Date: 2011-12-07 15:18:27 +0000 (Wed, 07 Dec 2011) Log Message: ----------- removed ext dependency for release Modified Paths: -------------- trunk/components-core/src/main/java/org/dllearner/core/AnnComponentManager.java trunk/interfaces/pom.xml trunk/interfaces/src/test/java/org/dllearner/cli/NLP2RDFCLITest.java Removed Paths: ------------- trunk/examples/nlp2rdf/ Modified: trunk/components-core/src/main/java/org/dllearner/core/AnnComponentManager.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/core/AnnComponentManager.java 2011-12-07 15:07:59 UTC (rev 3481) +++ trunk/components-core/src/main/java/org/dllearner/core/AnnComponentManager.java 2011-12-07 15:18:27 UTC (rev 3482) @@ -71,7 +71,7 @@ "org.dllearner.algorithms.properties.SubDataPropertyOfAxiomLearner", "org.dllearner.algorithms.DisjointClassesLearner", "org.dllearner.algorithms.SimpleSubclassLearner", - "org.dllearner.algorithm.qtl.QTL", +// "org.dllearner.algorithm.qtl.QTL", "org.dllearner.kb.KBFile", "org.dllearner.kb.OWLFile", "org.dllearner.kb.SparqlEndpointKS", Modified: trunk/interfaces/pom.xml =================================================================== --- trunk/interfaces/pom.xml 2011-12-07 15:07:59 UTC (rev 3481) +++ trunk/interfaces/pom.xml 2011-12-07 15:18:27 UTC (rev 3482) @@ -202,10 +202,12 @@ <groupId>org.dllearner</groupId> <artifactId>components-core</artifactId> </dependency> + <!-- <dependency> <groupId>org.dllearner</groupId> <artifactId>components-ext</artifactId> </dependency> + --> <!-- Added the dependency of the core tests so that they will be accessible from the tests in this component --> <dependency> Modified: trunk/interfaces/src/test/java/org/dllearner/cli/NLP2RDFCLITest.java =================================================================== --- trunk/interfaces/src/test/java/org/dllearner/cli/NLP2RDFCLITest.java 2011-12-07 15:07:59 UTC (rev 3481) +++ trunk/interfaces/src/test/java/org/dllearner/cli/NLP2RDFCLITest.java 2011-12-07 15:18:27 UTC (rev 3482) @@ -14,7 +14,7 @@ @Test public void sampleTest() throws IOException { - File f = new File("../examples/nlp2rdf/sample/sample1.conf"); + File f = new File("../test/nlp2rdf/sample/sample1.conf"); // File f = new File("../examples/nlp2rdf/learning_initial_6/dbpedia_spotlight_plus/copper17_vs_gold35.conf"); CLI cli = new CLI(f); cli.init(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jen...@us...> - 2011-12-07 15:08:10
|
Revision: 3481 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=3481&view=rev Author: jenslehmann Date: 2011-12-07 15:07:59 +0000 (Wed, 07 Dec 2011) Log Message: ----------- commented out one unit test and moved some examples to test directory Modified Paths: -------------- trunk/components-core/src/test/java/org/dllearner/test/junit/ConfigOptionTest.java Added Paths: ----------- trunk/test/nlp2rdf/reuters_gold_vs_copper/ trunk/test/nlp2rdf/sample/ Removed Paths: ------------- trunk/examples/nlp2rdf/reuters_gold_vs_copper/ trunk/examples/nlp2rdf/sample/ Modified: trunk/components-core/src/test/java/org/dllearner/test/junit/ConfigOptionTest.java =================================================================== --- trunk/components-core/src/test/java/org/dllearner/test/junit/ConfigOptionTest.java 2011-12-06 17:08:59 UTC (rev 3480) +++ trunk/components-core/src/test/java/org/dllearner/test/junit/ConfigOptionTest.java 2011-12-07 15:07:59 UTC (rev 3481) @@ -38,21 +38,23 @@ @Test public void testConfigOption() { - List<ConfigOption> configOptions = ConfigHelper.getConfigOptions(CELOE.class); - assertFalse(configOptions.isEmpty()); + // now outdated, because property editors do not need to be specified for each option - CELOE celoe = new CELOE(); - celoe.setMaxExecutionTimeInSeconds(10); - Map<ConfigOption,Object> optionValues = ConfigHelper.getConfigOptionValues(celoe); - boolean found = false; - for(Entry<ConfigOption,Object> entry : optionValues.entrySet()) { - System.out.println(entry.getKey() + " " + entry.getValue()); - if(entry.getKey().name().equals("maxExecutionTimeInSeconds")) { - found = true; - assertTrue(Integer.valueOf(entry.getValue().toString())==10); - } - } - assertTrue(found); +// List<ConfigOption> configOptions = ConfigHelper.getConfigOptions(CELOE.class); +// assertFalse(configOptions.isEmpty()); +// +// CELOE celoe = new CELOE(); +// celoe.setMaxExecutionTimeInSeconds(10); +// Map<ConfigOption,Object> optionValues = ConfigHelper.getConfigOptionValues(celoe); +// boolean found = false; +// for(Entry<ConfigOption,Object> entry : optionValues.entrySet()) { +// System.out.println(entry.getKey() + " " + entry.getValue()); +// if(entry.getKey().name().equals("maxExecutionTimeInSeconds")) { +// found = true; +// assertTrue(Integer.valueOf(entry.getValue().toString())==10); +// } +// } +// assertTrue(found); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sha...@us...> - 2011-12-06 17:09:10
|
Revision: 3480 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=3480&view=rev Author: shadowtm Date: 2011-12-06 17:08:59 +0000 (Tue, 06 Dec 2011) Log Message: ----------- Added log4j.properties to assembly package so it would be deployed in the root dl-learner directory in the distribution. Modified Paths: -------------- trunk/interfaces/src/main/assemble/archive.xml Modified: trunk/interfaces/src/main/assemble/archive.xml =================================================================== --- trunk/interfaces/src/main/assemble/archive.xml 2011-12-06 15:14:33 UTC (rev 3479) +++ trunk/interfaces/src/main/assemble/archive.xml 2011-12-06 17:08:59 UTC (rev 3480) @@ -41,6 +41,13 @@ <include>javadoc.html</include> </includes> </fileSet> + <fileSet> + <directory>src/main/resources</directory> + <includes> + <include>log4j.properties</include> + </includes> + <outputDirectory/> + </fileSet> <fileSet> <directory>${project.build.directory}/site</directory> <outputDirectory>docs</outputDirectory> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lor...@us...> - 2011-12-06 15:14:45
|
Revision: 3479 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=3479&view=rev Author: lorenz_b Date: 2011-12-06 15:14:33 +0000 (Tue, 06 Dec 2011) Log Message: ----------- Added example. Modified Paths: -------------- trunk/scripts/src/main/java/org/dllearner/scripts/ApproximateDebugging.java Added Paths: ----------- trunk/scripts/src/main/resources/dbpedia_0.75_no_datapropaxioms.owl Modified: trunk/scripts/src/main/java/org/dllearner/scripts/ApproximateDebugging.java =================================================================== --- trunk/scripts/src/main/java/org/dllearner/scripts/ApproximateDebugging.java 2011-12-06 15:01:09 UTC (rev 3478) +++ trunk/scripts/src/main/java/org/dllearner/scripts/ApproximateDebugging.java 2011-12-06 15:14:33 UTC (rev 3479) @@ -484,11 +484,11 @@ ConciseBoundedDescriptionGenerator cbdGen = new ConciseBoundedDescriptionGeneratorImpl(endpoint, new ExtractionDBCache("cache")); // ConciseBoundedDescriptionGenerator cbdGen = new SymmetricConciseBoundedDescriptionGeneratorImpl(endpoint, new ExtractionDBCache("cache")); - Model model = cbdGen.getConciseBoundedDescription(resource, 4); + Model model = cbdGen.getConciseBoundedDescription(resource, 3); OWLOntology data = convert(model); OWLOntologyManager man = OWLManager.createOWLOntologyManager(); - OWLOntology schema = man.loadOntologyFromOntologyDocument(new File("/home/lorenz/arbeit/dbpedia_0.75_no_datapropaxioms.owl")); + OWLOntology schema = man.loadOntologyFromOntologyDocument(new File("src/main/resources/dbpedia_0.75_no_datapropaxioms.owl")); ApproximateDebugging debug = new ApproximateDebugging(schema, data); Set<Set<OWLAxiom>> explanations1 = debug.computeInconsistencyExplanations(); Added: trunk/scripts/src/main/resources/dbpedia_0.75_no_datapropaxioms.owl =================================================================== --- trunk/scripts/src/main/resources/dbpedia_0.75_no_datapropaxioms.owl (rev 0) +++ trunk/scripts/src/main/resources/dbpedia_0.75_no_datapropaxioms.owl 2011-12-06 15:14:33 UTC (rev 3479) @@ -0,0 +1,234448 @@ +<?xml version="1.0"?> +<rdf:RDF xmlns="owlapi:ontology:ont1#" + xml:base="owlapi:ontology:ont1" + xmlns:schema="http://schema.org/" + xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" + xmlns:foaf="http://xmlns.com/foaf/0.1/" + xmlns:owl="http://www.w3.org/2002/07/owl#" + xmlns:xsd="http://www.w3.org/2001/XMLSchema#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:gml="http://www.opengis.net/gml/" + xmlns:ontology="http://dbpedia.org/ontology/" + xmlns:skos="http://www.w3.org/2004/02/skos/core#"> + <owl:Ontology rdf:about="owlapi:ontology:ont1"/> + + + + <!-- + /////////////////////////////////////////////////////////////////////////////////////// + // + // Object Properties + // + /////////////////////////////////////////////////////////////////////////////////////// + --> + + + + + <!-- http://dbpedia.org/ontology/academicAdvisor --> + + <owl:ObjectProperty rdf:about="http://dbpedia.org/ontology/academicAdvisor"> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#AsymmetricProperty"/> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#InverseFunctionalProperty"/> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#IrreflexiveProperty"/> + <rdfs:domain rdf:resource="http://dbpedia.org/ontology/Person"/> + <rdfs:domain rdf:resource="http://dbpedia.org/ontology/Scientist"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/academicDiscipline"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/actScore"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/addressInRoad"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/administrativeCollectivity"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/administrativeDistrict"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/affiliation"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/aircraftAttack"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/aircraftBomber"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/aircraftElectronic"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/aircraftFighter"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/aircraftHelicopter"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/aircraftHelicopterAttack"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/aircraftHelicopterCargo"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/aircraftHelicopterMultirole"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/aircraftHelicopterObservation"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/aircraftHelicopterTransport"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/aircraftHelicopterUtility"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/aircraftInterceptor"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/aircraftPatrol"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/aircraftRecon"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/aircraftTrainer"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/aircraftTransport"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/album"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/alliance"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/almaMater"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/alumni"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/animal"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/anthem"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/appointer"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/archipelago"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/architect"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/architecturalStyle"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/arrondissement"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/artery"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/artist"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/assembly"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/assistantPrincipal"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/associate"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/associateEditor"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/associatedAct"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/associatedBand"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/associatedMusicalArtist"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/associatedRocket"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/associationOfLocalGovernment"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/athletics"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/author"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/authority"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/automobilePlatform"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/availableSmartCard"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/award"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/bandMember"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/basedOn"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/battle"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/beatifiedBy"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/beatifiedPlace"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/beltwayCity"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/billed"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/binomial"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/binomialAuthority"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/biome"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/birthPlace"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/blockAlloy"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/board"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/bodyDiscovered"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/bodyStyle"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/boiler"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/boilerPressure"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/booster"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/border"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/borough"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/branchFrom"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/branchTo"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/brand"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/broadcastArea"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/broadcastNetwork"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/builder"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/building"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/campus"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/canonizedBy"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/canonizedPlace"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/canton"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/capital"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/capitalCountry"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/capitalMountain"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/capitalPlace"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/capitalPosition"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/capitalRegion"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/category"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/ceo"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/ceremonialCounty"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/chain"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/chairLabel"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/chairman"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/chairperson"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/chancellor"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/channel"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/chaplain"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/chef"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/chiefEditor"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/child"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/childOrganisation"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/choreographer"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/cinematography"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/citizenship"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/city"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/class"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/closingFilm"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/clubsRecordGoalscorer"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/coach"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/coachedTeam"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/college"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/colour"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/commandStructure"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/commander"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/committeeInLegislature"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/company"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/comparable"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/compiler"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/component"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/composer"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/computingInput"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/computingMedia"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/computingPlatform"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/congressionalDistrict"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/connotation"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/constructionMaterial"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/coolingSystem"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/councilArea"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/country"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/countryOrigin"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/countryWithFirstAstronaut"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/countryWithFirstSatellite"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/countryWithFirstSatelliteLaunched"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/countryWithFirstSpaceflight"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/county"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/countySeat"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/coverArtist"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/cpu"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/creativeDirector"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/creator"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/creatorOfDish"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/crew"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/crewMember"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/crosses"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/curator"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/currency"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/currentMember"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/currentPartner"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/currentProduction"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/custodian"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/daylightSavingTimeZone"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/dean"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/deathCause"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/deathPlace"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/debutTeam"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/denomination"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/department"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/deputy"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/derivative"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/designCompany"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/designer"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/destination"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/developer"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/director"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/discoverer"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/distributingCompany"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/distributingLabel"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/distributor"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/district"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/division"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/doctoralAdvisor"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/doctoralStudent"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/domain"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/draftTeam"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/drainsFrom"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/drainsTo"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/editing"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/editor"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/education"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/educationSystem"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/emmyAward"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/employer"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/endPoint"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/endingTheme"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/engine"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/engineType"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/engineer"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/equipment"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/era"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/ethnicGroup"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/ethnicity"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/europeanAffiliation"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/europeanParliamentGroup"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/event"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/executiveProducer"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/family"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/fastestDriver"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/fastestDriverCountry"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/fastestDriverTeam"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/federalState"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/field"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/film"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/filmFareAward"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/firstAppearance"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/firstAscentPerson"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/firstDriver"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/firstDriverCountry"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/firstDriverTeam"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/firstFlight"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/firstLaunchRocket"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/firstLeader"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/firstPopularVote"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/firstRace"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/firstWin"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/firstWinner"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/flagBearer"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/followingEvent"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/format"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/formerBandMember"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/formerBroadcastNetwork"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/formerChoreographer"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/formerCoach"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/formerHighschool"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/formerPartner"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/formerTeam"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/foundationPlace"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/foundedBy"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/foundingPerson"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/fourthCommander"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/frazioni"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/fuel"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/fuelSystem"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/fundedBy"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/gameArtist"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/gameEngine"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/garrison"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/gender"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/generalManager"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/genre"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/genus"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/governingBody"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/government"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/governmentCountry"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/governmentMountain"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/governmentPlace"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/governmentPosition"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/governmentRegion"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/governmentType"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/governor"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/governorGeneral"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/grades"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/ground"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/growingGrape"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/guest"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/hasJunctionWith"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/hasVariant"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/head"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/headAlloy"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/headChef"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/headquarter"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/headquarters"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/headteacher"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/heir"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/highestMountain"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/highestPlace"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/highestPosition"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/highestRegion"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/highestState"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/highschool"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/highwaySystem"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/homeArena"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/homeStadium"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/homeport"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/hometown"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/honours"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/house"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/hubAirport"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/ideology"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/illustrator"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/incumbent"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/industry"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/inflow"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/influenced"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/influencedBy"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/ingredient"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/innervates"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/instrument"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/intercommunality"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/internationalAffiliation"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/isPartOf"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/isPartOfAnatomicalStructure"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/isPartOfMilitaryConflict"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/isPartOfWineRegion"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/island"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/iso6391Code"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/iso6392Code"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/iso6393Code"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/isoCodeRegion"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/jointCommunity"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/jurisdiction"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/keyPerson"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/kingdom"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/knownFor"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/landingVehicle"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/language"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/languageFamily"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/languageRegulator"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/largestCity"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/largestSettlement"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/lastAppearance"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/lastFlight"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/lastLaunchRocket"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/lastRace"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/lastWin"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/launchPad"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/launchSite"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/launchVehicle"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/layout"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/leader"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/leaderFunction"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/leaderName"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/leaderParty"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/league"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/leftChild"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/leftTributary"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/legalForm"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/license"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/lieutenancyArea"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/lieutenant"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/literaryGenre"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/localAuthority"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/locatedInArea"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/location"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/locationCity"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/locationCountry"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/lounge"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/lowestMountain"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/lowestPlace"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/lowestPosition"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/lowestRegion"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/lowestState"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/lymph"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/lyrics"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/maidenFlightRocket"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/mainInterest"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/mainOrgan"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/maintainedBy"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/majorIsland"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/majorShrine"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/management"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/managementMountain"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/managementPlace"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/managementPosition"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/manager"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/managerClub"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/managingEditor"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/manufacturer"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/map"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/march"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/mayor"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/mediaType"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/meetingRoad"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/memberOfParliament"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/mergedIntoParty"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/metropolitanBorough"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/militaryBranch"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/militaryRank"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/militaryUnit"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/mission"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/monarch"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/mostWins"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/mountainRange"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/mouthCountry"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/mouthMountain"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/mouthPlace"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/mouthPosition"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/mouthRegion"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/movement"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/municipality"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/musicBy"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/musicComposer"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/musicFusionGenre"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/musicSubgenre"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/musicalArtist"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/musicalBand"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/namedAfter"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/narrator"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/nationalAffiliation"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/nationalOlympicCommittee"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/nationality"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/nearestCity"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/neighboringMunicipality"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/nerve"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/network"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/nextMission"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/nobelLaureates"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/nominee"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/nonFictionSubject"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/notableCommander"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/notableIdea"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/notableStudent"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/notableWine"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/notableWork"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/nrhpType"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/numberOfClassrooms"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/occupation"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/officerInCharge"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/officialLanguage"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/oilSystem"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/openingFilm"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/openingTheme"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/operatedBy"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/operatingSystem"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/operator"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/opponent"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/order"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/organSystem"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/origin"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/originalEndPoint"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/originalLanguage"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/originalStartPoint"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/orogeny"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/otherParty"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/outflow"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/owner"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/owningCompany"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/owningOrganisation"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/parent"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/parentCompany"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/parentMountainPeak"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/parentOrganisation"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/parish"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/part"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/partner"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/party"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/pastMember"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/pastor"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/patron"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/person"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/personFunction"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/philosophicalSchool"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/photographer"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/phylum"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/picture"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/pictureFormat"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/place"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/placeOfBurial"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/plant"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/poleDriver"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/poleDriverCountry"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/poleDriverTeam"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/politicalPartyInLegislature"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/politicalPartyOfLeader"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/populationPlace"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/port1"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/port2"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/portrayer"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/powerType"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/precursor"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/predecessor"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/premierePlace"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/presenter"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/president"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/previousEditor"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/previousEvent"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/previousInfrastructure"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/previousMission"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/previousWork"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/primeMinister"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/principal"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/principalArea"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/principalEngineer"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/producer"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/product"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/profession"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/programmeFormat"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/programmingLanguage"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/projectCoordinator"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/projectParticipant"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/promotion"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/prospectTeam"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/province"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/provost"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/publisher"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/railwayLineUsingTunnel"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/railwayRollingStock"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/rebuilder"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/recentWinner"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/recordLabel"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/recordedIn"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/rector"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/region"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/regionServed"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/regionalLanguage"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/related"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/relatedMeanOfTransportation"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/relation"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/relative"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/religion"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/religiousHead"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/religiousHeadLabel"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/residence"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/resolution"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/restingPlace"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/restingPlacePosition"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/retiredRocket"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/rightChild"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/rightTributary"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/rival"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/river"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/riverBranch"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/riverBranchOf"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/riverMouth"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/rocket"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/rocketFunction"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/routeEnd"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/routeEndLocation"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/routeJunction"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/routeStart"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/routeStartLocation"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/royalAnthem"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/runningMate"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/ruralMunicipality"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/saint"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/satScore"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/school"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/schoolBoard"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/schoolPatron"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/secondCommander"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/secondDriver"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/secondDriverCountry"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/secondLeader"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/secondPopularVote"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/secondTeam"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/secretaryGeneral"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/selection"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/series"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/service"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/servingRailwayLine"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/sheading"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/showJudge"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/significantBuilding"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/significantDesign"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/significantProject"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/similar"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/sisterCollege"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/sisterNewspaper"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/sisterStation"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/source"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/sourceConfluence"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/sourceConfluenceMountain"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/sourceConfluencePlace"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/sourceConfluencePosition"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/sourceConfluenceRegion"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/sourceConfluenceState"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/sourceCountry"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/sourceMountain"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/sourcePlace"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/sourcePosition"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/sourceRegion"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/spacecraft"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/species"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/splitFromParty"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/spokenIn"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/spokesperson"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/sport"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/sportCountry"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/sportGoverningBody"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/spouse"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/spurOf"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/starring"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/startPoint"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/state"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/stateDelegate"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/stateOfOrigin"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/statisticLabel"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/storyEditor"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/structuralSystem"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/stylisticOrigin"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/subregion"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/subsequentInfrastructure"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/subsequentWork"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/subsidiary"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/successor"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/summerAppearances"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/superintendent"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/supplies"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/targetAirport"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/targetSpaceStation"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/teachingStaff"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/team"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/tenant"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/territory"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/thirdCommander"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/thirdDriver"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/thirdDriverCountry"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/thirdTeam"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/timeZone"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/torchBearer"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/trainer"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/training"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/translator"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/trustee"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/twinCity"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/twinCountry"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/type"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/typeOfElectrification"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/unitaryAuthority"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/university"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/usedInWar"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/usingCountry"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/variantOf"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/varietals"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/vehicle"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/vein"/> + <owl:propertyDisjointWith rdf:resource="http://dbpedia.org/ontology/veneratedIn"/> + <owl:propertyDisjointWith rdf:resource="http... [truncated message content] |
From: <lor...@us...> - 2011-12-06 15:01:20
|
Revision: 3478 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=3478&view=rev Author: lorenz_b Date: 2011-12-06 15:01:09 +0000 (Tue, 06 Dec 2011) Log Message: ----------- Added logging and file appender. Modified Paths: -------------- trunk/scripts/src/main/java/org/dllearner/scripts/ApproximateDebugging.java Modified: trunk/scripts/src/main/java/org/dllearner/scripts/ApproximateDebugging.java =================================================================== --- trunk/scripts/src/main/java/org/dllearner/scripts/ApproximateDebugging.java 2011-12-06 14:36:59 UTC (rev 3477) +++ trunk/scripts/src/main/java/org/dllearner/scripts/ApproximateDebugging.java 2011-12-06 15:01:09 UTC (rev 3478) @@ -14,6 +14,7 @@ import java.util.TreeSet; import org.apache.log4j.ConsoleAppender; +import org.apache.log4j.FileAppender; import org.apache.log4j.Level; import org.apache.log4j.Logger; import org.apache.log4j.SimpleLayout; @@ -232,10 +233,13 @@ public Set<Set<OWLAxiom>> computeExplanationsDefault(int limit){ reasoner = PelletReasonerFactory.getInstance().createNonBufferingReasoner(schema); reasoner.isConsistent(); - + logger.info("Computing inconsistency explanations with only Pellet..."); + long startTime = System.currentTimeMillis(); PelletExplanation expGen = new PelletExplanation(reasoner); - - return expGen.getInconsistencyExplanations(limit); + Set<Set<OWLAxiom>> explanations = expGen.getInconsistencyExplanations(limit); + logger.info("done in " + (System.currentTimeMillis()-startTime) + "ms."); + logger.info("#Explanations: " + explanations.size()); + return explanations; } private Set<OWLObjectProperty> getUnsatisfiableObjectProperties(PelletReasoner reasoner){ @@ -471,6 +475,7 @@ Logger.getRootLogger().setLevel(Level.INFO); Logger.getRootLogger().removeAllAppenders(); Logger.getRootLogger().addAppender(new ConsoleAppender(new SimpleLayout())); + Logger.getRootLogger().addAppender(new FileAppender(new SimpleLayout(), "log/approx_debug.log")); PelletOptions.USE_UNIQUE_NAME_ASSUMPTION = true; String resource = "http://dbpedia.org/resource/Brad_Pitt"; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lor...@us...> - 2011-12-06 14:37:11
|
Revision: 3477 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=3477&view=rev Author: lorenz_b Date: 2011-12-06 14:36:59 +0000 (Tue, 06 Dec 2011) Log Message: ----------- Continued script. Modified Paths: -------------- trunk/scripts/src/main/java/org/dllearner/scripts/ApproximateDebugging.java Modified: trunk/scripts/src/main/java/org/dllearner/scripts/ApproximateDebugging.java =================================================================== --- trunk/scripts/src/main/java/org/dllearner/scripts/ApproximateDebugging.java 2011-12-06 12:09:48 UTC (rev 3476) +++ trunk/scripts/src/main/java/org/dllearner/scripts/ApproximateDebugging.java 2011-12-06 14:36:59 UTC (rev 3477) @@ -93,7 +93,7 @@ factory = new OWLDataFactoryImpl(); } - public void computeInconsistencyExplanations(){ + public Set<Set<OWLAxiom>> computeInconsistencyExplanations(){ Set<Set<OWLAxiom>> allExplanations = new HashSet<Set<OWLAxiom>>(); Set<Set<OWLAxiom>> explanations = computeInconsistencyExplanationsByPellet(); @@ -105,16 +105,31 @@ logger.info("Computed " + explanations.size() + " explanations with anti-pattern."); logger.info("Computed overall " + allExplanations.size() + " explanations."); + return allExplanations; } private Set<Set<OWLAxiom>> computeInconsistencyExplanationsByPellet(){ Set<Set<OWLAxiom>> explanations = new HashSet<Set<OWLAxiom>>(); +// man.removeAxioms(ontology, ontology.getAxioms(AxiomType.DISJOINT_CLASSES)); +// reasoner = PelletReasonerFactory.getInstance().createNonBufferingReasoner(ontology); +// System.out.println(reasoner.isConsistent()); +// +// OWLObjectProperty prop = factory.getOWLObjectProperty(IRI.create("p")); +// OWLIndividual s = factory.getOWLNamedIndividual(IRI.create("i")); +// OWLIndividual o1 = factory.getOWLNamedIndividual(IRI.create("o1")); +// OWLIndividual o2 = factory.getOWLNamedIndividual(IRI.create("o2")); +// OWLAxiom axi = factory.getOWLObjectPropertyAssertionAxiom(prop, s, o1); +// man.addAxiom(ontology, axi); +// axi = factory.getOWLObjectPropertyAssertionAxiom(prop, s, o2); +// man.addAxiom(ontology, axi); +// axi = factory.getOWLFunctionalObjectPropertyAxiom(prop); +// man.addAxiom(ontology, axi); +// System.out.println(reasoner.isConsistent()); - // OWLOntologyManager manager = OWLManager.createOWLOntologyManager(); // // try { -// OWLOntology dummy = manager.createOntology(); +// OWLOntology dummy = man.createOntology(); // OWLObjectProperty prop = factory.getOWLObjectProperty(IRI.create("p")); // OWLIndividual s = factory.getOWLNamedIndividual(IRI.create("i")); // OWLIndividual o1 = factory.getOWLNamedIndividual(IRI.create("o1")); @@ -168,7 +183,7 @@ expGen = new PelletExplanation(reasoner); logger.info("Computing explanations..."); startTime = System.currentTimeMillis(); - Set<Set<OWLAxiom>> temp = expGen.getUnsatisfiableExplanations(unsatClass, 50); + Set<Set<OWLAxiom>> temp = expGen.getUnsatisfiableExplanations(unsatClass, 10); logger.info("done in " + (System.currentTimeMillis()-startTime) + "ms."); logger.info("#Explanations: " + temp.size()); //we get all asserted instances @@ -214,6 +229,15 @@ return explanations; } + public Set<Set<OWLAxiom>> computeExplanationsDefault(int limit){ + reasoner = PelletReasonerFactory.getInstance().createNonBufferingReasoner(schema); + reasoner.isConsistent(); + + PelletExplanation expGen = new PelletExplanation(reasoner); + + return expGen.getInconsistencyExplanations(limit); + } + private Set<OWLObjectProperty> getUnsatisfiableObjectProperties(PelletReasoner reasoner){ SortedSet<OWLObjectProperty> properties = new TreeSet<OWLObjectProperty>(); OWLDataFactory f = OWLManager.createOWLOntologyManager().getOWLDataFactory(); @@ -449,20 +473,23 @@ Logger.getRootLogger().addAppender(new ConsoleAppender(new SimpleLayout())); PelletOptions.USE_UNIQUE_NAME_ASSUMPTION = true; - String resource = "http://dbpedia.org/resource/Leipzig"; + String resource = "http://dbpedia.org/resource/Brad_Pitt"; SparqlEndpoint endpoint = new SparqlEndpoint(new URL("http://dbpedia.aksw.org:8902/sparql"), Collections.singletonList("http://dbpedia.org"), Collections.<String>emptyList()); ConciseBoundedDescriptionGenerator cbdGen = new ConciseBoundedDescriptionGeneratorImpl(endpoint, new ExtractionDBCache("cache")); // ConciseBoundedDescriptionGenerator cbdGen = new SymmetricConciseBoundedDescriptionGeneratorImpl(endpoint, new ExtractionDBCache("cache")); - Model model = cbdGen.getConciseBoundedDescription(resource, 3); + Model model = cbdGen.getConciseBoundedDescription(resource, 4); OWLOntology data = convert(model); OWLOntologyManager man = OWLManager.createOWLOntologyManager(); OWLOntology schema = man.loadOntologyFromOntologyDocument(new File("/home/lorenz/arbeit/dbpedia_0.75_no_datapropaxioms.owl")); ApproximateDebugging debug = new ApproximateDebugging(schema, data); - debug.computeInconsistencyExplanations(); + Set<Set<OWLAxiom>> explanations1 = debug.computeInconsistencyExplanations(); + Set<Set<OWLAxiom>> explanations2 = debug.computeExplanationsDefault(500); + System.out.println(explanations1.size()); + System.out.println(explanations2.size()); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lor...@us...> - 2011-12-06 12:09:59
|
Revision: 3476 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=3476&view=rev Author: lorenz_b Date: 2011-12-06 12:09:48 +0000 (Tue, 06 Dec 2011) Log Message: ----------- Continued script. Modified Paths: -------------- trunk/scripts/src/main/java/org/dllearner/scripts/ApproximateDebugging.java Modified: trunk/scripts/src/main/java/org/dllearner/scripts/ApproximateDebugging.java =================================================================== --- trunk/scripts/src/main/java/org/dllearner/scripts/ApproximateDebugging.java 2011-12-05 23:00:46 UTC (rev 3475) +++ trunk/scripts/src/main/java/org/dllearner/scripts/ApproximateDebugging.java 2011-12-06 12:09:48 UTC (rev 3476) @@ -4,35 +4,55 @@ import java.io.ByteArrayOutputStream; import java.io.File; import java.io.IOException; +import java.io.PrintWriter; import java.net.URL; import java.util.Collections; +import java.util.Comparator; import java.util.HashSet; import java.util.Set; import java.util.SortedSet; import java.util.TreeSet; +import org.apache.log4j.ConsoleAppender; +import org.apache.log4j.Level; +import org.apache.log4j.Logger; +import org.apache.log4j.SimpleLayout; import org.dllearner.algorithm.qtl.util.ModelGenerator; import org.dllearner.algorithm.qtl.util.ModelGenerator.Strategy; +import org.dllearner.kb.sparql.ConciseBoundedDescriptionGenerator; +import org.dllearner.kb.sparql.ConciseBoundedDescriptionGeneratorImpl; import org.dllearner.kb.sparql.ExtractionDBCache; import org.dllearner.kb.sparql.SparqlEndpoint; +import org.dllearner.kb.sparql.SymmetricConciseBoundedDescriptionGeneratorImpl; import org.mindswap.pellet.PelletOptions; import org.semanticweb.owlapi.apibinding.OWLManager; import org.semanticweb.owlapi.io.RDFXMLOntologyFormat; import org.semanticweb.owlapi.model.AxiomType; import org.semanticweb.owlapi.model.IRI; import org.semanticweb.owlapi.model.OWLAxiom; +import org.semanticweb.owlapi.model.OWLClass; import org.semanticweb.owlapi.model.OWLDataFactory; +import org.semanticweb.owlapi.model.OWLDisjointClassesAxiom; +import org.semanticweb.owlapi.model.OWLEntity; +import org.semanticweb.owlapi.model.OWLException; import org.semanticweb.owlapi.model.OWLIndividual; import org.semanticweb.owlapi.model.OWLObjectProperty; +import org.semanticweb.owlapi.model.OWLObjectPropertyAssertionAxiom; import org.semanticweb.owlapi.model.OWLObjectPropertyCharacteristicAxiom; import org.semanticweb.owlapi.model.OWLOntology; import org.semanticweb.owlapi.model.OWLOntologyCreationException; import org.semanticweb.owlapi.model.OWLOntologyManager; import org.semanticweb.owlapi.model.OWLOntologyStorageException; +import org.semanticweb.owlapi.reasoner.InferenceType; import uk.ac.manchester.cs.owl.owlapi.OWLDataFactoryImpl; +import uk.ac.manchester.cs.owlapi.modularity.ModuleType; +import weka.attributeSelection.ConsistencySubsetEval; +import com.clarkparsia.modularity.ModularityUtils; import com.clarkparsia.owlapi.explanation.PelletExplanation; +import com.clarkparsia.owlapi.explanation.io.manchester.ManchesterSyntaxExplanationRenderer; +import com.clarkparsia.owlapiv3.OntologyUtils; import com.clarkparsia.pellet.owlapiv3.PelletReasoner; import com.clarkparsia.pellet.owlapiv3.PelletReasonerFactory; import com.hp.hpl.jena.query.Query; @@ -46,72 +66,215 @@ public class ApproximateDebugging { + private static final Logger logger = Logger.getLogger(ApproximateDebugging.class); + private PelletReasoner reasoner; + + private OWLOntology schema; + private OWLOntology data; private OWLOntology ontology; + private Model model; private OWLDataFactory factory; + private OWLOntologyManager man = OWLManager.createOWLOntologyManager(); static {PelletExplanation.setup();} - public ApproximateDebugging(OWLOntology ontology) { - this.ontology = ontology; + public ApproximateDebugging(OWLOntology schema, OWLOntology data) throws OWLOntologyCreationException { + this.schema = schema; + this.data = data; + Set<OWLOntology> ontologies = new HashSet<OWLOntology>(); + ontologies.add(schema); + ontologies.add(data); + ontology = man.createOntology(IRI.create("http://merged.owl"), ontologies); + model = convert(ontology); factory = new OWLDataFactoryImpl(); } public void computeInconsistencyExplanations(){ - Set<Set<OWLAxiom>> explanations = new HashSet<Set<OWLAxiom>>(); + Set<Set<OWLAxiom>> allExplanations = new HashSet<Set<OWLAxiom>>(); - explanations.addAll(computeInconsistencyExplanationsByPellet()); - explanations.addAll(computeInconsistencyExplanationsByPattern()); + Set<Set<OWLAxiom>> explanations = computeInconsistencyExplanationsByPellet(); + allExplanations.addAll(explanations); + logger.info("Computed " + explanations.size() + " explanations with Pellet."); - System.out.println(explanations); + explanations = computeInconsistencyExplanationsByPattern(); + allExplanations.addAll(explanations); + logger.info("Computed " + explanations.size() + " explanations with anti-pattern."); + + logger.info("Computed overall " + allExplanations.size() + " explanations."); } private Set<Set<OWLAxiom>> computeInconsistencyExplanationsByPellet(){ Set<Set<OWLAxiom>> explanations = new HashSet<Set<OWLAxiom>>(); - OWLOntologyManager manager = OWLManager.createOWLOntologyManager(); +// OWLOntologyManager manager = OWLManager.createOWLOntologyManager(); +// +// try { +// OWLOntology dummy = manager.createOntology(); +// OWLObjectProperty prop = factory.getOWLObjectProperty(IRI.create("p")); +// OWLIndividual s = factory.getOWLNamedIndividual(IRI.create("i")); +// OWLIndividual o1 = factory.getOWLNamedIndividual(IRI.create("o1")); +// OWLIndividual o2 = factory.getOWLNamedIndividual(IRI.create("o2")); +// OWLAxiom ax = factory.getOWLObjectPropertyAssertionAxiom(prop, s, o1); +// manager.addAxiom(dummy, ax); +// ax = factory.getOWLObjectPropertyAssertionAxiom(prop, s, o2); +// manager.addAxiom(dummy, ax); +// ax = factory.getOWLFunctionalObjectPropertyAxiom(prop); +// manager.addAxiom(dummy, ax); +// reasoner = PelletReasonerFactory.getInstance().createNonBufferingReasoner(dummy); +// System.out.println(reasoner.isConsistent()); +// PelletExplanation expGen = new PelletExplanation(reasoner); +// System.out.println(expGen.getInconsistencyExplanation()); +// } catch (OWLOntologyCreationException e) { +// e.printStackTrace(); +// } - try { - OWLOntology dummy = manager.createOntology(); - OWLObjectProperty prop = factory.getOWLObjectProperty(IRI.create("p")); - OWLIndividual s = factory.getOWLNamedIndividual(IRI.create("i")); - OWLIndividual o1 = factory.getOWLNamedIndividual(IRI.create("o1")); - OWLIndividual o2 = factory.getOWLNamedIndividual(IRI.create("o2")); - OWLAxiom ax = factory.getOWLObjectPropertyAssertionAxiom(prop, s, o1); - manager.addAxiom(dummy, ax); - ax = factory.getOWLObjectPropertyAssertionAxiom(prop, s, o2); - manager.addAxiom(dummy, ax); - ax = factory.getOWLFunctionalObjectPropertyAxiom(prop); - manager.addAxiom(dummy, ax); - reasoner = PelletReasonerFactory.getInstance().createNonBufferingReasoner(dummy); - System.out.println(reasoner.isConsistent()); - PelletExplanation expGen = new PelletExplanation(reasoner); - System.out.println(expGen.getInconsistencyExplanation()); - } catch (OWLOntologyCreationException e) { - e.printStackTrace(); + + reasoner = PelletReasonerFactory.getInstance().createNonBufferingReasoner(schema); + reasoner.precomputeInferences(InferenceType.CLASS_HIERARCHY); + reasoner.precomputeInferences(InferenceType.OBJECT_PROPERTY_HIERARCHY); + + PelletExplanation expGen = new PelletExplanation(reasoner); + + //we first compute the unsatisfiable classes and unsatisfiable object properties here + logger.info("Computing unsatisfiable classes..."); + long startTime = System.currentTimeMillis(); +// Set<OWLClass> unsatClasses = Collections.emptySet(); + Set<OWLClass> unsatClasses = reasoner.getUnsatisfiableClasses().getEntitiesMinusBottom(); + logger.info("done in " + (System.currentTimeMillis()-startTime) + "ms."); + logger.info("#Unsatisfiable classes: " + unsatClasses.size()); + logger.info("Computing unsatisfiable object properties..."); + startTime = System.currentTimeMillis(); + Set<OWLObjectProperty> unsatObjectProperties = getUnsatisfiableObjectProperties(reasoner); + logger.info("done in " + (System.currentTimeMillis()-startTime) + "ms."); + logger.info("#Unsatisfiable object properties: " + unsatObjectProperties.size()); + + //we keep only the unsatisfiable classes which are contained in the extracted module + unsatClasses.retainAll(data.getClassesInSignature()); + //we check if there are instances asserted to each of the unsatisfiable classes, but only + for(OWLClass unsatClass : unsatClasses){ + logger.info(unsatClass); + //we compute the justifications + logger.info("Extracting module..."); + startTime = System.currentTimeMillis(); + Set<OWLAxiom> module = ModularityUtils.extractModule(schema, Collections.singleton((OWLEntity)unsatClass), ModuleType.TOP_OF_BOT); + logger.info("done in " + (System.currentTimeMillis()-startTime) + "ms."); + logger.info("Module size: " + module.size()); + reasoner = PelletReasonerFactory.getInstance().createNonBufferingReasoner(OntologyUtils.getOntologyFromAxioms(module)); + expGen = new PelletExplanation(reasoner); + logger.info("Computing explanations..."); + startTime = System.currentTimeMillis(); + Set<Set<OWLAxiom>> temp = expGen.getUnsatisfiableExplanations(unsatClass, 50); + logger.info("done in " + (System.currentTimeMillis()-startTime) + "ms."); + logger.info("#Explanations: " + temp.size()); + //we get all asserted instances + Set<OWLIndividual> individuals = getAssertedIndividuals(unsatClass); + for(Set<OWLAxiom> t : temp){ + for(OWLIndividual ind : individuals){ + Set<OWLAxiom> explanation = new HashSet<OWLAxiom>(t); + explanation.add(factory.getOWLClassAssertionAxiom(unsatClass, ind)); + explanations.add(explanation); + } + } } + //we keep only the unsatisfiable object properties which are contained in the extracted module + unsatObjectProperties.retainAll(data.getObjectPropertiesInSignature()); - manager.removeAxioms(ontology, ontology.getAxioms(AxiomType.DISJOINT_CLASSES)); - reasoner = PelletReasonerFactory.getInstance().createNonBufferingReasoner(ontology); - System.out.println(reasoner.isConsistent()); + for(OWLObjectProperty unsatProp : unsatObjectProperties){ + logger.info(unsatProp); + logger.info("Extracting module..."); + startTime = System.currentTimeMillis(); + Set<OWLAxiom> module = ModularityUtils.extractModule(schema, Collections.singleton((OWLEntity)unsatProp), ModuleType.TOP_OF_BOT); + logger.info("done in " + (System.currentTimeMillis()-startTime) + "ms."); + logger.info("Module size: " + module.size()); + reasoner = PelletReasonerFactory.getInstance().createNonBufferingReasoner(OntologyUtils.getOntologyFromAxioms(module)); + expGen = new PelletExplanation(reasoner); + logger.info("Computing explanations..."); + startTime = System.currentTimeMillis(); + Set<Set<OWLAxiom>> temp = expGen.getUnsatisfiableExplanations(factory.getOWLObjectExactCardinality(1, unsatProp), 50); + logger.info("done in " + (System.currentTimeMillis()-startTime) + "ms."); + logger.info("#Explanations: " + temp.size()); + //we get all property assertions + Set<OWLObjectPropertyAssertionAxiom> assertions = getObjectPropertyAssertions(unsatProp); + for(Set<OWLAxiom> t : temp){ + for(OWLObjectPropertyAssertionAxiom ax : assertions){ + Set<OWLAxiom> explanation = new HashSet<OWLAxiom>(t); + explanation.add(ax); + explanations.add(explanation); + } + } + } - PelletExplanation expGen = new PelletExplanation(reasoner); - System.out.println(expGen.getInconsistencyExplanation()); return explanations; } + private Set<OWLObjectProperty> getUnsatisfiableObjectProperties(PelletReasoner reasoner){ + SortedSet<OWLObjectProperty> properties = new TreeSet<OWLObjectProperty>(); + OWLDataFactory f = OWLManager.createOWLOntologyManager().getOWLDataFactory(); + for(OWLObjectProperty p : reasoner.getRootOntology().getObjectPropertiesInSignature()){ +// boolean satisfiable = reasoner.isSatisfiable(f.getOWLObjectExactCardinality(1, p)); + boolean satisfiable = reasoner.isSatisfiable(f.getOWLObjectSomeValuesFrom(p, factory.getOWLThing())); + if(!satisfiable){ + properties.add(p); + } + } + return properties; + } + + private Set<OWLIndividual> getAssertedIndividuals(OWLClass cls){ + Set<OWLIndividual> individuals = new TreeSet<OWLIndividual>(); + + String queryString = "SELECT * WHERE {?s a <cls>}".replace("cls", cls.toStringID()); + Query query = QueryFactory.create(queryString) ; + QueryExecution qexec = QueryExecutionFactory.create(query, model) ; + try { + ResultSet results = qexec.execSelect(); + for (; results.hasNext();) { + QuerySolution qs = results.next(); + OWLIndividual subject = factory.getOWLNamedIndividual(IRI.create(qs.getResource("s").getURI())); + individuals.add(subject); + } + } finally { + qexec.close(); + } + + return individuals; + } + + private Set<OWLObjectPropertyAssertionAxiom> getObjectPropertyAssertions(OWLObjectProperty property){ + Set<OWLObjectPropertyAssertionAxiom> assertions = new TreeSet<OWLObjectPropertyAssertionAxiom>(); + + String queryString = "SELECT * WHERE {?s <prop> ?o}".replace("prop", property.toStringID()); + Query query = QueryFactory.create(queryString) ; + QueryExecution qexec = QueryExecutionFactory.create(query, model) ; + try { + ResultSet results = qexec.execSelect(); + for (; results.hasNext();) { + QuerySolution qs = results.next(); + OWLIndividual subject = factory.getOWLNamedIndividual(IRI.create(qs.getResource("s").getURI())); + OWLIndividual object = factory.getOWLNamedIndividual(IRI.create(qs.getResource("s").getURI())); + assertions.add(factory.getOWLObjectPropertyAssertionAxiom(property, subject, object)); + } + } finally { + qexec.close(); + } + + return assertions; + } + private Set<Set<OWLAxiom>> computeInconsistencyExplanationsByPattern(){ Set<Set<OWLAxiom>> explanations = new HashSet<Set<OWLAxiom>>(); explanations.addAll(computeInconsistencyExplanationsByFunctionalityPattern()); explanations.addAll(computeInconsistencyExplanationsByIrreflexivityPattern()); explanations.addAll(computeInconsistencyExplanationsByAsymmetryPattern()); + explanations.addAll(computeInconsistencyExplanationsByIndividualsAssertedToDisjointClassesPattern()); return explanations; } @@ -121,7 +284,7 @@ for(OWLObjectProperty prop : extractObjectProperties(AxiomType.FUNCTIONAL_OBJECT_PROPERTY)){ OWLAxiom axiom = factory.getOWLFunctionalObjectPropertyAxiom(prop); - String queryString = "SELECT * WHERE {?s <%s> ?o1. ?s <%s> ?o2. FILTER(?o1 != ?o2)} LIMIT 1000".replace("%s", prop.toStringID()); + String queryString = "SELECT * WHERE {?s <%s> ?o1. ?s <%s> ?o2. FILTER(?o1 != ?o2)}".replace("%s", prop.toStringID()); Query query = QueryFactory.create(queryString) ; QueryExecution qexec = QueryExecutionFactory.create(query, model) ; try { @@ -151,7 +314,7 @@ for(OWLObjectProperty prop : extractObjectProperties(AxiomType.ASYMMETRIC_OBJECT_PROPERTY)){ OWLAxiom axiom = factory.getOWLAsymmetricObjectPropertyAxiom(prop); - String queryString = "SELECT * WHERE {?s <%s> ?o. ?o <%s> ?s. FILTER(?o != ?s)} LIMIT 1000".replace("%s", prop.toStringID()); + String queryString = "SELECT * WHERE {?s <%s> ?o. ?o <%s> ?s. FILTER(?o != ?s)}".replace("%s", prop.toStringID()); Query query = QueryFactory.create(queryString) ; QueryExecution qexec = QueryExecutionFactory.create(query, model) ; try { @@ -180,7 +343,7 @@ for(OWLObjectProperty prop : extractObjectProperties(AxiomType.IRREFLEXIVE_OBJECT_PROPERTY)){ OWLAxiom axiom = factory.getOWLIrreflexiveObjectPropertyAxiom(prop); - String queryString = "SELECT * WHERE {?s <%s> ?s.} LIMIT 1000".replace("%s", prop.toStringID()); + String queryString = "SELECT * WHERE {?s <%s> ?s.}".replace("%s", prop.toStringID()); Query query = QueryFactory.create(queryString) ; QueryExecution qexec = QueryExecutionFactory.create(query, model) ; try { @@ -201,6 +364,36 @@ return explanations; } + private Set<Set<OWLAxiom>> computeInconsistencyExplanationsByIndividualsAssertedToDisjointClassesPattern(){ + Set<Set<OWLAxiom>> explanations = new HashSet<Set<OWLAxiom>>(); + + for(OWLDisjointClassesAxiom axiom : ontology.getAxioms(AxiomType.DISJOINT_CLASSES)){ + OWLClass dis1 = axiom.getClassExpressionsAsList().get(0).asOWLClass(); + OWLClass dis2 = axiom.getClassExpressionsAsList().get(1).asOWLClass(); + + String queryString = "SELECT * WHERE {?s a <cls1>. ?s a <cls2>}".replace("cls1", dis1.toStringID()).replace("cls2", dis2.toStringID()); + Query query = QueryFactory.create(queryString) ; + QueryExecution qexec = QueryExecutionFactory.create(query, model) ; + try { + ResultSet results = qexec.execSelect(); + for (; results.hasNext();) { + Set<OWLAxiom> explanation = new HashSet<OWLAxiom>(); + explanation.add(axiom); + QuerySolution qs = results.nextSolution(); + OWLIndividual subject = factory.getOWLNamedIndividual(IRI.create(qs.getResource("s").getURI())); + OWLAxiom ax = factory.getOWLClassAssertionAxiom(dis1, subject); + explanation.add(ax); + ax = factory.getOWLClassAssertionAxiom(dis2, subject); + explanation.add(ax); + explanations.add(explanation); + } + } finally { + qexec.close(); + } + } + return explanations; + } + private SortedSet<OWLObjectProperty> extractObjectProperties(AxiomType<? extends OWLAxiom> axiomType){ SortedSet<OWLObjectProperty> properties = new TreeSet<OWLObjectProperty>(); for(OWLAxiom ax : ontology.getAxioms(axiomType)){ @@ -251,23 +444,24 @@ * @throws Exception */ public static void main(String[] args) throws Exception { + Logger.getRootLogger().setLevel(Level.INFO); + Logger.getRootLogger().removeAllAppenders(); + Logger.getRootLogger().addAppender(new ConsoleAppender(new SimpleLayout())); + PelletOptions.USE_UNIQUE_NAME_ASSUMPTION = true; String resource = "http://dbpedia.org/resource/Leipzig"; SparqlEndpoint endpoint = new SparqlEndpoint(new URL("http://dbpedia.aksw.org:8902/sparql"), Collections.singletonList("http://dbpedia.org"), Collections.<String>emptyList()); - ModelGenerator modelGen = new ModelGenerator(endpoint, new ExtractionDBCache("cache")); - Model model = modelGen.createModel(resource, Strategy.CHUNKS, 4); + ConciseBoundedDescriptionGenerator cbdGen = new ConciseBoundedDescriptionGeneratorImpl(endpoint, new ExtractionDBCache("cache")); +// ConciseBoundedDescriptionGenerator cbdGen = new SymmetricConciseBoundedDescriptionGeneratorImpl(endpoint, new ExtractionDBCache("cache")); + Model model = cbdGen.getConciseBoundedDescription(resource, 3); + OWLOntology data = convert(model); OWLOntologyManager man = OWLManager.createOWLOntologyManager(); - OWLOntology ontology = man.loadOntologyFromOntologyDocument(new File("src/main/resources/dbpedia_0.75_no_datapropaxioms.owl")); - System.out.println(ontology.getLogicalAxiomCount()); - Set<OWLOntology> ontologies = new HashSet<OWLOntology>(); - ontologies.add(ontology); - ontologies.add(convert(model)); - ontology = man.createOntology(IRI.create("http://merged.owl"), ontologies);//man.addAxioms(ontology, convert(model).getLogicalAxioms()); + OWLOntology schema = man.loadOntologyFromOntologyDocument(new File("/home/lorenz/arbeit/dbpedia_0.75_no_datapropaxioms.owl")); - ApproximateDebugging debug = new ApproximateDebugging(ontology); + ApproximateDebugging debug = new ApproximateDebugging(schema, data); debug.computeInconsistencyExplanations(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lor...@us...> - 2011-12-05 23:00:53
|
Revision: 3475 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=3475&view=rev Author: lorenz_b Date: 2011-12-05 23:00:46 +0000 (Mon, 05 Dec 2011) Log Message: ----------- Continued approximate debugging script. Modified Paths: -------------- trunk/scripts/src/main/java/org/dllearner/scripts/ApproximateDebugging.java Modified: trunk/scripts/src/main/java/org/dllearner/scripts/ApproximateDebugging.java =================================================================== --- trunk/scripts/src/main/java/org/dllearner/scripts/ApproximateDebugging.java 2011-12-05 22:19:41 UTC (rev 3474) +++ trunk/scripts/src/main/java/org/dllearner/scripts/ApproximateDebugging.java 2011-12-05 23:00:46 UTC (rev 3475) @@ -54,7 +54,7 @@ static {PelletExplanation.setup();} public ApproximateDebugging(OWLOntology ontology) { - this.ontology = ontology;System.out.println(ontology.getLogicalAxiomCount()); + this.ontology = ontology; model = convert(ontology); factory = new OWLDataFactoryImpl(); @@ -72,11 +72,33 @@ private Set<Set<OWLAxiom>> computeInconsistencyExplanationsByPellet(){ Set<Set<OWLAxiom>> explanations = new HashSet<Set<OWLAxiom>>(); + OWLOntologyManager manager = OWLManager.createOWLOntologyManager(); + + try { + OWLOntology dummy = manager.createOntology(); + OWLObjectProperty prop = factory.getOWLObjectProperty(IRI.create("p")); + OWLIndividual s = factory.getOWLNamedIndividual(IRI.create("i")); + OWLIndividual o1 = factory.getOWLNamedIndividual(IRI.create("o1")); + OWLIndividual o2 = factory.getOWLNamedIndividual(IRI.create("o2")); + OWLAxiom ax = factory.getOWLObjectPropertyAssertionAxiom(prop, s, o1); + manager.addAxiom(dummy, ax); + ax = factory.getOWLObjectPropertyAssertionAxiom(prop, s, o2); + manager.addAxiom(dummy, ax); + ax = factory.getOWLFunctionalObjectPropertyAxiom(prop); + manager.addAxiom(dummy, ax); + reasoner = PelletReasonerFactory.getInstance().createNonBufferingReasoner(dummy); + System.out.println(reasoner.isConsistent()); + PelletExplanation expGen = new PelletExplanation(reasoner); + System.out.println(expGen.getInconsistencyExplanation()); + } catch (OWLOntologyCreationException e) { + e.printStackTrace(); + } + + manager.removeAxioms(ontology, ontology.getAxioms(AxiomType.DISJOINT_CLASSES)); - reasoner = PelletReasonerFactory.getInstance().createNonBufferingReasoner(ontology); - reasoner.isConsistent(); + System.out.println(reasoner.isConsistent()); PelletExplanation expGen = new PelletExplanation(reasoner); System.out.println(expGen.getInconsistencyExplanation()); @@ -243,7 +265,7 @@ Set<OWLOntology> ontologies = new HashSet<OWLOntology>(); ontologies.add(ontology); ontologies.add(convert(model)); - ontology = man.createOntology(IRI.create("http://merged.owl"), ontologies, true);//man.addAxioms(ontology, convert(model).getLogicalAxioms()); + ontology = man.createOntology(IRI.create("http://merged.owl"), ontologies);//man.addAxioms(ontology, convert(model).getLogicalAxioms()); ApproximateDebugging debug = new ApproximateDebugging(ontology); debug.computeInconsistencyExplanations(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lor...@us...> - 2011-12-05 22:19:49
|
Revision: 3474 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=3474&view=rev Author: lorenz_b Date: 2011-12-05 22:19:41 +0000 (Mon, 05 Dec 2011) Log Message: ----------- Started approximate debugging script. Added Paths: ----------- trunk/scripts/src/main/java/org/dllearner/scripts/ApproximateDebugging.java Added: trunk/scripts/src/main/java/org/dllearner/scripts/ApproximateDebugging.java =================================================================== --- trunk/scripts/src/main/java/org/dllearner/scripts/ApproximateDebugging.java (rev 0) +++ trunk/scripts/src/main/java/org/dllearner/scripts/ApproximateDebugging.java 2011-12-05 22:19:41 UTC (rev 3474) @@ -0,0 +1,252 @@ +package org.dllearner.scripts; + +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.net.URL; +import java.util.Collections; +import java.util.HashSet; +import java.util.Set; +import java.util.SortedSet; +import java.util.TreeSet; + +import org.dllearner.algorithm.qtl.util.ModelGenerator; +import org.dllearner.algorithm.qtl.util.ModelGenerator.Strategy; +import org.dllearner.kb.sparql.ExtractionDBCache; +import org.dllearner.kb.sparql.SparqlEndpoint; +import org.mindswap.pellet.PelletOptions; +import org.semanticweb.owlapi.apibinding.OWLManager; +import org.semanticweb.owlapi.io.RDFXMLOntologyFormat; +import org.semanticweb.owlapi.model.AxiomType; +import org.semanticweb.owlapi.model.IRI; +import org.semanticweb.owlapi.model.OWLAxiom; +import org.semanticweb.owlapi.model.OWLDataFactory; +import org.semanticweb.owlapi.model.OWLIndividual; +import org.semanticweb.owlapi.model.OWLObjectProperty; +import org.semanticweb.owlapi.model.OWLObjectPropertyCharacteristicAxiom; +import org.semanticweb.owlapi.model.OWLOntology; +import org.semanticweb.owlapi.model.OWLOntologyCreationException; +import org.semanticweb.owlapi.model.OWLOntologyManager; +import org.semanticweb.owlapi.model.OWLOntologyStorageException; + +import uk.ac.manchester.cs.owl.owlapi.OWLDataFactoryImpl; + +import com.clarkparsia.owlapi.explanation.PelletExplanation; +import com.clarkparsia.pellet.owlapiv3.PelletReasoner; +import com.clarkparsia.pellet.owlapiv3.PelletReasonerFactory; +import com.hp.hpl.jena.query.Query; +import com.hp.hpl.jena.query.QueryExecution; +import com.hp.hpl.jena.query.QueryExecutionFactory; +import com.hp.hpl.jena.query.QueryFactory; +import com.hp.hpl.jena.query.QuerySolution; +import com.hp.hpl.jena.query.ResultSet; +import com.hp.hpl.jena.rdf.model.Model; +import com.hp.hpl.jena.rdf.model.ModelFactory; + +public class ApproximateDebugging { + + private PelletReasoner reasoner; + private OWLOntology ontology; + private Model model; + private OWLDataFactory factory; + + static {PelletExplanation.setup();} + + public ApproximateDebugging(OWLOntology ontology) { + this.ontology = ontology;System.out.println(ontology.getLogicalAxiomCount()); + + model = convert(ontology); + factory = new OWLDataFactoryImpl(); + } + + public void computeInconsistencyExplanations(){ + Set<Set<OWLAxiom>> explanations = new HashSet<Set<OWLAxiom>>(); + + explanations.addAll(computeInconsistencyExplanationsByPellet()); + explanations.addAll(computeInconsistencyExplanationsByPattern()); + + System.out.println(explanations); + } + + private Set<Set<OWLAxiom>> computeInconsistencyExplanationsByPellet(){ + Set<Set<OWLAxiom>> explanations = new HashSet<Set<OWLAxiom>>(); + + OWLOntologyManager manager = OWLManager.createOWLOntologyManager(); + manager.removeAxioms(ontology, ontology.getAxioms(AxiomType.DISJOINT_CLASSES)); + + reasoner = PelletReasonerFactory.getInstance().createNonBufferingReasoner(ontology); + reasoner.isConsistent(); + + PelletExplanation expGen = new PelletExplanation(reasoner); + System.out.println(expGen.getInconsistencyExplanation()); + + return explanations; + } + + private Set<Set<OWLAxiom>> computeInconsistencyExplanationsByPattern(){ + Set<Set<OWLAxiom>> explanations = new HashSet<Set<OWLAxiom>>(); + + explanations.addAll(computeInconsistencyExplanationsByFunctionalityPattern()); + explanations.addAll(computeInconsistencyExplanationsByIrreflexivityPattern()); + explanations.addAll(computeInconsistencyExplanationsByAsymmetryPattern()); + + return explanations; + } + + private Set<Set<OWLAxiom>> computeInconsistencyExplanationsByFunctionalityPattern(){ + Set<Set<OWLAxiom>> explanations = new HashSet<Set<OWLAxiom>>(); + + for(OWLObjectProperty prop : extractObjectProperties(AxiomType.FUNCTIONAL_OBJECT_PROPERTY)){ + OWLAxiom axiom = factory.getOWLFunctionalObjectPropertyAxiom(prop); + String queryString = "SELECT * WHERE {?s <%s> ?o1. ?s <%s> ?o2. FILTER(?o1 != ?o2)} LIMIT 1000".replace("%s", prop.toStringID()); + Query query = QueryFactory.create(queryString) ; + QueryExecution qexec = QueryExecutionFactory.create(query, model) ; + try { + ResultSet results = qexec.execSelect(); + for (; results.hasNext();) { + Set<OWLAxiom> explanation = new HashSet<OWLAxiom>(); + explanation.add(axiom); + QuerySolution qs = results.next(); + OWLIndividual subject = factory.getOWLNamedIndividual(IRI.create(qs.getResource("s").getURI())); + OWLIndividual object1 = factory.getOWLNamedIndividual(IRI.create(qs.getResource("o1").getURI())); + OWLIndividual object2 = factory.getOWLNamedIndividual(IRI.create(qs.getResource("o2").getURI())); + OWLAxiom ax = factory.getOWLObjectPropertyAssertionAxiom(prop, subject, object1); + explanation.add(ax); + ax = factory.getOWLObjectPropertyAssertionAxiom(prop, subject, object2); + explanation.add(ax); + explanations.add(explanation); + } + } finally { + qexec.close(); + } + } + return explanations; + } + + private Set<Set<OWLAxiom>> computeInconsistencyExplanationsByAsymmetryPattern(){ + Set<Set<OWLAxiom>> explanations = new HashSet<Set<OWLAxiom>>(); + + for(OWLObjectProperty prop : extractObjectProperties(AxiomType.ASYMMETRIC_OBJECT_PROPERTY)){ + OWLAxiom axiom = factory.getOWLAsymmetricObjectPropertyAxiom(prop); + String queryString = "SELECT * WHERE {?s <%s> ?o. ?o <%s> ?s. FILTER(?o != ?s)} LIMIT 1000".replace("%s", prop.toStringID()); + Query query = QueryFactory.create(queryString) ; + QueryExecution qexec = QueryExecutionFactory.create(query, model) ; + try { + ResultSet results = qexec.execSelect(); + for (; results.hasNext();) { + Set<OWLAxiom> explanation = new HashSet<OWLAxiom>(); + explanation.add(axiom); + QuerySolution qs = results.nextSolution(); + OWLIndividual subject = factory.getOWLNamedIndividual(IRI.create(qs.getResource("s").getURI())); + OWLIndividual object = factory.getOWLNamedIndividual(IRI.create(qs.getResource("o").getURI())); + OWLAxiom ax = factory.getOWLObjectPropertyAssertionAxiom(prop, subject, object); + explanation.add(ax); + ax = factory.getOWLObjectPropertyAssertionAxiom(prop, object, subject); + explanation.add(ax); + explanations.add(explanation); + } + } finally { + qexec.close(); + } + } + return explanations; + } + + private Set<Set<OWLAxiom>> computeInconsistencyExplanationsByIrreflexivityPattern(){ + Set<Set<OWLAxiom>> explanations = new HashSet<Set<OWLAxiom>>(); + + for(OWLObjectProperty prop : extractObjectProperties(AxiomType.IRREFLEXIVE_OBJECT_PROPERTY)){ + OWLAxiom axiom = factory.getOWLIrreflexiveObjectPropertyAxiom(prop); + String queryString = "SELECT * WHERE {?s <%s> ?s.} LIMIT 1000".replace("%s", prop.toStringID()); + Query query = QueryFactory.create(queryString) ; + QueryExecution qexec = QueryExecutionFactory.create(query, model) ; + try { + ResultSet results = qexec.execSelect(); + for (; results.hasNext();) { + Set<OWLAxiom> explanation = new HashSet<OWLAxiom>(); + explanation.add(axiom); + QuerySolution qs = results.nextSolution(); + OWLIndividual subject = factory.getOWLNamedIndividual(IRI.create(qs.getResource("s").getURI())); + OWLAxiom ax = factory.getOWLObjectPropertyAssertionAxiom(prop, subject, subject); + explanation.add(ax); + explanations.add(explanation); + } + } finally { + qexec.close(); + } + } + return explanations; + } + + private SortedSet<OWLObjectProperty> extractObjectProperties(AxiomType<? extends OWLAxiom> axiomType){ + SortedSet<OWLObjectProperty> properties = new TreeSet<OWLObjectProperty>(); + for(OWLAxiom ax : ontology.getAxioms(axiomType)){ + properties.add(((OWLObjectPropertyCharacteristicAxiom)ax).getProperty().asOWLObjectProperty()); + } + return properties; + } + + public static OWLOntology convert(Model model) { + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + model.write(baos, "N-TRIPLE"); + ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray()); + OWLOntologyManager manager = OWLManager.createOWLOntologyManager(); + OWLOntology retOnt = null; + try { + retOnt = manager.loadOntologyFromOntologyDocument(bais); + } catch (OWLOntologyCreationException e) { + + } + return retOnt; + } + + public static Model convert(OWLOntology ontology) { + Model model = ModelFactory.createDefaultModel(); + ByteArrayInputStream bais = null; + try { + OWLOntologyManager man = OWLManager.createOWLOntologyManager(); + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + man.saveOntology(ontology, new RDFXMLOntologyFormat(), baos); + bais = new ByteArrayInputStream(baos.toByteArray()); + model.read(bais, null); + } catch (OWLOntologyStorageException e) { + e.printStackTrace(); + } finally { + try { + if(bais != null){ + bais.close(); + } + } catch (IOException e) { + e.printStackTrace(); + } + } + return model; + } + + /** + * @param args + * @throws Exception + */ + public static void main(String[] args) throws Exception { + PelletOptions.USE_UNIQUE_NAME_ASSUMPTION = true; + String resource = "http://dbpedia.org/resource/Leipzig"; + SparqlEndpoint endpoint = new SparqlEndpoint(new URL("http://dbpedia.aksw.org:8902/sparql"), + Collections.singletonList("http://dbpedia.org"), Collections.<String>emptyList()); + + ModelGenerator modelGen = new ModelGenerator(endpoint, new ExtractionDBCache("cache")); + Model model = modelGen.createModel(resource, Strategy.CHUNKS, 4); + + OWLOntologyManager man = OWLManager.createOWLOntologyManager(); + OWLOntology ontology = man.loadOntologyFromOntologyDocument(new File("src/main/resources/dbpedia_0.75_no_datapropaxioms.owl")); + System.out.println(ontology.getLogicalAxiomCount()); + Set<OWLOntology> ontologies = new HashSet<OWLOntology>(); + ontologies.add(ontology); + ontologies.add(convert(model)); + ontology = man.createOntology(IRI.create("http://merged.owl"), ontologies, true);//man.addAxioms(ontology, convert(model).getLogicalAxioms()); + + ApproximateDebugging debug = new ApproximateDebugging(ontology); + debug.computeInconsistencyExplanations(); + } + +} Property changes on: trunk/scripts/src/main/java/org/dllearner/scripts/ApproximateDebugging.java ___________________________________________________________________ Added: svn:mime-type + text/plain This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lor...@us...> - 2011-12-05 15:20:22
|
Revision: 3473 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=3473&view=rev Author: lorenz_b Date: 2011-12-05 15:20:13 +0000 (Mon, 05 Dec 2011) Log Message: ----------- Continued script. Modified Paths: -------------- trunk/scripts/src/main/java/org/dllearner/scripts/SPARQLSampleDebugging.java Modified: trunk/scripts/src/main/java/org/dllearner/scripts/SPARQLSampleDebugging.java =================================================================== --- trunk/scripts/src/main/java/org/dllearner/scripts/SPARQLSampleDebugging.java 2011-12-05 13:08:51 UTC (rev 3472) +++ trunk/scripts/src/main/java/org/dllearner/scripts/SPARQLSampleDebugging.java 2011-12-05 15:20:13 UTC (rev 3473) @@ -35,6 +35,7 @@ import org.apache.log4j.SimpleLayout; import org.dllearner.algorithm.qtl.util.ModelGenerator; import org.dllearner.algorithm.qtl.util.ModelGenerator.Strategy; +import org.dllearner.core.owl.IrreflexiveObjectPropertyAxiom; import org.dllearner.kb.sparql.ExtractionDBCache; import org.dllearner.kb.sparql.SparqlEndpoint; import org.dllearner.kb.sparql.SparqlQuery; @@ -44,12 +45,14 @@ import org.semanticweb.owlapi.io.RDFXMLOntologyFormat; import org.semanticweb.owlapi.model.AxiomType; import org.semanticweb.owlapi.model.IRI; +import org.semanticweb.owlapi.model.OWLAsymmetricObjectPropertyAxiom; import org.semanticweb.owlapi.model.OWLAxiom; import org.semanticweb.owlapi.model.OWLClass; import org.semanticweb.owlapi.model.OWLDataFactory; import org.semanticweb.owlapi.model.OWLDataProperty; import org.semanticweb.owlapi.model.OWLFunctionalDataPropertyAxiom; import org.semanticweb.owlapi.model.OWLFunctionalObjectPropertyAxiom; +import org.semanticweb.owlapi.model.OWLIrreflexiveObjectPropertyAxiom; import org.semanticweb.owlapi.model.OWLObjectProperty; import org.semanticweb.owlapi.model.OWLOntology; import org.semanticweb.owlapi.model.OWLOntologyCreationException; @@ -82,12 +85,16 @@ private ExtractionDBCache cache = new ExtractionDBCache("cache"); private int sampleSize = 10; - private int depth = 4; + private int depth = 2; private int nrOfChunks = 1; - private int maxNrOfExplanations = 60; + private int maxNrOfExplanations = 20; private Logger logger = Logger.getLogger(SPARQLSampleDebugging.class); + private Logger functionalLogger = Logger.getLogger("functionality"); + private Logger asymmetricLogger = Logger.getLogger("asymmetry"); + private Logger irreflexiveLogger = Logger.getLogger("irreflexivity"); + private Connection conn; private PreparedStatement ps; @@ -429,8 +436,8 @@ man.addOntologyChangeListener( reasoner ); Set<String> resources = extractSampleResourcesChunked(sampleSize); for(String resource : resources){ - logger.info("Resource " + resource);resource = "http://dbpedia.org/resource/Leipzig"; - module = extractSampleModule(Collections.singleton(resource)); + logger.info("Resource " + resource);resource = "http://dbpedia.org/resource/The_Man_Who_Wouldn%27t_Die"; + module = extractSampleModule(Collections.singleton(resource));computeExplanations(convert(module).add(convert(extractSampleModule(resource)))); man.addAxioms(reference, module.getABoxAxioms(true)); boolean isConsistent = reasoner.isConsistent(); logger.info("Consistent: " + isConsistent); @@ -512,10 +519,10 @@ ResultSet rs = SparqlQuery.convertJSONtoResultSet(cache.executeSelectQuery(endpoint, query)); while(rs.hasNext()){ QuerySolution qs = rs.next(); - logger.info("********************************************************"); - logger.info(prop); - logger.info(qs.get("s") + "-->" + qs.get("o1")); - logger.info(qs.get("s") + "-->" + qs.get("o2")); + functionalLogger.info("********************************************************"); + functionalLogger.info(prop); + functionalLogger.info(qs.get("s") + "-->" + qs.get("o1")); + functionalLogger.info(qs.get("s") + "-->" + qs.get("o2")); } } @@ -525,6 +532,57 @@ } + public void checkIrreflexivityViolation(){ + try { + OWLOntology ontology = loadReferenceOntology(); + + Set<String> properties = new TreeSet<String>(); + for(OWLAxiom ax : ontology.getAxioms(AxiomType.IRREFLEXIVE_OBJECT_PROPERTY)){ + OWLObjectProperty prop = ((OWLIrreflexiveObjectPropertyAxiom)ax).getProperty().asOWLObjectProperty(); + properties.add(prop.toStringID()); + } + for(String prop : properties){ + String query = "SELECT * WHERE {?s <%s> ?s.} LIMIT 1".replaceAll("%s", prop); + ResultSet rs = SparqlQuery.convertJSONtoResultSet(cache.executeSelectQuery(endpoint, query)); + while(rs.hasNext()){ + QuerySolution qs = rs.next(); + irreflexiveLogger.info("********************************************************"); + irreflexiveLogger.info(prop); + irreflexiveLogger.info(qs.get("s")); + } + + } + } catch (OWLOntologyCreationException e) { + e.printStackTrace(); + } + + } + + public void checkAsymmetryViolation(){ + try { + OWLOntology ontology = loadReferenceOntology(); + + Set<String> properties = new TreeSet<String>(); + for(OWLAxiom ax : ontology.getAxioms(AxiomType.ASYMMETRIC_OBJECT_PROPERTY)){ + OWLObjectProperty prop = ((OWLAsymmetricObjectPropertyAxiom)ax).getProperty().asOWLObjectProperty(); + properties.add(prop.toStringID()); + } + for(String prop : properties){ + String query = "SELECT * WHERE {?s <%s> ?o.?o <%s> ?s.FILTER(?s != ?o)} LIMIT 1".replaceAll("%s", prop); + ResultSet rs = SparqlQuery.convertJSONtoResultSet(cache.executeSelectQuery(endpoint, query)); + while(rs.hasNext()){ + QuerySolution qs = rs.next(); + asymmetricLogger.info("********************************************************"); + asymmetricLogger.info(prop); + asymmetricLogger.info(qs.get("s") + "<-->" + qs.get("o")); + } + + } + } catch (OWLOntologyCreationException e) { + e.printStackTrace(); + } + } + public void removeAxiomsWithNamespace(Set<String> namespaces){ } @@ -538,6 +596,9 @@ Logger.getRootLogger().removeAllAppenders(); Logger.getRootLogger().addAppender(new ConsoleAppender(new SimpleLayout())); Logger.getRootLogger().addAppender(new FileAppender(new SimpleLayout(), "log/debug.log")); + Logger.getLogger("functionality").addAppender(new FileAppender(new SimpleLayout(), "log/functionality_violations.log")); + Logger.getLogger("irreflexivity").addAppender(new FileAppender(new SimpleLayout(), "log/irreflexivity_violations.log")); + Logger.getLogger("asymmetry").addAppender(new FileAppender(new SimpleLayout(), "log/asymmetry_violations.log")); Logger.getLogger(SPARQLSampleDebugging.class).setLevel(Level.INFO); java.util.logging.Logger pelletLogger = java.util.logging.Logger.getLogger("com.clarkparsia.pellet"); pelletLogger.setLevel(java.util.logging.Level.OFF); @@ -554,7 +615,9 @@ SPARQLSampleDebugging debug = new SPARQLSampleDebugging(endpoint); -// debug.checkFunctionalityViolation(); + debug.checkFunctionalityViolation(); + debug.checkAsymmetryViolation(); + debug.checkIrreflexivityViolation(); long s1 = System.currentTimeMillis(); debug.runOptimized(ontology); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lor...@us...> - 2011-12-05 13:09:01
|
Revision: 3472 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=3472&view=rev Author: lorenz_b Date: 2011-12-05 13:08:51 +0000 (Mon, 05 Dec 2011) Log Message: ----------- Small improvement. Modified Paths: -------------- trunk/components-core/src/main/java/org/dllearner/algorithms/DisjointClassesLearner.java trunk/components-core/src/main/java/org/dllearner/reasoning/SPARQLReasoner.java Modified: trunk/components-core/src/main/java/org/dllearner/algorithms/DisjointClassesLearner.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/algorithms/DisjointClassesLearner.java 2011-12-05 09:42:14 UTC (rev 3471) +++ trunk/components-core/src/main/java/org/dllearner/algorithms/DisjointClassesLearner.java 2011-12-05 13:08:51 UTC (rev 3472) @@ -241,7 +241,10 @@ } for(NamedClass cls : completeDisjointclasses){ if(useClassPopularity){ - double[] confidenceInterval = Heuristics.getConfidenceInterval95Wald(reasoner.getIndividualsCount(cls), 0); + int popularity = reasoner.getIndividualsCount(cls); + //we skip classes with no instances + if(popularity == 0) continue; + double[] confidenceInterval = Heuristics.getConfidenceInterval95Wald(popularity, 0); double accuracy = (confidenceInterval[0] + confidenceInterval[1]) / 2; evalDesc = new EvaluatedDescription(cls, new AxiomScore(1- accuracy)); } else { @@ -276,7 +279,7 @@ public static void main(String[] args) throws Exception{ DisjointClassesLearner l = new DisjointClassesLearner(new SparqlEndpointKS(new SparqlEndpoint(new URL("http://dbpedia.aksw.org:8902/sparql"), Collections.singletonList("http://dbpedia.org"), Collections.<String>emptyList()))); - l.setClassToDescribe(new NamedClass("http://dbpedia.org/ontology/SoccerClub")); + l.setClassToDescribe(new NamedClass("http://dbpedia.org/ontology/Band")); l.init(); l.getReasoner().prepareSubsumptionHierarchy(); // System.out.println(l.getReasoner().getClassHierarchy().getSubClasses(new NamedClass("http://dbpedia.org/ontology/Athlete"), false));System.exit(0); Modified: trunk/components-core/src/main/java/org/dllearner/reasoning/SPARQLReasoner.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/reasoning/SPARQLReasoner.java 2011-12-05 09:42:14 UTC (rev 3471) +++ trunk/components-core/src/main/java/org/dllearner/reasoning/SPARQLReasoner.java 2011-12-05 13:08:51 UTC (rev 3472) @@ -571,7 +571,7 @@ public int getIndividualsCount(NamedClass nc){ String query = String.format("SELECT COUNT(?s) WHERE {" + - "?s a ?type." + + "?s a <%s>." + "}", nc.getURI()); ResultSet rs = executeSelectQuery(query); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lor...@us...> - 2011-12-05 09:42:22
|
Revision: 3471 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=3471&view=rev Author: lorenz_b Date: 2011-12-05 09:42:14 +0000 (Mon, 05 Dec 2011) Log Message: ----------- Rewrote tests to work without ComponentManager. Modified Paths: -------------- trunk/components-core/src/test/java/org/dllearner/test/junit/ELDownTests.java trunk/components-core/src/test/java/org/dllearner/test/junit/HeuristicTests.java trunk/components-core/src/test/java/org/dllearner/test/junit/RefinementOperatorTests.java trunk/components-core/src/test/java/org/dllearner/test/junit/TestOntologies.java Modified: trunk/components-core/src/test/java/org/dllearner/test/junit/ELDownTests.java =================================================================== --- trunk/components-core/src/test/java/org/dllearner/test/junit/ELDownTests.java 2011-12-05 09:15:13 UTC (rev 3470) +++ trunk/components-core/src/test/java/org/dllearner/test/junit/ELDownTests.java 2011-12-05 09:42:14 UTC (rev 3471) @@ -24,6 +24,7 @@ import java.io.File; import java.io.IOException; import java.net.MalformedURLException; +import java.util.Collections; import java.util.Set; import java.util.SortedSet; import java.util.TreeSet; @@ -296,12 +297,10 @@ logger.removeAllAppenders(); logger.addAppender(app); - ComponentManager cm = ComponentManager.getInstance(); - AbstractKnowledgeSource source = cm.knowledgeSource(OWLFile.class); - String ont = "test/galen2.owl"; - cm.applyConfigEntry(source, "url", new File(ont).toURI().toURL()); + String ont = "../test/galen2.owl"; + AbstractKnowledgeSource source = new OWLFile(ont); source.init(); - AbstractReasonerComponent reasoner = cm.reasoner(OWLAPIReasoner.class, source); + AbstractReasonerComponent reasoner = new OWLAPIReasoner(Collections.singleton(source)); reasoner.init(); System.out.println("Galen loaded."); @@ -333,12 +332,10 @@ @Test public void asTest() throws ComponentInitException, MalformedURLException { - ComponentManager cm = ComponentManager.getInstance(); - AbstractKnowledgeSource source = cm.knowledgeSource(OWLFile.class); - String ont = "test/galen2.owl"; - cm.applyConfigEntry(source, "url", new File(ont).toURI().toURL()); + String ont = "../test/galen2.owl"; + AbstractKnowledgeSource source = new OWLFile(ont); source.init(); - AbstractReasonerComponent reasoner = cm.reasoner(OWLAPIReasoner.class, source); + AbstractReasonerComponent reasoner = new OWLAPIReasoner(Collections.singleton(source)); reasoner.init(); System.out.println("Galen loaded."); Modified: trunk/components-core/src/test/java/org/dllearner/test/junit/HeuristicTests.java =================================================================== --- trunk/components-core/src/test/java/org/dllearner/test/junit/HeuristicTests.java 2011-12-05 09:15:13 UTC (rev 3470) +++ trunk/components-core/src/test/java/org/dllearner/test/junit/HeuristicTests.java 2011-12-05 09:42:14 UTC (rev 3471) @@ -101,7 +101,6 @@ AbstractKnowledgeSource ks = new KBFile(kb); AbstractReasonerComponent reasoner = cm.reasoner(OWLAPIReasoner.class, ks); ClassLearningProblem problem = cm.learningProblem(ClassLearningProblem.class, reasoner); - ks.init(); reasoner.init(); //// equivalent classes, no noise, no approximations //// @@ -198,7 +197,6 @@ AbstractKnowledgeSource ks = new KBFile(kb); AbstractReasonerComponent reasoner = cm.reasoner(OWLAPIReasoner.class, ks); PosNegLPStandard problem = cm.learningProblem(PosNegLPStandard.class, reasoner); - ks.init(); reasoner.init(); Individual[] pos1 = new Individual[] {ind[0], ind[1], ind[2], ind[3], ind[4]}; Modified: trunk/components-core/src/test/java/org/dllearner/test/junit/RefinementOperatorTests.java =================================================================== --- trunk/components-core/src/test/java/org/dllearner/test/junit/RefinementOperatorTests.java 2011-12-05 09:15:13 UTC (rev 3470) +++ trunk/components-core/src/test/java/org/dllearner/test/junit/RefinementOperatorTests.java 2011-12-05 09:42:14 UTC (rev 3471) @@ -23,6 +23,7 @@ import java.io.File; import java.net.MalformedURLException; +import java.util.Collections; import java.util.Set; import java.util.TreeSet; @@ -69,19 +70,11 @@ @Test public void rhoDRDownTest() { try { - String file = "examples/carcinogenesis/carcinogenesis.owl"; - ComponentManager cm = ComponentManager.getInstance(); - AbstractKnowledgeSource ks = cm.knowledgeSource(OWLFile.class); - try { - cm.applyConfigEntry(ks, "url", new File(file).toURI().toURL()); - } catch (MalformedURLException e) { - // should never happen - e.printStackTrace(); - } - ks.init(); - AbstractReasonerComponent rc = cm.reasoner(OWLAPIReasoner.class, ks); - rc.init(); - baseURI = rc.getBaseURI(); + String file = "../examples/carcinogenesis/carcinogenesis.owl"; + AbstractKnowledgeSource ks = new OWLFile(file); + AbstractReasonerComponent reasoner = new OWLAPIReasoner(Collections.singleton(ks)); + reasoner.init(); + baseURI = reasoner.getBaseURI(); // ReasonerComponent rs = cm.reasoningService(rc); // TODO the following two lines should not be necessary @@ -89,7 +82,11 @@ // rs.prepareRoleHierarchy(); RhoDRDown op = new RhoDRDown(); - op.setReasoner(rc); + op.setReasoner(reasoner); + op.setSubHierarchy(reasoner.getClassHierarchy()); + op.setObjectPropertyHierarchy(reasoner.getObjectPropertyHierarchy()); + op.setDataPropertyHierarchy(reasoner.getDatatypePropertyHierarchy()); + op.init(); Description concept = KBParser.parseConcept(uri("Compound")); Set<Description> results = op.refine(concept, 4, null); @@ -110,12 +107,18 @@ } @Test - public void rhoDRDownTest2() throws ParseException { + public void rhoDRDownTest2() throws ParseException, ComponentInitException { AbstractReasonerComponent reasoner = TestOntologies.getTestOntology(TestOntology.EPC_OE); + reasoner.init(); baseURI = reasoner.getBaseURI(); RhoDRDown op = new RhoDRDown(); op.setReasoner(reasoner); + op.setSubHierarchy(reasoner.getClassHierarchy()); + op.setObjectPropertyHierarchy(reasoner.getObjectPropertyHierarchy()); + op.setDataPropertyHierarchy(reasoner.getDatatypePropertyHierarchy()); + op.init(); + Description concept = KBParser.parseConcept("(\"http://localhost/aris/sap_model.owl#EPC\" AND EXISTS \"http://localhost/aris/sap_model.owl#hasModelElements\".\"http://localhost/aris/sap_model.owl#Object\")"); Set<Description> results = op.refine(concept,10); @@ -131,7 +134,7 @@ } @Test - public void rhoDRDownTest3() throws ParseException, LearningProblemUnsupportedException { + public void rhoDRDownTest3() throws ParseException, LearningProblemUnsupportedException, ComponentInitException { AbstractReasonerComponent reasoner = TestOntologies.getTestOntology(TestOntology.KRK_ZERO_ONE); baseURI = reasoner.getBaseURI(); @@ -152,6 +155,10 @@ System.out.println(" UNIT TEST INCOMPLETE AFTER FRAMEWORK CHANGE, BECAUSE CLASS HIERARCHY IS NOT PASSED TO REFINEMENT OPERATOR "); RhoDRDown op = new RhoDRDown(); op.setReasoner(reasoner); + op.setSubHierarchy(reasoner.getClassHierarchy()); + op.setObjectPropertyHierarchy(reasoner.getObjectPropertyHierarchy()); + op.setDataPropertyHierarchy(reasoner.getDatatypePropertyHierarchy()); + op.init(); Description concept = KBParser.parseConcept("EXISTS \"http://www.test.de/test#hasPiece\".EXISTS \"http://www.test.de/test#hasLowerRankThan\".(\"http://www.test.de/test#WRook\" AND TOP)"); Set<Description> results = op.refine(concept,8); @@ -191,39 +198,59 @@ } @Test - public void rhoDRDownTest4() throws ParseException, LearningProblemUnsupportedException { - AbstractReasonerComponent rs = TestOntologies.getTestOntology(TestOntology.RHO1); - RefinementOperator operator = new RhoDRDown(); - ((RhoDRDown)operator).setReasoner(rs); + public void rhoDRDownTest4() throws ParseException, LearningProblemUnsupportedException, ComponentInitException { + AbstractReasonerComponent reasoner = TestOntologies.getTestOntology(TestOntology.RHO1); + + RhoDRDown op = new RhoDRDown(); + op.setReasoner(reasoner); + op.setSubHierarchy(reasoner.getClassHierarchy()); + op.setObjectPropertyHierarchy(reasoner.getObjectPropertyHierarchy()); + op.setDataPropertyHierarchy(reasoner.getDatatypePropertyHierarchy()); + op.init(); + Description concept = KBParser.parseConcept("(car AND EXISTS hasOwner.person)"); // Description concept = Thing.instance; - Set<Description> refinements = operator.refine(concept, 6); + Set<Description> refinements = op.refine(concept, 6); for(Description refinement : refinements) { System.out.println(refinement); } } @Test - public void rhoDRDownTest5() throws ParseException, LearningProblemUnsupportedException { - AbstractReasonerComponent rs = TestOntologies.getTestOntology(TestOntology.SWORE); - RefinementOperator operator = new RhoDRDown(); - ((RhoDRDown)operator).setReasoner(rs); + public void rhoDRDownTest5() throws ParseException, LearningProblemUnsupportedException, ComponentInitException { + AbstractReasonerComponent reasoner = TestOntologies.getTestOntology(TestOntology.SWORE); + reasoner.init(); + + RhoDRDown op = new RhoDRDown(); + op.setReasoner(reasoner); + op.setSubHierarchy(reasoner.getClassHierarchy()); + op.setObjectPropertyHierarchy(reasoner.getObjectPropertyHierarchy()); + op.setDataPropertyHierarchy(reasoner.getDatatypePropertyHierarchy()); + op.init(); + // Description concept = KBParser.parseConcept("((NOT \"http://ns.softwiki.de/req/Requirement\") OR (ALL \"http://ns.softwiki.de/req/isCreatedBy\".(NOT \"http://ns.softwiki.de/req/Creditor\")))"); Description concept = KBParser.parseConcept("(NOT \"http://ns.softwiki.de/req/Requirement\" OR ALL \"http://ns.softwiki.de/req/isCreatedBy\".NOT \"http://ns.softwiki.de/req/Creditor\")"); System.out.println(concept); - Set<Description> refinements = operator.refine(concept, 7); + Set<Description> refinements = op.refine(concept, 7); for(Description refinement : refinements) { System.out.println(refinement); } } @Test - public void invertedOperatorTest() throws ParseException { - AbstractReasonerComponent rs = TestOntologies.getTestOntology(TestOntology.RHO1); - RhoDRDown rho = new RhoDRDown(); - rho.setReasoner(rs); - rho.setDropDisjuncts(true); - RefinementOperator operator = new OperatorInverter(rho); + public void invertedOperatorTest() throws ParseException, ComponentInitException { + AbstractReasonerComponent reasoner = TestOntologies.getTestOntology(TestOntology.RHO1); + reasoner.init(); + + RhoDRDown op = new RhoDRDown(); + op.setReasoner(reasoner); + op.setSubHierarchy(reasoner.getClassHierarchy()); + op.setObjectPropertyHierarchy(reasoner.getObjectPropertyHierarchy()); + op.setDataPropertyHierarchy(reasoner.getDatatypePropertyHierarchy()); + op.setDropDisjuncts(true); + op.init(); + + RefinementOperator operator = new OperatorInverter(op); Description concept = KBParser.parseConcept("(limo AND EXISTS hasOwner.man)"); Set<Description> refinements = operator.refine(concept, 6); for(Description refinement : refinements) { @@ -235,13 +262,20 @@ } @Test - public void rhoDownTestPellet() { + public void rhoDownTestPellet() throws ComponentInitException { Logger.getRootLogger().setLevel(Level.TRACE); - AbstractReasonerComponent rs = TestOntologies.getTestOntology(TestOntology.FATHER); - RhoDRDown rho = new RhoDRDown(); - rho.setReasoner(rs); + AbstractReasonerComponent reasoner = TestOntologies.getTestOntology(TestOntology.FATHER); + reasoner.init(); + + RhoDRDown op = new RhoDRDown(); + op.setReasoner(reasoner); + op.setSubHierarchy(reasoner.getClassHierarchy()); + op.setObjectPropertyHierarchy(reasoner.getObjectPropertyHierarchy()); + op.setDataPropertyHierarchy(reasoner.getDatatypePropertyHierarchy()); + op.init(); + NamedClass nc = new NamedClass("http://example.com/father#male"); - Set<Description> refinements = rho.refine(nc, 5); + Set<Description> refinements = op.refine(nc, 5); for(Description refinement : refinements) { System.out.println(refinement); } @@ -256,7 +290,7 @@ // (male AND EXISTS hasChild.TOP) // System.out.println(rs); // System.out.println("most general properties: " + rs.getMostGeneralProperties()); - System.out.println(rs.getObjectPropertyHierarchy()); + System.out.println(reasoner.getObjectPropertyHierarchy()); assertTrue(refinements.size()==8); } Modified: trunk/components-core/src/test/java/org/dllearner/test/junit/TestOntologies.java =================================================================== --- trunk/components-core/src/test/java/org/dllearner/test/junit/TestOntologies.java 2011-12-05 09:15:13 UTC (rev 3470) +++ trunk/components-core/src/test/java/org/dllearner/test/junit/TestOntologies.java 2011-12-05 09:42:14 UTC (rev 3471) @@ -126,13 +126,13 @@ } else if(ont.equals(TestOntology.CARCINOGENESIS)) { owlFile = "../examples/carcinogenesis/carcinogenesis.owl"; } else if(ont.equals(TestOntology.EPC_OE)) { - owlFile = "../examples/epc/sap_epc_oe.owl"; + owlFile = "../test/epc/sap_epc_oe.owl"; } else if(ont.equals(TestOntology.KRK_ZERO_ONE)) { - owlFile = "../examples/krk/KRK_ZERO_ONE.owl"; + owlFile = "../test/krk/KRK_ZERO_ONE.owl"; } else if(ont.equals(TestOntology.DBPEDIA_OWL)) { owlFile = "/home/jl/promotion/ontologien/dbpedia.owl"; } else if(ont.equals(TestOntology.TRAINS_OWL)) { - owlFile = "../examples/cross-benchmark/trains/trains.owl"; + owlFile = "../test/cross-benchmark/trains/trains.owl"; } else if(ont.equals(TestOntology.SWORE)) { owlFile = "../examples/swore/swore.rdf"; } else if(ont.equals(TestOntology.MDM)) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lor...@us...> - 2011-12-05 09:15:19
|
Revision: 3470 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=3470&view=rev Author: lorenz_b Date: 2011-12-05 09:15:13 +0000 (Mon, 05 Dec 2011) Log Message: ----------- Started rewriting tests without ComponentManager. Modified Paths: -------------- trunk/components-core/src/test/java/org/dllearner/test/ComponentTest.java trunk/components-core/src/test/java/org/dllearner/test/junit/TestOntologies.java Modified: trunk/components-core/src/test/java/org/dllearner/test/ComponentTest.java =================================================================== --- trunk/components-core/src/test/java/org/dllearner/test/ComponentTest.java 2011-12-05 08:59:27 UTC (rev 3469) +++ trunk/components-core/src/test/java/org/dllearner/test/ComponentTest.java 2011-12-05 09:15:13 UTC (rev 3470) @@ -21,6 +21,7 @@ import java.io.File; import java.net.MalformedURLException; +import java.util.Collections; import java.util.Set; import java.util.TreeSet; @@ -32,6 +33,7 @@ import org.dllearner.core.AbstractLearningProblem; import org.dllearner.core.LearningProblemUnsupportedException; import org.dllearner.core.AbstractReasonerComponent; +import org.dllearner.core.owl.Individual; import org.dllearner.kb.OWLFile; import org.dllearner.learningproblems.PosNegLPStandard; import org.dllearner.reasoning.OWLAPIReasoner; @@ -51,40 +53,30 @@ */ public static void main(String[] args) throws ComponentInitException, MalformedURLException { - // get singleton instance of component manager - ComponentManager cm = ComponentManager.getInstance(); - // create knowledge source - AbstractKnowledgeSource source = cm.knowledgeSource(OWLFile.class); - String example = "examples/family/uncle.owl"; - cm.applyConfigEntry(source, "url", new File(example).toURI().toURL()); - source.init(); + String example = "../examples/family/uncle.owl"; + AbstractKnowledgeSource source = new OWLFile(example); // create OWL API reasoning service with standard settings - AbstractReasonerComponent reasoner = cm.reasoner(OWLAPIReasoner.class, source); + AbstractReasonerComponent reasoner = new OWLAPIReasoner(Collections.singleton(source)); reasoner.init(); // create a learning problem and set positive and negative examples - AbstractLearningProblem lp = cm.learningProblem(PosNegLPStandard.class, reasoner); - Set<String> positiveExamples = new TreeSet<String>(); - positiveExamples.add("http://localhost/foo#heinz"); - positiveExamples.add("http://localhost/foo#alex"); - Set<String> negativeExamples = new TreeSet<String>(); - negativeExamples.add("http://localhost/foo#jan"); - negativeExamples.add("http://localhost/foo#anna"); - negativeExamples.add("http://localhost/foo#hanna"); - cm.applyConfigEntry(lp, "positiveExamples", positiveExamples); - cm.applyConfigEntry(lp, "negativeExamples", negativeExamples); + PosNegLPStandard lp = new PosNegLPStandard(reasoner); + Set<Individual> positiveExamples = new TreeSet<Individual>(); + positiveExamples.add(new Individual("http://localhost/foo#heinz")); + positiveExamples.add(new Individual("http://localhost/foo#alex")); + Set<Individual> negativeExamples = new TreeSet<Individual>(); + negativeExamples.add(new Individual("http://localhost/foo#jan")); + negativeExamples.add(new Individual("http://localhost/foo#anna")); + negativeExamples.add(new Individual("http://localhost/foo#hanna")); + lp.setPositiveExamples(positiveExamples); + lp.setNegativeExamples(negativeExamples); lp.init(); // create the learning algorithm - AbstractCELA la = null; - try { - la = cm.learningAlgorithm(OCEL.class, lp, reasoner); - la.init(); - } catch (LearningProblemUnsupportedException e) { - e.printStackTrace(); - } + AbstractCELA la = new OCEL(lp, reasoner); + la.init(); // start the algorithm and print the best concept found la.start(); Modified: trunk/components-core/src/test/java/org/dllearner/test/junit/TestOntologies.java =================================================================== --- trunk/components-core/src/test/java/org/dllearner/test/junit/TestOntologies.java 2011-12-05 08:59:27 UTC (rev 3469) +++ trunk/components-core/src/test/java/org/dllearner/test/junit/TestOntologies.java 2011-12-05 09:15:13 UTC (rev 3470) @@ -21,6 +21,7 @@ import java.io.File; import java.net.MalformedURLException; +import java.util.Collections; import org.dllearner.core.ComponentInitException; import org.dllearner.core.ComponentManager; @@ -119,23 +120,23 @@ kbString += "OPRANGE(hasOwner) = person.\n"; kbString += "hasOwner(opel123,person123).\n"; } else if(ont.equals(TestOntology.FATHER)) { - owlFile = "examples/father.owl"; + owlFile = "../examples/father.owl"; } else if(ont.equals(TestOntology.FATHER_OE)) { - owlFile = "examples/family/father_oe.owl"; + owlFile = "../examples/family/father_oe.owl"; } else if(ont.equals(TestOntology.CARCINOGENESIS)) { - owlFile = "examples/carcinogenesis/carcinogenesis.owl"; + owlFile = "../examples/carcinogenesis/carcinogenesis.owl"; } else if(ont.equals(TestOntology.EPC_OE)) { - owlFile = "examples/epc/sap_epc_oe.owl"; + owlFile = "../examples/epc/sap_epc_oe.owl"; } else if(ont.equals(TestOntology.KRK_ZERO_ONE)) { - owlFile = "examples/krk/KRK_ZERO_ONE.owl"; + owlFile = "../examples/krk/KRK_ZERO_ONE.owl"; } else if(ont.equals(TestOntology.DBPEDIA_OWL)) { owlFile = "/home/jl/promotion/ontologien/dbpedia.owl"; } else if(ont.equals(TestOntology.TRAINS_OWL)) { - owlFile = "examples/cross-benchmark/trains/trains.owl"; + owlFile = "../examples/cross-benchmark/trains/trains.owl"; } else if(ont.equals(TestOntology.SWORE)) { - owlFile = "examples/swore/swore.rdf"; + owlFile = "../examples/swore/swore.rdf"; } else if(ont.equals(TestOntology.MDM)) { - owlFile = "test/MDM0.73.owl"; + owlFile = "../test/MDM0.73.owl"; } try { @@ -148,17 +149,10 @@ source = new KBFile(kb); // do nothing for empty ontology } else { - source = cm.knowledgeSource(OWLFile.class); - try { - cm.applyConfigEntry(source, "url", new File(owlFile).toURI().toURL()); - } catch (MalformedURLException e) { - e.printStackTrace(); - } + source = new OWLFile(owlFile); } - AbstractReasonerComponent rc = cm.reasoner(OWLAPIReasoner.class, source); -// ReasonerComponent rc = cm.reasoner(FastInstanceChecker.class, source); - source.init(); + AbstractReasonerComponent rc = new OWLAPIReasoner(Collections.singleton(source)); rc.init(); return rc; } catch(ParseException e) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lor...@us...> - 2011-12-05 08:59:38
|
Revision: 3469 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=3469&view=rev Author: lorenz_b Date: 2011-12-05 08:59:27 +0000 (Mon, 05 Dec 2011) Log Message: ----------- Moved QTL example to test. Added Paths: ----------- trunk/test/qtl/ trunk/test/qtl/dbpedia_simple.conf Removed Paths: ------------- trunk/examples/qtl/ Added: trunk/test/qtl/dbpedia_simple.conf =================================================================== --- trunk/test/qtl/dbpedia_simple.conf (rev 0) +++ trunk/test/qtl/dbpedia_simple.conf 2011-12-05 08:59:27 UTC (rev 3469) @@ -0,0 +1,12 @@ + +prefixes = [ ("dbr","http://dbpedia.org/resource/") ] + +ks.type = "SPARQL" +ks.url = "http://live.dbpedia.org/sparql" +ks.defaultGraphURIs = { "http://dbpedia.org" } + +// learning problem +lp.type = "posonlylp" +lp.positiveExamples = { "dbr:Bob_Dylan", "dbr:The_Beatles", "dbr:Aerosmith" } + +alg.type = "qtl" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lor...@us...> - 2011-12-05 08:54:01
|
Revision: 3468 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=3468&view=rev Author: lorenz_b Date: 2011-12-05 08:53:54 +0000 (Mon, 05 Dec 2011) Log Message: ----------- Cleaned up script. Modified Paths: -------------- trunk/scripts/src/main/java/org/dllearner/scripts/SPARQLSampleDebugging.java Modified: trunk/scripts/src/main/java/org/dllearner/scripts/SPARQLSampleDebugging.java =================================================================== --- trunk/scripts/src/main/java/org/dllearner/scripts/SPARQLSampleDebugging.java 2011-12-04 15:50:59 UTC (rev 3467) +++ trunk/scripts/src/main/java/org/dllearner/scripts/SPARQLSampleDebugging.java 2011-12-05 08:53:54 UTC (rev 3468) @@ -2,11 +2,12 @@ import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; +import java.io.File; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; import java.io.InputStream; -import java.io.ObjectOutputStream; +import java.io.PrintWriter; import java.io.StringReader; import java.io.UnsupportedEncodingException; import java.net.URL; @@ -19,6 +20,7 @@ import java.util.Comparator; import java.util.HashMap; import java.util.HashSet; +import java.util.Iterator; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -46,16 +48,17 @@ import org.semanticweb.owlapi.model.OWLClass; import org.semanticweb.owlapi.model.OWLDataFactory; import org.semanticweb.owlapi.model.OWLDataProperty; +import org.semanticweb.owlapi.model.OWLFunctionalDataPropertyAxiom; +import org.semanticweb.owlapi.model.OWLFunctionalObjectPropertyAxiom; import org.semanticweb.owlapi.model.OWLObjectProperty; import org.semanticweb.owlapi.model.OWLOntology; import org.semanticweb.owlapi.model.OWLOntologyCreationException; -import org.semanticweb.owlapi.model.OWLOntologyFormat; import org.semanticweb.owlapi.model.OWLOntologyManager; import org.semanticweb.owlapi.model.OWLOntologyStorageException; import org.semanticweb.owlapi.reasoner.InferenceType; -import org.semanticweb.owlapi.reasoner.OWLReasoner; import com.clarkparsia.owlapi.explanation.PelletExplanation; +import com.clarkparsia.owlapi.explanation.io.manchester.ManchesterSyntaxExplanationRenderer; import com.clarkparsia.pellet.owlapiv3.PelletReasoner; import com.clarkparsia.pellet.owlapiv3.PelletReasonerFactory; import com.hp.hpl.jena.query.Query; @@ -64,8 +67,12 @@ import com.hp.hpl.jena.query.QueryFactory; import com.hp.hpl.jena.query.QuerySolution; import com.hp.hpl.jena.query.ResultSet; +import com.hp.hpl.jena.rdf.model.InfModel; import com.hp.hpl.jena.rdf.model.Model; import com.hp.hpl.jena.rdf.model.ModelFactory; +import com.hp.hpl.jena.reasoner.Reasoner; +import com.hp.hpl.jena.reasoner.ValidityReport; +import com.hp.hpl.jena.reasoner.ValidityReport.Report; import com.hp.hpl.jena.vocabulary.OWL; import com.hp.hpl.jena.vocabulary.RDFS; @@ -77,7 +84,7 @@ private int sampleSize = 10; private int depth = 4; private int nrOfChunks = 1; - private int maxNrOfExplanations = 20; + private int maxNrOfExplanations = 60; private Logger logger = Logger.getLogger(SPARQLSampleDebugging.class); @@ -105,7 +112,7 @@ conn = DriverManager.getConnection(url, dbUser, dbPass); ps = conn.prepareStatement("INSERT INTO debugging_evaluation (" - + "resource, fragement_size , consistent, nr_of_justifications, justifications, justificationsObject) " + "VALUES(?,?,?,?,?,?)"); + + "resource, fragment_size , consistent, nr_of_justifications, justifications, justificationsObject) " + "VALUES(?,?,?,?,?,?)"); } catch (ClassNotFoundException e) { e.printStackTrace(); @@ -219,6 +226,16 @@ } + private OWLOntology extractSampleModule(String resource){ + logger.info("Extracting sample module..."); + long startTime = System.currentTimeMillis(); + ModelGenerator modelGen = new ModelGenerator(endpoint, cache); + Model model = modelGen.createModel(resource, Strategy.CHUNKS, depth); + logger.info("...done in " + (System.currentTimeMillis()-startTime) + "ms."); + return convert(model); + + } + private Set<Set<OWLAxiom>> computeExplanations(OWLOntology ontology){ logger.info("Computing explanations..."); long startTime = System.currentTimeMillis(); @@ -238,11 +255,24 @@ return explanations; } + private void computeExplanations(Model model){ + logger.info("Computing explanations..."); + Reasoner reasoner = org.mindswap.pellet.jena.PelletReasonerFactory.theInstance().create(); + InfModel infModel = ModelFactory.createInfModel(reasoner, model); + long startTime = System.currentTimeMillis(); + ValidityReport report = infModel.validate(); + Iterator<Report> i = report.getReports(); + while(i.hasNext()){ + System.out.println(i.next()); + } + logger.info("...done in " + (System.currentTimeMillis()-startTime) + "ms."); + } + private OWLOntology loadReferenceOntology() throws OWLOntologyCreationException{ long startTime = System.currentTimeMillis(); logger.info("Loading reference ontology..."); OWLOntology ontology = OWLManager.createOWLOntologyManager().loadOntologyFromOntologyDocument( - getClass().getClassLoader().getResourceAsStream("dbpedia_0.75.owl")); + getClass().getClassLoader().getResourceAsStream("dbpedia_0.75_no_datapropaxioms.owl"));System.out.println(ontology.getLogicalAxiomCount()); logger.info("...done in " + (System.currentTimeMillis()-startTime) + "ms."); return ontology; } @@ -284,69 +314,7 @@ return model; } - public void run() throws OWLOntologyCreationException{ - OWLOntology reference = loadReferenceOntology(); - - Set<OWLOntology> ontologies = new HashSet<OWLOntology>(); - ontologies.add(reference); - OWLOntology sample; - OWLOntology merged; - OWLReasoner reasoner; - for(int i = 0; i < 100; i++){ - Set<String> resources = extractSampleResourcesChunked(sampleSize); - sample = extractSampleModule(resources); - - ontologies.add(sample); - - merged = OWLManager.createOWLOntologyManager().createOntology(IRI.create("http://merged.en"), ontologies); - - reasoner = PelletReasonerFactory.getInstance().createNonBufferingReasoner(merged); - Logger pelletLogger = Logger.getLogger("org.mindswap.pellet"); - pelletLogger.setLevel(Level.OFF); - - boolean isConsistent = reasoner.isConsistent(); - logger.info("Consistent: " + isConsistent); - reasoner.dispose(); - if(!isConsistent){ - Set<Set<OWLAxiom>> explanations = computeExplanations(merged); - for(Set<OWLAxiom> explanation : explanations){ - System.out.println(explanation); - } - break; - - } - ontologies.remove(sample); - - } - - } - public void run2() throws OWLOntologyCreationException{ - OWLOntology reference = loadReferenceOntology(); - OWLReasoner reasoner = PelletReasonerFactory.getInstance().createReasoner(reference); - OWLOntologyManager man = OWLManager.createOWLOntologyManager(); - - Set<String> resources = extractSampleResourcesChunked(sampleSize); - for(String resource : resources){ - logger.info("Resource " + resource); - OWLOntology module = extractSampleModule(Collections.singleton(resource)); - man.addAxioms(reference, module.getLogicalAxioms()); - reasoner.flush(); - logger.info(reasoner.getRootOntology().getLogicalAxiomCount()); - boolean isConsistent = reasoner.isConsistent(); - logger.info("Consistent: " + isConsistent); - if(!isConsistent){ - Set<Set<OWLAxiom>> explanations = computeExplanations(reference); - for(Set<OWLAxiom> explanation : explanations){ - logger.info(explanation); - } - } - man.removeAxioms(reference, module.getLogicalAxioms()); - - } - - } - private Set<OWLObjectProperty> getUnsatisfiableObjectProperties(PelletReasoner reasoner){ SortedSet<OWLObjectProperty> properties = new TreeSet<OWLObjectProperty>(new Comparator<OWLObjectProperty>() { @Override @@ -355,12 +323,29 @@ } }); OWLDataFactory f = OWLManager.createOWLOntologyManager().getOWLDataFactory(); + ManchesterSyntaxExplanationRenderer renderer = new ManchesterSyntaxExplanationRenderer(); + PrintWriter out = new PrintWriter( System.out ); for(OWLObjectProperty p : reasoner.getRootOntology().getObjectPropertiesInSignature()){ boolean satisfiable = reasoner.isSatisfiable(f.getOWLObjectExactCardinality(1, p)); if(!satisfiable){ properties.add(p); +// PelletExplanation expGen = new PelletExplanation(reasoner); +// try { +// Set<Set<OWLAxiom>> explanations = expGen.getUnsatisfiableExplanations(f.getOWLObjectExactCardinality(1, p),1); +// System.out.println(explanations); +// renderer.startRendering( out ); +// renderer.render(explanations); +// renderer.endRendering(); +// } catch (UnsupportedOperationException e) { +// e.printStackTrace(); +// } catch (OWLException e) { +// e.printStackTrace(); +// } catch (IOException e) { +// e.printStackTrace(); +// } } } + return properties; } @@ -378,8 +363,7 @@ } - public void run3() throws OWLOntologyCreationException{ - OWLOntology reference = loadReferenceOntology(); + public void run(OWLOntology reference) throws OWLOntologyCreationException{ Set<OWLOntology> ontologies = new HashSet<OWLOntology>(); ontologies.add(reference); PelletReasoner reasoner = PelletReasonerFactory.getInstance().createNonBufferingReasoner(reference); @@ -394,7 +378,7 @@ OWLOntology module; Set<String> resources = extractSampleResourcesChunked(sampleSize); - for(String resource : resources){ + for(String resource : resources){resource = "http://dbpedia.org/resource/Leipzig"; logger.info("Resource " + resource); module = extractSampleModule(Collections.singleton(resource)); ontologies.add(module); @@ -424,17 +408,64 @@ } ontologies.remove(module); reasoner.dispose(); - writeToDB(resource, module.getLogicalAxiomCount(), isConsistent, explanations); - +// writeToDB(resource, module.getLogicalAxiomCount(), isConsistent, explanations); + break; } } + public void runOptimized(OWLOntology reference) throws OWLOntologyCreationException{ + PelletReasoner reasoner = PelletReasonerFactory.getInstance().createNonBufferingReasoner(reference); + reasoner.precomputeInferences(InferenceType.CLASS_HIERARCHY); + Set<OWLClass> unsatisfiableClasses = reasoner.getUnsatisfiableClasses().getEntitiesMinusBottom(); + logger.info("Unsatisfiable classes(" + unsatisfiableClasses.size() + "): " + unsatisfiableClasses); + Set<OWLObjectProperty> unsatisfiableObjectProperties = getUnsatisfiableObjectProperties(reasoner); + logger.info("Unsatisfiable object properties(" + unsatisfiableObjectProperties.size() + "): " + unsatisfiableObjectProperties); + Set<OWLDataProperty> unsatisfiableDataProperties = getUnsatisfiableDataProperties(reasoner); + logger.info("Unsatisfiable data properties(" + unsatisfiableDataProperties.size() + "): " + unsatisfiableDataProperties); + OWLOntology module; + reasoner.isConsistent(); + OWLOntologyManager man = OWLManager.createOWLOntologyManager(); + man.addOntologyChangeListener( reasoner ); + Set<String> resources = extractSampleResourcesChunked(sampleSize); + for(String resource : resources){ + logger.info("Resource " + resource);resource = "http://dbpedia.org/resource/Leipzig"; + module = extractSampleModule(Collections.singleton(resource)); + man.addAxioms(reference, module.getABoxAxioms(true)); + boolean isConsistent = reasoner.isConsistent(); + logger.info("Consistent: " + isConsistent); + Set<Set<OWLAxiom>> explanations = null; + if(!isConsistent){ + explanations = computeExplanations(reasoner); + logger.info("Found " + explanations.size() + " explanations."); + Map<AxiomType, Integer> axiomType2CountMap = new HashMap<AxiomType, Integer>(); + for(Set<OWLAxiom> explanation : explanations){ + logger.info(explanation); + for(OWLAxiom axiom : explanation){ + Integer cnt = axiomType2CountMap.get(axiom.getAxiomType()); + if(cnt == null){ + cnt = Integer.valueOf(0); + } + cnt = Integer.valueOf(cnt + 1); + axiomType2CountMap.put(axiom.getAxiomType(), cnt); + } + } + for(Entry<AxiomType, Integer> entry : axiomType2CountMap.entrySet()){ + logger.info(entry.getKey() + "\t: " + entry.getValue()); + } + } + man.removeAxioms(reference, module.getABoxAxioms(true)); +// writeToDB(resource, module.getLogicalAxiomCount(), isConsistent, explanations); + break; + } + + } + public void runPatternBasedDetection(){ Model model = ModelFactory.createDefaultModel(); //read schema - InputStream in = getClass().getClassLoader().getResourceAsStream("dbpedia_0.75.owl"); + InputStream in = getClass().getClassLoader().getResourceAsStream("dbpedia_0.75_no_datapropertyaxioms.owl"); model.read(in, null); //read data @@ -463,6 +494,41 @@ } finally { qexec.close() ; } } + public void checkFunctionalityViolation(){ + try { + OWLOntology ontology = loadReferenceOntology(); + + Set<String> properties = new TreeSet<String>(); + for(OWLAxiom ax : ontology.getAxioms(AxiomType.FUNCTIONAL_OBJECT_PROPERTY)){ + OWLObjectProperty prop = ((OWLFunctionalObjectPropertyAxiom)ax).getProperty().asOWLObjectProperty(); + properties.add(prop.toStringID()); + } + for(OWLAxiom ax : ontology.getAxioms(AxiomType.FUNCTIONAL_DATA_PROPERTY)){ + OWLDataProperty prop = ((OWLFunctionalDataPropertyAxiom)ax).getProperty().asOWLDataProperty(); + properties.add(prop.toStringID()); + } + for(String prop : properties){ + String query = "SELECT * WHERE {?s <%s> ?o1. ?s <%s> ?o2. FILTER(?o1 != ?o2)} LIMIT 1".replaceAll("%s", prop); + ResultSet rs = SparqlQuery.convertJSONtoResultSet(cache.executeSelectQuery(endpoint, query)); + while(rs.hasNext()){ + QuerySolution qs = rs.next(); + logger.info("********************************************************"); + logger.info(prop); + logger.info(qs.get("s") + "-->" + qs.get("o1")); + logger.info(qs.get("s") + "-->" + qs.get("o2")); + } + + } + } catch (OWLOntologyCreationException e) { + e.printStackTrace(); + } + + } + + public void removeAxiomsWithNamespace(Set<String> namespaces){ + + } + /** * @param args * @throws Exception @@ -478,8 +544,28 @@ SparqlEndpoint endpoint = new SparqlEndpoint(new URL("http://dbpedia.aksw.org:8902/sparql"), Collections.singletonList("http://dbpedia.org"), Collections.<String>emptyList()); -// new SPARQLSampleDebugging(endpoint).runPatternBasedDetection(); - new SPARQLSampleDebugging(endpoint).run3(); + + if(args.length != 1){ + System.out.println("Usage: SPARQLSampleDebugging <Schema-Ontology>"); + System.exit(0); + } + + OWLOntology ontology = OWLManager.createOWLOntologyManager().loadOntologyFromOntologyDocument(IRI.create(new File(args[0]).toURI())); + + SPARQLSampleDebugging debug = new SPARQLSampleDebugging(endpoint); + +// debug.checkFunctionalityViolation(); + + long s1 = System.currentTimeMillis(); + debug.runOptimized(ontology); + long s2 = System.currentTimeMillis()-s1; + + long s3 = System.currentTimeMillis(); + debug.run(ontology); + long s4 = System.currentTimeMillis()-s3; + + System.out.println(s2); + System.out.println(s4); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lor...@us...> - 2011-12-04 15:51:05
|
Revision: 3467 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=3467&view=rev Author: lorenz_b Date: 2011-12-04 15:50:59 +0000 (Sun, 04 Dec 2011) Log Message: ----------- Added method to get the popularity for a property. Modified Paths: -------------- trunk/components-core/src/main/java/org/dllearner/reasoning/SPARQLReasoner.java Modified: trunk/components-core/src/main/java/org/dllearner/reasoning/SPARQLReasoner.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/reasoning/SPARQLReasoner.java 2011-12-04 15:48:34 UTC (rev 3466) +++ trunk/components-core/src/main/java/org/dllearner/reasoning/SPARQLReasoner.java 2011-12-04 15:50:59 UTC (rev 3467) @@ -580,6 +580,17 @@ } + public int getPropertyCount(ObjectProperty property){ + String query = String.format("SELECT COUNT(*) WHERE {" + + "?s <%s> ?o." + + "}", + property.getName()); + ResultSet rs = executeSelectQuery(query); + int cnt = rs.next().get(rs.getResultVars().get(0)).asLiteral().getInt(); + return cnt; + + } + public SortedSet<ObjectProperty> getInverseObjectProperties(ObjectProperty property){ SortedSet<ObjectProperty> inverseObjectProperties = new TreeSet<ObjectProperty>(); String query = "SELECT ?p WHERE {" + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lor...@us...> - 2011-12-04 15:48:40
|
Revision: 3466 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=3466&view=rev Author: lorenz_b Date: 2011-12-04 15:48:34 +0000 (Sun, 04 Dec 2011) Log Message: ----------- Small change. Modified Paths: -------------- trunk/components-core/src/main/java/org/dllearner/algorithms/properties/DisjointObjectPropertyAxiomLearner.java Modified: trunk/components-core/src/main/java/org/dllearner/algorithms/properties/DisjointObjectPropertyAxiomLearner.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/algorithms/properties/DisjointObjectPropertyAxiomLearner.java 2011-12-02 09:51:19 UTC (rev 3465) +++ trunk/components-core/src/main/java/org/dllearner/algorithms/properties/DisjointObjectPropertyAxiomLearner.java 2011-12-04 15:48:34 UTC (rev 3466) @@ -19,7 +19,9 @@ package org.dllearner.algorithms.properties; +import java.net.URL; import java.util.ArrayList; +import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -30,13 +32,16 @@ import org.dllearner.core.AbstractAxiomLearningAlgorithm; import org.dllearner.core.ComponentAnn; import org.dllearner.core.EvaluatedAxiom; +import org.dllearner.core.EvaluatedDescription; import org.dllearner.core.config.ConfigOption; import org.dllearner.core.config.ObjectPropertyEditor; import org.dllearner.core.owl.DisjointObjectPropertyAxiom; import org.dllearner.core.owl.ObjectProperty; import org.dllearner.kb.SparqlEndpointKS; import org.dllearner.kb.sparql.SPARQLTasks; +import org.dllearner.kb.sparql.SparqlEndpoint; import org.dllearner.learningproblems.AxiomScore; +import org.dllearner.learningproblems.Heuristics; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -51,6 +56,8 @@ @ConfigOption(name="propertyToDescribe", description="", propertyEditorClass=ObjectPropertyEditor.class) private ObjectProperty propertyToDescribe; + private boolean usePropertyPopularity = true; + public DisjointObjectPropertyAxiomLearner(SparqlEndpointKS ks){ this.ks = ks; } @@ -126,6 +133,16 @@ EvaluatedAxiom evalAxiom; //first create disjoint axioms with properties which not occur and give score of 1 for(ObjectProperty p : completeDisjointProperties){ + if(usePropertyPopularity){ + int popularity = reasoner.getPropertyCount(p); + //skip if property is not used in kb + if(popularity == 0) continue; + double[] confidenceInterval = Heuristics.getConfidenceInterval95Wald(popularity, 0); + double accuracy = (confidenceInterval[0] + confidenceInterval[1]) / 2; + evalAxiom = new EvaluatedAxiom(new DisjointObjectPropertyAxiom(propertyToDescribe, p), new AxiomScore(1- accuracy)); + } else { + evalAxiom = new EvaluatedAxiom(new DisjointObjectPropertyAxiom(propertyToDescribe, p), new AxiomScore(1)); + } evalAxiom = new EvaluatedAxiom(new DisjointObjectPropertyAxiom(propertyToDescribe, p), new AxiomScore(1)); axioms.add(evalAxiom); @@ -133,8 +150,10 @@ //second create disjoint axioms with other properties and score 1 - (#occurence/#all) for(Entry<ObjectProperty, Integer> entry : sortByValues(property2Count)){ + double[] confidenceInterval = Heuristics.getConfidenceInterval95Wald(all, entry.getValue()); + double accuracy = (confidenceInterval[0] + confidenceInterval[1]) / 2; evalAxiom = new EvaluatedAxiom(new DisjointObjectPropertyAxiom(propertyToDescribe, entry.getKey()), - new AxiomScore(1 - (entry.getValue() / (double)all))); + new AxiomScore(1 - accuracy)); axioms.add(evalAxiom); } @@ -142,5 +161,13 @@ return axioms; } - + public static void main(String[] args) throws Exception{ + DisjointObjectPropertyAxiomLearner l = new DisjointObjectPropertyAxiomLearner(new SparqlEndpointKS(new SparqlEndpoint( + new URL("http://dbpedia.aksw.org:8902/sparql"), Collections.singletonList("http://dbpedia.org"), Collections.<String>emptyList())));//.getEndpointDBpediaLiveAKSW())); + l.setPropertyToDescribe(new ObjectProperty("http://dbpedia.org/ontology/engineType")); + l.setMaxExecutionTimeInSeconds(10); + l.init(); + l.start(); + System.out.println(l.getCurrentlyBestEvaluatedAxioms(5)); + } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lor...@us...> - 2011-12-02 09:51:26
|
Revision: 3465 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=3465&view=rev Author: lorenz_b Date: 2011-12-02 09:51:19 +0000 (Fri, 02 Dec 2011) Log Message: ----------- Added algorithms. Modified Paths: -------------- trunk/interfaces/src/main/java/org/dllearner/cli/Enrichment.java Modified: trunk/interfaces/src/main/java/org/dllearner/cli/Enrichment.java =================================================================== --- trunk/interfaces/src/main/java/org/dllearner/cli/Enrichment.java 2011-12-01 22:06:17 UTC (rev 3464) +++ trunk/interfaces/src/main/java/org/dllearner/cli/Enrichment.java 2011-12-02 09:51:19 UTC (rev 3465) @@ -73,8 +73,10 @@ import org.dllearner.algorithms.properties.FunctionalObjectPropertyAxiomLearner; import org.dllearner.algorithms.properties.InverseFunctionalObjectPropertyAxiomLearner; import org.dllearner.algorithms.properties.InverseObjectPropertyAxiomLearner; +import org.dllearner.algorithms.properties.IrreflexiveObjectPropertyAxiomLearner; import org.dllearner.algorithms.properties.ObjectPropertyDomainAxiomLearner; import org.dllearner.algorithms.properties.ObjectPropertyRangeAxiomLearner; +import org.dllearner.algorithms.properties.ReflexiveObjectPropertyAxiomLearner; import org.dllearner.algorithms.properties.SubDataPropertyOfAxiomLearner; import org.dllearner.algorithms.properties.SubObjectPropertyOfAxiomLearner; import org.dllearner.algorithms.properties.SymmetricObjectPropertyAxiomLearner; @@ -242,6 +244,8 @@ objectPropertyAlgorithms.add(AsymmetricObjectPropertyAxiomLearner.class); objectPropertyAlgorithms.add(TransitiveObjectPropertyAxiomLearner.class); objectPropertyAlgorithms.add(InverseObjectPropertyAxiomLearner.class); + objectPropertyAlgorithms.add(ReflexiveObjectPropertyAxiomLearner.class); + objectPropertyAlgorithms.add(IrreflexiveObjectPropertyAxiomLearner.class); dataPropertyAlgorithms = new LinkedList<Class<? extends AxiomLearningAlgorithm>>(); dataPropertyAlgorithms.add(DisjointDataPropertyAxiomLearner.class); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lor...@us...> - 2011-12-01 22:06:23
|
Revision: 3464 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=3464&view=rev Author: lorenz_b Date: 2011-12-01 22:06:17 +0000 (Thu, 01 Dec 2011) Log Message: ----------- Added method to get inverse properties. Modified Paths: -------------- trunk/components-core/src/main/java/org/dllearner/reasoning/SPARQLReasoner.java Modified: trunk/components-core/src/main/java/org/dllearner/reasoning/SPARQLReasoner.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/reasoning/SPARQLReasoner.java 2011-12-01 21:44:18 UTC (rev 3463) +++ trunk/components-core/src/main/java/org/dllearner/reasoning/SPARQLReasoner.java 2011-12-01 22:06:17 UTC (rev 3464) @@ -579,6 +579,20 @@ return cnt; } + + public SortedSet<ObjectProperty> getInverseObjectProperties(ObjectProperty property){ + SortedSet<ObjectProperty> inverseObjectProperties = new TreeSet<ObjectProperty>(); + String query = "SELECT ?p WHERE {" + + "{<%p> <%ax> ?p.} UNION {?p <%ax> <%p>}}".replace("%p", property.getName()).replace("%ax", OWL.inverseOf.getURI()); + ResultSet rs = executeSelectQuery(query); + QuerySolution qs; + while(rs.hasNext()){ + qs = rs.next(); + inverseObjectProperties.add(new ObjectProperty(qs.getResource("p").getURI())); + + } + return inverseObjectProperties; + } @Override public DataRange getRange(DatatypeProperty datatypeProperty) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lor...@us...> - 2011-12-01 21:44:24
|
Revision: 3463 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=3463&view=rev Author: lorenz_b Date: 2011-12-01 21:44:18 +0000 (Thu, 01 Dec 2011) Log Message: ----------- Added new algorithms to enrichment script. Modified Paths: -------------- trunk/interfaces/src/main/java/org/dllearner/cli/Enrichment.java Modified: trunk/interfaces/src/main/java/org/dllearner/cli/Enrichment.java =================================================================== --- trunk/interfaces/src/main/java/org/dllearner/cli/Enrichment.java 2011-12-01 14:27:28 UTC (rev 3462) +++ trunk/interfaces/src/main/java/org/dllearner/cli/Enrichment.java 2011-12-01 21:44:18 UTC (rev 3463) @@ -62,6 +62,7 @@ import org.dllearner.algorithms.DisjointClassesLearner; import org.dllearner.algorithms.SimpleSubclassLearner; import org.dllearner.algorithms.celoe.CELOE; +import org.dllearner.algorithms.properties.AsymmetricObjectPropertyAxiomLearner; import org.dllearner.algorithms.properties.DataPropertyDomainAxiomLearner; import org.dllearner.algorithms.properties.DataPropertyRangeAxiomLearner; import org.dllearner.algorithms.properties.DisjointDataPropertyAxiomLearner; @@ -71,6 +72,7 @@ import org.dllearner.algorithms.properties.FunctionalDataPropertyAxiomLearner; import org.dllearner.algorithms.properties.FunctionalObjectPropertyAxiomLearner; import org.dllearner.algorithms.properties.InverseFunctionalObjectPropertyAxiomLearner; +import org.dllearner.algorithms.properties.InverseObjectPropertyAxiomLearner; import org.dllearner.algorithms.properties.ObjectPropertyDomainAxiomLearner; import org.dllearner.algorithms.properties.ObjectPropertyRangeAxiomLearner; import org.dllearner.algorithms.properties.SubDataPropertyOfAxiomLearner; @@ -237,7 +239,9 @@ objectPropertyAlgorithms.add(ObjectPropertyRangeAxiomLearner.class); objectPropertyAlgorithms.add(SubObjectPropertyOfAxiomLearner.class); objectPropertyAlgorithms.add(SymmetricObjectPropertyAxiomLearner.class); + objectPropertyAlgorithms.add(AsymmetricObjectPropertyAxiomLearner.class); objectPropertyAlgorithms.add(TransitiveObjectPropertyAxiomLearner.class); + objectPropertyAlgorithms.add(InverseObjectPropertyAxiomLearner.class); dataPropertyAlgorithms = new LinkedList<Class<? extends AxiomLearningAlgorithm>>(); dataPropertyAlgorithms.add(DisjointDataPropertyAxiomLearner.class); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lor...@us...> - 2011-12-01 14:27:34
|
Revision: 3462 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=3462&view=rev Author: lorenz_b Date: 2011-12-01 14:27:28 +0000 (Thu, 01 Dec 2011) Log Message: ----------- Fixed example. Modified Paths: -------------- trunk/examples/family/father_oe.conf Modified: trunk/examples/family/father_oe.conf =================================================================== --- trunk/examples/family/father_oe.conf 2011-12-01 14:21:48 UTC (rev 3461) +++ trunk/examples/family/father_oe.conf 2011-12-01 14:27:28 UTC (rev 3462) @@ -14,4 +14,4 @@ lp.classToDescribe = "ex:father" // create learning algorithm to run -alg.type = "ocel" +alg.type = "celoe" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jen...@us...> - 2011-12-01 14:21:58
|
Revision: 3461 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=3461&view=rev Author: jenslehmann Date: 2011-12-01 14:21:48 +0000 (Thu, 01 Dec 2011) Log Message: ----------- fixed bug in CELOE Modified Paths: -------------- trunk/components-core/src/main/java/org/dllearner/algorithms/celoe/CELOE.java trunk/examples/nlp2rdf/sample/sample2.conf Modified: trunk/components-core/src/main/java/org/dllearner/algorithms/celoe/CELOE.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/algorithms/celoe/CELOE.java 2011-12-01 13:21:18 UTC (rev 3460) +++ trunk/components-core/src/main/java/org/dllearner/algorithms/celoe/CELOE.java 2011-12-01 14:21:48 UTC (rev 3461) @@ -244,7 +244,7 @@ } // singleSuggestionMode = configurator.getSingleSuggestionMode(); - + /* // create refinement operator if(operator == null) { operator = new RhoDRDown(); @@ -255,6 +255,22 @@ ((RhoDRDown)operator).setObjectPropertyHierarchy(reasoner.getObjectPropertyHierarchy()); ((RhoDRDown)operator).setDataPropertyHierarchy(reasoner.getDatatypePropertyHierarchy()); ((RhoDRDown)operator).init(); + */ + // create a refinement operator and pass all configuration + // variables to it + if(operator == null) { + // we use a default operator and inject the class hierarchy for now + operator = new RhoDRDown(); + ((RhoDRDown)operator).setStartClass(startClass); + ((RhoDRDown)operator).setReasoner(reasoner); + ((RhoDRDown)operator).init(); + } + // TODO: find a better solution as this is quite difficult to debug + ((RhoDRDown)operator).setSubHierarchy(classHierarchy); + ((RhoDRDown)operator).setObjectPropertyHierarchy(reasoner.getObjectPropertyHierarchy()); + ((RhoDRDown)operator).setDataPropertyHierarchy(reasoner.getDatatypePropertyHierarchy()); + + // operator = new RhoDRDown(reasoner, classHierarchy, startClass, configurator); baseURI = reasoner.getBaseURI(); prefixes = reasoner.getPrefixes(); Modified: trunk/examples/nlp2rdf/sample/sample2.conf =================================================================== --- trunk/examples/nlp2rdf/sample/sample2.conf 2011-12-01 13:21:18 UTC (rev 3460) +++ trunk/examples/nlp2rdf/sample/sample2.conf 2011-12-01 14:21:48 UTC (rev 3461) @@ -30,6 +30,7 @@ lp.negativeExamples = {"nif:offset_81_107_The+eaten+apple+was+", "nif:offset_108_132_The+apple+ate+the+ap", "nif:offset_133_160_The+boy+will+eat+the"} // create a refinement operator and configure it + op.type = "rho" op.useNegation = false op.useAllConstructor = false This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lor...@us...> - 2011-12-01 13:21:29
|
Revision: 3460 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=3460&view=rev Author: lorenz_b Date: 2011-12-01 13:21:18 +0000 (Thu, 01 Dec 2011) Log Message: ----------- Fixed some examples. Modified Paths: -------------- trunk/examples/family/father_owl.conf trunk/examples/family/father_posonly.conf trunk/examples/sparql/Actors.conf trunk/examples/sparql/Actors2.conf trunk/examples/sparql/AristotlePosNeg.conf trunk/examples/sparql/BritishPrimeMinisters.conf trunk/examples/sparql/DBpediaOntology/Actor.conf trunk/examples/sparql/DBpediaYAGOWomanInPolitics.conf trunk/examples/sparql/difference/DBpediaSKOS_kohl_vs_angela.conf trunk/examples/sparql/difference/DifferenceDBpediaYAGO_angela_vs_hillary.conf trunk/examples/sparql/difference/DifferenceDBpediaYAGO_angela_vs_hillary_ignoredConcepts.conf trunk/examples/sparql/difference/DifferenceDBpediaYAGO_hillary_vs_angela.conf trunk/examples/sparql/difference/DifferenceDBpediaYAGO_hillary_vs_angela_ignoredConcepts.conf trunk/examples/sparql/govtrack.conf trunk/examples/sparql/hierarchy/Hierarchy0DBpediaYAGOChancellor_property_monarch.conf trunk/examples/sparql/hierarchy/Hierarchy1DBpediaYAGOChancellor_property_Knight.conf trunk/examples/sparql/moosique.conf trunk/examples/sparql/navigation/NavigationDBpediaYAGOGreekPhilosophers_3_negatives.conf trunk/examples/sparql/navigation/NavigationDBpediaYAGOGreekPhilosophers_4_negatives.conf trunk/examples/sparql/navigation/NavigationDBpediaYAGOGreekPhilosophers_5_negatives.conf trunk/examples/sparql/scrobble.conf Modified: trunk/examples/family/father_owl.conf =================================================================== --- trunk/examples/family/father_owl.conf 2011-12-01 13:03:42 UTC (rev 3459) +++ trunk/examples/family/father_owl.conf 2011-12-01 13:21:18 UTC (rev 3460) @@ -7,11 +7,11 @@ * Copyright (C) 2007, Jens Lehmann */ // declare some prefixes to use as abbreviations -prefixes = [ ("kb","http://localhost/foo#") ] +prefixes = [ ("kb","http://example.com/father#") ] // knowledge source definition ks.type = "OWL File" -ks.url = "father.owl" +ks.fileName = "father.owl" // ks.baseDir = "examples/family"; //Assuming running from parent directory of examples. // reasoner Modified: trunk/examples/family/father_posonly.conf =================================================================== --- trunk/examples/family/father_posonly.conf 2011-12-01 13:03:42 UTC (rev 3459) +++ trunk/examples/family/father_posonly.conf 2011-12-01 13:21:18 UTC (rev 3460) @@ -22,25 +22,14 @@ embeddedReasoner.sources = { ks } // learning problem -lp.type = "posOnlyLP" +lp.type = "posonlylp" lp.positiveExamples = {"kb:markus","kb:stefan","kb:bernd"} // plug a reasoner into the learning problem lp.reasoner = reasoner //lp.reasoner = reasoner - try to remove the component:part in the parser -// create a refinement operator and configure it -op.type = "rho" -op.useCardinalityRestrictions = true -op.reasoner = reasoner - -// create a heuristic and configure it -h.type = "multiheuristic" -h.expansionPenaltyFactor = 0.2 - // create learning algorithm to run -alg.type = "ocel" +alg.type = "celoe" alg.reasoner = reasoner -alg.operator = op -alg.heuristic = h alg.maxExecutionTimeInSeconds = 10 Modified: trunk/examples/sparql/Actors.conf =================================================================== --- trunk/examples/sparql/Actors.conf 2011-12-01 13:03:42 UTC (rev 3459) +++ trunk/examples/sparql/Actors.conf 2011-12-01 13:21:18 UTC (rev 3460) @@ -45,5 +45,3 @@ // we use the OCEL algorithm alg.type = "ocel" -alg.reasoner = reasoner -alg.learningProblem = lp Modified: trunk/examples/sparql/Actors2.conf =================================================================== --- trunk/examples/sparql/Actors2.conf 2011-12-01 13:03:42 UTC (rev 3459) +++ trunk/examples/sparql/Actors2.conf 2011-12-01 13:21:18 UTC (rev 3460) @@ -55,6 +55,5 @@ // we use the OCEL algorithm alg.type = "ocel" alg.reasoner = reasoner -alg.learningProblem = lp alg.operator = op Modified: trunk/examples/sparql/AristotlePosNeg.conf =================================================================== --- trunk/examples/sparql/AristotlePosNeg.conf 2011-12-01 13:03:42 UTC (rev 3459) +++ trunk/examples/sparql/AristotlePosNeg.conf 2011-12-01 13:21:18 UTC (rev 3460) @@ -49,4 +49,3 @@ // we use the OCEL algorithm alg.type = "ocel" alg.reasoner = reasoner -alg.learningProblem = lp Modified: trunk/examples/sparql/BritishPrimeMinisters.conf =================================================================== --- trunk/examples/sparql/BritishPrimeMinisters.conf 2011-12-01 13:03:42 UTC (rev 3459) +++ trunk/examples/sparql/BritishPrimeMinisters.conf 2011-12-01 13:21:18 UTC (rev 3460) @@ -78,7 +78,6 @@ // we use the ocel algorithm alg.type = "ocel" alg.reasoner = reasoner -alg.learningProblem = lp alg.maxExecutionTimeInSeconds = 10 //alg.ignoredConcepts={"http://dbpedia.org/class/yago/Abstainer109758173"} Modified: trunk/examples/sparql/DBpediaOntology/Actor.conf =================================================================== --- trunk/examples/sparql/DBpediaOntology/Actor.conf 2011-12-01 13:03:42 UTC (rev 3459) +++ trunk/examples/sparql/DBpediaOntology/Actor.conf 2011-12-01 13:21:18 UTC (rev 3460) @@ -95,7 +95,6 @@ // we use the ocel algorithm alg.type = "ocel" alg.reasoner = reasoner -alg.learningProblem = lp alg.maxExecutionTimeInSeconds = 10 alg.noisePercentage = 15.0 alg.minExecutionTimeInSeconds = 30 Modified: trunk/examples/sparql/DBpediaYAGOWomanInPolitics.conf =================================================================== --- trunk/examples/sparql/DBpediaYAGOWomanInPolitics.conf 2011-12-01 13:03:42 UTC (rev 3459) +++ trunk/examples/sparql/DBpediaYAGOWomanInPolitics.conf 2011-12-01 13:21:18 UTC (rev 3460) @@ -36,5 +36,4 @@ // we use the OCEL algorithm alg.type = "ocel" alg.reasoner = reasoner -alg.learningProblem = lp Modified: trunk/examples/sparql/difference/DBpediaSKOS_kohl_vs_angela.conf =================================================================== --- trunk/examples/sparql/difference/DBpediaSKOS_kohl_vs_angela.conf 2011-12-01 13:03:42 UTC (rev 3459) +++ trunk/examples/sparql/difference/DBpediaSKOS_kohl_vs_angela.conf 2011-12-01 13:21:18 UTC (rev 3460) @@ -98,5 +98,4 @@ // we use the OCEL algorithm alg.type = "ocel" alg.reasoner = reasoner -alg.learningProblem = lp Modified: trunk/examples/sparql/difference/DifferenceDBpediaYAGO_angela_vs_hillary.conf =================================================================== --- trunk/examples/sparql/difference/DifferenceDBpediaYAGO_angela_vs_hillary.conf 2011-12-01 13:03:42 UTC (rev 3459) +++ trunk/examples/sparql/difference/DifferenceDBpediaYAGO_angela_vs_hillary.conf 2011-12-01 13:21:18 UTC (rev 3460) @@ -43,4 +43,3 @@ // we use the OCEL algorithm alg.type = "ocel" alg.reasoner = reasoner -alg.learningProblem = lp Modified: trunk/examples/sparql/difference/DifferenceDBpediaYAGO_angela_vs_hillary_ignoredConcepts.conf =================================================================== --- trunk/examples/sparql/difference/DifferenceDBpediaYAGO_angela_vs_hillary_ignoredConcepts.conf 2011-12-01 13:03:42 UTC (rev 3459) +++ trunk/examples/sparql/difference/DifferenceDBpediaYAGO_angela_vs_hillary_ignoredConcepts.conf 2011-12-01 13:21:18 UTC (rev 3460) @@ -62,4 +62,3 @@ // we use the OCEL algorithm alg.type = "ocel" alg.reasoner = reasoner -alg.learningProblem = lp Modified: trunk/examples/sparql/difference/DifferenceDBpediaYAGO_hillary_vs_angela.conf =================================================================== --- trunk/examples/sparql/difference/DifferenceDBpediaYAGO_hillary_vs_angela.conf 2011-12-01 13:03:42 UTC (rev 3459) +++ trunk/examples/sparql/difference/DifferenceDBpediaYAGO_hillary_vs_angela.conf 2011-12-01 13:21:18 UTC (rev 3460) @@ -31,4 +31,3 @@ // we use the OCEL algorithm alg.type = "ocel" alg.reasoner = reasoner -alg.learningProblem = lp Modified: trunk/examples/sparql/difference/DifferenceDBpediaYAGO_hillary_vs_angela_ignoredConcepts.conf =================================================================== --- trunk/examples/sparql/difference/DifferenceDBpediaYAGO_hillary_vs_angela_ignoredConcepts.conf 2011-12-01 13:03:42 UTC (rev 3459) +++ trunk/examples/sparql/difference/DifferenceDBpediaYAGO_hillary_vs_angela_ignoredConcepts.conf 2011-12-01 13:21:18 UTC (rev 3460) @@ -75,4 +75,3 @@ // we use the OCEL algorithm alg.type = "ocel" alg.reasoner = reasoner -alg.learningProblem = lp Modified: trunk/examples/sparql/govtrack.conf =================================================================== --- trunk/examples/sparql/govtrack.conf 2011-12-01 13:03:42 UTC (rev 3459) +++ trunk/examples/sparql/govtrack.conf 2011-12-01 13:21:18 UTC (rev 3460) @@ -30,7 +30,6 @@ // we use the CELOE algorithm ocel.type = "ocel" ocel.reasoner = reasoner -ocel.learningProblem = lp ocel.ignoredRoles = { "http://www.w3.org/2002/07/owl#sameAs"} ocel.useHasValueConstructor = true Modified: trunk/examples/sparql/hierarchy/Hierarchy0DBpediaYAGOChancellor_property_monarch.conf =================================================================== --- trunk/examples/sparql/hierarchy/Hierarchy0DBpediaYAGOChancellor_property_monarch.conf 2011-12-01 13:03:42 UTC (rev 3459) +++ trunk/examples/sparql/hierarchy/Hierarchy0DBpediaYAGOChancellor_property_monarch.conf 2011-12-01 13:21:18 UTC (rev 3460) @@ -65,5 +65,4 @@ // we use the OCEL algorithm alg.type = "ocel" alg.reasoner = reasoner -alg.learningProblem = lp alg.operator = op Modified: trunk/examples/sparql/hierarchy/Hierarchy1DBpediaYAGOChancellor_property_Knight.conf =================================================================== --- trunk/examples/sparql/hierarchy/Hierarchy1DBpediaYAGOChancellor_property_Knight.conf 2011-12-01 13:03:42 UTC (rev 3459) +++ trunk/examples/sparql/hierarchy/Hierarchy1DBpediaYAGOChancellor_property_Knight.conf 2011-12-01 13:21:18 UTC (rev 3460) @@ -49,5 +49,4 @@ // we use the OCEL algorithm alg.type = "ocel" alg.reasoner = reasoner -alg.learningProblem = lp alg.operator = op Modified: trunk/examples/sparql/moosique.conf =================================================================== --- trunk/examples/sparql/moosique.conf 2011-12-01 13:03:42 UTC (rev 3459) +++ trunk/examples/sparql/moosique.conf 2011-12-01 13:21:18 UTC (rev 3460) @@ -62,7 +62,6 @@ // we use the CELOE algorithm alg.type = "celoe" alg.reasoner = reasoner -alg.learningProblem = lp // set the start class to the correct type (Record in this case) - not supported yet // celoe.startClass = "http://purl.org/ontology/mo/Record"; // let it run for a short amount of time (we only want simple expressions) Modified: trunk/examples/sparql/navigation/NavigationDBpediaYAGOGreekPhilosophers_3_negatives.conf =================================================================== --- trunk/examples/sparql/navigation/NavigationDBpediaYAGOGreekPhilosophers_3_negatives.conf 2011-12-01 13:03:42 UTC (rev 3459) +++ trunk/examples/sparql/navigation/NavigationDBpediaYAGOGreekPhilosophers_3_negatives.conf 2011-12-01 13:21:18 UTC (rev 3460) @@ -72,4 +72,3 @@ // we use the OCEL algorithm alg.type = "ocel" alg.reasoner = reasoner -alg.learningProblem = lp Modified: trunk/examples/sparql/navigation/NavigationDBpediaYAGOGreekPhilosophers_4_negatives.conf =================================================================== --- trunk/examples/sparql/navigation/NavigationDBpediaYAGOGreekPhilosophers_4_negatives.conf 2011-12-01 13:03:42 UTC (rev 3459) +++ trunk/examples/sparql/navigation/NavigationDBpediaYAGOGreekPhilosophers_4_negatives.conf 2011-12-01 13:21:18 UTC (rev 3460) @@ -74,5 +74,4 @@ // we use the OCEL algorithm alg.type = "ocel" alg.reasoner = reasoner -alg.learningProblem = lp Modified: trunk/examples/sparql/navigation/NavigationDBpediaYAGOGreekPhilosophers_5_negatives.conf =================================================================== --- trunk/examples/sparql/navigation/NavigationDBpediaYAGOGreekPhilosophers_5_negatives.conf 2011-12-01 13:03:42 UTC (rev 3459) +++ trunk/examples/sparql/navigation/NavigationDBpediaYAGOGreekPhilosophers_5_negatives.conf 2011-12-01 13:21:18 UTC (rev 3460) @@ -62,4 +62,3 @@ // we use the OCEL algorithm alg.type = "ocel" alg.reasoner = reasoner -alg.learningProblem = lp Modified: trunk/examples/sparql/scrobble.conf =================================================================== --- trunk/examples/sparql/scrobble.conf 2011-12-01 13:03:42 UTC (rev 3459) +++ trunk/examples/sparql/scrobble.conf 2011-12-01 13:21:18 UTC (rev 3460) @@ -80,20 +80,14 @@ "http://dbtune.org/musicbrainz/resource/artist/a10ca116-02af-4989-9a91-fb25585216f7" } -// plug a reasoner into the learning problem -lp.reasoner = reasoner - // create a refinement operator and configure it op.type = "rho" op.useNegation = false op.useAllConstructor = false op.useCardinalityRestrictions = false -op.reasoner = reasoner ocel.type = "ocel" -ocel.reasoner = reasoner -ocel.learningProblem = lp ocel.operator = op ocel.maxExecutionTimeInSeconds = 10 //ocel.writeSearchTree = true @@ -102,9 +96,3 @@ - - - - - - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lor...@us...> - 2011-12-01 13:03:53
|
Revision: 3459 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=3459&view=rev Author: lorenz_b Date: 2011-12-01 13:03:42 +0000 (Thu, 01 Dec 2011) Log Message: ----------- Fixed some examples. Modified Paths: -------------- trunk/examples/datatypes/stringtyped.conf trunk/examples/family/father_owl.conf trunk/examples/family/father_posonly.conf Modified: trunk/examples/datatypes/stringtyped.conf =================================================================== --- trunk/examples/datatypes/stringtyped.conf 2011-12-01 11:25:16 UTC (rev 3458) +++ trunk/examples/datatypes/stringtyped.conf 2011-12-01 13:03:42 UTC (rev 3459) @@ -26,12 +26,16 @@ "kb:nothing1", "kb:nothing2" } +lp.reasoner = reasoner op.type = "rho" +op.reasoner = reasoner op.useDataHasValueConstructor=true op.useStringDatatypes = true alg.type = "ocel" +alg.reasoner = reasoner +alg.operator = op alg.searchTreeFile = "log/stringTypedTree.txt" // alg.writeSearchTree = true Modified: trunk/examples/family/father_owl.conf =================================================================== --- trunk/examples/family/father_owl.conf 2011-12-01 11:25:16 UTC (rev 3458) +++ trunk/examples/family/father_owl.conf 2011-12-01 13:03:42 UTC (rev 3459) @@ -6,18 +6,42 @@ * * Copyright (C) 2007, Jens Lehmann */ +// declare some prefixes to use as abbreviations +prefixes = [ ("kb","http://localhost/foo#") ] -import("father.owl"); +// knowledge source definition +ks.type = "OWL File" +ks.url = "father.owl" +// ks.baseDir = "examples/family"; //Assuming running from parent directory of examples. -// do not display http://example.com/father# in concepts -// and roles to make the output more readable -hidePrefix = "http://example.com/father#"; +// reasoner +reasoner.type = "fast instance checker" +reasoner.reasonerComponent = embeddedReasoner +embeddedReasoner.type = "OWL API Reasoner" +embeddedReasoner.sources = { ks } -/** examples **/ -+"http://example.com/father#stefan" -+"http://example.com/father#markus" -+"http://example.com/father#martin" --"http://example.com/father#heinz" --"http://example.com/father#anna" --"http://example.com/father#michelle" +// learning problem +lp.type = "posNegStandard" +lp.positiveExamples = {"kb:markus","kb:stefan","kb:martin"} +lp.negativeExamples = {"kb:heinz","kb:anna","kb:michelle"} + +// plug a reasoner into the learning problem +lp.reasoner = reasoner +//lp.reasoner = reasoner - try to remove the component:part in the parser + +// create a refinement operator and configure it +op.type = "rho" +op.useCardinalityRestrictions = true +op.reasoner = reasoner + +// create a heuristic and configure it +h.type = "multiheuristic" +h.expansionPenaltyFactor = 0.2 + +// create learning algorithm to run +alg.type = "ocel" +alg.reasoner = reasoner +alg.operator = op +alg.heuristic = h +alg.maxExecutionTimeInSeconds = 15 \ No newline at end of file Modified: trunk/examples/family/father_posonly.conf =================================================================== --- trunk/examples/family/father_posonly.conf 2011-12-01 11:25:16 UTC (rev 3458) +++ trunk/examples/family/father_posonly.conf 2011-12-01 13:03:42 UTC (rev 3459) @@ -1,19 +1,46 @@ /** - * Father Example + * Another Father Example (this time using OWL import) * - * possible solution: + * possible solution: * male AND EXISTS hasChild.TOP * - * Copyright (C) 2007-2009, Jens Lehmann + * Copyright (C) 2007, Jens Lehmann */ +// declare some prefixes to use as abbreviations +prefixes = [ ("kb","http://localhost/foo#") ] -/** settings **/ -import("father.kb"); -problem = posOnlyLP; -algorithm = celoe; -celoe.maxExecutionTimeInSeconds = 1; +// knowledge source definition +ks.type = "KB File" +ks.url = "father.kb" +// ks.baseDir = "examples/family"; //Assuming running from parent directory of examples. -/** examples **/ -+stefan -+markus -+bernd +// reasoner +reasoner.type = "fast instance checker" +reasoner.reasonerComponent = embeddedReasoner + +embeddedReasoner.type = "OWL API Reasoner" +embeddedReasoner.sources = { ks } + +// learning problem +lp.type = "posOnlyLP" +lp.positiveExamples = {"kb:markus","kb:stefan","kb:bernd"} + +// plug a reasoner into the learning problem +lp.reasoner = reasoner +//lp.reasoner = reasoner - try to remove the component:part in the parser + +// create a refinement operator and configure it +op.type = "rho" +op.useCardinalityRestrictions = true +op.reasoner = reasoner + +// create a heuristic and configure it +h.type = "multiheuristic" +h.expansionPenaltyFactor = 0.2 + +// create learning algorithm to run +alg.type = "ocel" +alg.reasoner = reasoner +alg.operator = op +alg.heuristic = h +alg.maxExecutionTimeInSeconds = 10 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jen...@us...> - 2011-12-01 11:25:23
|
Revision: 3458 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=3458&view=rev Author: jenslehmann Date: 2011-12-01 11:25:16 +0000 (Thu, 01 Dec 2011) Log Message: ----------- extended Manchester Syntax Parser such that < and > are now optional for URIs Modified Paths: -------------- trunk/components-core/src/main/java/org/dllearner/core/config/ClassExpressionPropertyEditor.java trunk/components-core/src/main/java/org/dllearner/parser/ManchesterSyntaxParser.java trunk/components-core/src/main/java/org/dllearner/parser/ManchesterSyntaxParserConstants.java trunk/components-core/src/main/java/org/dllearner/parser/ManchesterSyntaxParserTokenManager.java trunk/components-core/src/main/java/org/dllearner/parser/manchester.jj Modified: trunk/components-core/src/main/java/org/dllearner/core/config/ClassExpressionPropertyEditor.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/core/config/ClassExpressionPropertyEditor.java 2011-12-01 11:01:47 UTC (rev 3457) +++ trunk/components-core/src/main/java/org/dllearner/core/config/ClassExpressionPropertyEditor.java 2011-12-01 11:25:16 UTC (rev 3458) @@ -71,8 +71,10 @@ @Override public void setAsText(String arg0) throws IllegalArgumentException { // we assume that the start class string is given in Manchester syntax +// System.out.println("parser string: " + arg0); try { description = ManchesterSyntaxParser.parseClassExpression(arg0); +// System.out.println("parsed: " + description); } catch (ParseException e) { throw new IllegalArgumentException(e); } Modified: trunk/components-core/src/main/java/org/dllearner/parser/ManchesterSyntaxParser.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/parser/ManchesterSyntaxParser.java 2011-12-01 11:01:47 UTC (rev 3457) +++ trunk/components-core/src/main/java/org/dllearner/parser/ManchesterSyntaxParser.java 2011-12-01 11:25:16 UTC (rev 3458) @@ -28,32 +28,32 @@ default: jj_la1[0] = jj_gen; if (jj_2_1(2147483647)) { - jj_consume_token(21); + jj_consume_token(22); c1 = ClassExpression(); jj_consume_token(AND); c2 = ClassExpression(); - jj_consume_token(22); + jj_consume_token(23); {if (true) return new Intersection(c1,c2);} } else if (jj_2_2(2147483647)) { - jj_consume_token(21); + jj_consume_token(22); c1 = ClassExpression(); jj_consume_token(OR); c2 = ClassExpression(); - jj_consume_token(22); + jj_consume_token(23); {if (true) return new Union(c1,c2);} } else if (jj_2_3(2147483647)) { - jj_consume_token(21); + jj_consume_token(22); s = URI(); jj_consume_token(SOME); c = ClassExpression(); - jj_consume_token(22); + jj_consume_token(23); {if (true) return new ObjectSomeRestriction(new ObjectProperty(s),c);} } else if (jj_2_4(2147483647)) { - jj_consume_token(21); + jj_consume_token(22); s = URI(); jj_consume_token(ONLY); c = ClassExpression(); - jj_consume_token(22); + jj_consume_token(23); {if (true) return new ObjectAllRestriction(new ObjectProperty(s),c);} } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { @@ -66,7 +66,7 @@ jj_consume_token(GE); i = Integer(); s = URI(); - jj_consume_token(23); + jj_consume_token(24); c = ClassExpression(); {if (true) return new ObjectMinCardinalityRestriction(i,new ObjectProperty(s),c);} break; @@ -74,29 +74,30 @@ jj_consume_token(LE); i = Integer(); s = URI(); - jj_consume_token(23); + jj_consume_token(24); c = ClassExpression(); {if (true) return new ObjectMaxCardinalityRestriction(i,new ObjectProperty(s),c);} break; default: jj_la1[1] = jj_gen; if (jj_2_5(4)) { - jj_consume_token(21); + jj_consume_token(22); s1 = URI(); - jj_consume_token(24); + jj_consume_token(25); s2 = URI(); - jj_consume_token(22); + jj_consume_token(23); {if (true) return new ObjectValueRestriction(new ObjectProperty(s1), new Individual(s2));} } else if (jj_2_6(4)) { - jj_consume_token(21); + jj_consume_token(22); s1 = URI(); - jj_consume_token(24); + jj_consume_token(25); s2 = String(); - jj_consume_token(22); + jj_consume_token(23); {if (true) return new StringValueRestriction(new DatatypeProperty(s1), s2);} } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case URI: + case URI_PREFIX: s = URI(); {if (true) return new NamedClass(s);} break; @@ -140,11 +141,24 @@ final public String URI() throws ParseException { Token t; String s; - t = jj_consume_token(URI); + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case URI_PREFIX: + // LOOKAHEAD("<") + t = jj_consume_token(URI_PREFIX); // cut "<" and ">" s = t.image; s = s.substring(1, s.length() - 1); {if (true) return s;} + break; + case URI: + t = jj_consume_token(URI); + {if (true) return t.image;} + break; + default: + jj_la1[3] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } throw new Error("Missing return statement in function"); } @@ -190,30 +204,21 @@ finally { jj_save(5, xla); } } - private boolean jj_3R_8() { - if (jj_scan_token(21)) return true; - if (jj_3R_2()) return true; - if (jj_scan_token(SOME)) return true; - if (jj_3R_1()) return true; + private boolean jj_3R_7() { if (jj_scan_token(22)) return true; - return false; - } - - private boolean jj_3R_7() { - if (jj_scan_token(21)) return true; if (jj_3R_1()) return true; if (jj_scan_token(OR)) return true; if (jj_3R_1()) return true; - if (jj_scan_token(22)) return true; + if (jj_scan_token(23)) return true; return false; } private boolean jj_3R_6() { - if (jj_scan_token(21)) return true; + if (jj_scan_token(22)) return true; if (jj_3R_1()) return true; if (jj_scan_token(AND)) return true; if (jj_3R_1()) return true; - if (jj_scan_token(22)) return true; + if (jj_scan_token(23)) return true; return false; } @@ -267,48 +272,63 @@ return false; } - private boolean jj_3R_14() { + private boolean jj_3R_16() { if (jj_scan_token(NUMBER)) return true; return false; } + private boolean jj_3R_15() { + if (jj_scan_token(URI)) return true; + return false; + } + private boolean jj_3R_13() { if (jj_3R_2()) return true; return false; } + private boolean jj_3R_14() { + if (jj_scan_token(URI_PREFIX)) return true; + return false; + } + private boolean jj_3R_2() { - if (jj_scan_token(URI)) return true; + Token xsp; + xsp = jj_scanpos; + if (jj_3R_14()) { + jj_scanpos = xsp; + if (jj_3R_15()) return true; + } return false; } private boolean jj_3_6() { - if (jj_scan_token(21)) return true; + if (jj_scan_token(22)) return true; if (jj_3R_2()) return true; - if (jj_scan_token(24)) return true; + if (jj_scan_token(25)) return true; if (jj_3R_3()) return true; - if (jj_scan_token(22)) return true; + if (jj_scan_token(23)) return true; return false; } private boolean jj_3_4() { - if (jj_scan_token(21)) return true; + if (jj_scan_token(22)) return true; if (jj_3R_2()) return true; if (jj_scan_token(ONLY)) return true; return false; } private boolean jj_3_5() { - if (jj_scan_token(21)) return true; + if (jj_scan_token(22)) return true; if (jj_3R_2()) return true; - if (jj_scan_token(24)) return true; + if (jj_scan_token(25)) return true; if (jj_3R_2()) return true; - if (jj_scan_token(22)) return true; + if (jj_scan_token(23)) return true; return false; } private boolean jj_3_3() { - if (jj_scan_token(21)) return true; + if (jj_scan_token(22)) return true; if (jj_3R_2()) return true; if (jj_scan_token(SOME)) return true; return false; @@ -316,15 +336,15 @@ private boolean jj_3R_12() { if (jj_scan_token(LE)) return true; - if (jj_3R_14()) return true; + if (jj_3R_16()) return true; if (jj_3R_2()) return true; - if (jj_scan_token(23)) return true; + if (jj_scan_token(24)) return true; if (jj_3R_1()) return true; return false; } private boolean jj_3_2() { - if (jj_scan_token(21)) return true; + if (jj_scan_token(22)) return true; if (jj_3R_1()) return true; if (jj_scan_token(OR)) return true; return false; @@ -332,9 +352,9 @@ private boolean jj_3R_11() { if (jj_scan_token(GE)) return true; - if (jj_3R_14()) return true; + if (jj_3R_16()) return true; if (jj_3R_2()) return true; - if (jj_scan_token(23)) return true; + if (jj_scan_token(24)) return true; if (jj_3R_1()) return true; return false; } @@ -346,18 +366,18 @@ } private boolean jj_3_1() { - if (jj_scan_token(21)) return true; + if (jj_scan_token(22)) return true; if (jj_3R_1()) return true; if (jj_scan_token(AND)) return true; return false; } private boolean jj_3R_9() { - if (jj_scan_token(21)) return true; + if (jj_scan_token(22)) return true; if (jj_3R_2()) return true; if (jj_scan_token(ONLY)) return true; if (jj_3R_1()) return true; - if (jj_scan_token(22)) return true; + if (jj_scan_token(23)) return true; return false; } @@ -366,6 +386,15 @@ return false; } + private boolean jj_3R_8() { + if (jj_scan_token(22)) return true; + if (jj_3R_2()) return true; + if (jj_scan_token(SOME)) return true; + if (jj_3R_1()) return true; + if (jj_scan_token(23)) return true; + return false; + } + /** Generated Token Manager. */ public ManchesterSyntaxParserTokenManager token_source; SimpleCharStream jj_input_stream; @@ -377,13 +406,13 @@ private Token jj_scanpos, jj_lastpos; private int jj_la; private int jj_gen; - final private int[] jj_la1 = new int[3]; + final private int[] jj_la1 = new int[4]; static private int[] jj_la1_0; static { jj_la1_init_0(); } private static void jj_la1_init_0() { - jj_la1_0 = new int[] {0xc00,0x70000,0x100000,}; + jj_la1_0 = new int[] {0xc00,0x70000,0x300000,0x300000,}; } final private JJCalls[] jj_2_rtns = new JJCalls[6]; private boolean jj_rescan = false; @@ -400,7 +429,7 @@ token = new Token(); jj_ntk = -1; jj_gen = 0; - for (int i = 0; i < 3; i++) jj_la1[i] = -1; + for (int i = 0; i < 4; i++) jj_la1[i] = -1; for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); } @@ -415,7 +444,7 @@ token = new Token(); jj_ntk = -1; jj_gen = 0; - for (int i = 0; i < 3; i++) jj_la1[i] = -1; + for (int i = 0; i < 4; i++) jj_la1[i] = -1; for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); } @@ -426,7 +455,7 @@ token = new Token(); jj_ntk = -1; jj_gen = 0; - for (int i = 0; i < 3; i++) jj_la1[i] = -1; + for (int i = 0; i < 4; i++) jj_la1[i] = -1; for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); } @@ -437,7 +466,7 @@ token = new Token(); jj_ntk = -1; jj_gen = 0; - for (int i = 0; i < 3; i++) jj_la1[i] = -1; + for (int i = 0; i < 4; i++) jj_la1[i] = -1; for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); } @@ -447,7 +476,7 @@ token = new Token(); jj_ntk = -1; jj_gen = 0; - for (int i = 0; i < 3; i++) jj_la1[i] = -1; + for (int i = 0; i < 4; i++) jj_la1[i] = -1; for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); } @@ -457,7 +486,7 @@ token = new Token(); jj_ntk = -1; jj_gen = 0; - for (int i = 0; i < 3; i++) jj_la1[i] = -1; + for (int i = 0; i < 4; i++) jj_la1[i] = -1; for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); } @@ -569,12 +598,12 @@ /** Generate ParseException. */ public ParseException generateParseException() { jj_expentries.clear(); - boolean[] la1tokens = new boolean[25]; + boolean[] la1tokens = new boolean[26]; if (jj_kind >= 0) { la1tokens[jj_kind] = true; jj_kind = -1; } - for (int i = 0; i < 3; i++) { + for (int i = 0; i < 4; i++) { if (jj_la1[i] == jj_gen) { for (int j = 0; j < 32; j++) { if ((jj_la1_0[i] & (1<<j)) != 0) { @@ -583,7 +612,7 @@ } } } - for (int i = 0; i < 25; i++) { + for (int i = 0; i < 26; i++) { if (la1tokens[i]) { jj_expentry = new int[1]; jj_expentry[0] = i; Modified: trunk/components-core/src/main/java/org/dllearner/parser/ManchesterSyntaxParserConstants.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/parser/ManchesterSyntaxParserConstants.java 2011-12-01 11:01:47 UTC (rev 3457) +++ trunk/components-core/src/main/java/org/dllearner/parser/ManchesterSyntaxParserConstants.java 2011-12-01 11:25:16 UTC (rev 3458) @@ -42,6 +42,8 @@ int STRING = 19; /** RegularExpression Id. */ int URI = 20; + /** RegularExpression Id. */ + int URI_PREFIX = 21; /** Lexical state. */ int DEFAULT = 0; @@ -69,6 +71,7 @@ "\"<=\"", "<STRING>", "<URI>", + "<URI_PREFIX>", "\"(\"", "\")\"", "\".\"", Modified: trunk/components-core/src/main/java/org/dllearner/parser/ManchesterSyntaxParserTokenManager.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/parser/ManchesterSyntaxParserTokenManager.java 2011-12-01 11:01:47 UTC (rev 3457) +++ trunk/components-core/src/main/java/org/dllearner/parser/ManchesterSyntaxParserTokenManager.java 2011-12-01 11:25:16 UTC (rev 3458) @@ -18,12 +18,28 @@ { case 0: if ((active0 & 0x40000L) != 0L) - return 34; + return 39; + if ((active0 & 0x3c1fc06L) != 0L) + return 40; return -1; case 1: if ((active0 & 0x40000L) != 0L) - return 34; + return 39; + if ((active0 & 0x201fc00L) != 0L) + return 40; return -1; + case 2: + if ((active0 & 0x201dc00L) != 0L) + return 40; + return -1; + case 3: + if ((active0 & 0x200c800L) != 0L) + return 40; + return -1; + case 4: + if ((active0 & 0x2000800L) != 0L) + return 40; + return -1; default : return -1; } @@ -42,12 +58,16 @@ { switch(curChar) { + case 9: + return jjStartNfaWithStates_0(0, 2, 40); + case 32: + return jjStartNfaWithStates_0(0, 1, 40); case 40: - return jjStopAtPos(0, 21); + return jjStartNfaWithStates_0(0, 22, 40); case 41: - return jjStopAtPos(0, 22); + return jjStartNfaWithStates_0(0, 23, 40); case 46: - return jjStopAtPos(0, 23); + return jjStartNfaWithStates_0(0, 24, 40); case 60: return jjMoveStringLiteralDfa1_0(0x40000L); case 62: @@ -65,7 +85,7 @@ case 115: return jjMoveStringLiteralDfa1_0(0x4000L); case 118: - return jjMoveStringLiteralDfa1_0(0x1000000L); + return jjMoveStringLiteralDfa1_0(0x2000000L); default : return jjMoveNfa_0(0, 0); } @@ -83,19 +103,19 @@ if ((active0 & 0x20000L) != 0L) return jjStopAtPos(1, 17); else if ((active0 & 0x40000L) != 0L) - return jjStartNfaWithStates_0(1, 18, 34); + return jjStartNfaWithStates_0(1, 18, 39); break; case 79: return jjMoveStringLiteralDfa2_0(active0, 0xc00L); case 97: - return jjMoveStringLiteralDfa2_0(active0, 0x1000000L); + return jjMoveStringLiteralDfa2_0(active0, 0x2000000L); case 110: return jjMoveStringLiteralDfa2_0(active0, 0x9000L); case 111: return jjMoveStringLiteralDfa2_0(active0, 0x14000L); case 114: if ((active0 & 0x2000L) != 0L) - return jjStopAtPos(1, 13); + return jjStartNfaWithStates_0(1, 13, 40); break; default : break; @@ -115,21 +135,21 @@ { case 80: if ((active0 & 0x400L) != 0L) - return jjStopAtPos(2, 10); + return jjStartNfaWithStates_0(2, 10, 40); break; case 84: return jjMoveStringLiteralDfa3_0(active0, 0x800L); case 100: if ((active0 & 0x1000L) != 0L) - return jjStopAtPos(2, 12); + return jjStartNfaWithStates_0(2, 12, 40); break; case 108: - return jjMoveStringLiteralDfa3_0(active0, 0x1008000L); + return jjMoveStringLiteralDfa3_0(active0, 0x2008000L); case 109: return jjMoveStringLiteralDfa3_0(active0, 0x4000L); case 116: if ((active0 & 0x10000L) != 0L) - return jjStopAtPos(2, 16); + return jjStartNfaWithStates_0(2, 16, 40); break; default : break; @@ -151,13 +171,13 @@ return jjMoveStringLiteralDfa4_0(active0, 0x800L); case 101: if ((active0 & 0x4000L) != 0L) - return jjStopAtPos(3, 14); + return jjStartNfaWithStates_0(3, 14, 40); break; case 117: - return jjMoveStringLiteralDfa4_0(active0, 0x1000000L); + return jjMoveStringLiteralDfa4_0(active0, 0x2000000L); case 121: if ((active0 & 0x8000L) != 0L) - return jjStopAtPos(3, 15); + return jjStartNfaWithStates_0(3, 15, 40); break; default : break; @@ -178,8 +198,8 @@ case 79: return jjMoveStringLiteralDfa5_0(active0, 0x800L); case 101: - if ((active0 & 0x1000000L) != 0L) - return jjStopAtPos(4, 24); + if ((active0 & 0x2000000L) != 0L) + return jjStartNfaWithStates_0(4, 25, 40); break; default : break; @@ -199,7 +219,7 @@ { case 77: if ((active0 & 0x800L) != 0L) - return jjStopAtPos(5, 11); + return jjStartNfaWithStates_0(5, 11, 40); break; default : break; @@ -220,7 +240,7 @@ private int jjMoveNfa_0(int startState, int curPos) { int startsAt = 0; - jjnewStateCnt = 34; + jjnewStateCnt = 39; int i = 1; jjstateSet[0] = startState; int kind = 0x7fffffff; @@ -235,7 +255,27 @@ { switch(jjstateSet[--i]) { + case 39: + if ((0xbfffffffffffdbffL & l) != 0L) + jjCheckNAddTwoStates(10, 11); + if (curChar == 58) + jjCheckNAddTwoStates(12, 13); + break; + case 40: + if ((0xafffffffffffdbffL & l) != 0L) + jjCheckNAddTwoStates(6, 7); + if (curChar == 58) + { + if (kind > 20) + kind = 20; + jjCheckNAdd(8); + } + break; case 0: + if ((0xafffffffffffdbffL & l) != 0L) + jjCheckNAddTwoStates(6, 7); + else if (curChar == 60) + jjCheckNAddTwoStates(10, 11); if ((0x3fe000000000000L & l) != 0L) { if (kind > 8) @@ -246,26 +286,21 @@ { if (kind > 8) kind = 8; - jjCheckNAdd(31); + jjCheckNAdd(36); } else if (curChar == 47) jjAddStates(3, 5); - else if (curChar == 60) - jjCheckNAddTwoStates(7, 8); + else if (curChar == 58) + { + if (kind > 20) + kind = 20; + jjCheckNAdd(8); + } else if (curChar == 39) jjCheckNAddTwoStates(4, 5); else if (curChar == 34) jjCheckNAddTwoStates(1, 2); break; - case 34: - if ((0xbfffffffffffdbffL & l) != 0L) - jjCheckNAddTwoStates(7, 8); - else if (curChar == 62) - { - if (kind > 20) - kind = 20; - } - break; case 1: if ((0xfffffffbffffdbffL & l) != 0L) jjCheckNAddTwoStates(1, 2); @@ -287,131 +322,157 @@ kind = 19; break; case 6: - if (curChar == 60) - jjCheckNAddTwoStates(7, 8); + if ((0xafffffffffffdbffL & l) != 0L) + jjCheckNAddTwoStates(6, 7); break; case 7: - if ((0xbfffffffffffdbffL & l) != 0L) - jjCheckNAddTwoStates(7, 8); + if (curChar != 58) + break; + if (kind > 20) + kind = 20; + jjCheckNAdd(8); break; case 8: - if (curChar == 62 && kind > 20) + if ((0xafffffffffffdbffL & l) == 0L) + break; + if (kind > 20) kind = 20; + jjCheckNAdd(8); break; case 9: + if (curChar == 60) + jjCheckNAddTwoStates(10, 11); + break; + case 10: + if ((0xbfffffffffffdbffL & l) != 0L) + jjCheckNAddTwoStates(10, 11); + break; + case 11: + if (curChar == 58) + jjCheckNAddTwoStates(12, 13); + break; + case 12: + if ((0xbfffffffffffdbffL & l) != 0L) + jjCheckNAddTwoStates(12, 13); + break; + case 13: + if (curChar == 62 && kind > 21) + kind = 21; + break; + case 14: if (curChar == 47) jjAddStates(3, 5); break; - case 10: + case 15: if (curChar == 47) jjCheckNAddStates(6, 8); break; - case 11: + case 16: if ((0xffffffffffffdbffL & l) != 0L) jjCheckNAddStates(6, 8); break; - case 12: + case 17: if ((0x2400L & l) != 0L && kind > 5) kind = 5; break; - case 13: + case 18: if (curChar == 10 && kind > 5) kind = 5; break; - case 14: + case 19: if (curChar == 13) - jjstateSet[jjnewStateCnt++] = 13; + jjstateSet[jjnewStateCnt++] = 18; break; - case 15: + case 20: if (curChar == 42) - jjCheckNAddTwoStates(16, 17); + jjCheckNAddTwoStates(21, 22); break; - case 16: + case 21: if ((0xfffffbffffffffffL & l) != 0L) - jjCheckNAddTwoStates(16, 17); + jjCheckNAddTwoStates(21, 22); break; - case 17: + case 22: if (curChar == 42) jjCheckNAddStates(9, 11); break; - case 18: + case 23: if ((0xffff7bffffffffffL & l) != 0L) - jjCheckNAddTwoStates(19, 17); + jjCheckNAddTwoStates(24, 22); break; - case 19: + case 24: if ((0xfffffbffffffffffL & l) != 0L) - jjCheckNAddTwoStates(19, 17); + jjCheckNAddTwoStates(24, 22); break; - case 20: + case 25: if (curChar == 47 && kind > 6) kind = 6; break; - case 21: + case 26: if (curChar == 42) - jjstateSet[jjnewStateCnt++] = 15; + jjstateSet[jjnewStateCnt++] = 20; break; - case 22: + case 27: if (curChar == 42) - jjCheckNAddTwoStates(23, 24); + jjCheckNAddTwoStates(28, 29); break; - case 23: + case 28: if ((0xfffffbffffffffffL & l) != 0L) - jjCheckNAddTwoStates(23, 24); + jjCheckNAddTwoStates(28, 29); break; - case 24: + case 29: if (curChar == 42) jjCheckNAddStates(12, 14); break; - case 25: + case 30: if ((0xffff7bffffffffffL & l) != 0L) - jjCheckNAddTwoStates(26, 24); + jjCheckNAddTwoStates(31, 29); break; - case 26: + case 31: if ((0xfffffbffffffffffL & l) != 0L) - jjCheckNAddTwoStates(26, 24); + jjCheckNAddTwoStates(31, 29); break; - case 27: + case 32: if (curChar == 47 && kind > 7) kind = 7; break; - case 28: + case 33: if ((0x3fe000000000000L & l) == 0L) break; if (kind > 8) kind = 8; jjCheckNAddStates(0, 2); break; - case 29: + case 34: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 8) kind = 8; - jjCheckNAdd(29); + jjCheckNAdd(34); break; - case 30: + case 35: if ((0x3ff000000000000L & l) != 0L) - jjCheckNAddTwoStates(30, 31); + jjCheckNAddTwoStates(35, 36); break; - case 31: + case 36: if (curChar != 46) break; if (kind > 9) kind = 9; - jjCheckNAdd(32); + jjCheckNAdd(37); break; - case 32: + case 37: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 9) kind = 9; - jjCheckNAdd(32); + jjCheckNAdd(37); break; - case 33: + case 38: if (curChar != 48) break; if (kind > 8) kind = 8; - jjCheckNAdd(31); + jjCheckNAdd(36); break; default : break; } @@ -424,11 +485,20 @@ { switch(jjstateSet[--i]) { - case 34: - case 7: + case 39: + case 10: if ((0xffffffffefffffffL & l) != 0L) - jjCheckNAddTwoStates(7, 8); + jjCheckNAddTwoStates(10, 11); break; + case 40: + case 6: + if ((0xffffffffefffffffL & l) != 0L) + jjCheckNAddTwoStates(6, 7); + break; + case 0: + if ((0xffffffffefffffffL & l) != 0L) + jjCheckNAddTwoStates(6, 7); + break; case 1: if ((0xffffffffefffffffL & l) != 0L) jjAddStates(15, 16); @@ -437,23 +507,34 @@ if ((0xffffffffefffffffL & l) != 0L) jjAddStates(17, 18); break; - case 11: - jjAddStates(6, 8); + case 8: + if ((0xffffffffefffffffL & l) == 0L) + break; + if (kind > 20) + kind = 20; + jjstateSet[jjnewStateCnt++] = 8; break; + case 12: + if ((0xffffffffefffffffL & l) != 0L) + jjAddStates(19, 20); + break; case 16: - jjCheckNAddTwoStates(16, 17); + jjAddStates(6, 8); break; - case 18: - case 19: - jjCheckNAddTwoStates(19, 17); + case 21: + jjCheckNAddTwoStates(21, 22); break; case 23: - jjCheckNAddTwoStates(23, 24); + case 24: + jjCheckNAddTwoStates(24, 22); break; - case 25: - case 26: - jjCheckNAddTwoStates(26, 24); + case 28: + jjCheckNAddTwoStates(28, 29); break; + case 30: + case 31: + jjCheckNAddTwoStates(31, 29); + break; default : break; } } while(i != startsAt); @@ -466,11 +547,20 @@ { switch(jjstateSet[--i]) { - case 34: - case 7: + case 39: + case 10: if ((jjbitVec0[i2] & l2) != 0L) - jjCheckNAddTwoStates(7, 8); + jjCheckNAddTwoStates(10, 11); break; + case 40: + case 6: + if ((jjbitVec0[i2] & l2) != 0L) + jjCheckNAddTwoStates(6, 7); + break; + case 0: + if ((jjbitVec0[i2] & l2) != 0L) + jjCheckNAddTwoStates(6, 7); + break; case 1: if ((jjbitVec0[i2] & l2) != 0L) jjAddStates(15, 16); @@ -479,28 +569,39 @@ if ((jjbitVec0[i2] & l2) != 0L) jjAddStates(17, 18); break; - case 11: + case 8: + if ((jjbitVec0[i2] & l2) == 0L) + break; + if (kind > 20) + kind = 20; + jjstateSet[jjnewStateCnt++] = 8; + break; + case 12: if ((jjbitVec0[i2] & l2) != 0L) - jjAddStates(6, 8); + jjAddStates(19, 20); break; case 16: if ((jjbitVec0[i2] & l2) != 0L) - jjCheckNAddTwoStates(16, 17); + jjAddStates(6, 8); break; - case 18: - case 19: + case 21: if ((jjbitVec0[i2] & l2) != 0L) - jjCheckNAddTwoStates(19, 17); + jjCheckNAddTwoStates(21, 22); break; case 23: + case 24: if ((jjbitVec0[i2] & l2) != 0L) - jjCheckNAddTwoStates(23, 24); + jjCheckNAddTwoStates(24, 22); break; - case 25: - case 26: + case 28: if ((jjbitVec0[i2] & l2) != 0L) - jjCheckNAddTwoStates(26, 24); + jjCheckNAddTwoStates(28, 29); break; + case 30: + case 31: + if ((jjbitVec0[i2] & l2) != 0L) + jjCheckNAddTwoStates(31, 29); + break; default : break; } } while(i != startsAt); @@ -512,36 +613,37 @@ kind = 0x7fffffff; } ++curPos; - if ((i = jjnewStateCnt) == (startsAt = 34 - (jjnewStateCnt = startsAt))) + if ((i = jjnewStateCnt) == (startsAt = 39 - (jjnewStateCnt = startsAt))) return curPos; try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { return curPos; } } } static final int[] jjnextStates = { - 29, 30, 31, 10, 21, 22, 11, 12, 14, 17, 18, 20, 24, 25, 27, 1, - 2, 4, 5, + 34, 35, 36, 15, 26, 27, 16, 17, 19, 22, 23, 25, 29, 30, 32, 1, + 2, 4, 5, 12, 13, }; /** Token literal values. */ public static final String[] jjstrLiteralImages = { "", null, null, null, null, null, null, null, null, null, "\124\117\120", "\102\117\124\124\117\115", "\141\156\144", "\157\162", "\163\157\155\145", "\157\156\154\171", -"\156\157\164", "\76\75", "\74\75", null, null, "\50", "\51", "\56", "\166\141\154\165\145", }; +"\156\157\164", "\76\75", "\74\75", null, null, null, "\50", "\51", "\56", +"\166\141\154\165\145", }; /** Lexer state names. */ public static final String[] lexStateNames = { "DEFAULT", }; static final long[] jjtoToken = { - 0x1ffff01L, + 0x3ffff01L, }; static final long[] jjtoSkip = { 0xfeL, }; protected SimpleCharStream input_stream; -private final int[] jjrounds = new int[34]; -private final int[] jjstateSet = new int[68]; +private final int[] jjrounds = new int[39]; +private final int[] jjstateSet = new int[78]; protected char curChar; /** Constructor. */ public ManchesterSyntaxParserTokenManager(SimpleCharStream stream){ @@ -568,7 +670,7 @@ { int i; jjround = 0x80000001; - for (i = 34; i-- > 0;) + for (i = 39; i-- > 0;) jjrounds[i] = 0x80000000; } @@ -640,7 +742,7 @@ } try { input_stream.backup(0); - while (curChar <= 32 && (0x100002600L & (1L << curChar)) != 0L) + while (curChar <= 13 && (0x2400L & (1L << curChar)) != 0L) curChar = input_stream.BeginToken(); } catch (java.io.IOException e1) { continue EOFLoop; } Modified: trunk/components-core/src/main/java/org/dllearner/parser/manchester.jj =================================================================== --- trunk/components-core/src/main/java/org/dllearner/parser/manchester.jj 2011-12-01 11:01:47 UTC (rev 3457) +++ trunk/components-core/src/main/java/org/dllearner/parser/manchester.jj 2011-12-01 11:25:16 UTC (rev 3458) @@ -66,7 +66,10 @@ | < LE: "<=" > // support single quotes and double quotes | < STRING: "\"" (~["\"","\\","\n","\r"])* "\"" | "'" (~["\"","\\","\n","\r"])* "'"> - | < URI: "<" (~[">","\\","\n","\r"])* ">" > +// | < URI: "<" (~[">","\\","\n","\r"])* ">" > + | < URI: (~["<",">","\\","\n","\r"])* ":" (~["<",">","\\","\n","\r"])* > + | < URI_PREFIX: "<" (~[">","\\","\n","\r"])* ":" (~[">","\\","\n","\r"])* ">" > +// | <URI: ["<"] (~[ ">","<", "\"", "{", "}", "^", "\\", "|", "`", "\u0000"-"\u0020"])* ">"? > } Description ClassExpression() : @@ -150,11 +153,13 @@ String s; } { - t=<URI> + // LOOKAHEAD("<") + t=<URI_PREFIX> { // cut "<" and ">" s = t.image; s = s.substring(1, s.length() - 1); return s; } + | t=<URI> { return t.image; } } \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |