From: <ji...@us...> - 2011-06-20 11:04:31
|
Revision: 2915 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=2915&view=rev Author: jialva Date: 2011-06-20 11:04:22 +0000 (Mon, 20 Jun 2011) Log Message: ----------- Last changes in fuzzyDL-Learner before going back to Spain. Modified Paths: -------------- trunk/components-core/src/main/java/org/dllearner/algorithms/fuzzydll/FuzzyCELOE.java trunk/components-core/src/main/java/org/dllearner/learningproblems/fuzzydll/FuzzyPosNegLPStandard.java trunk/components-core/src/main/java/org/dllearner/reasoning/fuzzydll/FuzzyDLReasonerManager.java trunk/components-core/src/test/java/org/dllearner/test/FuzzyDLLTest_Trains.java Added Paths: ----------- trunk/examples/fuzzydll/fuzzyTrains_v5.0.owl trunk/examples/fuzzydll/noFuzzyTrains_v1.5.owl Removed Paths: ------------- trunk/examples/fuzzydll/fuzzyOWL2fuzzyDLparserOutput.fuzzyDL.txt trunk/examples/fuzzydll/fuzzyOWL2fuzzyDLparserOutput_manual.fuzzyDL.txt trunk/examples/fuzzydll/fuzzyTrains_v1.3.owl trunk/examples/fuzzydll/fuzzyTrains_v1.4.owl trunk/examples/fuzzydll/noFuzzyTrains_v1.3.owl Modified: trunk/components-core/src/main/java/org/dllearner/algorithms/fuzzydll/FuzzyCELOE.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/algorithms/fuzzydll/FuzzyCELOE.java 2011-06-20 10:33:20 UTC (rev 2914) +++ trunk/components-core/src/main/java/org/dllearner/algorithms/fuzzydll/FuzzyCELOE.java 2011-06-20 11:04:22 UTC (rev 2915) @@ -149,9 +149,10 @@ private int minHorizExp = 0; private int maxHorizExp = 0; - // TODO remove this variable, just for testing purposes - private int counter = 0; - private PrintWriter out; + // TODO: remove this variable, just for testing purposes +// private int counter = 0; +// private PrintWriter out; +// private long start = 0; @Override public FuzzyCELOEConfigurator getConfigurator() { @@ -206,15 +207,15 @@ @Override public void init() throws ComponentInitException { - // TODO remove, just for testing purposes - FileWriter fstream; - try { - fstream = new FileWriter("../examples/fuzzydll/testOut_v2.0_noise30_10000.log"); - out = new PrintWriter(fstream); - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } + // TODO: remove, just for testing purposes +// FileWriter fstream; +// try { +// fstream = new FileWriter("../examples/fuzzydll/kk.log"); +// out = new PrintWriter(fstream); +// } catch (IOException e) { +// // TODO Auto-generated catch block +// e.printStackTrace(); +// } // copy class hierarchy and modify it such that each class is only // reachable via a single path @@ -378,8 +379,8 @@ addNode(startClass, null); int loop = 0; + while (!terminationCriteriaSatisfied()) { -// System.out.println("loop " + loop); if(!singleSuggestionMode && bestEvaluatedDescriptions.getBestAccuracy() > highestAccuracy) { highestAccuracy = bestEvaluatedDescriptions.getBestAccuracy(); @@ -395,13 +396,13 @@ TreeSet<Description> refinements = refineNode(nextNode); mon.stop(); - // TODO just for testing purposes - counter++; - out.println(counter + " next node: " + nextNode); - for(Description refinement : refinements) { - out.println("refinement: " + refinement); - } - out.println(); + // TODO: just for testing purposes +// counter++; +// out.println(counter + " next node: " + nextNode); +// for(Description refinement : refinements) { +// out.println("refinement: " + refinement); +// } +// out.println(); while(refinements.size() != 0) { // pick element from set @@ -414,7 +415,16 @@ // System.out.println("potentially adding " + refinement + " to search tree as child of " + nextNode + " " + new Date()); Monitor mon2 = MonitorFactory.start("addNode"); + + // TODO: remove +// start = System.currentTimeMillis(); + addNode(refinement, nextNode); + + // TODO: remove, just testing purposes +// counter++; +// System.out.println(counter + " * " + (System.currentTimeMillis() - start)); + mon2.stop(); // adding nodes is potentially computationally expensive, so we have // to check whether max time is exceeded Modified: trunk/components-core/src/main/java/org/dllearner/learningproblems/fuzzydll/FuzzyPosNegLPStandard.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/learningproblems/fuzzydll/FuzzyPosNegLPStandard.java 2011-06-20 10:33:20 UTC (rev 2914) +++ trunk/components-core/src/main/java/org/dllearner/learningproblems/fuzzydll/FuzzyPosNegLPStandard.java 2011-06-20 11:04:22 UTC (rev 2915) @@ -622,7 +622,6 @@ double invertedCoveredMembershipDegree = 0; double lastMembershipDegree = 0; - // TODO to optimize for (FuzzyIndividual ind: fuzzyExamples) { lastMembershipDegree = (1 - Math.abs(ind.getTruthDegree() - reasoner.hasTypeFuzzyMembership(description, ind))); coveredMembershipDegree += lastMembershipDegree * ind.getTruthDegree(); @@ -630,7 +629,7 @@ invertedCoveredMembershipDegree += (1 - ind.getTruthDegree()) * (1 - lastMembershipDegree); } double fuzzyRecall = totalMembershipDegree == 0 ? 0 :coveredMembershipDegree/totalMembershipDegree; - // TODO this is like this??? not sure + if(fuzzyRecall < 1 - noise) { return -1; } Modified: trunk/components-core/src/main/java/org/dllearner/reasoning/fuzzydll/FuzzyDLReasonerManager.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/reasoning/fuzzydll/FuzzyDLReasonerManager.java 2011-06-20 10:33:20 UTC (rev 2914) +++ trunk/components-core/src/main/java/org/dllearner/reasoning/fuzzydll/FuzzyDLReasonerManager.java 2011-06-20 11:04:22 UTC (rev 2915) @@ -3,6 +3,7 @@ import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; +import java.io.FileWriter; import java.io.IOException; import java.io.PrintStream; import java.io.PrintWriter; @@ -84,10 +85,25 @@ private OWLDataFactory factory; private String baseURI; private NodeSet<OWLClass> newOwlInstances; + + // TODO: remove, just for testing purposes // private FileOutputStream errorFile; +// private PrintStream out; +// private int counter = 1; +// private int counter2 = 1; public FuzzyDLReasonerManager(String ontologyFile, OWLOntology ontology, OWLReasonerConfiguration conf, OWLDataFactory factory, String baseURI) throws Exception { + // TODO: remove, just for testing purposes +// FileOutputStream fstream; +// try { +// fstream = new FileOutputStream("../examples/fuzzydll/milpSolverLogs.log"); +// out = new PrintStream(fstream); +// } catch (IOException e) { +// // TODO Auto-generated catch block +// e.printStackTrace(); +// } + this.factory = factory; this.baseURI = baseURI; @@ -152,7 +168,16 @@ try { KnowledgeBase clonedFuzzyKB = fuzzyKB.clone(); + + // TODO: just for testing, remove +// long start = System.nanoTime(); + queryResult = q.solve(clonedFuzzyKB); + + // TODO: just for testing, remove +// out.println(counter + " * " + (System.nanoTime() - start)); +// counter++; + if (!queryResult.isConsistentKB()){ System.err.println("Fuzzy KB is inconsistent."); System.err.println("This may be a fuzzyDL reasoner bug. Press enter to continue."); @@ -597,7 +622,16 @@ AxiomNotInProfileException, FreshEntitiesException, InconsistentOntologyException { - return crispReasoner.isEntailed(arg0); + // TODO: just for testing, remove +// long start = System.nanoTime(); + + boolean outBoolean = crispReasoner.isEntailed(arg0); + + // TODO: just for testing, remove +// out.println(counter2 + " + " + (System.nanoTime() - start)); +// counter2++; + + return outBoolean; } @Override Modified: trunk/components-core/src/test/java/org/dllearner/test/FuzzyDLLTest_Trains.java =================================================================== --- trunk/components-core/src/test/java/org/dllearner/test/FuzzyDLLTest_Trains.java 2011-06-20 10:33:20 UTC (rev 2914) +++ trunk/components-core/src/test/java/org/dllearner/test/FuzzyDLLTest_Trains.java 2011-06-20 11:04:22 UTC (rev 2915) @@ -43,31 +43,32 @@ */ public class FuzzyDLLTest_Trains { +// String[] posEx = { +// "http://www.example.com/fuzzyTrains.owl#east1", +// "http://www.example.com/fuzzyTrains.owl#east2", +// "http://www.example.com/fuzzyTrains.owl#east3", +// "http://www.example.com/fuzzyTrains.owl#east4", +// "http://www.example.com/fuzzyTrains.owl#east5" +// }; +// String[] negEx = { +// "http://www.example.com/fuzzyTrains.owl#west6", +// "http://www.example.com/fuzzyTrains.owl#west7", +// "http://www.example.com/fuzzyTrains.owl#west8", +// "http://www.example.com/fuzzyTrains.owl#west9", +// "http://www.example.com/fuzzyTrains.owl#west0" +// }; + String[] posEx = { "http://www.example.com/fuzzyTrains.owl#east1", - "http://www.example.com/fuzzyTrains.owl#east2", - "http://www.example.com/fuzzyTrains.owl#east3", - "http://www.example.com/fuzzyTrains.owl#east4", - "http://www.example.com/fuzzyTrains.owl#east5" + "http://www.example.com/fuzzyTrains.owl#east2" }; String[] negEx = { "http://www.example.com/fuzzyTrains.owl#west6", - "http://www.example.com/fuzzyTrains.owl#west7", - "http://www.example.com/fuzzyTrains.owl#west8", - "http://www.example.com/fuzzyTrains.owl#west9", - "http://www.example.com/fuzzyTrains.owl#west0" + "http://www.example.com/fuzzyTrains.owl#west7" }; + private static long start; // String[] posEx = { -// "http://www.example.com/fuzzyTrains.owl#east1", -// "http://www.example.com/fuzzyTrains.owl#east2" -// }; -// String[] negEx = { -// "http://www.example.com/fuzzyTrains.owl#west6", -// "http://www.example.com/fuzzyTrains.owl#west7" -// }; - -// String[] posEx = { // "http://www.example.com/fuzzyTrains.owl#carPositive" // }; // String[] negEx = { @@ -98,18 +99,22 @@ for (int i=0; i<negEx.length; i++) { fuzzyExamples.add(new FuzzyExample(negEx[i],0.0)); } +// fuzzyExamples.add(new FuzzyExample(posEx[0],1.0)); +// fuzzyExamples.add(new FuzzyExample(posEx[1],0.9)); +// fuzzyExamples.add(new FuzzyExample(negEx[0],0.1)); +// fuzzyExamples.add(new FuzzyExample(negEx[1],0.0)); ComponentManager cm = ComponentManager.getInstance(); OWLFile ks = cm.knowledgeSource(OWLFile.class); - ks.getConfigurator().setUrl(new URL("file", null, "../examples/fuzzydll/fuzzyTrains_v2.0.owl")); + ks.getConfigurator().setUrl(new URL("file", null, "../examples/fuzzydll/fuzzyTrains_v5.0.owl")); ks.init(); // ReasonerComponent rc = cm.reasoner(OWLAPIReasoner.class, ks); FuzzyOWLAPIReasoner rc = cm.reasoner(FuzzyOWLAPIReasoner.class, ks); rc.getConfigurator().setReasonerType("fuzzydl"); rc.init(); - System.out.println(rc.getClassHierarchy()); + // System.out.println(rc.getClassHierarchy()); FuzzyPosNegLPStandard lp = cm.learningProblem(FuzzyPosNegLPStandard.class, rc); //PosNegLPStandard lp = cm.learningProblem(PosNegLPStandard.class, rc); @@ -127,20 +132,24 @@ // aaaaaaaaaa.add("Nothing"); // fc.getConfigurator().setIgnoredConcepts(aaaaaaaaaa); fc.getConfigurator().setMaxClassDescriptionTests(10000); + // fc.getConfigurator().setMaxNrOfResults(50); fc.getConfigurator().setMaxExecutionTimeInSeconds(0); fc.getConfigurator().setUseDoubleDatatypes(false); fc.getConfigurator().setUseCardinalityRestrictions(false); - fc.getConfigurator().setWriteSearchTree(true); - fc.getConfigurator().setSearchTreeFile("log/searchTreeFuzzy.txt"); - fc.getConfigurator().setNoisePercentage(30); + // fc.getConfigurator().setWriteSearchTree(true); + // fc.getConfigurator().setSearchTreeFile("log/searchTreeFuzzy.txt"); + fc.getConfigurator().setNoisePercentage(100); fc.init(); + + start = System.currentTimeMillis(); + fc.start(); - + + return fc.getCurrentlyBestDescription(); } public static void main(String args[]) throws LearningProblemUnsupportedException, IOException, ComponentInitException { - long start = System.currentTimeMillis(); FuzzyDLLTest_Trains test = new FuzzyDLLTest_Trains(); test.learn(); Deleted: trunk/examples/fuzzydll/fuzzyOWL2fuzzyDLparserOutput.fuzzyDL.txt =================================================================== --- trunk/examples/fuzzydll/fuzzyOWL2fuzzyDLparserOutput.fuzzyDL.txt 2011-06-20 10:33:20 UTC (rev 2914) +++ trunk/examples/fuzzydll/fuzzyOWL2fuzzyDLparserOutput.fuzzyDL.txt 2011-06-20 11:04:22 UTC (rev 2915) @@ -1,93 +0,0 @@ -(define-fuzzy-concept fuzzyLongCar right-shoulder(5.0, 50.0, 40.0, 40.0) ) -(define-fuzzy-concept fuzzyShortCar left-shoulder(5.0, 50.0, 15.0, 15.0) ) -(define-fuzzy-concept fuzzyMediumLengthCar trapezoidal(5.0, 50.0, 15.0, 15.0, 40.0, 40.0) ) -(functional isInFrontOf) -(functional hasCarLength) -(domain hasLoad Car ) -(domain isInFrontOf (or Car Train ) ) -(domain hasCar Train ) -(range hasCar Car ) -(range isInFrontOf Car ) -(range hasLoad Load ) -(domain hasCarLength Car ) -(range hasCarLength *real* 5.0 50.0 ) -(instance load62a Triangle 1.0) -(instance load63a Rectangle 1.0) -(instance east2 Train 1.0) -(instance car72 Car 1.0) -(instance car22 Car 1.0) -(instance car61 Car 1.0) -(instance load21b Triangle 1.0) -(instance car13 Car 1.0) -(instance load72c Triangle 1.0) -(instance load63b Triangle 1.0) -(instance car21 Car 1.0) -(instance car62 Car 1.0) -(instance load71b Rectangle 1.0) -(instance car63 Car 1.0) -(instance load72b Rectangle 1.0) -(instance load11a Rectangle 1.0) -(instance car11 Car 1.0) -(instance car12 Car 1.0) -(instance west7 Train 1.0) -(instance load11c Triangle 1.0) -(instance load11b Rectangle 1.0) -(instance load71a Triangle 1.0) -(instance car71 Car 1.0) -(instance west6 Train 1.0) -(instance load62b Rectangle 1.0) -(instance load12a Rectangle 1.0) -(instance east1 Train 1.0) -(instance load21a Rectangle 1.0) -(instance load72a Rectangle 1.0) -(related west6 car61 isInFrontOf 1.0) -(related car63 load63a hasLoad 1.0) -(related west6 car63 hasCar 1.0) -(related east1 car13 hasCar 1.0) -(related east2 car21 hasCar 1.0) -(related car72 load72b hasLoad 1.0) -(related east1 car11 hasCar 1.0) -(related west7 car72 hasCar 1.0) -(related car62 load62a hasLoad 1.0) -(related car11 load11a hasLoad 1.0) -(related west6 car61 hasCar 1.0) -(related car71 load71a hasLoad 1.0) -(related west7 car71 isInFrontOf 1.0) -(related car21 load12a hasLoad 1.0) -(related car11 load11c hasLoad 1.0) -(related west7 car71 hasCar 1.0) -(related east2 car22 hasCar 1.0) -(related car21 car22 isInFrontOf 1.0) -(related car63 load63b hasLoad 1.0) -(related west6 car62 hasCar 1.0) -(related east1 car11 isInFrontOf 1.0) -(related car12 car13 isInFrontOf 1.0) -(related car61 car62 isInFrontOf 1.0) -(related car12 load12a hasLoad 1.0) -(related car11 car12 isInFrontOf 1.0) -(related car62 load62b hasLoad 1.0) -(related east1 car12 hasCar 1.0) -(related car72 load72c hasLoad 1.0) -(related east2 car21 isInFrontOf 1.0) -(related car71 car72 isInFrontOf 1.0) -(related car71 load71b hasLoad 1.0) -(related car21 load21a hasLoad 1.0) -(related car62 car63 isInFrontOf 1.0) -(related car11 load11b hasLoad 1.0) -(related car72 load72a hasLoad 1.0) -(instance car13 (= hasCarLength 13) 1.0 ) -(instance car22 (= hasCarLength 7) 1.0 ) -(instance car71 (= hasCarLength 7) 1.0 ) -(instance car11 (= hasCarLength 49) 1.0 ) -(instance car62 (= hasCarLength 8) 1.0 ) -(instance car21 (= hasCarLength 47) 1.0 ) -(instance car61 (= hasCarLength 45) 1.0 ) -(instance car63 (= hasCarLength 25) 1.0 ) -(instance car12 (= hasCarLength 25) 1.0 ) -(instance car72 (= hasCarLength 6) 1.0 ) -(disjoint Car Load ) -(disjoint Car Train ) -(disjoint Load Train ) -(define-concept LongCar (and Car (some hasCarLength fuzzyLongCar))) -(define-concept ShortCar (and Car (some hasCarLength fuzzyShortCar))) -(define-concept MediumLenghtCar (and Car (some hasCarLength fuzzyMediumLengthCar))) Deleted: trunk/examples/fuzzydll/fuzzyOWL2fuzzyDLparserOutput_manual.fuzzyDL.txt =================================================================== --- trunk/examples/fuzzydll/fuzzyOWL2fuzzyDLparserOutput_manual.fuzzyDL.txt 2011-06-20 10:33:20 UTC (rev 2914) +++ trunk/examples/fuzzydll/fuzzyOWL2fuzzyDLparserOutput_manual.fuzzyDL.txt 2011-06-20 11:04:22 UTC (rev 2915) @@ -1,93 +0,0 @@ -(define-fuzzy-concept fuzzyLongCar right-shoulder(5.0, 50.0, 40.0, 40.0) ) -(define-fuzzy-concept fuzzyShortCar left-shoulder(5.0, 50.0, 15.0, 15.0) ) -(define-fuzzy-concept fuzzyMediumLengthCar trapezoidal(5.0, 50.0, 15.0, 15.0, 40.0, 40.0) ) -(functional isInFrontOf) -(functional hasCarLength) -(domain hasLoad Car ) -(domain isInFrontOf (or Car Train ) ) -(domain hasCar Train ) -(range hasCar Car ) -(range isInFrontOf Car ) -(range hasLoad Load ) -(domain hasCarLength Car ) -(range hasCarLength *real* 5.0 50.0 ) -(instance load62a Triangle 1.0) -(instance load63a Rectangle 1.0) -(instance east2 Train 1.0) -(instance car72 Car 1.0) -(instance car22 Car 1.0) -(instance car61 Car 1.0) -(instance load21b Triangle 1.0) -(instance car13 Car 1.0) -(instance load72c Triangle 1.0) -(instance load63b Triangle 1.0) -(instance car21 Car 1.0) -(instance car62 Car 1.0) -(instance load71b Rectangle 1.0) -(instance car63 Car 1.0) -(instance load72b Rectangle 1.0) -(instance load11a Rectangle 1.0) -(instance car11 Car 1.0) -(instance car12 Car 1.0) -(instance west7 Train 1.0) -(instance load11c Triangle 1.0) -(instance load11b Rectangle 1.0) -(instance load71a Triangle 1.0) -(instance car71 Car 1.0) -(instance west6 Train 1.0) -(instance load62b Rectangle 1.0) -(instance load12a Rectangle 1.0) -(instance east1 Train 1.0) -(instance load21a Rectangle 1.0) -(instance load72a Rectangle 1.0) -(related west6 car61 isInFrontOf 1.0) -(related car63 load63a hasLoad 1.0) -(related west6 car63 hasCar 1.0) -(related east1 car13 hasCar 1.0) -(related east2 car21 hasCar 1.0) -(related car72 load72b hasLoad 1.0) -(related east1 car11 hasCar 1.0) -(related west7 car72 hasCar 1.0) -(related car62 load62a hasLoad 1.0) -(related car11 load11a hasLoad 1.0) -(related west6 car61 hasCar 1.0) -(related car71 load71a hasLoad 1.0) -(related west7 car71 isInFrontOf 1.0) -(related car21 load12a hasLoad 1.0) -(related car11 load11c hasLoad 1.0) -(related west7 car71 hasCar 1.0) -(related east2 car22 hasCar 1.0) -(related car21 car22 isInFrontOf 1.0) -(related car63 load63b hasLoad 1.0) -(related west6 car62 hasCar 1.0) -(related east1 car11 isInFrontOf 1.0) -(related car12 car13 isInFrontOf 1.0) -(related car61 car62 isInFrontOf 1.0) -(related car12 load12a hasLoad 1.0) -(related car11 car12 isInFrontOf 1.0) -(related car62 load62b hasLoad 1.0) -(related east1 car12 hasCar 1.0) -(related car72 load72c hasLoad 1.0) -(related east2 car21 isInFrontOf 1.0) -(related car71 car72 isInFrontOf 1.0) -(related car71 load71b hasLoad 1.0) -(related car21 load21a hasLoad 1.0) -(related car62 car63 isInFrontOf 1.0) -(related car11 load11b hasLoad 1.0) -(related car72 load72a hasLoad 1.0) -(instance car13 (= hasCarLength 13) 1.0 ) -(instance car22 (= hasCarLength 7) 1.0 ) -(instance car71 (= hasCarLength 7) 1.0 ) -(instance car11 (= hasCarLength 49) 1.0 ) -(instance car62 (= hasCarLength 8) 1.0 ) -(instance car21 (= hasCarLength 47) 1.0 ) -(instance car61 (= hasCarLength 45) 1.0 ) -(instance car63 (= hasCarLength 25) 1.0 ) -(instance car12 (= hasCarLength 25) 1.0 ) -(instance car72 (= hasCarLength 6) 1.0 ) -(disjoint Car Load ) -(disjoint Car Train ) -(disjoint Load Train ) -(define-concept LongCar (and Car (some hasCarLength fuzzyLongCar))) -(define-concept ShortCar (and Car (some hasCarLength fuzzyShortCar))) -(define-concept MediumLenghtCar (and Car (some hasCarLength fuzzyMediumLengthCar))) Deleted: trunk/examples/fuzzydll/fuzzyTrains_v1.3.owl =================================================================== --- trunk/examples/fuzzydll/fuzzyTrains_v1.3.owl 2011-06-20 10:33:20 UTC (rev 2914) +++ trunk/examples/fuzzydll/fuzzyTrains_v1.3.owl 2011-06-20 11:04:22 UTC (rev 2915) @@ -1,634 +0,0 @@ -<?xml version="1.0"?> - - -<!DOCTYPE rdf:RDF [ - <!ENTITY owl "http://www.w3.org/2002/07/owl#" > - <!ENTITY xsd "http://www.w3.org/2001/XMLSchema#" > - <!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#" > - <!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#" > -]> - - -<rdf:RDF xmlns="http://www.example.com/fuzzyTrains.owl#" - xml:base="http://www.example.com/fuzzyTrains.owl" - xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" - 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#"> - <owl:Ontology rdf:about="http://www.example.com/fuzzyTrains.owl"> - <rdfs:comment xml:lang="en">Fuzzy adaptation of Michalsky's trains problem [1] -Original idea from [2] - -Developed by Josue Iglesias (josue at grpss.ssr.upm.es) - -[1] http://www.mli.gmu.edu/papers/79-80/80-05.pdf -[2] http://users.iit.demokritos.gr/~konstant/dload/Pubs/fuzz10.pdf</rdfs:comment> - <rdfs:comment xml:lang="en">v1.0: Cars can be (fuzzy) classified as being short, medium or long depending on their length (double)</rdfs:comment> - <rdfs:comment xml:lang="en">v1.1: Car's load can be more or less similar to a triangle and/or a rectangle</rdfs:comment> - <rdfs:comment xml:lang="en">v1.2: Change properties (Train) hasFirstCar (Car) + (Car) isInFrontOf (Car) for just (Train) hasCar (Car) in order to make the example easier</rdfs:comment> - <rdfs:comment xml:lang="en">v1.3: -Some concepts of v1.1 and v1.2 are merged: -- (Train) hasCar (Train) -- (Train) or (Car) isInFrontOf (Car)</rdfs:comment> - </owl:Ontology> - - - - <!-- - /////////////////////////////////////////////////////////////////////////////////////// - // - // Annotation properties - // - /////////////////////////////////////////////////////////////////////////////////////// - --> - - <owl:AnnotationProperty rdf:about="http://www.example.com/fuzzyTrains.owl#fuzzyLabel"/> - <owl:AnnotationProperty rdf:about="&rdfs;comment"/> - - - - <!-- - /////////////////////////////////////////////////////////////////////////////////////// - // - // Datatypes - // - /////////////////////////////////////////////////////////////////////////////////////// - --> - - - - - <!-- http://www.example.com/fuzzyTrains.owl#fuzzyLongCar --> - - <rdfs:Datatype rdf:about="http://www.example.com/fuzzyTrains.owl#fuzzyLongCar"> - <owl:equivalentClass> - <rdfs:Datatype> - <owl:intersectionOf rdf:parseType="Collection"> - <rdfs:Datatype> - <owl:onDatatype rdf:resource="&xsd;double"/> - <owl:withRestrictions rdf:parseType="Collection"> - <rdf:Description> - <xsd:minInclusive rdf:datatype="&xsd;double">5.0</xsd:minInclusive> - </rdf:Description> - </owl:withRestrictions> - </rdfs:Datatype> - <rdfs:Datatype> - <owl:onDatatype rdf:resource="&xsd;double"/> - <owl:withRestrictions rdf:parseType="Collection"> - <rdf:Description> - <xsd:maxInclusive rdf:datatype="&xsd;double">50.0</xsd:maxInclusive> - </rdf:Description> - </owl:withRestrictions> - </rdfs:Datatype> - </owl:intersectionOf> - </rdfs:Datatype> - </owl:equivalentClass> - <fuzzyLabel><fuzzyOwl2 fuzzyType="datatype"> -<Datatype type="rightshoulder" a="40" b="40" /> -</fuzzyOwl2></fuzzyLabel> - </rdfs:Datatype> - - - - <!-- http://www.example.com/fuzzyTrains.owl#fuzzyMediumLengthCar --> - - <rdfs:Datatype rdf:about="http://www.example.com/fuzzyTrains.owl#fuzzyMediumLengthCar"> - <owl:equivalentClass> - <rdfs:Datatype> - <owl:intersectionOf rdf:parseType="Collection"> - <rdfs:Datatype> - <owl:onDatatype rdf:resource="&xsd;double"/> - <owl:withRestrictions rdf:parseType="Collection"> - <rdf:Description> - <xsd:minInclusive rdf:datatype="&xsd;double">5.0</xsd:minInclusive> - </rdf:Description> - </owl:withRestrictions> - </rdfs:Datatype> - <rdfs:Datatype> - <owl:onDatatype rdf:resource="&xsd;double"/> - <owl:withRestrictions rdf:parseType="Collection"> - <rdf:Description> - <xsd:maxInclusive rdf:datatype="&xsd;double">50.0</xsd:maxInclusive> - </rdf:Description> - </owl:withRestrictions> - </rdfs:Datatype> - </owl:intersectionOf> - </rdfs:Datatype> - </owl:equivalentClass> - <fuzzyLabel><fuzzyOwl2 fuzzyType="datatype"> -<Datatype type="trapezoidal" a="15" b="15" c="40" d="40" /> -</fuzzyOwl2></fuzzyLabel> - </rdfs:Datatype> - - - - <!-- http://www.example.com/fuzzyTrains.owl#fuzzyShortCar --> - - <rdfs:Datatype rdf:about="http://www.example.com/fuzzyTrains.owl#fuzzyShortCar"> - <owl:equivalentClass> - <rdfs:Datatype> - <owl:intersectionOf rdf:parseType="Collection"> - <rdfs:Datatype> - <owl:onDatatype rdf:resource="&xsd;double"/> - <owl:withRestrictions rdf:parseType="Collection"> - <rdf:Description> - <xsd:minInclusive rdf:datatype="&xsd;double">5.0</xsd:minInclusive> - </rdf:Description> - </owl:withRestrictions> - </rdfs:Datatype> - <rdfs:Datatype> - <owl:onDatatype rdf:resource="&xsd;double"/> - <owl:withRestrictions rdf:parseType="Collection"> - <rdf:Description> - <xsd:maxInclusive rdf:datatype="&xsd;double">50.0</xsd:maxInclusive> - </rdf:Description> - </owl:withRestrictions> - </rdfs:Datatype> - </owl:intersectionOf> - </rdfs:Datatype> - </owl:equivalentClass> - <fuzzyLabel><fuzzyOwl2 fuzzyType="datatype"> -<Datatype type="leftshoulder" a="15" b="15" /> -</fuzzyOwl2></fuzzyLabel> - </rdfs:Datatype> - - - - <!-- - /////////////////////////////////////////////////////////////////////////////////////// - // - // Object Properties - // - /////////////////////////////////////////////////////////////////////////////////////// - --> - - - - - <!-- http://www.example.com/fuzzyTrains.owl#hasCar --> - - <owl:ObjectProperty rdf:about="http://www.example.com/fuzzyTrains.owl#hasCar"> - <rdfs:range rdf:resource="http://www.example.com/fuzzyTrains.owl#Car"/> - <rdfs:domain rdf:resource="http://www.example.com/fuzzyTrains.owl#Train"/> - </owl:ObjectProperty> - - - - <!-- http://www.example.com/fuzzyTrains.owl#hasLoad --> - - <owl:ObjectProperty rdf:about="http://www.example.com/fuzzyTrains.owl#hasLoad"> - <rdfs:domain rdf:resource="http://www.example.com/fuzzyTrains.owl#Car"/> - <rdfs:range rdf:resource="http://www.example.com/fuzzyTrains.owl#Load"/> - </owl:ObjectProperty> - - - - <!-- http://www.example.com/fuzzyTrains.owl#isInFrontOf --> - - <owl:ObjectProperty rdf:about="http://www.example.com/fuzzyTrains.owl#isInFrontOf"> - <rdf:type rdf:resource="&owl;FunctionalProperty"/> - <rdfs:range rdf:resource="http://www.example.com/fuzzyTrains.owl#Car"/> - <rdfs:domain> - <owl:Class> - <owl:unionOf rdf:parseType="Collection"> - <rdf:Description rdf:about="http://www.example.com/fuzzyTrains.owl#Car"/> - <rdf:Description rdf:about="http://www.example.com/fuzzyTrains.owl#Train"/> - </owl:unionOf> - </owl:Class> - </rdfs:domain> - </owl:ObjectProperty> - - - - <!-- - /////////////////////////////////////////////////////////////////////////////////////// - // - // Data properties - // - /////////////////////////////////////////////////////////////////////////////////////// - --> - - - - - <!-- http://www.example.com/fuzzyTrains.owl#hasCarLength --> - - <owl:DatatypeProperty rdf:about="http://www.example.com/fuzzyTrains.owl#hasCarLength"> - <rdf:type rdf:resource="&owl;FunctionalProperty"/> - <rdfs:domain rdf:resource="http://www.example.com/fuzzyTrains.owl#Car"/> - <rdfs:range> - <rdfs:Datatype> - <owl:intersectionOf rdf:parseType="Collection"> - <rdfs:Datatype> - <owl:onDatatype rdf:resource="&xsd;double"/> - <owl:withRestrictions rdf:parseType="Collection"> - <rdf:Description> - <xsd:minInclusive rdf:datatype="&xsd;double">5.0</xsd:minInclusive> - </rdf:Description> - </owl:withRestrictions> - </rdfs:Datatype> - <rdfs:Datatype> - <owl:onDatatype rdf:resource="&xsd;double"/> - <owl:withRestrictions rdf:parseType="Collection"> - <rdf:Description> - <xsd:maxInclusive rdf:datatype="&xsd;double">50.0</xsd:maxInclusive> - </rdf:Description> - </owl:withRestrictions> - </rdfs:Datatype> - </owl:intersectionOf> - </rdfs:Datatype> - </rdfs:range> - </owl:DatatypeProperty> - - - - <!-- - /////////////////////////////////////////////////////////////////////////////////////// - // - // Classes - // - /////////////////////////////////////////////////////////////////////////////////////// - --> - - - - - <!-- http://www.example.com/fuzzyTrains.owl#Car --> - - <owl:Class rdf:about="http://www.example.com/fuzzyTrains.owl#Car"> - <rdfs:subClassOf rdf:resource="&owl;Thing"/> - <owl:disjointWith rdf:resource="http://www.example.com/fuzzyTrains.owl#Load"/> - <owl:disjointWith rdf:resource="http://www.example.com/fuzzyTrains.owl#Train"/> - </owl:Class> - - - - <!-- http://www.example.com/fuzzyTrains.owl#Load --> - - <owl:Class rdf:about="http://www.example.com/fuzzyTrains.owl#Load"> - <owl:disjointWith rdf:resource="http://www.example.com/fuzzyTrains.owl#Train"/> - </owl:Class> - - - - <!-- http://www.example.com/fuzzyTrains.owl#LongCar --> - - <owl:Class rdf:about="http://www.example.com/fuzzyTrains.owl#LongCar"> - <owl:equivalentClass> - <owl:Restriction> - <owl:onProperty rdf:resource="http://www.example.com/fuzzyTrains.owl#hasCarLength"/> - <owl:someValuesFrom rdf:resource="http://www.example.com/fuzzyTrains.owl#fuzzyLongCar"/> - </owl:Restriction> - </owl:equivalentClass> - <rdfs:subClassOf rdf:resource="http://www.example.com/fuzzyTrains.owl#Car"/> - </owl:Class> - - - - <!-- http://www.example.com/fuzzyTrains.owl#MediumLenghtCar --> - - <owl:Class rdf:about="http://www.example.com/fuzzyTrains.owl#MediumLenghtCar"> - <owl:equivalentClass> - <owl:Restriction> - <owl:onProperty rdf:resource="http://www.example.com/fuzzyTrains.owl#hasCarLength"/> - <owl:someValuesFrom rdf:resource="http://www.example.com/fuzzyTrains.owl#fuzzyMediumLengthCar"/> - </owl:Restriction> - </owl:equivalentClass> - <rdfs:subClassOf rdf:resource="http://www.example.com/fuzzyTrains.owl#Car"/> - </owl:Class> - - - - <!-- http://www.example.com/fuzzyTrains.owl#Rectangle --> - - <owl:Class rdf:about="http://www.example.com/fuzzyTrains.owl#Rectangle"> - <rdfs:subClassOf rdf:resource="http://www.example.com/fuzzyTrains.owl#Load"/> - </owl:Class> - - - - <!-- http://www.example.com/fuzzyTrains.owl#ShortCar --> - - <owl:Class rdf:about="http://www.example.com/fuzzyTrains.owl#ShortCar"> - <owl:equivalentClass> - <owl:Restriction> - <owl:onProperty rdf:resource="http://www.example.com/fuzzyTrains.owl#hasCarLength"/> - <owl:someValuesFrom rdf:resource="http://www.example.com/fuzzyTrains.owl#fuzzyShortCar"/> - </owl:Restriction> - </owl:equivalentClass> - <rdfs:subClassOf rdf:resource="http://www.example.com/fuzzyTrains.owl#Car"/> - </owl:Class> - - - - <!-- http://www.example.com/fuzzyTrains.owl#Train --> - - <owl:Class rdf:about="http://www.example.com/fuzzyTrains.owl#Train"/> - - - - <!-- http://www.example.com/fuzzyTrains.owl#Triangle --> - - <owl:Class rdf:about="http://www.example.com/fuzzyTrains.owl#Triangle"> - <rdfs:subClassOf rdf:resource="http://www.example.com/fuzzyTrains.owl#Load"/> - </owl:Class> - - - - <!-- http://www.w3.org/2002/07/owl#Thing --> - - <owl:Class rdf:about="&owl;Thing"/> - - - - <!-- - /////////////////////////////////////////////////////////////////////////////////////// - // - // Individuals - // - /////////////////////////////////////////////////////////////////////////////////////// - --> - - - - - <!-- http://www.example.com/fuzzyTrains.owl#car11 --> - - <owl:NamedIndividual rdf:about="http://www.example.com/fuzzyTrains.owl#car11"> - <rdf:type rdf:resource="http://www.example.com/fuzzyTrains.owl#Car"/> - <hasCarLength rdf:datatype="&xsd;double">49</hasCarLength> - <isInFrontOf rdf:resource="http://www.example.com/fuzzyTrains.owl#car12"/> - <hasLoad rdf:resource="http://www.example.com/fuzzyTrains.owl#load11a"/> - <hasLoad rdf:resource="http://www.example.com/fuzzyTrains.owl#load11b"/> - <hasLoad rdf:resource="http://www.example.com/fuzzyTrains.owl#load11c"/> - </owl:NamedIndividual> - - - - <!-- http://www.example.com/fuzzyTrains.owl#car12 --> - - <owl:NamedIndividual rdf:about="http://www.example.com/fuzzyTrains.owl#car12"> - <rdf:type rdf:resource="http://www.example.com/fuzzyTrains.owl#Car"/> - <hasCarLength rdf:datatype="&xsd;double">25</hasCarLength> - <isInFrontOf rdf:resource="http://www.example.com/fuzzyTrains.owl#car13"/> - <hasLoad rdf:resource="http://www.example.com/fuzzyTrains.owl#load12a"/> - </owl:NamedIndividual> - - - - <!-- http://www.example.com/fuzzyTrains.owl#car13 --> - - <owl:NamedIndividual rdf:about="http://www.example.com/fuzzyTrains.owl#car13"> - <rdf:type rdf:resource="http://www.example.com/fuzzyTrains.owl#Car"/> - <hasCarLength rdf:datatype="&xsd;double">13</hasCarLength> - </owl:NamedIndividual> - - - - <!-- http://www.example.com/fuzzyTrains.owl#car21 --> - - <owl:NamedIndividual rdf:about="http://www.example.com/fuzzyTrains.owl#car21"> - <rdf:type rdf:resource="http://www.example.com/fuzzyTrains.owl#Car"/> - <hasCarLength rdf:datatype="&xsd;double">47</hasCarLength> - <isInFrontOf rdf:resource="http://www.example.com/fuzzyTrains.owl#car22"/> - <hasLoad rdf:resource="http://www.example.com/fuzzyTrains.owl#load12a"/> - <hasLoad rdf:resource="http://www.example.com/fuzzyTrains.owl#load21a"/> - </owl:NamedIndividual> - - - - <!-- http://www.example.com/fuzzyTrains.owl#car22 --> - - <owl:NamedIndividual rdf:about="http://www.example.com/fuzzyTrains.owl#car22"> - <rdf:type rdf:resource="http://www.example.com/fuzzyTrains.owl#Car"/> - <hasCarLength rdf:datatype="&xsd;double">7</hasCarLength> - </owl:NamedIndividual> - - - - <!-- http://www.example.com/fuzzyTrains.owl#car61 --> - - <owl:NamedIndividual rdf:about="http://www.example.com/fuzzyTrains.owl#car61"> - <rdf:type rdf:resource="http://www.example.com/fuzzyTrains.owl#Car"/> - <hasCarLength rdf:datatype="&xsd;double">45</hasCarLength> - <isInFrontOf rdf:resource="http://www.example.com/fuzzyTrains.owl#car62"/> - </owl:NamedIndividual> - - - - <!-- http://www.example.com/fuzzyTrains.owl#car62 --> - - <owl:NamedIndividual rdf:about="http://www.example.com/fuzzyTrains.owl#car62"> - <rdf:type rdf:resource="http://www.example.com/fuzzyTrains.owl#Car"/> - <hasCarLength rdf:datatype="&xsd;double">8</hasCarLength> - <isInFrontOf rdf:resource="http://www.example.com/fuzzyTrains.owl#car63"/> - <hasLoad rdf:resource="http://www.example.com/fuzzyTrains.owl#load62a"/> - <hasLoad rdf:resource="http://www.example.com/fuzzyTrains.owl#load62b"/> - </owl:NamedIndividual> - - - - <!-- http://www.example.com/fuzzyTrains.owl#car63 --> - - <owl:NamedIndividual rdf:about="http://www.example.com/fuzzyTrains.owl#car63"> - <rdf:type rdf:resource="http://www.example.com/fuzzyTrains.owl#Car"/> - <hasCarLength rdf:datatype="&xsd;double">25</hasCarLength> - <hasLoad rdf:resource="http://www.example.com/fuzzyTrains.owl#load63a"/> - <hasLoad rdf:resource="http://www.example.com/fuzzyTrains.owl#load63b"/> - </owl:NamedIndividual> - - - - <!-- http://www.example.com/fuzzyTrains.owl#car71 --> - - <owl:NamedIndividual rdf:about="http://www.example.com/fuzzyTrains.owl#car71"> - <rdf:type rdf:resource="http://www.example.com/fuzzyTrains.owl#Car"/> - <hasCarLength rdf:datatype="&xsd;double">7</hasCarLength> - <isInFrontOf rdf:resource="http://www.example.com/fuzzyTrains.owl#car72"/> - <hasLoad rdf:resource="http://www.example.com/fuzzyTrains.owl#load71a"/> - <hasLoad rdf:resource="http://www.example.com/fuzzyTrains.owl#load71b"/> - </owl:NamedIndividual> - - - - <!-- http://www.example.com/fuzzyTrains.owl#car72 --> - - <owl:NamedIndividual rdf:about="http://www.example.com/fuzzyTrains.owl#car72"> - <rdf:type rdf:resource="http://www.example.com/fuzzyTrains.owl#Car"/> - <hasCarLength rdf:datatype="&xsd;double">6</hasCarLength> - <hasLoad rdf:resource="http://www.example.com/fuzzyTrains.owl#load72a"/> - <hasLoad rdf:resource="http://www.example.com/fuzzyTrains.owl#load72b"/> - <hasLoad rdf:resource="http://www.example.com/fuzzyTrains.owl#load72c"/> - </owl:NamedIndividual> - - - - <!-- http://www.example.com/fuzzyTrains.owl#east1 --> - - <owl:NamedIndividual rdf:about="http://www.example.com/fuzzyTrains.owl#east1"> - <rdf:type rdf:resource="http://www.example.com/fuzzyTrains.owl#Train"/> - <isInFrontOf rdf:resource="http://www.example.com/fuzzyTrains.owl#car11"/> - <hasCar rdf:resource="http://www.example.com/fuzzyTrains.owl#car11"/> - <hasCar rdf:resource="http://www.example.com/fuzzyTrains.owl#car12"/> - <hasCar rdf:resource="http://www.example.com/fuzzyTrains.owl#car13"/> - </owl:NamedIndividual> - - - - <!-- http://www.example.com/fuzzyTrains.owl#east2 --> - - <owl:NamedIndividual rdf:about="http://www.example.com/fuzzyTrains.owl#east2"> - <rdf:type rdf:resource="http://www.example.com/fuzzyTrains.owl#Train"/> - <hasCar rdf:resource="http://www.example.com/fuzzyTrains.owl#car21"/> - <isInFrontOf rdf:resource="http://www.example.com/fuzzyTrains.owl#car21"/> - <hasCar rdf:resource="http://www.example.com/fuzzyTrains.owl#car22"/> - </owl:NamedIndividual> - - - - <!-- http://www.example.com/fuzzyTrains.owl#load11a --> - - <owl:NamedIndividual rdf:about="http://www.example.com/fuzzyTrains.owl#load11a"> - <rdf:type rdf:resource="http://www.example.com/fuzzyTrains.owl#Rectangle"/> - </owl:NamedIndividual> - - - - <!-- http://www.example.com/fuzzyTrains.owl#load11b --> - - <owl:NamedIndividual rdf:about="http://www.example.com/fuzzyTrains.owl#load11b"> - <rdf:type rdf:resource="http://www.example.com/fuzzyTrains.owl#Rectangle"/> - </owl:NamedIndividual> - - - - <!-- http://www.example.com/fuzzyTrains.owl#load11c --> - - <owl:NamedIndividual rdf:about="http://www.example.com/fuzzyTrains.owl#load11c"> - <rdf:type rdf:resource="http://www.example.com/fuzzyTrains.owl#Triangle"/> - </owl:NamedIndividual> - - - - <!-- http://www.example.com/fuzzyTrains.owl#load12a --> - - <owl:NamedIndividual rdf:about="http://www.example.com/fuzzyTrains.owl#load12a"> - <rdf:type rdf:resource="http://www.example.com/fuzzyTrains.owl#Rectangle"/> - </owl:NamedIndividual> - - - - <!-- http://www.example.com/fuzzyTrains.owl#load21a --> - - <owl:NamedIndividual rdf:about="http://www.example.com/fuzzyTrains.owl#load21a"> - <rdf:type rdf:resource="http://www.example.com/fuzzyTrains.owl#Rectangle"/> - </owl:NamedIndividual> - - - - <!-- http://www.example.com/fuzzyTrains.owl#load21b --> - - <owl:NamedIndividual rdf:about="http://www.example.com/fuzzyTrains.owl#load21b"> - <rdf:type rdf:resource="http://www.example.com/fuzzyTrains.owl#Triangle"/> - </owl:NamedIndividual> - - - - <!-- http://www.example.com/fuzzyTrains.owl#load62a --> - - <owl:NamedIndividual rdf:about="http://www.example.com/fuzzyTrains.owl#load62a"> - <rdf:type rdf:resource="http://www.example.com/fuzzyTrains.owl#Triangle"/> - </owl:NamedIndividual> - - - - <!-- http://www.example.com/fuzzyTrains.owl#load62b --> - - <owl:NamedIndividual rdf:about="http://www.example.com/fuzzyTrains.owl#load62b"> - <rdf:type rdf:resource="http://www.example.com/fuzzyTrains.owl#Rectangle"/> - </owl:NamedIndividual> - - - - <!-- http://www.example.com/fuzzyTrains.owl#load63a --> - - <owl:NamedIndividual rdf:about="http://www.example.com/fuzzyTrains.owl#load63a"> - <rdf:type rdf:resource="http://www.example.com/fuzzyTrains.owl#Rectangle"/> - </owl:NamedIndividual> - - - - <!-- http://www.example.com/fuzzyTrains.owl#load63b --> - - <owl:NamedIndividual rdf:about="http://www.example.com/fuzzyTrains.owl#load63b"> - <rdf:type rdf:resource="http://www.example.com/fuzzyTrains.owl#Triangle"/> - </owl:NamedIndividual> - - - - <!-- http://www.example.com/fuzzyTrains.owl#load71a --> - - <owl:NamedIndividual rdf:about="http://www.example.com/fuzzyTrains.owl#load71a"> - <rdf:type rdf:resource="http://www.example.com/fuzzyTrains.owl#Triangle"/> - </owl:NamedIndividual> - - - - <!-- http://www.example.com/fuzzyTrains.owl#load71b --> - - <owl:NamedIndividual rdf:about="http://www.example.com/fuzzyTrains.owl#load71b"> - <rdf:type rdf:resource="http://www.example.com/fuzzyTrains.owl#Rectangle"/> - </owl:NamedIndividual> - - - - <!-- http://www.example.com/fuzzyTrains.owl#load72a --> - - <owl:NamedIndividual rdf:about="http://www.example.com/fuzzyTrains.owl#load72a"> - <rdf:type rdf:resource="http://www.example.com/fuzzyTrains.owl#Rectangle"/> - </owl:NamedIndividual> - - - - <!-- http://www.example.com/fuzzyTrains.owl#load72b --> - - <owl:NamedIndividual rdf:about="http://www.example.com/fuzzyTrains.owl#load72b"> - <rdf:type rdf:resource="http://www.example.com/fuzzyTrains.owl#Rectangle"/> - </owl:NamedIndividual> - - - - <!-- http://www.example.com/fuzzyTrains.owl#load72c --> - - <owl:NamedIndividual rdf:about="http://www.example.com/fuzzyTrains.owl#load72c"> - <rdf:type rdf:resource="http://www.example.com/fuzzyTrains.owl#Triangle"/> - </owl:NamedIndividual> - - - - <!-- http://www.example.com/fuzzyTrains.owl#west6 --> - - <owl:NamedIndividual rdf:about="http://www.example.com/fuzzyTrains.owl#west6"> - <rdf:type rdf:resource="http://www.example.com/fuzzyTrains.owl#Train"/> - <isInFrontOf rdf:resource="http://www.example.com/fuzzyTrains.owl#car61"/> - <hasCar rdf:resource="http://www.example.com/fuzzyTrains.owl#car61"/> - <hasCar rdf:resource="http://www.example.com/fuzzyTrains.owl#car62"/> - <hasCar rdf:resource="http://www.example.com/fuzzyTrains.owl#car63"/> - </owl:NamedIndividual> - - - - <!-- http://www.example.com/fuzzyTrains.owl#west7 --> - - <owl:NamedIndividual rdf:about="http://www.example.com/fuzzyTrains.owl#west7"> - <rdf:type rdf:resource="http://www.example.com/fuzzyTrains.owl#Train"/> - <hasCar rdf:resource="http://www.example.com/fuzzyTrains.owl#car71"/> - <isInFrontOf rdf:resource="http://www.example.com/fuzzyTrains.owl#car71"/> - <hasCar rdf:resource="http://www.example.com/fuzzyTrains.owl#car72"/> - </owl:NamedIndividual> -</rdf:RDF> - - - -<!-- Generated by the OWL API (version 3.1.0.20069) http://owlapi.sourceforge.net --> - Deleted: trunk/examples/fuzzydll/fuzzyTrains_v1.4.owl =================================================================== --- trunk/examples/fuzzydll/fuzzyTrains_v1.4.owl 2011-06-20 10:33:20 UTC (rev 2914) +++ trunk/examples/fuzzydll/fuzzyTrains_v1.4.owl 2011-06-20 11:04:22 UTC (rev 2915) @@ -1,647 +0,0 @@ -<?xml version="1.0"?> - - -<!DOCTYPE rdf:RDF [ - <!ENTITY owl "http://www.w3.org/2002/07/owl#" > - <!ENTITY xsd "http://www.w3.org/2001/XMLSchema#" > - <!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#" > - <!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#" > -]> - - -<rdf:RDF xmlns="http://www.example.com/fuzzyTrains.owl#" - xml:base="http://www.example.com/fuzzyTrains.owl" - xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" - 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#"> - <owl:Ontology rdf:about="http://www.example.com/fuzzyTrains.owl"> - <rdfs:comment xml:lang="en">Fuzzy adaptation of Michalsky's trains problem [1] -Original idea from [2] - -Developed by Josue Iglesias (josue at grpss.ssr.upm.es) - -[1] http://www.mli.gmu.edu/papers/79-80/80-05.pdf -[2] http://users.iit.demokritos.gr/~konstant/dload/Pubs/fuzz10.pdf</rdfs:comment> - <rdfs:comment xml:lang="en">v1.0: Cars can be (fuzzy) classified as being short, medium or long depending on their length (double)</rdfs:comment> - <rdfs:comment xml:lang="en">v1.1: Car's load can be more or less similar to a triangle and/or a rectangle</rdfs:comment> - <rdfs:comment xml:lang="en">v1.2: Change properties (Train) hasFirstCar (Car) + (Car) isInFrontOf (Car) for just (Train) hasCar (Car) in order to make the example easier</rdfs:comment> - <rdfs:comment xml:lang="en">v1.3: -Some concepts of v1.1 and v1.2 are merged: -- (Train) hasCar (Train) -- (Train) or (Car) isInFrontOf (Car)</rdfs:comment> - <rdfs:comment xml:lang="en">v1.4: Instead of defining fuzzy data types as (double[>= 5.0] and double[<= 50.0]), this is change to - -- fuzzyShortCar (double[>= 5.0] and double[<= 150.0]) -- fuzzyMediumLengthCar (double[>= -100.0] and double[<= 100.0]) -- fuzzyLongCar (double[>= -150.0] and double[<= 50.0]) - -Now, hasLength range has changed to - -(double[>= -1000.0] and double[<= 1000.0]) - -This is done in order crisp reasoners not to infer that ShortCar, MediumLengthCar and LongCar to be equivalent clases. - -Note that although for a crip reasoner, e.g., fuzzyShortCar range from 5 to 150, for a fuzzy reasoner it would range from 5 to 50 (as it also applies the fuzzy annotations attched to fuzzyShortCar).</rdfs:comment> - </owl:Ontology> - - - - <!-- - /////////////////////////////////////////////////////////////////////////////////////// - // - // Annotation properties - // - /////////////////////////////////////////////////////////////////////////////////////// - --> - - <owl:AnnotationProperty rdf:about="http://www.example.com/fuzzyTrains.owl#fuzzyLabel"/> - <owl:AnnotationProperty rdf:about="&rdfs;comment"/> - - - - <!-- - /////////////////////////////////////////////////////////////////////////////////////// - // - // Datatypes - // - /////////////////////////////////////////////////////////////////////////////////////// - --> - - - - - <!-- http://www.example.com/fuzzyTrains.owl#fuzzyLongCar --> - - <rdfs:Datatype rdf:about="http://www.example.com/fuzzyTrains.owl#fuzzyLongCar"> - <owl:equivalentClass> - <rdfs:Datatype> - <owl:intersectionOf rdf:parseType="Collection"> - <rdfs:Datatype> - <owl:onDatatype rdf:resource="&xsd;double"/> - <owl:withRestrictions rdf:parseType="Collection"> - <rdf:Description> - <xsd:minInclusive rdf:datatype="&xsd;double">-150.0</xsd:minInclusive> - </rdf:Description> - </owl:withRestrictions> - </rdfs:Datatype> - <rdfs:Datatype> - <owl:onDatatype rdf:resource="&xsd;double"/> - <owl:withRestrictions rdf:parseType="Collection"> - <rdf:Description> - <xsd:maxInclusive rdf:datatype="&xsd;double">50.0</xsd:maxInclusive> - </rdf:Description> - </owl:withRestrictions> - </rdfs:Datatype> - </owl:intersectionOf> - </rdfs:Datatype> - </owl:equivalentClass> - <fuzzyLabel><fuzzyOwl2 fuzzyType="datatype"> -<Datatype type="rightshoulder" a="40" b="40" /> -</fuzzyOwl2></fuzzyLabel> - </rdfs:Datatype> - - - - <!-- http://www.example.com/fuzzyTrains.owl#fuzzyMediumLengthCar --> - - <rdfs:Datatype rdf:about="http://www.example.com/fuzzyTrains.owl#fuzzyMediumLengthCar"> - <owl:equivalentClass> - <rdfs:Datatype> - <owl:intersectionOf rdf:parseType="Collection"> - <rdfs:Datatype> - <owl:onDatatype rdf:resource="&xsd;double"/> - <owl:withRestrictions rdf:parseType="Collection"> - <rdf:Description> - <xsd:minInclusive rdf:datatype="&xsd;double">-100.0</xsd:minInclusive> - </rdf:Description> - </owl:withRestrictions> - </rdfs:Datatype> - <rdfs:Datatype> - <owl:onDatatype rdf:resource="&xsd;double"/> - <owl:withRestrictions rdf:parseType="Collection"> - <rdf:Description> - <xsd:maxInclusive rdf:datatype="&xsd;double">100.0</xsd:maxInclusive> - </rdf:Description> - </owl:withRestrictions> - </rdfs:Datatype> - </owl:intersectionOf> - </rdfs:Datatype> - </owl:equivalentClass> - <fuzzyLabel><fuzzyOwl2 fuzzyType="datatype"> -<Datatype type="trapezoidal" a="15" b="15" c="40" d="40" /> -</fuzzyOwl2></fuzzyLabel> - </rdfs:Datatype> - - - - <!-- http://www.example.com/fuzzyTrains.owl#fuzzyShortCar --> - - <rdfs:Datatype rdf:about="http://www.example.com/fuzzyTrains.owl#fuzzyShortCar"> - <owl:equivalentClass> - <rdfs:Datatype> - <owl:intersectionOf rdf:parseType="Collection"> - <rdfs:Datatype> - <owl:onDatatype rdf:resource="&xsd;double"/> - <owl:withRestrictions rdf:parseType="Collection"> - <rdf:Description> - <xsd:minInclusive rdf:datatype="&xsd;double">5.0</xsd:minInclusive> - </rdf:Description> - </owl:withRestrictions> - </rdfs:Datatype> - <rdfs:Datatype> - <owl:onDatatype rdf:resource="&xsd;double"/> - <owl:withRestrictions rdf:parseType="Collection"> - <rdf:Description> - <xsd:maxInclusive rdf:datatype="&xsd;double">150.0</xsd:maxInclusive> - </rdf:Description> - </owl:withRestrictions> - </rdfs:Datatype> - </owl:intersectionOf> - </rdfs:Datatype> - </owl:equivalentClass> - <fuzzyLabel><fuzzyOwl2 fuzzyType="datatype"> -<Datatype type="leftshoulder" a="15" b="15" /> -</fuzzyOwl2></fuzzyLabel> - </rdfs:Datatype> - - - - <!-- - /////////////////////////////////////////////////////////////////////////////////////// - // - // Object Properties - // - /////////////////////////////////////////////////////////////////////////////////////// - --> - - - - - <!-- http://www.example.com/fuzzyTrains.owl#hasCar --> - - <owl:ObjectProperty rdf:about="http://www.example.com/fuzzyTrains.owl#hasCar"> - <rdfs:range rdf:resource="http://www.example.com/fuzzyTrains.owl#Car"/> - <rdfs:domain rdf:resource="http://www.example.com/fuzzyTrains.owl#Train"/> - </owl:ObjectProperty> - - - - <!-- http://www.example.com/fuzzyTrains.owl#hasLoad --> - - <owl:ObjectProperty rdf:about="http://www.example.com/fuzzyTrains.owl#hasLoad"> - <rdfs:domain rdf:resource="http://www.example.com/fuzzyTrains.owl#Car"/> - <rdfs:range rdf:resource="http://www.example.com/fuzzyTrains.owl#Load"/> - </owl:ObjectProperty> - - - - <!-- http://www.example.com/fuzzyTrains.owl#isInFrontOf --> - - <owl:ObjectProperty rdf:about="http://www.example.com/fuzzyTrains.owl#isInFrontOf"> - <rdf:type rdf:resource="&owl;FunctionalProperty"/> - <rdfs:range rdf:resource="http://www.example.com/fuzzyTrains.owl#Car"/> - <rdfs:domain> - <owl:Class> - <owl:unionOf rdf:parseType="Collection"> - <rdf:Description rdf:about="http://www.example.com/fuzzyTrains.owl#Car"/> - <rdf:Description rdf:about="http://www.example.com/fuzzyTrains.owl#Train"/> - </owl:unionOf> - </owl:Class> - </rdfs:domain> - </owl:ObjectProperty> - - - - <!-- - /////////////////////////////////////////////////////////////////////////////////////// - // - // Data properties - // - /////////////////////////////////////////////////////////////////////////////////////// - --> - - - - - <!-- http://www.example.com/fuzzyTrains.owl#hasCarLength --> - - <owl:DatatypeProperty rdf:about="http://www.example.com/fuzzyTrains.owl#hasCarLength"> - <rdf:type rdf:resource="&owl;FunctionalProperty"/> - <rdfs:domain rdf:resource="http://www.example.com/fuzzyTrains.owl#Car"/> - <rdfs:range> - <rdfs:Datatype> - <owl:intersectionOf rdf:parseType="Collection"> - <rdfs:Datatype> - <owl:onDatatype rdf:resource="&xsd;double"/> - <owl:withRestrictions rdf:parseType="Collection"> - <rdf:Description> - <xsd:minInclusive rdf:datatype="&xsd;double">-1000.0</xsd:minInclusive> - </rdf:Description> - </owl:withRestrictions> - </rdfs:Datatype> - <rdfs:Datatype> - <owl:onDatatype rdf:resource="&xsd;double"/> - <owl:withRestrictions rdf:parseType="Collection"> - <rdf:Description> - <xsd:maxInclusive rdf:datatype="&xsd;double">1000.0</xsd:maxInclusive> - </rdf:Description> - </owl:withRestrictions> - </rdfs:Datatype> - </owl:intersectionOf> - </rdfs:Datatype> - </rdfs:range> - </owl:DatatypeProperty> - - - - <!-- - /////////////////////////////////////////////////////////////////////////////////////// - // - // Classes - // - /////////////////////////////////////////////////////////////////////////////////////// - --> - - - - - <!-- http://www.example.com/fuzzyTrains.owl#Car --> - - <owl:Class rdf:about="http://www.example.com/fuzzyTrains.owl#Car"> - <rdfs:subClassOf rdf:resource="&owl;Thing"/> - <owl:disjointWith rdf:resource="http://www.example.com/fuzzyTrains.owl#Load"/> - <owl:disjointWith rdf:resource="http://www.example.com/fuzzyTrains.owl#Train"/> - </owl:Class> - - - - <!-- http://www.example.com/fuzzyTrains.owl#Load --> - - <owl:Class rdf:about="http://www.example.com/fuzzyTrains.owl#Load"> - <owl:disjointWith rdf:resource="http://www.example.com/fuzzyTrains.owl#Train"/> - </owl:Class> - - - - <!-- http://www.example.com/fuzzyTrains.owl#LongCar --> - - <owl:Class rdf:about="http://www.example.com/fuzzyTrains.owl#LongCar"> - <owl:equivalentClass> - <owl:Restriction> - <owl:onProperty rdf:resource="http://www.example.com/fuzzyTrains.owl#hasCarLength"/> - <owl:someValuesFrom rdf:resource="http://www.example.com/fuzzyTrains.owl#fuzzyLongCar"/> - </owl:Restriction> - </owl:equivalentClass> - <rdfs:subClassOf rdf:resource="http://www.example.com/fuzzyTrains.owl#Car"/> - </owl:Class> - - - - <!-- http://www.example.com/fuzzyTrains.owl#MediumLenghtCar --> - - <owl:Class rdf:about="http://www.example.com/fuzzyTrains.owl#MediumLenghtCar"> - <owl:equivalentClass> - <owl:Restriction> - <owl:onProperty rdf:resource="http://www.example.com/fuzzyTrains.owl#hasCarLength"/> - <owl:someValuesFrom rdf:resource="http://www.example.com/fuzzyTrains.owl#fuzzyMediumLengthCar"/> - </owl:Restriction> - </owl:equivalentClass> - <rdfs:subClassOf rdf:resource="http://www.example.com/fuzzyTrains.owl#Car"/> - </owl:Class> - - - - <!-- http://www.example.com/fuzzyTrains.owl#Rectangle --> - - <owl:Class rdf:about="http://www.example.com/fuzzyTrains.owl#Rectangle"> - <rdfs:subClassOf rdf:resource="http://www.example.com/fuzzyTrains.owl#Load"/> - </owl:Class> - - - - <!-- http://www.example.com/fuzzyTrains.owl#ShortCar --> - - <owl:Class rdf:about="http://www.example.com/fuzzyTrains.owl#ShortCar"> - <owl:equivalentClass> - <owl:Restriction> - <owl:onProperty rdf:resource="http://www.example.com/fuzzyTrains.owl#hasCarLength"/> - <owl:someValuesFrom rdf:resource="http://www.example.com/fuzzyTrains.owl#fuzzyShortCar"/> - </owl:Restriction> - </owl:equivalentClass> - <rdfs:subClassOf rdf:resource="http://www.example.com/fuzzyTrains.owl#Car"/> - </owl:Class> - - - - <!-- http://www.example.com/fuzzyTrains.owl#Train --> - - <owl:Class rdf:about="http://www.example.com/fuzzyTrains.owl#Train"/> - - - - <!-- http://www.example.com/fuzzyTrains.owl#Triangle --> - - <owl:Class rdf:about="http://www.example.com/fuzzyTrains.owl#Triangle"> - <rdfs:subClassOf rdf:resource="http://www.example.com/fuzzyTrains.owl#Load"/> - </owl:Class> - - - - <!-- http://www.w3.org/2002/07/owl#Thing --> - - <owl:Class rdf:about="&owl;T... [truncated message content] |