diff options
| author | RncLsn <rnc.lsn@gmail.com> | 2015-05-19 13:35:52 +0100 |
|---|---|---|
| committer | RncLsn <rnc.lsn@gmail.com> | 2015-05-19 13:35:52 +0100 |
| commit | 5d54af2638a53721b414a41356a93686a9616272 (patch) | |
| tree | e28c64b1887e7e964661d12d96df5b09abd4d9ee /test/uk/ac/ox/cs/hermit | |
| parent | c7dbc7c61c7094ea4ec49bd630023f23b92fd9d1 (diff) | |
| download | ACQuA-5d54af2638a53721b414a41356a93686a9616272.tar.gz ACQuA-5d54af2638a53721b414a41356a93686a9616272.zip | |
Backup before changes in MyQueryReasoner.
Diffstat (limited to 'test/uk/ac/ox/cs/hermit')
| -rw-r--r-- | test/uk/ac/ox/cs/hermit/HermitQueryReasoner.java | 48 | ||||
| -rw-r--r-- | test/uk/ac/ox/cs/hermit/JAIR_HermiT.java | 20 |
2 files changed, 24 insertions, 44 deletions
diff --git a/test/uk/ac/ox/cs/hermit/HermitQueryReasoner.java b/test/uk/ac/ox/cs/hermit/HermitQueryReasoner.java index f6246f8..008fcb2 100644 --- a/test/uk/ac/ox/cs/hermit/HermitQueryReasoner.java +++ b/test/uk/ac/ox/cs/hermit/HermitQueryReasoner.java | |||
| @@ -1,43 +1,21 @@ | |||
| 1 | package uk.ac.ox.cs.hermit; | 1 | package uk.ac.ox.cs.hermit; |
| 2 | 2 | ||
| 3 | import java.io.File; | ||
| 4 | import java.io.FileNotFoundException; | ||
| 5 | import java.io.FileOutputStream; | ||
| 6 | import java.io.IOException; | ||
| 7 | import java.io.PrintStream; | ||
| 8 | import java.util.HashSet; | ||
| 9 | import java.util.Set; | ||
| 10 | import java.util.concurrent.Callable; | ||
| 11 | import java.util.concurrent.ExecutionException; | ||
| 12 | import java.util.concurrent.ExecutorService; | ||
| 13 | import java.util.concurrent.Executors; | ||
| 14 | import java.util.concurrent.Future; | ||
| 15 | import java.util.concurrent.TimeUnit; | ||
| 16 | import java.util.concurrent.TimeoutException; | ||
| 17 | |||
| 18 | import org.semanticweb.HermiT.Reasoner; | 3 | import org.semanticweb.HermiT.Reasoner; |
| 19 | import org.semanticweb.HermiT.model.Atom; | 4 | import org.semanticweb.HermiT.model.Atom; |
| 20 | import org.semanticweb.HermiT.model.AtomicRole; | 5 | import org.semanticweb.HermiT.model.AtomicRole; |
| 21 | import org.semanticweb.owlapi.model.IRI; | 6 | import org.semanticweb.owlapi.model.*; |
| 22 | import org.semanticweb.owlapi.model.OWLAxiom; | ||
| 23 | import org.semanticweb.owlapi.model.OWLClassExpression; | ||
| 24 | import org.semanticweb.owlapi.model.OWLDataFactory; | ||
| 25 | import org.semanticweb.owlapi.model.OWLDatatype; | ||
| 26 | import org.semanticweb.owlapi.model.OWLIndividual; | ||
| 27 | import org.semanticweb.owlapi.model.OWLNamedIndividual; | ||
| 28 | import org.semanticweb.owlapi.model.OWLObjectProperty; | ||
| 29 | import org.semanticweb.owlapi.model.OWLOntology; | ||
| 30 | import org.semanticweb.owlapi.model.OWLOntologyCreationException; | ||
| 31 | import org.semanticweb.owlapi.model.OWLOntologyManager; | ||
| 32 | import org.semanticweb.owlapi.model.OWLOntologyStorageException; | ||
| 33 | import org.semanticweb.owlapi.reasoner.Node; | 7 | import org.semanticweb.owlapi.reasoner.Node; |
| 34 | |||
| 35 | import uk.ac.ox.cs.pagoda.owl.OWLHelper; | 8 | import uk.ac.ox.cs.pagoda.owl.OWLHelper; |
| 36 | import uk.ac.ox.cs.pagoda.owl.QueryRoller; | 9 | import uk.ac.ox.cs.pagoda.owl.QueryRoller; |
| 37 | import uk.ac.ox.cs.pagoda.query.QueryManager; | 10 | import uk.ac.ox.cs.pagoda.query.QueryManager; |
| 38 | import uk.ac.ox.cs.pagoda.query.QueryRecord; | 11 | import uk.ac.ox.cs.pagoda.query.QueryRecord; |
| 39 | import uk.ac.ox.cs.pagoda.util.Timer; | 12 | import uk.ac.ox.cs.pagoda.util.Timer; |
| 40 | 13 | ||
| 14 | import java.io.*; | ||
| 15 | import java.util.HashSet; | ||
| 16 | import java.util.Set; | ||
| 17 | import java.util.concurrent.*; | ||
| 18 | |||
| 41 | public class HermitQueryReasoner { | 19 | public class HermitQueryReasoner { |
| 42 | 20 | ||
| 43 | public static void main(String... args) throws FileNotFoundException, OWLOntologyCreationException, OWLOntologyStorageException { | 21 | public static void main(String... args) throws FileNotFoundException, OWLOntologyCreationException, OWLOntologyStorageException { |
| @@ -48,11 +26,13 @@ public class HermitQueryReasoner { | |||
| 48 | // args = new String[] {"/media/krr-nas-share/Yujiao/ontologies/npd/npd-all-minus-datatype.owl", "/media/krr-nas-share/Yujiao/ontologies/npd/data/npd-data-dump-minus-datatype-new.ttl", "/users/yzhou/ontologies/npd/queries/atomic.sparql"}; | 26 | // args = new String[] {"/media/krr-nas-share/Yujiao/ontologies/npd/npd-all-minus-datatype.owl", "/media/krr-nas-share/Yujiao/ontologies/npd/data/npd-data-dump-minus-datatype-new.ttl", "/users/yzhou/ontologies/npd/queries/atomic.sparql"}; |
| 49 | // args = new String[] {"/media/krr-nas-share/Yujiao/ontologies/npd/npd-all.owl", "/media/krr-nas-share/Yujiao/ontologies/npd/data/npd-data-dump-processed.ttl", "/users/yzhou/ontologies/npd/queries/atomic.sparql"}; | 27 | // args = new String[] {"/media/krr-nas-share/Yujiao/ontologies/npd/npd-all.owl", "/media/krr-nas-share/Yujiao/ontologies/npd/data/npd-data-dump-processed.ttl", "/users/yzhou/ontologies/npd/queries/atomic.sparql"}; |
| 50 | // args = new String[] {PagodaTester.dbpedia_tbox, PagodaTester.dbpedia_abox, PagodaTester.dbpedia_query}; | 28 | // args = new String[] {PagodaTester.dbpedia_tbox, PagodaTester.dbpedia_abox, PagodaTester.dbpedia_query}; |
| 51 | // args = new String[] {"/users/yzhou/ontologies/test/unsatisfiable.owl", null, "/users/yzhou/ontologies/test/unsatisfiable_queries.sparql"}; | 29 | // args = new String[] {"/users/yzhou/ontologies/answersCorrectness/unsatisfiable.owl", null, "/users/yzhou/ontologies/answersCorrectness/unsatisfiable_queries.sparql"}; |
| 52 | 30 | ||
| 53 | // args = new String[] {"/media/krr-nas-share/Yujiao/ontologies/bio2rdf/chembl/cco-processed-noDPR-noDPD.ttl", "/media/krr-nas-share/Yujiao/ontologies/bio2rdf/chembl/graph sampling/sample_100.nt", "/media/krr-nas-share/Yujiao/ontologies/bio2rdf/chembl/queries/atomic_one_filtered.sparql", "../test-share/results/chembl/hermit_1p"}; | 31 | // args = new String[] {"/media/krr-nas-share/Yujiao/ontologies/bio2rdf/chembl/cco-processed-noDPR-noDPD.ttl", "/media/krr-nas-share/Yujiao/ontologies/bio2rdf/chembl/graph sampling/sample_100.nt", "/media/krr-nas-share/Yujiao/ontologies/bio2rdf/chembl/queries/atomic_one_filtered.sparql", "../answersCorrectness-share/results/chembl/hermit_1p"}; |
| 54 | args = new String[] {"/users/yzhou/temp/uniprot_debug/core-processed-noDis.owl", "/users/yzhou/temp/uniprot_debug/sample_1_removed.nt", "/media/krr-nas-share/Yujiao/ontologies/bio2rdf/uniprot/queries/atomic_one.sparql", "../test-share/results/uniprot/hermit_1p"}; } | 32 | args = |
| 55 | // args = new String[] {"imported.owl", "", "/media/krr-nas-share/Yujiao/ontologies/bio2rdf/uniprot/queries/atomic_one.sparql", "../test-share/results/uniprot/hermit_1p"}; } | 33 | new String[]{"/users/yzhou/temp/uniprot_debug/core-processed-noDis.owl", "/users/yzhou/temp/uniprot_debug/sample_1_removed.nt", "/media/krr-nas-share/Yujiao/ontologies/bio2rdf/uniprot/queries/atomic_one.sparql", "../answersCorrectness-share/results/uniprot/hermit_1p"}; |
| 34 | } | ||
| 35 | // args = new String[] {"imported.owl", "", "/media/krr-nas-share/Yujiao/ontologies/bio2rdf/uniprot/queries/atomic_one.sparql", "../answersCorrectness-share/results/uniprot/hermit_1p"}; } | ||
| 56 | 36 | ||
| 57 | 37 | ||
| 58 | PrintStream ps = args.length < 4 ? null : new PrintStream(new File(args[3])); | 38 | PrintStream ps = args.length < 4 ? null : new PrintStream(new File(args[3])); |
| @@ -60,8 +40,8 @@ public class HermitQueryReasoner { | |||
| 60 | if (args[i] == null || args[i].equalsIgnoreCase("null")) args[i] = ""; | 40 | if (args[i] == null || args[i].equalsIgnoreCase("null")) args[i] = ""; |
| 61 | System.out.println("Argument " + i + ": " + args[i]); | 41 | System.out.println("Argument " + i + ": " + args[i]); |
| 62 | } | 42 | } |
| 63 | 43 | ||
| 64 | // PrintStream ps = null; // new PrintStream(new File("../test-share/results/reactome/ ")); | 44 | // PrintStream ps = null; // new PrintStream(new File("../answersCorrectness-share/results/reactome/ ")); |
| 65 | if (ps != null) System.setOut(ps); | 45 | if (ps != null) System.setOut(ps); |
| 66 | 46 | ||
| 67 | Timer t = new Timer(); | 47 | Timer t = new Timer(); |
diff --git a/test/uk/ac/ox/cs/hermit/JAIR_HermiT.java b/test/uk/ac/ox/cs/hermit/JAIR_HermiT.java index a3264ba..72e7af8 100644 --- a/test/uk/ac/ox/cs/hermit/JAIR_HermiT.java +++ b/test/uk/ac/ox/cs/hermit/JAIR_HermiT.java | |||
| @@ -11,8 +11,8 @@ public class JAIR_HermiT { | |||
| 11 | String[] args = new String[] { | 11 | String[] args = new String[] { |
| 12 | TestUtil.combinePaths(ontoDir, "lubm/univ-bench.owl"), | 12 | TestUtil.combinePaths(ontoDir, "lubm/univ-bench.owl"), |
| 13 | TestUtil.combinePaths(ontoDir, "lubm/data/lubm1_owl"), | 13 | TestUtil.combinePaths(ontoDir, "lubm/data/lubm1_owl"), |
| 14 | TestUtil.combinePaths(ontoDir, "lubm/queries/test.sparql") | 14 | TestUtil.combinePaths(ontoDir, "lubm/queries/answersCorrectness.sparql") |
| 15 | // , "/home/yzhou/java-workspace/test-share/results_new/lubm1/hermit" | 15 | // , "/home/yzhou/java-workspace/answersCorrectness-share/results_new/lubm1/hermit" |
| 16 | }; | 16 | }; |
| 17 | HermitQueryReasoner.main(args); | 17 | HermitQueryReasoner.main(args); |
| 18 | } | 18 | } |
| @@ -24,7 +24,7 @@ public class JAIR_HermiT { | |||
| 24 | "/home/yzhou/backup/20141212/univ-bench-queries.owl", | 24 | "/home/yzhou/backup/20141212/univ-bench-queries.owl", |
| 25 | TestUtil.combinePaths(ontoDir, "lubm/data/lubm1_owl"), | 25 | TestUtil.combinePaths(ontoDir, "lubm/data/lubm1_owl"), |
| 26 | TestUtil.combinePaths(ontoDir, "lubm/queries/atomic_lubm.sparql") | 26 | TestUtil.combinePaths(ontoDir, "lubm/queries/atomic_lubm.sparql") |
| 27 | // , "/home/yzhou/java-workspace/test-share/results_new/lubm1/hermit_rolledUp" | 27 | // , "/home/yzhou/java-workspace/answersCorrectness-share/results_new/lubm1/hermit_rolledUp" |
| 28 | }; | 28 | }; |
| 29 | HermitQueryReasoner.main(args); | 29 | HermitQueryReasoner.main(args); |
| 30 | } | 30 | } |
| @@ -37,7 +37,7 @@ public class JAIR_HermiT { | |||
| 37 | TestUtil.combinePaths(ontoDir, "uobm/data/uobm1_owl_withDeclaration"), | 37 | TestUtil.combinePaths(ontoDir, "uobm/data/uobm1_owl_withDeclaration"), |
| 38 | TestUtil.combinePaths(ontoDir, "uobm/queries/standard.sparql") | 38 | TestUtil.combinePaths(ontoDir, "uobm/queries/standard.sparql") |
| 39 | // , "hermit_uobm1.out" | 39 | // , "hermit_uobm1.out" |
| 40 | // , "/home/yzhou/java-workspace/test-share/results_new/uobm1/hermit" | 40 | // , "/home/yzhou/java-workspace/answersCorrectness-share/results_new/uobm1/hermit" |
| 41 | }; | 41 | }; |
| 42 | HermitQueryReasoner.main(args); | 42 | HermitQueryReasoner.main(args); |
| 43 | } | 43 | } |
| @@ -50,7 +50,7 @@ public class JAIR_HermiT { | |||
| 50 | TestUtil.combinePaths(ontoDir, "uobm/data/uobm1_owl_withDeclaration"), | 50 | TestUtil.combinePaths(ontoDir, "uobm/data/uobm1_owl_withDeclaration"), |
| 51 | TestUtil.combinePaths(ontoDir, "uobm/queries/atomic_uobm.sparql") | 51 | TestUtil.combinePaths(ontoDir, "uobm/queries/atomic_uobm.sparql") |
| 52 | , "hermit_uobm1_rolledUp.out" | 52 | , "hermit_uobm1_rolledUp.out" |
| 53 | // , "/home/yzhou/java-workspace/test-share/results_new/uobm1/hermit_rolledUp" | 53 | // , "/home/yzhou/java-workspace/answersCorrectness-share/results_new/uobm1/hermit_rolledUp" |
| 54 | }; | 54 | }; |
| 55 | HermitQueryReasoner.main(args); | 55 | HermitQueryReasoner.main(args); |
| 56 | } | 56 | } |
| @@ -75,7 +75,7 @@ public class JAIR_HermiT { | |||
| 75 | TestUtil.combinePaths(ontoDir, "npd/data/npd-data-dump-minus-datatype-new.ttl"), | 75 | TestUtil.combinePaths(ontoDir, "npd/data/npd-data-dump-minus-datatype-new.ttl"), |
| 76 | TestUtil.combinePaths(ontoDir, "npd/queries/atomic_ground.sparql") | 76 | TestUtil.combinePaths(ontoDir, "npd/queries/atomic_ground.sparql") |
| 77 | , "hermit_npd.out" | 77 | , "hermit_npd.out" |
| 78 | // , "/home/yzhou/java-workspace/test-share/results_new/npd/hermit" | 78 | // , "/home/yzhou/java-workspace/answersCorrectness-share/results_new/npd/hermit" |
| 79 | ); | 79 | ); |
| 80 | } | 80 | } |
| 81 | 81 | ||
| @@ -86,7 +86,7 @@ public class JAIR_HermiT { | |||
| 86 | TestUtil.combinePaths(ontoDir, "dbpedia/integratedOntology-all-in-one-minus-datatype.owl"), | 86 | TestUtil.combinePaths(ontoDir, "dbpedia/integratedOntology-all-in-one-minus-datatype.owl"), |
| 87 | TestUtil.combinePaths(ontoDir, "dbpedia/data/dbpedia-minus-datatype-new.ttl"), | 87 | TestUtil.combinePaths(ontoDir, "dbpedia/data/dbpedia-minus-datatype-new.ttl"), |
| 88 | TestUtil.combinePaths(ontoDir, "dbpedia/queries/atomic_ground.sparql") | 88 | TestUtil.combinePaths(ontoDir, "dbpedia/queries/atomic_ground.sparql") |
| 89 | , "/home/yzhou/java-workspace/test-share/results_new/dbpedia/hermit" | 89 | , "/home/yzhou/java-workspace/answersCorrectness-share/results_new/dbpedia/hermit" |
| 90 | ); | 90 | ); |
| 91 | } | 91 | } |
| 92 | 92 | ||
| @@ -97,7 +97,7 @@ public class JAIR_HermiT { | |||
| 97 | TestUtil.combinePaths(ontoDir, "bio2rdf/reactome/biopax-level3-processed.owl"), | 97 | TestUtil.combinePaths(ontoDir, "bio2rdf/reactome/biopax-level3-processed.owl"), |
| 98 | TestUtil.combinePaths(ontoDir, "bio2rdf/reactome/graph sampling/reactome_sample_10.ttl"), | 98 | TestUtil.combinePaths(ontoDir, "bio2rdf/reactome/graph sampling/reactome_sample_10.ttl"), |
| 99 | TestUtil.combinePaths(ontoDir, "bio2rdf/reactome/queries/atomic_ground.sparql") | 99 | TestUtil.combinePaths(ontoDir, "bio2rdf/reactome/queries/atomic_ground.sparql") |
| 100 | , "/home/yzhou/java-workspace/test-share/results_new/reactome/hermit_10p" | 100 | , "/home/yzhou/java-workspace/answersCorrectness-share/results_new/reactome/hermit_10p" |
| 101 | ); | 101 | ); |
| 102 | } | 102 | } |
| 103 | 103 | ||
| @@ -110,7 +110,7 @@ public class JAIR_HermiT { | |||
| 110 | TestUtil.combinePaths(ontoDir, "bio2rdf/chembl/graph sampling/sample_1.nt"), | 110 | TestUtil.combinePaths(ontoDir, "bio2rdf/chembl/graph sampling/sample_1.nt"), |
| 111 | TestUtil.combinePaths(ontoDir, "bio2rdf/chembl/queries/atomic_ground.sparql") | 111 | TestUtil.combinePaths(ontoDir, "bio2rdf/chembl/queries/atomic_ground.sparql") |
| 112 | , "hermit_chembl.out" | 112 | , "hermit_chembl.out" |
| 113 | // , "/home/yzhou/java-workspace/test-share/results_new/chembl/hermit_1p" | 113 | // , "/home/yzhou/java-workspace/answersCorrectness-share/results_new/chembl/hermit_1p" |
| 114 | ); | 114 | ); |
| 115 | } | 115 | } |
| 116 | 116 | ||
| @@ -122,7 +122,7 @@ public class JAIR_HermiT { | |||
| 122 | TestUtil.combinePaths(ontoDir, "bio2rdf/uniprot/graph sampling/sample_1.nt"), | 122 | TestUtil.combinePaths(ontoDir, "bio2rdf/uniprot/graph sampling/sample_1.nt"), |
| 123 | TestUtil.combinePaths(ontoDir, "bio2rdf/uniprot/queries/atomic_ground.sparql") | 123 | TestUtil.combinePaths(ontoDir, "bio2rdf/uniprot/queries/atomic_ground.sparql") |
| 124 | , "hermit_uniprot.out" | 124 | , "hermit_uniprot.out" |
| 125 | // , "/home/yzhou/java-workspace/test-share/results_new/uniprot/hermit_1p" | 125 | // , "/home/yzhou/java-workspace/answersCorrectness-share/results_new/uniprot/hermit_1p" |
| 126 | ); | 126 | ); |
| 127 | } | 127 | } |
| 128 | 128 | ||
