From: <ku...@us...> - 2010-08-17 12:23:31
|
Revision: 2261 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=2261&view=rev Author: kurzum Date: 2010-08-17 12:23:25 +0000 (Tue, 17 Aug 2010) Log Message: ----------- fixed small things in pom.xml Modified Paths: -------------- trunk/lib/makePOM.sh trunk/lib/pomBegin.xml trunk/pom.xml Modified: trunk/lib/makePOM.sh =================================================================== --- trunk/lib/makePOM.sh 2010-08-12 16:43:15 UTC (rev 2260) +++ trunk/lib/makePOM.sh 2010-08-17 12:23:25 UTC (rev 2261) @@ -11,7 +11,7 @@ artifactid=$(echo $filepath | sed 's/.*\///') -#~ mvn deploy:deploy-file -Dfile=$filepath -DrepositoryId=archiva.snapshots -Durl=http://db0.aksw.org:8081/archiva/repository/snapshots -DartifactId=$artifactid -DgroupId=dllearnerDependency -Dversion=snapshot -Dpackaging=jar +#~ mvn deploy:deploy-file -Dfile=$filepath -DrepositoryId=maven.aksw.snapshots -Durl=http://db0.aksw.org:8081/archiva/repository/snapshots -DartifactId=$artifactid -DgroupId=dllearnerDependency -Dversion=snapshot -Dpackaging=jar echo "writing to "$PWD"/pomtmp.xml" echo "<dependency> <groupId>dllearnerDependency</groupId> <artifactId>"$artifactid"</artifactId> <version>snapshot</version> </dependency>" >> pomtmp.xml Modified: trunk/lib/pomBegin.xml =================================================================== --- trunk/lib/pomBegin.xml 2010-08-12 16:43:15 UTC (rev 2260) +++ trunk/lib/pomBegin.xml 2010-08-17 12:23:25 UTC (rev 2261) @@ -11,14 +11,14 @@ </properties> <distributionManagement> <repository> - <id>archiva.internal</id> - <name>Internal Release Repository</name> - <url> http://db0.aksw.org:8081/archiva/repository/internal/</url> + <id>maven.aksw.internal</id> + <name>AKSW Internal Release Repository</name> + <url>http://db0.aksw.org:8081/archiva/repository/internal</url> </repository> <snapshotRepository> - <id>archiva.snapshots</id> - <name>Internal Snapshot Repository</name> - <url>http://db0.aksw.org:8081/archiva/repository/snapshots/</url> + <id>maven.aksw.snapshot</id> + <name>AKSW Snapshot Repository</name> + <url>http://db0.aksw.org:8081/archiva/repository/snapshots</url> </snapshotRepository> </distributionManagement> Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2010-08-12 16:43:15 UTC (rev 2260) +++ trunk/pom.xml 2010-08-17 12:23:25 UTC (rev 2261) @@ -11,14 +11,14 @@ </properties> <distributionManagement> <repository> - <id>archiva.internal</id> - <name>Internal Release Repository</name> - <url> http://db0.aksw.org:8081/archiva/repository/internal/</url> + <id>maven.aksw.internal</id> + <name>AKSW Internal Release Repository</name> + <url>http://db0.aksw.org:8081/archiva/repository/internal</url> </repository> <snapshotRepository> - <id>archiva.snapshots</id> - <name>Internal Snapshot Repository</name> - <url>http://db0.aksw.org:8081/archiva/repository/snapshots/</url> + <id>maven.aksw.snapshot</id> + <name>AKSW Snapshot Repository</name> + <url>http://db0.aksw.org:8081/archiva/repository/snapshots</url> </snapshotRepository> </distributionManagement> @@ -82,12 +82,6 @@ <dependency> <groupId>dllearnerDependency</groupId> <artifactId>dig1.1-xmlbeans.jar</artifactId> <version>snapshot</version> </dependency> <dependency> <groupId>dllearnerDependency</groupId> <artifactId>lucene-core-3.0.1.jar</artifactId> <version>snapshot</version> </dependency> <dependency> <groupId>dllearnerDependency</groupId> <artifactId>ini4j-0.3.2.jar</artifactId> <version>snapshot</version> </dependency> -<dependency> <groupId>dllearnerDependency</groupId> <artifactId>converter.jar</artifactId> <version>snapshot</version> </dependency> -<dependency> <groupId>dllearnerDependency</groupId> <artifactId>commons-lang-2.3.jar</artifactId> <version>snapshot</version> </dependency> -<dependency> <groupId>dllearnerDependency</groupId> <artifactId>rdbtoonto.jar</artifactId> <version>snapshot</version> </dependency> -<dependency> <groupId>dllearnerDependency</groupId> <artifactId>mysql-connector-java-5.1.6-bin.jar</artifactId> <version>snapshot</version> </dependency> -<dependency> <groupId>dllearnerDependency</groupId> <artifactId>commons-collections-3.2.jar</artifactId> <version>snapshot</version> </dependency> -<dependency> <groupId>dllearnerDependency</groupId> <artifactId>commons-configuration-1.4.jar</artifactId> <version>snapshot</version> </dependency> <dependency> <groupId>dllearnerDependency</groupId> <artifactId>org.protege.editor.core.application.jar</artifactId> <version>snapshot</version> </dependency> <dependency> <groupId>dllearnerDependency</groupId> <artifactId>org.protege.editor.owl.jar</artifactId> <version>snapshot</version> </dependency> <dependency> <groupId>dllearnerDependency</groupId> <artifactId>org.semanticweb.HermiT.jar</artifactId> <version>snapshot</version> </dependency> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ku...@us...> - 2010-08-17 17:43:52
|
Revision: 2262 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=2262&view=rev Author: kurzum Date: 2010-08-17 17:43:46 +0000 (Tue, 17 Aug 2010) Log Message: ----------- more maven pom.xml fixes Modified Paths: -------------- trunk/lib/makePOM.sh trunk/lib/pomBegin.xml trunk/pom.xml Added Paths: ----------- trunk/maven.todo Modified: trunk/lib/makePOM.sh =================================================================== --- trunk/lib/makePOM.sh 2010-08-17 12:23:25 UTC (rev 2261) +++ trunk/lib/makePOM.sh 2010-08-17 17:43:46 UTC (rev 2262) @@ -20,7 +20,7 @@ cat pomEnd.xml >> pomtmp.xml -mv pomtmp.xml ../pom.xml +mv -v pomtmp.xml ../pom.xml echo "in case the script fails with 401 you need to update credentials in ~/.m2/settings.xml" Modified: trunk/lib/pomBegin.xml =================================================================== --- trunk/lib/pomBegin.xml 2010-08-17 12:23:25 UTC (rev 2261) +++ trunk/lib/pomBegin.xml 2010-08-17 17:43:46 UTC (rev 2262) @@ -57,6 +57,12 @@ <testOutputDirectory>target/test-classes</testOutputDirectory> <sourceDirectory>src/dl-learner</sourceDirectory> <scriptSourceDirectory>bin</scriptSourceDirectory> + <resources> + <resource> + <directory>src/dl-learner</directory> + </resource> + </resources> + <!-- <testSourceDirectory>src/test/java</testSourceDirectory> --> </build> Added: trunk/maven.todo =================================================================== --- trunk/maven.todo (rev 0) +++ trunk/maven.todo 2010-08-17 17:43:46 UTC (rev 2262) @@ -0,0 +1,3 @@ +- create a resource dir and adjust paths, especially for components.ini +- move tests +- check http://maven.apache.org/guides/introduction/introduction-to-the-pom.html for more options Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2010-08-17 12:23:25 UTC (rev 2261) +++ trunk/pom.xml 2010-08-17 17:43:46 UTC (rev 2262) @@ -57,6 +57,12 @@ <testOutputDirectory>target/test-classes</testOutputDirectory> <sourceDirectory>src/dl-learner</sourceDirectory> <scriptSourceDirectory>bin</scriptSourceDirectory> + <resources> + <resource> + <directory>src/dl-learner</directory> + </resource> + </resources> + <!-- <testSourceDirectory>src/test/java</testSourceDirectory> --> </build> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hee...@us...> - 2010-08-20 09:01:03
|
Revision: 2264 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=2264&view=rev Author: heeroyuy Date: 2010-08-20 09:00:54 +0000 (Fri, 20 Aug 2010) Log Message: ----------- -added heart disease ontology Added Paths: ----------- trunk/src/dl-learner/org/dllearner/examples/Heart.java trunk/test/heart/ trunk/test/heart/files/ trunk/test/heart/files/heart.dat trunk/test/heart/heart.owl trunk/test/heart/train.conf Added: trunk/src/dl-learner/org/dllearner/examples/Heart.java =================================================================== --- trunk/src/dl-learner/org/dllearner/examples/Heart.java (rev 0) +++ trunk/src/dl-learner/org/dllearner/examples/Heart.java 2010-08-20 09:00:54 UTC (rev 2264) @@ -0,0 +1,423 @@ +package org.dllearner.examples; + +import java.io.File; +import java.io.FileNotFoundException; +import java.util.HashMap; +import java.util.LinkedList; +import java.util.List; +import java.util.Scanner; +import java.util.Set; +import java.util.TreeSet; + +import org.dllearner.core.owl.Axiom; +import org.dllearner.core.owl.BooleanDatatypePropertyAssertion; +import org.dllearner.core.owl.ClassAssertionAxiom; +import org.dllearner.core.owl.DatatypeProperty; +import org.dllearner.core.owl.DatatypePropertyAssertion; +import org.dllearner.core.owl.DoubleDatatypePropertyAssertion; +import org.dllearner.core.owl.Individual; +import org.dllearner.core.owl.KB; +import org.dllearner.core.owl.NamedClass; +import org.dllearner.core.owl.ObjectProperty; +import org.dllearner.core.owl.ObjectPropertyAssertion; +import org.dllearner.core.owl.SubClassAxiom; +import org.dllearner.parser.KBParser; +import org.dllearner.parser.ParseException; +import org.dllearner.reasoning.OWLAPIReasoner; +import org.dllearner.utilities.Files; +import org.dllearner.utilities.Helper; +import org.semanticweb.owlapi.model.IRI; + +public class Heart { + + private static IRI ontologyIRI = IRI.create("http://dl-learner.org/heart"); + private static final String fileName = "test/heart/files/heart.dat"; + private static HashMap<String, Integer> patients = new HashMap<String, Integer>(); + private static List<Axiom> axioms = new LinkedList<Axiom>(); + private static Set<String> thals = new TreeSet<String>(); + + public static void main(String agrs[]) throws FileNotFoundException, ParseException { + Scanner input = new Scanner(new File(fileName), "UTF-8"); + File owlFile = new File("test/heart/heart.owl"); + long startTime, duration; + String time; + mapThalValues(); + KB kb = new KB(); + kb.addKB(generateDomainAndRangeForObjectProperties()); + NamedClass atomClass = getAtomicConcept("Thals"); + for (String thal : thals) { + NamedClass elClass = getAtomicConcept(thal); + SubClassAxiom sc = new SubClassAxiom(elClass, atomClass); + kb.addAxiom(sc); + } + + System.out.print("Reading in heart files ... "); + startTime = System.nanoTime(); + + int i = 0; + while (input.hasNextLine()) { + String nextLine = input.next(); + + String age = nextLine.substring(0, nextLine.indexOf(",")); + nextLine = nextLine.replaceFirst(age + ",", ""); + + String sex = nextLine.substring(0, nextLine.indexOf(",")); + nextLine = nextLine.replaceFirst(sex + ",", ""); + + String chestPain = nextLine.substring(0, nextLine.indexOf(",")); + nextLine = nextLine.replaceFirst(chestPain + ",", ""); + + String bloodPressure = nextLine.substring(0, nextLine.indexOf(",")); + nextLine = nextLine.replaceFirst(bloodPressure + ",", ""); + + String cholestoral = nextLine.substring(0, nextLine.indexOf(",")); + nextLine = nextLine.replaceFirst(cholestoral + ",", ""); + + String bloodSugar = nextLine.substring(0, nextLine.indexOf(",")); + nextLine = nextLine.replaceFirst(bloodSugar + ",", ""); + + String electrocardiographicResults = nextLine.substring(0, + nextLine.indexOf(",")); + nextLine = nextLine.replaceFirst(electrocardiographicResults + ",", + ""); + + String maximumHeartRate = nextLine.substring(0, + nextLine.indexOf(",")); + nextLine = nextLine.replaceFirst(maximumHeartRate + ",", ""); + + String angina = nextLine.substring(0, nextLine.indexOf(",")); + nextLine = nextLine.replaceFirst(angina + ",", ""); + + String oldpeak = nextLine.substring(0, nextLine.indexOf(",")); + nextLine = nextLine.replaceFirst(oldpeak + ",", ""); + + String stSegment = nextLine.substring(0, nextLine.indexOf(",")); + nextLine = nextLine.replaceFirst(stSegment + ",", ""); + + String majorVessels = nextLine.substring(0, nextLine.indexOf(",")); + nextLine = nextLine.replaceFirst(majorVessels + ",", ""); + + String thal = nextLine.substring(0, nextLine.indexOf(",")); + nextLine = nextLine.replaceFirst(thal + ",", ""); + + String heartDisease = nextLine; + // System.out.println("age: "+ age + " sex: " + sex + " 1: " + + // chestPain + " 2: "+ bloodPressure+" 3: "+cholestoral+" 4: "+ + // bloodSugar+" 5: "+ electrocardiographicResults+" 6: "+ + // maximumHeartRate+" 7: "+ angina+" 8: " + oldpeak+ " 9: "+ + // stSegment+" 10: "+majorVessels+" 11: "+ thal+" 12: "+ + // heartDisease+ " 13: "+i); + List<Axiom> axioms = mapClauses(age, sex, chestPain, bloodPressure, + cholestoral, bloodSugar, electrocardiographicResults, + maximumHeartRate, angina, oldpeak, stSegment, majorVessels, + thal, heartDisease, i); + for (Axiom axiom : axioms) + kb.addAxiom(axiom); + + i++; + } + duration = System.nanoTime() - startTime; + time = Helper.prettyPrintNanoSeconds(duration, false, false); + System.out.println("OK (" + time + ")."); + + // writing generated knowledge base + System.out.print("Writing OWL file ... "); + startTime = System.nanoTime(); + OWLAPIReasoner.exportKBToOWL(owlFile, kb, ontologyIRI); + duration = System.nanoTime() - startTime; + time = Helper.prettyPrintNanoSeconds(duration, false, false); + System.out.println("OK (" + time + ")."); + + // generating second conf file + System.out.print("Generating conf file ... "); + File confTrainFile = new File("test/heart/train.conf"); + Files.clearFile(confTrainFile); + generateConfFile(confTrainFile); + generateExamples(confTrainFile); + duration = System.nanoTime() - startTime; + time = Helper.prettyPrintNanoSeconds(duration, false, false); + System.out.println("OK (" + time + ")."); + System.out.println("Finished"); + + } + + private static List<Axiom> mapClauses(String age, String sex, + String chestPain, String bloodPressure, String cholestoral, + String bloodSugar, String electrocardiographicResults, + String maximumHeartRate, String angina, String oldPeak, + String stSegment, String majorVessels, String thal, + String heartDisease, int i) { + + ClassAssertionAxiom cmpAxiom = getConceptAssertion("Patient", "Patient" + + i); + axioms.add(cmpAxiom); + + double ages = Double.parseDouble(age); + + DatatypePropertyAssertion dpa = getDoubleDatatypePropertyAssertion( + "Patient" + i, "hasAge", ages); + axioms.add(dpa); + + double gender = Double.parseDouble(sex); + + if (gender == 0.0) { + + ClassAssertionAxiom maAxiom = getConceptAssertion("Gender", "male"); + axioms.add(maAxiom); + ObjectPropertyAssertion sa = getRoleAssertion("hasGender", + "Patient" + i, "male"); + axioms.add(sa); + } else { + ClassAssertionAxiom maAxiom = getConceptAssertion("Gender", + "female"); + axioms.add(maAxiom); + ObjectPropertyAssertion sa = getRoleAssertion("hasGender", + "Patient" + i, "female"); + axioms.add(sa); + } + + ObjectPropertyAssertion dpb = getRoleAssertion("hasChestPain", + "Patient" + i, chestPain); + axioms.add(dpb); + + double blood = Double.parseDouble(bloodPressure); + + DatatypePropertyAssertion blo = getDoubleDatatypePropertyAssertion( + "Patient" + i, "hasBloodPressure", blood); + axioms.add(blo); + + double cholester = Double.parseDouble(cholestoral); + + DatatypePropertyAssertion cho = getDoubleDatatypePropertyAssertion( + "Patient" + i, "hasCholestoral", cholester); + axioms.add(cho); + + double cholest = Double.parseDouble(cholestoral); + if (cholest == 0.0) { + BooleanDatatypePropertyAssertion ames = getBooleanDatatypePropertyAssertion( + "Patient" + i, "hasBloodSugarOver120mg/dl", false); + axioms.add(ames); + } else { + BooleanDatatypePropertyAssertion ames = getBooleanDatatypePropertyAssertion( + "Patient" + i, "hasBloodSugarOver120mg/dl", true); + axioms.add(ames); + } + + ObjectPropertyAssertion ddb = getRoleAssertion( + "hasElectrocardiographicResults", "Patient" + i, + electrocardiographicResults); + axioms.add(ddb); + + double maxHeart = Double.parseDouble(maximumHeartRate); + + DatatypePropertyAssertion mhr = getDoubleDatatypePropertyAssertion( + "Patient" + i, "hasMaximumHeartRate", maxHeart); + axioms.add(mhr); + + double ang = Double.parseDouble(angina); + if (ang == 0.0) { + BooleanDatatypePropertyAssertion ames = getBooleanDatatypePropertyAssertion( + "Patient" + i, "hasAngina", false); + axioms.add(ames); + } else { + BooleanDatatypePropertyAssertion ames = getBooleanDatatypePropertyAssertion( + "Patient" + i, "hasAngina", true); + axioms.add(ames); + } + + double oldP = Double.parseDouble(oldPeak); + + DatatypePropertyAssertion op = getDoubleDatatypePropertyAssertion( + "Patient" + i, "hasOldPeak", oldP); + axioms.add(op); + + double stS = Double.parseDouble(stSegment); + + DatatypePropertyAssertion sts = getDoubleDatatypePropertyAssertion( + "Patient" + i, "hasStSegment", stS); + axioms.add(sts); + + double majorV = Double.parseDouble(majorVessels); + + DatatypePropertyAssertion mv = getDoubleDatatypePropertyAssertion( + "Patient" + i, "hasMajorVessels", majorV); + axioms.add(mv); + double th = Double.parseDouble(thal); + if (th == 3.0) { + ObjectPropertyAssertion tha = getRoleAssertion("hasThalValue", + "Patient" + i, "normal"); + axioms.add(tha); + ClassAssertionAxiom maAxiom = getConceptAssertion("normal", + "normal"); + axioms.add(maAxiom); + + } else if (th == 6.0) { + ObjectPropertyAssertion thb = getRoleAssertion("hasThalValue", + "Patient" + i, "fixed-defect"); + axioms.add(thb); + ClassAssertionAxiom maAxiom = getConceptAssertion("fixed-defect", + "fixed-defect"); + axioms.add(maAxiom); + } else if (th == 7.0) { + ObjectPropertyAssertion thc = getRoleAssertion("hasThalValue", + "Patient" + i, "reversable-defect"); + axioms.add(thc); + ClassAssertionAxiom maAxiom = getConceptAssertion( + "reversable-defect", "reversable-defect"); + axioms.add(maAxiom); + } + patients.put("Patient" + i, new Integer(heartDisease)); + + return axioms; + } + + private static NamedClass getAtomicConcept(String name) { + return new NamedClass(ontologyIRI + "#" + name); + } + + private static ClassAssertionAxiom getConceptAssertion(String concept, + String i) { + Individual ind = getIndividual(i); + NamedClass c = getAtomicConcept(concept); + return new ClassAssertionAxiom(c, ind); + } + + private static Individual getIndividual(String name) { + return new Individual(ontologyIRI + "#" + name); + } + + private static ObjectPropertyAssertion getRoleAssertion(String role, + String i1, String i2) { + Individual ind1 = getIndividual(i1); + Individual ind2 = getIndividual(i2); + ObjectProperty ar = getRole(role); + return new ObjectPropertyAssertion(ar, ind1, ind2); + } + + private static ObjectProperty getRole(String name) { + return new ObjectProperty(ontologyIRI + "#" + name); + } + + private static void generateConfFile(File file) { + String confHeader = "import(\"heart.owl\");\n\n"; + confHeader += "reasoner = fastInstanceChecker;\n"; + confHeader += "algorithm = refexamples;\n"; + confHeader += "refexamples.noisePercentage = 15;\n"; + confHeader += "refexamples.startClass = " + getURI2("Patient") + ";\n"; + confHeader += "refexamples.writeSearchTree = false;\n"; + confHeader += "refexamples.searchTreeFile = \"log/heart/searchTree.log\";\n"; + confHeader += "\n"; + Files.appendFile(file, confHeader); + } + + private static void generateExamples(File file) { + StringBuffer content = new StringBuffer(); + Set<String> keys = patients.keySet(); + for (String key : keys) { + Integer subsValue = patients.get(key); + if (subsValue == 2) { + content.append("+\"" + getIndividual(key) + "\"\n"); + } else { + content.append("-\"" + getIndividual(key) + "\"\n"); + } + } + Files.appendFile(file, content.toString()); + } + + private static String getURI(String name) { + return ontologyIRI + "#" + name; + } + + // returns URI including quotationsmark (need for KBparser) + private static String getURI2(String name) { + return "\"" + getURI(name) + "\""; + } + + private static DoubleDatatypePropertyAssertion getDoubleDatatypePropertyAssertion( + String individual, String datatypeProperty, double value) { + Individual ind = getIndividual(individual); + DatatypeProperty dp = getDatatypeProperty(datatypeProperty); + return new DoubleDatatypePropertyAssertion(dp, ind, value); + } + + private static DatatypeProperty getDatatypeProperty(String name) { + return new DatatypeProperty(ontologyIRI + "#" + name); + } + + private static BooleanDatatypePropertyAssertion getBooleanDatatypePropertyAssertion( + String individual, String datatypeProperty, boolean value) { + Individual ind = getIndividual(individual); + DatatypeProperty dp = getDatatypeProperty(datatypeProperty); + return new BooleanDatatypePropertyAssertion(dp, ind, value); + } + + private static void mapThalValues() { + thals.add("normal"); + thals.add("fixed-defect"); + thals.add("reversable-defect"); + } + + private static KB generateDomainAndRangeForObjectProperties() throws ParseException { + String kbString = "OPDOMAIN(" + getURI2("hasThalValue") + ") = " + + getURI2("Patient") + ".\n"; + kbString += "OPRANGE(" + getURI2("hasThalValue") + ") = " + getURI2("Thals") + + ".\n"; + + kbString += "OPDOMAIN(" + getURI2("hasGender") + ") = " + + getURI2("Patient") + ".\n"; + kbString += "OPRANGE(" + getURI2("hasGender") + ") = " + getURI2("Gender") + + ".\n"; + + kbString += "OPDOMAIN(" + getURI2("hasChestPain") + ") = " + getURI2("Patient") + + ".\n"; + kbString += "OPRANGE(" + getURI2("hasChestPain") + ") = " + getURI2("Thing") + + ".\n"; + + kbString += "OPDOMAIN(" + getURI2("hasElectrocardiographicResults") + ") = " + + getURI2("Patient") + ".\n"; + kbString += "OPRANGE(" + getURI2("hasElectrocardiographicResults") + ") = " + + + getURI2("Thing") + ".\n"; + + kbString += "DPDOMAIN(" + getURI2("hasMajorVessels") + ") = " + + getURI2("Patient") + ".\n"; + kbString += "DPRANGE(" + getURI2("hasMajorVessels") + ") = DOUBLE.\n"; + + kbString += "DPDOMAIN(" + getURI2("hasBloodPressure") + ") = " + + getURI2("Patient") + ".\n"; + kbString += "DPRANGE(" + getURI2("hasBloodPressure") + ") = DOUBLE.\n"; + + kbString += "DPDOMAIN(" + getURI2("hasBloodSugarOver120mg/dl") + ") = " + + getURI2("Patient") + ".\n"; + kbString += "DPRANGE(" + getURI2("hasBloodSugarOver120mg/dl") + ") = BOOLEAN.\n"; + + kbString += "DPDOMAIN(" + getURI2("hasAngina") + ") = " + + getURI2("Patient") + ".\n"; + kbString += "DPRANGE(" + getURI2("hasAngina") + ") = BOOLEAN.\n"; + + kbString += "DPDOMAIN(" + getURI2("hasAge") + ") = " + + getURI2("Patient") + ".\n"; + kbString += "DPRANGE(" + getURI2("hasAge") + ") = DOUBLE.\n"; + + kbString += "DPDOMAIN(" + getURI2("hasMaximumHeartRate") + ") = " + + getURI2("Patient") + ".\n"; + kbString += "DPRANGE(" + getURI2("hasMaximumHeartRate") + ") = DOUBLE.\n"; + + kbString += "DPDOMAIN(" + getURI2("hasCholestoral") + ") = " + + getURI2("Patient") + ".\n"; + kbString += "DPRANGE(" + getURI2("hasCholestoral") + ") = DOUBLE.\n"; + + kbString += "DPDOMAIN(" + getURI2("hasOldPeak") + ") = " + + getURI2("Patient") + ".\n"; + kbString += "DPRANGE(" + getURI2("hasOldPeak") + ") = DOUBLE.\n"; + + kbString += "DPDOMAIN(" + getURI2("hasStSegment") + ") = " + + getURI2("Patient") + ".\n"; + kbString += "DPRANGE(" + getURI2("hasStSegment") + ") = DOUBLE.\n"; + + KB kb2 = KBParser.parseKBFile(kbString); + return kb2; + + } + +} Added: trunk/test/heart/files/heart.dat =================================================================== --- trunk/test/heart/files/heart.dat (rev 0) +++ trunk/test/heart/files/heart.dat 2010-08-20 09:00:54 UTC (rev 2264) @@ -0,0 +1,270 @@ +70.0,1.0,4.0,130.0,322.0,0.0,2.0,109.0,0.0,2.4,2.0,3.0,3.0,2 +67.0,0.0,3.0,115.0,564.0,0.0,2.0,160.0,0.0,1.6,2.0,0.0,7.0,1 +57.0,1.0,2.0,124.0,261.0,0.0,0.0,141.0,0.0,0.3,1.0,0.0,7.0,2 +64.0,1.0,4.0,128.0,263.0,0.0,0.0,105.0,1.0,0.2,2.0,1.0,7.0,1 +74.0,0.0,2.0,120.0,269.0,0.0,2.0,121.0,1.0,0.2,1.0,1.0,3.0,1 +65.0,1.0,4.0,120.0,177.0,0.0,0.0,140.0,0.0,0.4,1.0,0.0,7.0,1 +56.0,1.0,3.0,130.0,256.0,1.0,2.0,142.0,1.0,0.6,2.0,1.0,6.0,2 +59.0,1.0,4.0,110.0,239.0,0.0,2.0,142.0,1.0,1.2,2.0,1.0,7.0,2 +60.0,1.0,4.0,140.0,293.0,0.0,2.0,170.0,0.0,1.2,2.0,2.0,7.0,2 +63.0,0.0,4.0,150.0,407.0,0.0,2.0,154.0,0.0,4.0,2.0,3.0,7.0,2 +59.0,1.0,4.0,135.0,234.0,0.0,0.0,161.0,0.0,0.5,2.0,0.0,7.0,1 +53.0,1.0,4.0,142.0,226.0,0.0,2.0,111.0,1.0,0.0,1.0,0.0,7.0,1 +44.0,1.0,3.0,140.0,235.0,0.0,2.0,180.0,0.0,0.0,1.0,0.0,3.0,1 +61.0,1.0,1.0,134.0,234.0,0.0,0.0,145.0,0.0,2.6,2.0,2.0,3.0,2 +57.0,0.0,4.0,128.0,303.0,0.0,2.0,159.0,0.0,0.0,1.0,1.0,3.0,1 +71.0,0.0,4.0,112.0,149.0,0.0,0.0,125.0,0.0,1.6,2.0,0.0,3.0,1 +46.0,1.0,4.0,140.0,311.0,0.0,0.0,120.0,1.0,1.8,2.0,2.0,7.0,2 +53.0,1.0,4.0,140.0,203.0,1.0,2.0,155.0,1.0,3.1,3.0,0.0,7.0,2 +64.0,1.0,1.0,110.0,211.0,0.0,2.0,144.0,1.0,1.8,2.0,0.0,3.0,1 +40.0,1.0,1.0,140.0,199.0,0.0,0.0,178.0,1.0,1.4,1.0,0.0,7.0,1 +67.0,1.0,4.0,120.0,229.0,0.0,2.0,129.0,1.0,2.6,2.0,2.0,7.0,2 +48.0,1.0,2.0,130.0,245.0,0.0,2.0,180.0,0.0,0.2,2.0,0.0,3.0,1 +43.0,1.0,4.0,115.0,303.0,0.0,0.0,181.0,0.0,1.2,2.0,0.0,3.0,1 +47.0,1.0,4.0,112.0,204.0,0.0,0.0,143.0,0.0,0.1,1.0,0.0,3.0,1 +54.0,0.0,2.0,132.0,288.0,1.0,2.0,159.0,1.0,0.0,1.0,1.0,3.0,1 +48.0,0.0,3.0,130.0,275.0,0.0,0.0,139.0,0.0,0.2,1.0,0.0,3.0,1 +46.0,0.0,4.0,138.0,243.0,0.0,2.0,152.0,1.0,0.0,2.0,0.0,3.0,1 +51.0,0.0,3.0,120.0,295.0,0.0,2.0,157.0,0.0,0.6,1.0,0.0,3.0,1 +58.0,1.0,3.0,112.0,230.0,0.0,2.0,165.0,0.0,2.5,2.0,1.0,7.0,2 +71.0,0.0,3.0,110.0,265.0,1.0,2.0,130.0,0.0,0.0,1.0,1.0,3.0,1 +57.0,1.0,3.0,128.0,229.0,0.0,2.0,150.0,0.0,0.4,2.0,1.0,7.0,2 +66.0,1.0,4.0,160.0,228.0,0.0,2.0,138.0,0.0,2.3,1.0,0.0,6.0,1 +37.0,0.0,3.0,120.0,215.0,0.0,0.0,170.0,0.0,0.0,1.0,0.0,3.0,1 +59.0,1.0,4.0,170.0,326.0,0.0,2.0,140.0,1.0,3.4,3.0,0.0,7.0,2 +50.0,1.0,4.0,144.0,200.0,0.0,2.0,126.0,1.0,0.9,2.0,0.0,7.0,2 +48.0,1.0,4.0,130.0,256.0,1.0,2.0,150.0,1.0,0.0,1.0,2.0,7.0,2 +61.0,1.0,4.0,140.0,207.0,0.0,2.0,138.0,1.0,1.9,1.0,1.0,7.0,2 +59.0,1.0,1.0,160.0,273.0,0.0,2.0,125.0,0.0,0.0,1.0,0.0,3.0,2 +42.0,1.0,3.0,130.0,180.0,0.0,0.0,150.0,0.0,0.0,1.0,0.0,3.0,1 +48.0,1.0,4.0,122.0,222.0,0.0,2.0,186.0,0.0,0.0,1.0,0.0,3.0,1 +40.0,1.0,4.0,152.0,223.0,0.0,0.0,181.0,0.0,0.0,1.0,0.0,7.0,2 +62.0,0.0,4.0,124.0,209.0,0.0,0.0,163.0,0.0,0.0,1.0,0.0,3.0,1 +44.0,1.0,3.0,130.0,233.0,0.0,0.0,179.0,1.0,0.4,1.0,0.0,3.0,1 +46.0,1.0,2.0,101.0,197.0,1.0,0.0,156.0,0.0,0.0,1.0,0.0,7.0,1 +59.0,1.0,3.0,126.0,218.0,1.0,0.0,134.0,0.0,2.2,2.0,1.0,6.0,2 +58.0,1.0,3.0,140.0,211.0,1.0,2.0,165.0,0.0,0.0,1.0,0.0,3.0,1 +49.0,1.0,3.0,118.0,149.0,0.0,2.0,126.0,0.0,0.8,1.0,3.0,3.0,2 +44.0,1.0,4.0,110.0,197.0,0.0,2.0,177.0,0.0,0.0,1.0,1.0,3.0,2 +66.0,1.0,2.0,160.0,246.0,0.0,0.0,120.0,1.0,0.0,2.0,3.0,6.0,2 +65.0,0.0,4.0,150.0,225.0,0.0,2.0,114.0,0.0,1.0,2.0,3.0,7.0,2 +42.0,1.0,4.0,136.0,315.0,0.0,0.0,125.0,1.0,1.8,2.0,0.0,6.0,2 +52.0,1.0,2.0,128.0,205.0,1.0,0.0,184.0,0.0,0.0,1.0,0.0,3.0,1 +65.0,0.0,3.0,140.0,417.0,1.0,2.0,157.0,0.0,0.8,1.0,1.0,3.0,1 +63.0,0.0,2.0,140.0,195.0,0.0,0.0,179.0,0.0,0.0,1.0,2.0,3.0,1 +45.0,0.0,2.0,130.0,234.0,0.0,2.0,175.0,0.0,0.6,2.0,0.0,3.0,1 +41.0,0.0,2.0,105.0,198.0,0.0,0.0,168.0,0.0,0.0,1.0,1.0,3.0,1 +61.0,1.0,4.0,138.0,166.0,0.0,2.0,125.0,1.0,3.6,2.0,1.0,3.0,2 +60.0,0.0,3.0,120.0,178.0,1.0,0.0,96.0,0.0,0.0,1.0,0.0,3.0,1 +59.0,0.0,4.0,174.0,249.0,0.0,0.0,143.0,1.0,0.0,2.0,0.0,3.0,2 +62.0,1.0,2.0,120.0,281.0,0.0,2.0,103.0,0.0,1.4,2.0,1.0,7.0,2 +57.0,1.0,3.0,150.0,126.0,1.0,0.0,173.0,0.0,0.2,1.0,1.0,7.0,1 +51.0,0.0,4.0,130.0,305.0,0.0,0.0,142.0,1.0,1.2,2.0,0.0,7.0,2 +44.0,1.0,3.0,120.0,226.0,0.0,0.0,169.0,0.0,0.0,1.0,0.0,3.0,1 +60.0,0.0,1.0,150.0,240.0,0.0,0.0,171.0,0.0,0.9,1.0,0.0,3.0,1 +63.0,1.0,1.0,145.0,233.0,1.0,2.0,150.0,0.0,2.3,3.0,0.0,6.0,1 +57.0,1.0,4.0,150.0,276.0,0.0,2.0,112.0,1.0,0.6,2.0,1.0,6.0,2 +51.0,1.0,4.0,140.0,261.0,0.0,2.0,186.0,1.0,0.0,1.0,0.0,3.0,1 +58.0,0.0,2.0,136.0,319.0,1.0,2.0,152.0,0.0,0.0,1.0,2.0,3.0,2 +44.0,0.0,3.0,118.0,242.0,0.0,0.0,149.0,0.0,0.3,2.0,1.0,3.0,1 +47.0,1.0,3.0,108.0,243.0,0.0,0.0,152.0,0.0,0.0,1.0,0.0,3.0,2 +61.0,1.0,4.0,120.0,260.0,0.0,0.0,140.0,1.0,3.6,2.0,1.0,7.0,2 +57.0,0.0,4.0,120.0,354.0,0.0,0.0,163.0,1.0,0.6,1.0,0.0,3.0,1 +70.0,1.0,2.0,156.0,245.0,0.0,2.0,143.0,0.0,0.0,1.0,0.0,3.0,1 +76.0,0.0,3.0,140.0,197.0,0.0,1.0,116.0,0.0,1.1,2.0,0.0,3.0,1 +67.0,0.0,4.0,106.0,223.0,0.0,0.0,142.0,0.0,0.3,1.0,2.0,3.0,1 +45.0,1.0,4.0,142.0,309.0,0.0,2.0,147.0,1.0,0.0,2.0,3.0,7.0,2 +45.0,1.0,4.0,104.0,208.0,0.0,2.0,148.0,1.0,3.0,2.0,0.0,3.0,1 +39.0,0.0,3.0,94.0,199.0,0.0,0.0,179.0,0.0,0.0,1.0,0.0,3.0,1 +42.0,0.0,3.0,120.0,209.0,0.0,0.0,173.0,0.0,0.0,2.0,0.0,3.0,1 +56.0,1.0,2.0,120.0,236.0,0.0,0.0,178.0,0.0,0.8,1.0,0.0,3.0,1 +58.0,1.0,4.0,146.0,218.0,0.0,0.0,105.0,0.0,2.0,2.0,1.0,7.0,2 +35.0,1.0,4.0,120.0,198.0,0.0,0.0,130.0,1.0,1.6,2.0,0.0,7.0,2 +58.0,1.0,4.0,150.0,270.0,0.0,2.0,111.0,1.0,0.8,1.0,0.0,7.0,2 +41.0,1.0,3.0,130.0,214.0,0.0,2.0,168.0,0.0,2.0,2.0,0.0,3.0,1 +57.0,1.0,4.0,110.0,201.0,0.0,0.0,126.0,1.0,1.5,2.0,0.0,6.0,1 +42.0,1.0,1.0,148.0,244.0,0.0,2.0,178.0,0.0,0.8,1.0,2.0,3.0,1 +62.0,1.0,2.0,128.0,208.0,1.0,2.0,140.0,0.0,0.0,1.0,0.0,3.0,1 +59.0,1.0,1.0,178.0,270.0,0.0,2.0,145.0,0.0,4.2,3.0,0.0,7.0,1 +41.0,0.0,2.0,126.0,306.0,0.0,0.0,163.0,0.0,0.0,1.0,0.0,3.0,1 +50.0,1.0,4.0,150.0,243.0,0.0,2.0,128.0,0.0,2.6,2.0,0.0,7.0,2 +59.0,1.0,2.0,140.0,221.0,0.0,0.0,164.0,1.0,0.0,1.0,0.0,3.0,1 +61.0,0.0,4.0,130.0,330.0,0.0,2.0,169.0,0.0,0.0,1.0,0.0,3.0,2 +54.0,1.0,4.0,124.0,266.0,0.0,2.0,109.0,1.0,2.2,2.0,1.0,7.0,2 +54.0,1.0,4.0,110.0,206.0,0.0,2.0,108.0,1.0,0.0,2.0,1.0,3.0,2 +52.0,1.0,4.0,125.0,212.0,0.0,0.0,168.0,0.0,1.0,1.0,2.0,7.0,2 +47.0,1.0,4.0,110.0,275.0,0.0,2.0,118.0,1.0,1.0,2.0,1.0,3.0,2 +66.0,1.0,4.0,120.0,302.0,0.0,2.0,151.0,0.0,0.4,2.0,0.0,3.0,1 +58.0,1.0,4.0,100.0,234.0,0.0,0.0,156.0,0.0,0.1,1.0,1.0,7.0,2 +64.0,0.0,3.0,140.0,313.0,0.0,0.0,133.0,0.0,0.2,1.0,0.0,7.0,1 +50.0,0.0,2.0,120.0,244.0,0.0,0.0,162.0,0.0,1.1,1.0,0.0,3.0,1 +44.0,0.0,3.0,108.0,141.0,0.0,0.0,175.0,0.0,0.6,2.0,0.0,3.0,1 +67.0,1.0,4.0,120.0,237.0,0.0,0.0,71.0,0.0,1.0,2.0,0.0,3.0,2 +49.0,0.0,4.0,130.0,269.0,0.0,0.0,163.0,0.0,0.0,1.0,0.0,3.0,1 +57.0,1.0,4.0,165.0,289.0,1.0,2.0,124.0,0.0,1.0,2.0,3.0,7.0,2 +63.0,1.0,4.0,130.0,254.0,0.0,2.0,147.0,0.0,1.4,2.0,1.0,7.0,2 +48.0,1.0,4.0,124.0,274.0,0.0,2.0,166.0,0.0,0.5,2.0,0.0,7.0,2 +51.0,1.0,3.0,100.0,222.0,0.0,0.0,143.0,1.0,1.2,2.0,0.0,3.0,1 +60.0,0.0,4.0,150.0,258.0,0.0,2.0,157.0,0.0,2.6,2.0,2.0,7.0,2 +59.0,1.0,4.0,140.0,177.0,0.0,0.0,162.0,1.0,0.0,1.0,1.0,7.0,2 +45.0,0.0,2.0,112.0,160.0,0.0,0.0,138.0,0.0,0.0,2.0,0.0,3.0,1 +55.0,0.0,4.0,180.0,327.0,0.0,1.0,117.0,1.0,3.4,2.0,0.0,3.0,2 +41.0,1.0,2.0,110.0,235.0,0.0,0.0,153.0,0.0,0.0,1.0,0.0,3.0,1 +60.0,0.0,4.0,158.0,305.0,0.0,2.0,161.0,0.0,0.0,1.0,0.0,3.0,2 +54.0,0.0,3.0,135.0,304.0,1.0,0.0,170.0,0.0,0.0,1.0,0.0,3.0,1 +42.0,1.0,2.0,120.0,295.0,0.0,0.0,162.0,0.0,0.0,1.0,0.0,3.0,1 +49.0,0.0,2.0,134.0,271.0,0.0,0.0,162.0,0.0,0.0,2.0,0.0,3.0,1 +46.0,1.0,4.0,120.0,249.0,0.0,2.0,144.0,0.0,0.8,1.0,0.0,7.0,2 +56.0,0.0,4.0,200.0,288.0,1.0,2.0,133.0,1.0,4.0,3.0,2.0,7.0,2 +66.0,0.0,1.0,150.0,226.0,0.0,0.0,114.0,0.0,2.6,3.0,0.0,3.0,1 +56.0,1.0,4.0,130.0,283.0,1.0,2.0,103.0,1.0,1.6,3.0,0.0,7.0,2 +49.0,1.0,3.0,120.0,188.0,0.0,0.0,139.0,0.0,2.0,2.0,3.0,7.0,2 +54.0,1.0,4.0,122.0,286.0,0.0,2.0,116.0,1.0,3.2,2.0,2.0,3.0,2 +57.0,1.0,4.0,152.0,274.0,0.0,0.0,88.0,1.0,1.2,2.0,1.0,7.0,2 +65.0,0.0,3.0,160.0,360.0,0.0,2.0,151.0,0.0,0.8,1.0,0.0,3.0,1 +54.0,1.0,3.0,125.0,273.0,0.0,2.0,152.0,0.0,0.5,3.0,1.0,3.0,1 +54.0,0.0,3.0,160.0,201.0,0.0,0.0,163.0,0.0,0.0,1.0,1.0,3.0,1 +62.0,1.0,4.0,120.0,267.0,0.0,0.0,99.0,1.0,1.8,2.0,2.0,7.0,2 +52.0,0.0,3.0,136.0,196.0,0.0,2.0,169.0,0.0,0.1,2.0,0.0,3.0,1 +52.0,1.0,2.0,134.0,201.0,0.0,0.0,158.0,0.0,0.8,1.0,1.0,3.0,1 +60.0,1.0,4.0,117.0,230.0,1.0,0.0,160.0,1.0,1.4,1.0,2.0,7.0,2 +63.0,0.0,4.0,108.0,269.0,0.0,0.0,169.0,1.0,1.8,2.0,2.0,3.0,2 +66.0,1.0,4.0,112.0,212.0,0.0,2.0,132.0,1.0,0.1,1.0,1.0,3.0,2 +42.0,1.0,4.0,140.0,226.0,0.0,0.0,178.0,0.0,0.0,1.0,0.0,3.0,1 +64.0,1.0,4.0,120.0,246.0,0.0,2.0,96.0,1.0,2.2,3.0,1.0,3.0,2 +54.0,1.0,3.0,150.0,232.0,0.0,2.0,165.0,0.0,1.6,1.0,0.0,7.0,1 +46.0,0.0,3.0,142.0,177.0,0.0,2.0,160.0,1.0,1.4,3.0,0.0,3.0,1 +67.0,0.0,3.0,152.0,277.0,0.0,0.0,172.0,0.0,0.0,1.0,1.0,3.0,1 +56.0,1.0,4.0,125.0,249.0,1.0,2.0,144.0,1.0,1.2,2.0,1.0,3.0,2 +34.0,0.0,2.0,118.0,210.0,0.0,0.0,192.0,0.0,0.7,1.0,0.0,3.0,1 +57.0,1.0,4.0,132.0,207.0,0.0,0.0,168.0,1.0,0.0,1.0,0.0,7.0,1 +64.0,1.0,4.0,145.0,212.0,0.0,2.0,132.0,0.0,2.0,2.0,2.0,6.0,2 +59.0,1.0,4.0,138.0,271.0,0.0,2.0,182.0,0.0,0.0,1.0,0.0,3.0,1 +50.0,1.0,3.0,140.0,233.0,0.0,0.0,163.0,0.0,0.6,2.0,1.0,7.0,2 +51.0,1.0,1.0,125.0,213.0,0.0,2.0,125.0,1.0,1.4,1.0,1.0,3.0,1 +54.0,1.0,2.0,192.0,283.0,0.0,2.0,195.0,0.0,0.0,1.0,1.0,7.0,2 +53.0,1.0,4.0,123.0,282.0,0.0,0.0,95.0,1.0,2.0,2.0,2.0,7.0,2 +52.0,1.0,4.0,112.0,230.0,0.0,0.0,160.0,0.0,0.0,1.0,1.0,3.0,2 +40.0,1.0,4.0,110.0,167.0,0.0,2.0,114.0,1.0,2.0,2.0,0.0,7.0,2 +58.0,1.0,3.0,132.0,224.0,0.0,2.0,173.0,0.0,3.2,1.0,2.0,7.0,2 +41.0,0.0,3.0,112.0,268.0,0.0,2.0,172.0,1.0,0.0,1.0,0.0,3.0,1 +41.0,1.0,3.0,112.0,250.0,0.0,0.0,179.0,0.0,0.0,1.0,0.0,3.0,1 +50.0,0.0,3.0,120.0,219.0,0.0,0.0,158.0,0.0,1.6,2.0,0.0,3.0,1 +54.0,0.0,3.0,108.0,267.0,0.0,2.0,167.0,0.0,0.0,1.0,0.0,3.0,1 +64.0,0.0,4.0,130.0,303.0,0.0,0.0,122.0,0.0,2.0,2.0,2.0,3.0,1 +51.0,0.0,3.0,130.0,256.0,0.0,2.0,149.0,0.0,0.5,1.0,0.0,3.0,1 +46.0,0.0,2.0,105.0,204.0,0.0,0.0,172.0,0.0,0.0,1.0,0.0,3.0,1 +55.0,1.0,4.0,140.0,217.0,0.0,0.0,111.0,1.0,5.6,3.0,0.0,7.0,2 +45.0,1.0,2.0,128.0,308.0,0.0,2.0,170.0,0.0,0.0,1.0,0.0,3.0,1 +56.0,1.0,1.0,120.0,193.0,0.0,2.0,162.0,0.0,1.9,2.0,0.0,7.0,1 +66.0,0.0,4.0,178.0,228.0,1.0,0.0,165.0,1.0,1.0,2.0,2.0,7.0,2 +38.0,1.0,1.0,120.0,231.0,0.0,0.0,182.0,1.0,3.8,2.0,0.0,7.0,2 +62.0,0.0,4.0,150.0,244.0,0.0,0.0,154.0,1.0,1.4,2.0,0.0,3.0,2 +55.0,1.0,2.0,130.0,262.0,0.0,0.0,155.0,0.0,0.0,1.0,0.0,3.0,1 +58.0,1.0,4.0,128.0,259.0,0.0,2.0,130.0,1.0,3.0,2.0,2.0,7.0,2 +43.0,1.0,4.0,110.0,211.0,0.0,0.0,161.0,0.0,0.0,1.0,0.0,7.0,1 +64.0,0.0,4.0,180.0,325.0,0.0,0.0,154.0,1.0,0.0,1.0,0.0,3.0,1 +50.0,0.0,4.0,110.0,254.0,0.0,2.0,159.0,0.0,0.0,1.0,0.0,3.0,1 +53.0,1.0,3.0,130.0,197.0,1.0,2.0,152.0,0.0,1.2,3.0,0.0,3.0,1 +45.0,0.0,4.0,138.0,236.0,0.0,2.0,152.0,1.0,0.2,2.0,0.0,3.0,1 +65.0,1.0,1.0,138.0,282.0,1.0,2.0,174.0,0.0,1.4,2.0,1.0,3.0,2 +69.0,1.0,1.0,160.0,234.0,1.0,2.0,131.0,0.0,0.1,2.0,1.0,3.0,1 +69.0,1.0,3.0,140.0,254.0,0.0,2.0,146.0,0.0,2.0,2.0,3.0,7.0,2 +67.0,1.0,4.0,100.0,299.0,0.0,2.0,125.0,1.0,0.9,2.0,2.0,3.0,2 +68.0,0.0,3.0,120.0,211.0,0.0,2.0,115.0,0.0,1.5,2.0,0.0,3.0,1 +34.0,1.0,1.0,118.0,182.0,0.0,2.0,174.0,0.0,0.0,1.0,0.0,3.0,1 +62.0,0.0,4.0,138.0,294.0,1.0,0.0,106.0,0.0,1.9,2.0,3.0,3.0,2 +51.0,1.0,4.0,140.0,298.0,0.0,0.0,122.0,1.0,4.2,2.0,3.0,7.0,2 +46.0,1.0,3.0,150.0,231.0,0.0,0.0,147.0,0.0,3.6,2.0,0.0,3.0,2 +67.0,1.0,4.0,125.0,254.0,1.0,0.0,163.0,0.0,0.2,2.0,2.0,7.0,2 +50.0,1.0,3.0,129.0,196.0,0.0,0.0,163.0,0.0,0.0,1.0,0.0,3.0,1 +42.0,1.0,3.0,120.0,240.0,1.0,0.0,194.0,0.0,0.8,3.0,0.0,7.0,1 +56.0,0.0,4.0,134.0,409.0,0.0,2.0,150.0,1.0,1.9,2.0,2.0,7.0,2 +41.0,1.0,4.0,110.0,172.0,0.0,2.0,158.0,0.0,0.0,1.0,0.0,7.0,2 +42.0,0.0,4.0,102.0,265.0,0.0,2.0,122.0,0.0,0.6,2.0,0.0,3.0,1 +53.0,1.0,3.0,130.0,246.0,1.0,2.0,173.0,0.0,0.0,1.0,3.0,3.0,1 +43.0,1.0,3.0,130.0,315.0,0.0,0.0,162.0,0.0,1.9,1.0,1.0,3.0,1 +56.0,1.0,4.0,132.0,184.0,0.0,2.0,105.0,1.0,2.1,2.0,1.0,6.0,2 +52.0,1.0,4.0,108.0,233.0,1.0,0.0,147.0,0.0,0.1,1.0,3.0,7.0,1 +62.0,0.0,4.0,140.0,394.0,0.0,2.0,157.0,0.0,1.2,2.0,0.0,3.0,1 +70.0,1.0,3.0,160.0,269.0,0.0,0.0,112.0,1.0,2.9,2.0,1.0,7.0,2 +54.0,1.0,4.0,140.0,239.0,0.0,0.0,160.0,0.0,1.2,1.0,0.0,3.0,1 +70.0,1.0,4.0,145.0,174.0,0.0,0.0,125.0,1.0,2.6,3.0,0.0,7.0,2 +54.0,1.0,2.0,108.0,309.0,0.0,0.0,156.0,0.0,0.0,1.0,0.0,7.0,1 +35.0,1.0,4.0,126.0,282.0,0.0,2.0,156.0,1.0,0.0,1.0,0.0,7.0,2 +48.0,1.0,3.0,124.0,255.0,1.0,0.0,175.0,0.0,0.0,1.0,2.0,3.0,1 +55.0,0.0,2.0,135.0,250.0,0.0,2.0,161.0,0.0,1.4,2.0,0.0,3.0,1 +58.0,0.0,4.0,100.0,248.0,0.0,2.0,122.0,0.0,1.0,2.0,0.0,3.0,1 +54.0,0.0,3.0,110.0,214.0,0.0,0.0,158.0,0.0,1.6,2.0,0.0,3.0,1 +69.0,0.0,1.0,140.0,239.0,0.0,0.0,151.0,0.0,1.8,1.0,2.0,3.0,1 +77.0,1.0,4.0,125.0,304.0,0.0,2.0,162.0,1.0,0.0,1.0,3.0,3.0,2 +68.0,1.0,3.0,118.0,277.0,0.0,0.0,151.0,0.0,1.0,1.0,1.0,7.0,1 +58.0,1.0,4.0,125.0,300.0,0.0,2.0,171.0,0.0,0.0,1.0,2.0,7.0,2 +60.0,1.0,4.0,125.0,258.0,0.0,2.0,141.0,1.0,2.8,2.0,1.0,7.0,2 +51.0,1.0,4.0,140.0,299.0,0.0,0.0,173.0,1.0,1.6,1.0,0.0,7.0,2 +55.0,1.0,4.0,160.0,289.0,0.0,2.0,145.0,1.0,0.8,2.0,1.0,7.0,2 +52.0,1.0,1.0,152.0,298.0,1.0,0.0,178.0,0.0,1.2,2.0,0.0,7.0,1 +60.0,0.0,3.0,102.0,318.0,0.0,0.0,160.0,0.0,0.0,1.0,1.0,3.0,1 +58.0,1.0,3.0,105.0,240.0,0.0,2.0,154.0,1.0,0.6,2.0,0.0,7.0,1 +64.0,1.0,3.0,125.0,309.0,0.0,0.0,131.0,1.0,1.8,2.0,0.0,7.0,2 +37.0,1.0,3.0,130.0,250.0,0.0,0.0,187.0,0.0,3.5,3.0,0.0,3.0,1 +59.0,1.0,1.0,170.0,288.0,0.0,2.0,159.0,0.0,0.2,2.0,0.0,7.0,2 +51.0,1.0,3.0,125.0,245.0,1.0,2.0,166.0,0.0,2.4,2.0,0.0,3.0,1 +43.0,0.0,3.0,122.0,213.0,0.0,0.0,165.0,0.0,0.2,2.0,0.0,3.0,1 +58.0,1.0,4.0,128.0,216.0,0.0,2.0,131.0,1.0,2.2,2.0,3.0,7.0,2 +29.0,1.0,2.0,130.0,204.0,0.0,2.0,202.0,0.0,0.0,1.0,0.0,3.0,1 +41.0,0.0,2.0,130.0,204.0,0.0,2.0,172.0,0.0,1.4,1.0,0.0,3.0,1 +63.0,0.0,3.0,135.0,252.0,0.0,2.0,172.0,0.0,0.0,1.0,0.0,3.0,1 +51.0,1.0,3.0,94.0,227.0,0.0,0.0,154.0,1.0,0.0,1.0,1.0,7.0,1 +54.0,1.0,3.0,120.0,258.0,0.0,2.0,147.0,0.0,0.4,2.0,0.0,7.0,1 +44.0,1.0,2.0,120.0,220.0,0.0,0.0,170.0,0.0,0.0,1.0,0.0,3.0,1 +54.0,1.0,4.0,110.0,239.0,0.0,0.0,126.0,1.0,2.8,2.0,1.0,7.0,2 +65.0,1.0,4.0,135.0,254.0,0.0,2.0,127.0,0.0,2.8,2.0,1.0,7.0,2 +57.0,1.0,3.0,150.0,168.0,0.0,0.0,174.0,0.0,1.6,1.0,0.0,3.0,1 +63.0,1.0,4.0,130.0,330.0,1.0,2.0,132.0,1.0,1.8,1.0,3.0,7.0,2 +35.0,0.0,4.0,138.0,183.0,0.0,0.0,182.0,0.0,1.4,1.0,0.0,3.0,1 +41.0,1.0,2.0,135.0,203.0,0.0,0.0,132.0,0.0,0.0,2.0,0.0,6.0,1 +62.0,0.0,3.0,130.0,263.0,0.0,0.0,97.0,0.0,1.2,2.0,1.0,7.0,2 +43.0,0.0,4.0,132.0,341.0,1.0,2.0,136.0,1.0,3.0,2.0,0.0,7.0,2 +58.0,0.0,1.0,150.0,283.0,1.0,2.0,162.0,0.0,1.0,1.0,0.0,3.0,1 +52.0,1.0,1.0,118.0,186.0,0.0,2.0,190.0,0.0,0.0,2.0,0.0,6.0,1 +61.0,0.0,4.0,145.0,307.0,0.0,2.0,146.0,1.0,1.0,2.0,0.0,7.0,2 +39.0,1.0,4.0,118.0,219.0,0.0,0.0,140.0,0.0,1.2,2.0,0.0,7.0,2 +45.0,1.0,4.0,115.0,260.0,0.0,2.0,185.0,0.0,0.0,1.0,0.0,3.0,1 +52.0,1.0,4.0,128.0,255.0,0.0,0.0,161.0,1.0,0.0,1.0,1.0,7.0,2 +62.0,1.0,3.0,130.0,231.0,0.0,0.0,146.0,0.0,1.8,2.0,3.0,7.0,1 +62.0,0.0,4.0,160.0,164.0,0.0,2.0,145.0,0.0,6.2,3.0,3.0,7.0,2 +53.0,0.0,4.0,138.0,234.0,0.0,2.0,160.0,0.0,0.0,1.0,0.0,3.0,1 +43.0,1.0,4.0,120.0,177.0,0.0,2.0,120.0,1.0,2.5,2.0,0.0,7.0,2 +47.0,1.0,3.0,138.0,257.0,0.0,2.0,156.0,0.0,0.0,1.0,0.0,3.0,1 +52.0,1.0,2.0,120.0,325.0,0.0,0.0,172.0,0.0,0.2,1.0,0.0,3.0,1 +68.0,1.0,3.0,180.0,274.0,1.0,2.0,150.0,1.0,1.6,2.0,0.0,7.0,2 +39.0,1.0,3.0,140.0,321.0,0.0,2.0,182.0,0.0,0.0,1.0,0.0,3.0,1 +53.0,0.0,4.0,130.0,264.0,0.0,2.0,143.0,0.0,0.4,2.0,0.0,3.0,1 +62.0,0.0,4.0,140.0,268.0,0.0,2.0,160.0,0.0,3.6,3.0,2.0,3.0,2 +51.0,0.0,3.0,140.0,308.0,0.0,2.0,142.0,0.0,1.5,1.0,1.0,3.0,1 +60.0,1.0,4.0,130.0,253.0,0.0,0.0,144.0,1.0,1.4,1.0,1.0,7.0,2 +65.0,1.0,4.0,110.0,248.0,0.0,2.0,158.0,0.0,0.6,1.0,2.0,6.0,2 +65.0,0.0,3.0,155.0,269.0,0.0,0.0,148.0,0.0,0.8,1.0,0.0,3.0,1 +60.0,1.0,3.0,140.0,185.0,0.0,2.0,155.0,0.0,3.0,2.0,0.0,3.0,2 +60.0,1.0,4.0,145.0,282.0,0.0,2.0,142.0,1.0,2.8,2.0,2.0,7.0,2 +54.0,1.0,4.0,120.0,188.0,0.0,0.0,113.0,0.0,1.4,2.0,1.0,7.0,2 +44.0,1.0,2.0,130.0,219.0,0.0,2.0,188.0,0.0,0.0,1.0,0.0,3.0,1 +44.0,1.0,4.0,112.0,290.0,0.0,2.0,153.0,0.0,0.0,1.0,1.0,3.0,2 +51.0,1.0,3.0,110.0,175.0,0.0,0.0,123.0,0.0,0.6,1.0,0.0,3.0,1 +59.0,1.0,3.0,150.0,212.0,1.0,0.0,157.0,0.0,1.6,1.0,0.0,3.0,1 +71.0,0.0,2.0,160.0,302.0,0.0,0.0,162.0,0.0,0.4,1.0,2.0,3.0,1 +61.0,1.0,3.0,150.0,243.0,1.0,0.0,137.0,1.0,1.0,2.0,0.0,3.0,1 +55.0,1.0,4.0,132.0,353.0,0.0,0.0,132.0,1.0,1.2,2.0,1.0,7.0,2 +64.0,1.0,3.0,140.0,335.0,0.0,0.0,158.0,0.0,0.0,1.0,0.0,3.0,2 +43.0,1.0,4.0,150.0,247.0,0.0,0.0,171.0,0.0,1.5,1.0,0.0,3.0,1 +58.0,0.0,3.0,120.0,340.0,0.0,0.0,172.0,0.0,0.0,1.0,0.0,3.0,1 +60.0,1.0,4.0,130.0,206.0,0.0,2.0,132.0,1.0,2.4,2.0,2.0,7.0,2 +58.0,1.0,2.0,120.0,284.0,0.0,2.0,160.0,0.0,1.8,2.0,0.0,3.0,2 +49.0,1.0,2.0,130.0,266.0,0.0,0.0,171.0,0.0,0.6,1.0,0.0,3.0,1 +48.0,1.0,2.0,110.0,229.0,0.0,0.0,168.0,0.0,1.0,3.0,0.0,7.0,2 +52.0,1.0,3.0,172.0,199.0,1.0,0.0,162.0,0.0,0.5,1.0,0.0,7.0,1 +44.0,1.0,2.0,120.0,263.0,0.0,0.0,173.0,0.0,0.0,1.0,0.0,7.0,1 +56.0,0.0,2.0,140.0,294.0,0.0,2.0,153.0,0.0,1.3,2.0,0.0,3.0,1 +57.0,1.0,4.0,140.0,192.0,0.0,0.0,148.0,0.0,0.4,2.0,0.0,6.0,1 +67.0,1.0,4.0,160.0,286.0,0.0,2.0,108.0,1.0,1.5,2.0,3.0,3.0,2 \ No newline at end of file Added: trunk/test/heart/heart.owl =================================================================== --- trunk/test/heart/heart.owl (rev 0) +++ trunk/test/heart/heart.owl 2010-08-20 09:00:54 UTC (rev 2264) @@ -0,0 +1,5968 @@ +<?xml version="1.0"?> +<rdf:RDF xmlns="http://dl-learner.org/heart#" + xml:base="http://dl-learner.org/heart" + xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" + xmlns:heart="http://dl-learner.org/heart#" + 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:hasBloodSugarOver120mg="http://dl-learner.org/heart#hasBloodSugarOver120mg/"> + <owl:Ontology rdf:about="http://dl-learner.org/heart"/> + + + + <!-- + /////////////////////////////////////////////////////////////////////////////////////// + // + // Object Properties + // + /////////////////////////////////////////////////////////////////////////////////////// + --> + + + + + <!-- http://dl-learner.org/heart#hasChestPain --> + + <owl:ObjectProperty rdf:about="http://dl-learner.org/heart#hasChestPain"> + <rdfs:domain rdf:resource="http://dl-learner.org/heart#Patient"/> + <rdfs:range rdf:resource="http://dl-learner.org/heart#Thing"/> + </owl:ObjectProperty> + + + + <!-- http://dl-learner.org/heart#hasElectrocardiographicResults --> + + <owl:ObjectProperty rdf:about="http://dl-learner.org/heart#hasElectrocardiographicResults"> + <rdfs:domain rdf:resource="http://dl-learner.org/heart#Patient"/> + <rdfs:range rdf:resource="http://dl-learner.org/heart#Thing"/> + </owl:ObjectProperty> + + + + <!-- http://dl-learner.org/heart#hasGender --> + + <owl:ObjectProperty rdf:about="http://dl-learner.org/heart#hasGender"> + <rdfs:range rdf:resource="http://dl-learner.org/heart#Gender"/> + <rdfs:domain rdf:resource="http://dl-learner.org/heart#Patient"/> + </owl:ObjectProperty> + + + + <!-- http://dl-learner.org/heart#hasThalValue --> + + <owl:ObjectProperty rdf:about="http://dl-learner.org/heart#hasThalValue"> + <rdfs:domain rdf:resource="http://dl-learner.org/heart#Patient"/> + <rdfs:range rdf:resource="http://dl-learner.org/heart#Thals"/> + </owl:ObjectProperty> + + + + <!-- + /////////////////////////////////////////////////////////////////////////////////////// + // + // Data properties + // + /////////////////////////////////////////////////////////////////////////////////////// + --> + + + + + <!-- http://dl-learner.org/heart#hasAge --> + + <owl:DatatypeProperty rdf:about="http://dl-learner.org/heart#hasAge"> + <rdfs:domain rdf:resource="http://dl-learner.org/heart#Patient"/> + <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#double"/> + </owl:DatatypeProperty> + + + + <!-- http://dl-learner.org/heart#hasAngina --> + + <owl:DatatypeProperty rdf:about="http://dl-learner.org/heart#hasAngina"> + <rdfs:domain rdf:resource="http://dl-learner.org/heart#Patient"/> + <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#boolean"/> + </owl:DatatypeProperty> + + + + <!-- http://dl-learner.org/heart#hasBloodPressure --> + + <owl:DatatypeProperty rdf:about="http://dl-learner.org/heart#hasBloodPressure"> + <rdfs:domain rdf:resource="http://dl-learner.org/heart#Patient"/> + <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#double"/> + </owl:DatatypeProperty> + + + + <!-- http://dl-learner.org/heart#hasBloodSugarOver120mg/dl --> + + <owl:DatatypeProperty rdf:about="http://dl-learner.org/heart#hasBloodSugarOver120mg/dl"> + <rdfs:domain rdf:resource="http://dl-learner.org/heart#Patient"/> + <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#boolean"/> + </owl:DatatypeProperty> + + + + <!-- http://dl-learner.org/heart#hasCholestoral --> + + <owl:DatatypeProperty rdf:about="http://dl-learner.org/heart#hasCholestoral"> + <rdfs:domain rdf:resource="http://dl-learner.org/heart#Patient"/> + <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#double"/> + </owl:DatatypeProperty> + + + + <!-- http://dl-learner.org/heart#hasMajorVessels --> + + <owl:DatatypeProperty rdf:about="http://dl-learner.org/heart#hasMajorVessels"> + <rdfs:domain rdf:resource="http://dl-learner.org/heart#Patient"/> + <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#double"/> + </owl:DatatypeProperty> + + + + <!-- http://dl-learner.org/heart#hasMaximumHeartRate --> + + <owl:DatatypeProperty rdf:about="http://dl-learner.org/heart#hasMaximumHeartRate"> + <rdfs:domain rdf:resource="http://dl-learner.org/heart#Patient"/> + <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#double"/> + </owl:DatatypeProperty> + + + + <!-- http://dl-learner.org/heart#hasOldPeak --> + + <owl:DatatypeProperty rdf:about="http://dl-learner.org/heart#hasOldPeak"> + <rdfs:domain rdf:resource="http://dl-learner.org/heart#Patient"/> + <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#double"/> + </owl:DatatypeProperty> + + + + <!-- http://dl-learner.org/heart#hasStSegment --> + + <owl:DatatypeProperty rdf:about="http://dl-learner.org/heart#hasStSegment"> + <rdfs:domain rdf:resource="http://dl-learner.org/heart#Patient"/> + <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#double"/> + </owl:DatatypeProperty> + + + + <!-- + /////////////////////////////////////////////////////////////////////////////////////// + // + // Classes + // + /////////////////////////////////////////////////////////////////////////////////////// + --> + + + + + <!-- http://dl-learner.org/heart#Gender --> + + <owl:Class rdf:about="http://dl-learner.org/heart#Gender"/> + + + + <!-- http://dl-learner.org/heart#Patient --> + + <owl:Class rdf:about="http://dl-learner.org/heart#Patient"/> + + + + <!-- http://dl-learner.org/heart#Thals --> + + <owl:Class rdf:about="http://dl-learner.org/heart#Thals"/> + + + + <!-- http://dl-learner.org/heart#Thing --> + + <owl:Class rdf:about="http://dl-learner.org/heart#Thing"/> + + + + <!-- http://dl-learner.org/heart#fixed-defect --> + + <owl:Class rdf:about="http://dl-learner.org/heart#fixed-defect"> + <rdfs:subClassOf rdf:resource="http://dl-learner.org/heart#Thals"/> + </owl:Class> + + + + <!-- http://dl-learner.org/heart#normal --> + + <owl:Class rdf:about="http://dl-learner.org/heart#normal"> + <rdfs:subClassOf rdf:resource="http://dl-learner.org/heart#Thals"/> + </owl:Class> + + + + <!-- http://dl-learner.org/heart#reversable-defect --> + + <owl:Class rdf:about="http://dl-learner.org/heart#reversable-defect"> + <rdfs:subClassOf rdf:resource="http://dl-learner.org/heart#Thals"/> + </owl:Class> + + + + <!-- + /////////////////////////////////////////////////////////////////////////////////////// + // + // Individuals + // + /////////////////////////////////////////////////////////////////////////////////////// + --> + + + + + <!-- http://dl-learner.org/heart#0.0 --> + + <owl:NamedIndividual rdf:about="http://dl-learner.org/heart#0.0"/> + + + + <!-- http://dl-learner.org/heart#1.0 --> + + <owl:NamedIndividual rdf:about="http://dl-learner.org/heart#1.0"/> + + + + <!-- http://dl-learner.org/heart#2.0 --> + + <owl:NamedIndividual rdf:about="http://dl-learner.org/heart#2.0"/> + + + + <!-- http://dl-learner.org/heart#3.0 --> + + <owl:NamedIndividual rdf:about="http://dl-learner.org/heart#3.0"/> + + + + <!-- http://dl-learner.org/heart#4.0 --> + + <owl:NamedIndividual rdf:about="http://dl-learner.org/heart#4.0"/> + + + + <!-- http://dl-learner.org/heart#Patient0 --> + + <owl:NamedIndividual rdf:about="http://dl-learner.org/heart#Patient0"> + <rdf:type rdf:resource="http://dl-learner.org/heart#Patient"/> + <hasMaximumHeartRate rdf:datatype="http://www.w3.org/2001/XMLSchema#double">109.0</hasMaximumHeartRate> + <hasBloodPressure rdf:datatype="http://www.w3.org/2001/XMLSchema#double">130.0</hasBloodPressure> + <hasStSegment rdf:datatype="http://www.w3.org/2001/XMLSchema#double">2.0</hasStSegment> + <hasOldPeak rdf:datatype="http://www.w3.org/2001/XMLSchema#double">2.4</hasOldPeak> + <hasMajorVessels rdf:datatype="http://www.w3.org/2001/XMLSchema#double">3.0</hasMajorVessels> + <hasCholestoral rdf:datatype="http://www.w3.org/2001/XMLSchema#double">322.0</hasCholestoral> + <hasAge rdf:datatype="http://www.w3.org/2001/XMLSchema#double">70.0</hasAge> + <hasAngina rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean">false</hasAngina> + <hasBloodSugarOver120mg:dl rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean">true</hasBloodSugarOver120mg:dl> + <hasElectrocardiographicResults rdf:resource="http://dl-learner.org/heart#2.0"/> + <hasChestPain rdf:resource="http://dl-learner.org/heart#4.0"/> + <hasGender rdf:resource="http://dl-learner.org/heart#female"/> + <hasThalValue rdf:resource="http://dl-learner.org/heart#normal"/> + </owl:NamedIndividual> + + + + <!-- http://dl-learner.org/heart#Patient1 --> + + <owl:NamedIndividual rdf:about="http://dl-learner.org/heart#Patient1"> + <rdf:type rdf:resource="http://dl-learner.org/heart#Patient"/> + <hasMajorVessels rdf:datatype="http://www.w3.org/2001/XMLSchema#double">0.0</hasMajorVessels> + <hasOldPeak rdf:datatype="http://www.w3.org/2001/XMLSchema#double">1.6</hasOldPeak> + <hasBloodPressure rdf:datatype="http://www.w3.org/2001/XMLSchema#double">115.0</hasBloodPressure> + <hasMaximumHeartRate rdf:datatype="http://www.w3.org/2001/XMLSchema#double">160.0</hasMaximumHeartRate> + <hasStSegment rdf:datatype="http://www.w3.org/2001/XMLSchema#double">2.0</hasStSegment> + <hasCholestoral rdf:datatype="http://www.w3.org/2001/XMLSchema#double">564.0</hasCholestoral> + <hasAge rdf:datatype="http://www.w3.org/2001/XMLSchema#double">67.0</hasAge> + <hasAngina rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean">false</hasAngina> + <hasBloodSugarOver120mg:dl rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean">true</hasBloodSugarOver120mg:dl> + <hasElectrocardiographicResults rdf:resource="http://dl-learner.org/heart#2.0"/> + <hasChestPain rdf:resource="http://dl-learner.org/heart#3.0"/> + <hasGender rdf:resource="http://dl-learner.org/heart#male"/> + <hasThalValue rdf:resource="http://dl-learner.org/heart#reversable-defect"/> + </owl:NamedIndividual> + + + + <!-- http://dl-learner.org/heart#Patient10 --> + + <owl:NamedIndividual rdf:about="http://dl-learner.org/heart#Patient10"> + <rdf:type rdf:resource="http://dl-learner.org/heart#Patient"/> + <hasMajorVessels rdf:datatype="http://www.w3.org/2001/XMLSchema#double">0.0</hasMajorVessels> + <hasOldPeak rdf:datatype="http://www.w3.org/2001/XMLSchema#double">0.5</hasOldPeak> + <hasBloodPressure rdf:datatype="http://www.w3.org/2001/XMLSchema#double">135.0</hasBloodPressure> + <hasMaximumHeartRate rdf:datatype="http://www.w3.org/2001/XMLSchema#double">161.0</hasMaximumHeartRate> + <hasStSegment rdf:datatype="http://www.w3.org/2001/XMLSchema#double">2.0</hasStSegment> + <hasCholestoral rdf:datatype="http://www.w3.org/2001/XMLSchema#double">234.0</hasCholestoral> + <hasAge rdf:datatype="http://www.w3.org/2001/XMLSchema#double">59.0</hasAge> + <hasAngina rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean">false</hasAngina> + <hasBloodSugarOver120mg:dl rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean">true</hasBloodSugarOver120mg:dl> + <hasElectrocardiographicResults rdf:resource="http://dl-learner.org/heart#0.0"/> + <hasChestPain rdf:resource="http://dl-learner.org/heart#4.0"/> + <hasGender rdf:resource="http://dl-learner.org/heart#female"/> + <hasThalValue rdf:resource="http://dl-learner.org/heart#reversable-defect"/> + </owl:NamedIndividual> + + + + <!-- http://dl-learner.org/heart#Patient100 --> + + <owl:NamedIndividual rdf:about="http://dl-learner.org/heart#Patient100"> + <rdf:type rdf:resource="http://dl-learner.org/heart#Patient"/> + <hasMajorVessels rdf:datatype="http://www.w3.org/2001/XMLSchema#double">0.0</hasMajorVessels> + <hasOldPeak rdf:datatype="http://www.w3.org/2001/XMLSchema#double">0.6</hasOldPeak> + <hasBloodPressure rdf:datatype="http://www.w3.org/2001/XMLSchema#double">108.0</hasBloodPressure> + <hasCholestoral rdf:datatype="http://www.w3.org/2001/XMLSchema#double">141.0</hasCholestoral> + <hasMaximumHeartRate rdf:datatype="http://www.w3.org/2001/XMLSchema#double">175.0</hasMaximumHeartRate> + <hasStSegment rdf:datatype="http://www.w3.org/2001/XMLSchema#double">2.0</hasStSegment> + <hasAge rdf:datatype="http://www.w3.org/2001/XMLSchema#double">44.0</hasAge> + <hasAngina rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean">false</hasAngina> + <hasBloodSugarOver120mg:dl rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean">true</hasBloodSugarOver120mg:dl> + <hasElectrocardiographicResults rdf:resource="http://dl-learner.org/heart#0.0"/> + <hasChestPain rdf:resource="http://dl-learner.org/heart#3.0"/> + <hasGender rdf:resource="http://dl-learner.org/heart#male"/> + <hasThalValue rdf:resource="http://dl-learner.org/heart#normal"/> + </owl:NamedIndividual> + + + + <!-- http://dl-learner.org/heart#Patient101 --> + + <owl:NamedIndividual rdf:about="http://dl-learner.org/heart#Patient101"> + <rdf:type rdf:resource="http://dl-learner.org/heart#Patient"/> + <hasMajorVessels rdf:datatype="http://www.w3.org/2001/XMLSchema#double">0.0</hasMajorVessels> + <hasOldPeak rdf:datatype="http://www.w3.org/2001/XMLSchema#double">1.0</hasOldPeak> + <hasBloodPressure rdf:datatype="http://www.w3.org/2001/XMLSchema#double">120.0</hasBloodPressure> + <hasStSegment rdf:datatype="http://www.w3.org/2001/XMLSchema#double">2.0</hasStSegment> + <hasCholestoral rdf:datatype="http://www.w3.org/2001/XMLSchema#double">237.0</hasCholestoral> + <hasAge rdf:datatype="http://www.w3.org/2001/XMLSchema#double">67.0</hasAge> + <hasMaximumHeartRate rdf:datatype="http://www.w3.org/2001/XMLSchema#double">71.0</hasMaximumHeartRate> + <hasAngina rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean">false</hasAngina> + <hasBloodSugarOver120mg:dl rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean">true</hasBloodSugarOver120mg:dl> + <hasElectrocardiographicResults rdf:resource="http://dl-learner.org/heart#0.0"/> + <hasChestPain rdf:resource="http://dl-learner.org/heart#4.0"/> + <hasGender rdf:resource="http://dl-learner.org/heart#female"/> + <hasThalValue rdf:resource="http://dl-learner.org/heart#normal"/> + </owl:NamedIndividual> + + + + <!-- http://dl-learner.org/heart#Patient102 --> + + <owl:NamedIndividual rdf:about="http://dl-learner.org/heart#Patient102"> + <rdf:type rdf:resource="http://dl-learner.org/heart#Patient"/> + <hasOldPeak rdf:datatype="http://www.w3.org/2001/XMLSchema#double">0.0</hasOldPeak> + <hasMajorVessels rdf:datatype="http://www.w3.org/2001/XMLSchema#double">0.0</hasMajorVessels> + <hasStSegment rdf:datatype="http://www.w3.org/2001/XMLSchema#double">1.0</hasStSegment> + <hasBloodPressure rdf:datatype="http://www.w3.org/2001/XMLSchema#double">130.0</hasBloodPressure> + <hasMaximumHeartRate rdf:datatype="http://www.w3.org/2001/XMLSchema#double">163.0</hasMaximumHeartRate> + <hasCholestoral rdf:datatype="http://www.w3.org/2001/XMLSchema#double">269.0</hasCholestoral> + <hasAge rdf:datatype="http://www.w3.org/2001/XMLSchema#double">49.0</hasAge> + <hasAngina rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean">false</hasAngina> + <hasBloodSugarOver120mg:dl rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean">true</hasBloodSugarOver120mg:dl> + <hasElectrocardiographicResults rdf:resource="http://dl-learner.org/heart#0.0"/> + <hasChestPain rdf:resource="http://dl-learner.org/heart#4.0"/> + <hasGender rdf:resource="http://dl-learner.org/heart#male"/> + <hasThalValue rdf:resource="http://dl-learner.org/heart#normal"/> + </owl:NamedIndividual> + + + + <!-- http://dl-learner.org/heart#Patient103 --> + + <owl:NamedIndividual rdf:about="http://dl-learner.org/heart#Patient103"> + <rdf:type rdf:resource="http://dl-learner.org/heart#Patient"/> + <hasOldPeak rdf:datatype="http://www.w3.org/2001/XMLSchema#double">1.0</hasOldPeak> + <hasMaximumHeartRate rdf:datatype="http://www.w3.org/2001/XMLSchema#double">124.0</hasMaximumHeartRate> + <hasBloodPressure rdf:datatype="http://www.w3.org/2001/XMLSchema#double">165.0</hasBloodPressure> + <hasStSegment rdf:datatype="http://www.w3.org/2001/XMLSchema#double">2.0</hasStSegment> + <hasCholestoral rdf:datatype="http://www.w3.org/2001/XMLSchema#double">289.0</hasCholestoral> + <hasMajorVessels rdf:datatype="http://www.w3.org/2001/XMLSchema#double">3.0</hasMajorVessels> + <hasAge rdf:datatype="http://www.w3.org/2001/XMLSchema#double">57.0</hasAge> + <hasAngina rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean">false</hasAngina> + <hasBloodSugarOver120mg:dl rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean">true</hasBloodSugarOver120mg:dl> + <hasElectrocardiographicResults rdf:resource="http://dl-learner.org/heart#2.0"/> + <hasChestPain rdf:resource="http://dl-learner.org/heart#4.0"/> + <hasGender rdf:resource="http://dl-learner.org/heart#female"/> + <hasThalValue rdf:resource="http://dl-learner.org/heart#reversable-defect"/> + </owl:NamedIndividual> + + + + <!-- http://dl-learner.org/heart#Patient104 --> + + <owl:NamedIndividual rdf:about="http://dl-learner.org/heart#Patient104"> + <rdf:type rdf:resource="http://dl-learner.org/heart#Patient"/> + <hasMajorVessels rdf:datatype="http://www.w3.org/2001/XMLSchema#double">1.0</hasMajorVessels> + <hasOldPeak rdf:datatype="http://www.w3.org/2001/XMLSchema#double">1.4</hasOldPeak> + <hasBloodPressure rdf:datatype="http://www.w3.org/2001/XMLSchema#double">130.0</hasBloodPressure> + <hasMaximumHeartRate rdf:datatype="http://www.w3.org/2001/XMLSchema#double">147.0</hasMaximumHeartRate> + <hasStSegment rdf:datatype="http://www.w3.org/2001/XMLSchema#double">2.0</hasStSegment> + <hasCholestoral rdf:datatype="http://www.w3.org/2001/XMLSchema#double">254.0</hasCholestoral> + <hasAge rdf:datatype="http://www.w3.org/2001/XMLSchema#double">63.0</hasAge> + <hasAngina rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean">false</hasAngina> + <hasBloodSugarOver120mg:dl rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean">true</hasBloodSugarOver120mg:dl> + <hasElectrocardiographicResults rdf:resource="http://dl-learner.org/heart#2.0"/> + <hasChestPain rdf:resource="http://dl-learner.org/heart#4.0"/> + <hasGender rdf:resource="http://dl-learner.org/heart#female"/> + <hasThalValue rdf:resource="http://dl-learner.org/heart#reversable-defect"/> + </owl:NamedIndividual> + + + + <!-- http://dl-learner.org/heart#Patient105 --> + + <owl:NamedIndividual rdf:about="http://dl-learner.org/heart#Patient105"> + <rdf:type rdf:resource="http://dl-learner.org/heart#Patient"/> + <hasMajorVessels rdf:datatype="http://www.w3.org/2001/XMLSchema#double">0.0</hasMajorVessels> + <hasOldPeak rdf:datatype="http://www.w3.org/2001/XMLSchema#double">0.5</hasOldPeak> + <hasBloodPressure rdf:datatype="http://www.w3.org/2001/XMLSchema#double">124.0</hasBloodPressure> + <hasMaximumHeartRate rdf:datatype="http://www.w3.org/2001/XMLSchema#double">166.0</hasMaximumHeartRate> + <hasStSegment rdf:datatype="http://www.w3.org/2001/XMLSchema#double">2.0</hasStSegment> + <hasCholestoral rdf:datatype="http://www.w3.org/2001/XMLSchema#double">274.0</hasCholestoral> + <hasAge rdf:datatype="http://www.w3.org/2001/XMLSchema#double">48.0</hasAge> + <hasAngina rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean">false</hasAngina> + <hasBloodSugarOver120mg:dl rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean">true</hasBloodSugarOver120mg:dl> + <hasElectrocardiographicResults rdf:resource="http://dl-learner.org/heart#2.0"/> + <hasChestPain rdf:resource="http://dl-learner.org/heart#4.0"/> + <hasGender rdf:resource="http://dl-learner.org/heart#female"/> + <hasThalValue rdf:resource="http://dl-learner.org/heart#reversable-defect"/> + </owl:NamedIndividual> + + + + <!-- http://dl-learner.org/heart#Patient106 --> + + <owl:NamedIndividual rdf:about="http://dl-learner.org/heart#Patient106"> + <rdf:type rdf:resource="http://dl-learner.org/heart#Patient"/> + <hasMajorVessels rdf:datatype="http://www.w3.org/2001/XMLSchema#double">0.0</hasMajorVessels> + <hasOldPeak rdf:datatype="http://www.w3.org/2001/XMLSchema#double">1.2</hasOldPeak> + <hasBloodPressure rdf:datatype="http://www.w3.org/2001/XMLSchema#double">100.0</hasBloodPressure> + <hasMaximumHeartRate rdf:datatype="http://www.w3.org/2001/XMLSchema#double">143.0</hasMaximumHeartRate> + <hasStSegment rdf:datatype="http://www.w3.org/2001/XMLSchema#double">2.0</hasStSegment> + <hasCholestoral rdf:datatype="http://www.w3.org/2001/XMLSchema#double">222.0</hasCholestoral> + <hasAge rdf:datatype="http://www.w3.org/2001/XMLSchema#double">51.0</hasAge> + <hasBloodSugarOver120mg:dl rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean">true</hasBloodSugarOver120mg:dl> + <hasAngina rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean">true</hasAngina> + <hasElectrocardiographicResults rdf:resource="http://dl-learner.org/heart#0.0"/> + <hasChestPain rdf:resource="http://dl-learner.org/heart#3.0"/> + <hasGender rdf:resource="http://dl-learner.org/heart#female"/> + <hasThalValue rdf:resource="http://dl-learner.org/heart#normal"/> + </owl:NamedIndividual> + + + + <!-- http://dl-learner.org/heart#Patient107 --> + + <owl:NamedIndividual rdf:about="http://dl-learner.org/heart#Patient107"> + <rdf:type rdf:resource="http://dl-learner.org/heart#Patient"/> + <hasBloodPressure rdf:datatype="http://www.w3.org/2001/XMLSchema#double">150.0</hasBloodPressure> + <hasMaximumHeartRate rdf:datatype="http://www.w3.org/2001/XMLSchema#double">157.0</hasMaximumHeartRate> + <hasMajorVessels rdf:datatype="http://www.w3.org/2001/XMLSchema#double">2.0</hasMajorVessels> + <hasStSegment rdf:datatype="http://www.w3.org/2001/XMLSchema#double">2.0</hasStSegment> + <hasOldPeak rdf:datatype="http://www.w3.org/2001/XMLSchema#double">2.6</hasOldPeak> + <hasCholestoral rdf:datatype="http://www.w3.org/2001/XMLSchema#double">258.0</hasCholestoral> + <hasAge rdf:datatype="http://www.w3.org/2001/XMLSchema#double">60.0</hasAge> + <hasAngina rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean">false</hasAngina> + <hasBloodSugarOver120mg:dl rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean">true</hasBloodSugarOver120mg:dl> + <hasElectrocardiographicResults rdf:resource="http://dl-learner.org/heart#2.0"/> + <hasChestPain rdf:resource="http://dl-learner.org/heart#4.0"/> + <hasGender rdf:resource="http://dl-learner.org/heart#male"/> + <hasThalValue rdf:resource="http://dl-learner.org/heart#reversable-defect"/> + </owl:NamedIndividual> + + + + <!-- http://dl-learner.org/heart#Patient108 --> + + <owl:NamedIndividual rdf:about="http://dl-learner.org/heart#Patient108"> + <rdf:type rdf:resource="http://dl-learner.org/heart#Patient"/> + <hasOldPeak rdf:datatype="http://www.w3.org/2001/XMLSchema#double">0.0</hasOldPeak> + <hasMajorVessels rdf:datatype="http://www.w3.org/2001/XMLSchema#double">1.0</hasMajorVessels> + <hasStSegment rdf:datatype="http://www.w3.org/2001/XMLSchema#double">1.0</hasStSegment> + <hasBloodPressure rdf:datatype="http://www.w3.org/2001/XMLSchema#double">140.0</hasBloodPressure> + <hasMaximumHeartRate rdf:datatype="http://www.w3.org/2001/XMLSchema#double">162.0</hasMaximumHeartRate> + <hasCholestoral rdf:datatype="http://www.w3.org/2001/XMLSchema#double">177.0</hasCholestoral> + <hasAge rdf:datatype="http://www.w3.org/2001/XMLSchema#double">59.0</hasAge> + <hasBloodSugarOver120mg:dl rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean">true</hasBloodSugarOver120mg:dl> + <hasAngina rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean">true</hasAngina> + <hasElectrocardiographicResults rdf:resource="http://dl-learner.org/heart#0.0"/> + <hasChestPain rdf:resource="http://dl-learner.org/heart#4.0"/> + <hasGender rdf:resource="http://dl-learner.org/heart#female"/> + <hasThalValue rdf:resource="http://dl-learner.org/heart#reversable-defect"/> + </owl:NamedIndividual> + + + + <!-- http://dl-learner.org/heart#Patient109 --> + + <owl:NamedIndividual rdf:about="http://dl-learner.org/heart#Patient109"> + <rdf:type rdf:resource="http://dl-learner.org/heart#Patient"/> + <hasMajorVessels rdf:datatype="http://www.w3.org/2001/XMLSchema#double">0.0</hasMajorVessels> + <hasOldPeak rdf:datatype="http://www.w3.org/2001/XMLSchema#double">0.0</hasOldPeak> + <hasBloodPressure rdf:datatype="http://www.w3.org/2001/XMLSchema#double">112.0</hasBloodPressure> + <hasMaximumHeartRate rdf:datatype="http://www.w3.org/2001/XMLSchema#double">138.0</hasMaximumHeartRate> + <hasCholestoral rdf:datatype="http://www.w3.org/2001/XMLSchema#double">160.0</hasCholestoral> + <hasStSegment rdf:datatype="http://www.w3.org/2001/XMLSchema#double">2.0</hasStSegment> + <hasAge rdf:datatype="http://www.w3.org/2001/XMLSchema#double">45.0</hasAge> + <hasAngina rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean">false</hasAngina> + <hasBloodSugarOver120mg:dl rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean">true</hasBloodSugarOver120mg:dl> + <hasElectrocardiographicResults rdf:resource="http://dl-learner.org/heart#0.0"/> + <hasChestPain rdf:resource="http://dl-learner.org/heart#2.0"/> + <hasGender rdf:resource="http://dl-learner.org/heart#male"/> + <hasThalValue rdf:resource="http://dl-learner.org/heart#normal"/> + </owl:NamedIndividual> + + + + <!-- http://dl-learner.org/heart#Patient11 --> + + <owl:NamedIndividual rdf:about="http://dl-learner.org/heart#Patient11"> + <rdf:type rdf:resource="http://dl-learner.org/heart#Patient"/> + <hasMajorVessels rdf:datatype="http://... [truncated message content] |
From: <hee...@us...> - 2010-08-20 09:02:19
|
Revision: 2265 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=2265&view=rev Author: heeroyuy Date: 2010-08-20 09:02:10 +0000 (Fri, 20 Aug 2010) Log Message: ----------- added ontology for mammographic masses Added Paths: ----------- trunk/src/dl-learner/org/dllearner/examples/Mammographic.java trunk/test/mammographic/ trunk/test/mammographic/files/ trunk/test/mammographic/files/mammographic_masses.data trunk/test/mammographic/mammographic.owl trunk/test/mammographic/train.conf Added: trunk/src/dl-learner/org/dllearner/examples/Mammographic.java =================================================================== --- trunk/src/dl-learner/org/dllearner/examples/Mammographic.java (rev 0) +++ trunk/src/dl-learner/org/dllearner/examples/Mammographic.java 2010-08-20 09:02:10 UTC (rev 2265) @@ -0,0 +1,347 @@ +package org.dllearner.examples; + +import java.io.File; +import java.io.FileNotFoundException; +import java.util.HashMap; +import java.util.LinkedList; +import java.util.List; +import java.util.Scanner; +import java.util.Set; +import java.util.TreeSet; + +import org.dllearner.core.owl.Axiom; +import org.dllearner.core.owl.ClassAssertionAxiom; +import org.dllearner.core.owl.DatatypeProperty; +import org.dllearner.core.owl.DatatypePropertyAssertion; +import org.dllearner.core.owl.DoubleDatatypePropertyAssertion; +import org.dllearner.core.owl.Individual; +import org.dllearner.core.owl.KB; +import org.dllearner.core.owl.NamedClass; +import org.dllearner.core.owl.ObjectProperty; +import org.dllearner.core.owl.ObjectPropertyAssertion; +import org.dllearner.core.owl.SubClassAxiom; +import org.dllearner.parser.KBParser; +import org.dllearner.parser.ParseException; +import org.dllearner.reasoning.OWLAPIReasoner; +import org.dllearner.utilities.Files; +import org.dllearner.utilities.Helper; +import org.semanticweb.owlapi.model.IRI; + +public class Mammographic { + + private static IRI ontologyIRI = IRI + .create("http://dl-learner.org/mammographic"); + private static final String fileName = "test/mammographic/files/mammographic_masses.data"; + private static HashMap<String, String> shapes; + private static HashMap<String, String> margines; + private static HashMap<String, String> densities; + private static HashMap<String, Integer> patients = new HashMap<String, Integer>(); + private static List<Axiom> axioms = new LinkedList<Axiom>(); + private static Set<String> measures = new TreeSet<String>(); + private static Set<String> shape = new TreeSet<String>(); + private static Set<String> margin = new TreeSet<String>(); + private static Set<String> density = new TreeSet<String>(); + + public static void main(String agrs[]) throws FileNotFoundException, ParseException { + Scanner input = new Scanner(new File(fileName), "UTF-8"); + File owlFile = new File("test/mammographic/mammographic.owl"); + long startTime, duration; + String time; + createShapeMapping(); + createMarginMapping(); + createDensityMapping(); + setMeasures(); + KB kb = new KB(); + + NamedClass atomClass = getAtomicConcept("Measure"); + for (String measure : measures) { + NamedClass elClass = getAtomicConcept(measure); + SubClassAxiom sc = new SubClassAxiom(elClass, atomClass); + kb.addAxiom(sc); + } + + NamedClass subClass = getAtomicConcept("Shape"); + for (String shapes : shape) { + NamedClass elClass = getAtomicConcept(shapes); + SubClassAxiom sc = new SubClassAxiom(elClass, subClass); + kb.addAxiom(sc); + } + + NamedClass subsClass = getAtomicConcept("Margin"); + for (String margines : margin) { + NamedClass elClass = getAtomicConcept(margines); + SubClassAxiom sc = new SubClassAxiom(elClass, subsClass); + kb.addAxiom(sc); + } + + NamedClass subClasses = getAtomicConcept("Density"); + for (String densities : density) { + NamedClass elClass = getAtomicConcept(densities); + SubClassAxiom sc = new SubClassAxiom(elClass, subClasses); + kb.addAxiom(sc); + } + + String kbString = generateDomainAndRangeForObjectProperties(); + KB kb2 = KBParser.parseKBFile(kbString); + kb.addKB(kb2); + + System.out.print("Reading in mammographic files ... "); + startTime = System.nanoTime(); + // create subclasses of atom + int i = 0; + while ( input.hasNextLine() ) { + String nextLine = input.next(); + String biRads = nextLine.substring(0, nextLine.indexOf(",")); + nextLine = nextLine.replaceFirst(biRads + ",", ""); + String age = nextLine.substring(0, nextLine.indexOf(",")); + nextLine = nextLine.replaceFirst(age + ",", ""); + String shape = nextLine.substring(0, nextLine.indexOf(",")); + nextLine = nextLine.replaceFirst(shape + ",", ""); + shape = shapes.get(shape); + String margin = nextLine.substring(0, nextLine.indexOf(",")); + nextLine = nextLine.replaceFirst(margin + ",", ""); + margin = margines.get(margin); + String density = nextLine.substring(0, nextLine.indexOf(",")); + nextLine = nextLine.replaceFirst(density + ",", ""); + density = densities.get(density); + String malignant = nextLine; + List<Axiom> axioms = mapClauses(biRads, age, shape, margin, density, malignant, i); + for (Axiom axiom : axioms) + kb.addAxiom(axiom); + + i++; + } + duration = System.nanoTime() - startTime; + time = Helper.prettyPrintNanoSeconds(duration, false, false); + System.out.println("OK (" + time + ")."); + + // writing generated knowledge base + System.out.print("Writing OWL file ... "); + startTime = System.nanoTime(); + OWLAPIReasoner.exportKBToOWL(owlFile, kb, ontologyIRI); + duration = System.nanoTime() - startTime; + time = Helper.prettyPrintNanoSeconds(duration, false, false); + System.out.println("OK (" + time + ")."); + + // generating second conf file + System.out.print("Generating conf file ... "); + File confTrainFile = new File("test/mammographic/train.conf"); + Files.clearFile(confTrainFile); + generateConfFile(confTrainFile); + generateExamples(confTrainFile); + duration = System.nanoTime() - startTime; + time = Helper.prettyPrintNanoSeconds(duration, false, false); + System.out.println("OK (" + time + ")."); + System.out.println("Finished"); + } + + // create chemical element list + private static void createShapeMapping() { + shapes = new HashMap<String, String>(); + shapes.put("0", "unknown"); + shapes.put("1", "round"); + shapes.put("2", "oval"); + shapes.put("3", "lobular"); + shapes.put("4", "irregular"); + + } + + // create chemical element list + private static void createMarginMapping() { + margines = new HashMap<String, String>(); + margines.put("0", "unknown"); + margines.put("1", "circumscribed"); + margines.put("2", "microlobulated"); + margines.put("3", "obscured"); + margines.put("4", "ill-defined"); + margines.put("5", "spiculated"); + + } + + // create chemical element list + private static void createDensityMapping() { + densities = new HashMap<String, String>(); + densities.put("0", "unknown"); + densities.put("1", "high"); + densities.put("2", "iso"); + densities.put("3", "low"); + densities.put("4", "fat-containing"); + + } + + private static List<Axiom> mapClauses(String bi, String age, String shape, String margin, String density, String malignant, int i) { + + + ClassAssertionAxiom cmpAxiom = getConceptAssertion("Patient", + "Patient" + i); + axioms.add(cmpAxiom); + + double biRads = Double + .parseDouble(bi); + + DatatypePropertyAssertion dpa = getDoubleDatatypePropertyAssertion( + "Patient"+i, "hasBiRads", biRads); + axioms.add(dpa); + + double agePatient = Double + .parseDouble(age); + + DatatypePropertyAssertion dpb = getDoubleDatatypePropertyAssertion( + "Patient"+i, "hasAge", agePatient); + axioms.add(dpb); + + ObjectPropertyAssertion sa = getRoleAssertion("hasShape", + "Patient" + i, shape); + axioms.add(sa); + + ClassAssertionAxiom compAxiom = getConceptAssertion(shape, + shape); + axioms.add(compAxiom); + + ObjectPropertyAssertion ma = getRoleAssertion("hasMargin", + "Patient" + i, margin); + axioms.add(ma); + + ClassAssertionAxiom maAxiom = getConceptAssertion(margin, + margin); + axioms.add(maAxiom); + + ObjectPropertyAssertion ca = getRoleAssertion("hasDensity", + "Patient" + i, density); + axioms.add(ca); + + ClassAssertionAxiom denAxiom = getConceptAssertion(density, + density); + axioms.add(denAxiom); + + patients.put("Patient" + i, new Integer(malignant)); + + return axioms; + } + + private static NamedClass getAtomicConcept(String name) { + return new NamedClass(ontologyIRI + "#" + name); + } + + private static ClassAssertionAxiom getConceptAssertion(String concept, + String i) { + Individual ind = getIndividual(i); + NamedClass c = getAtomicConcept(concept); + return new ClassAssertionAxiom(c, ind); + } + + private static Individual getIndividual(String name) { + return new Individual(ontologyIRI + "#" + name); + } + + private static ObjectPropertyAssertion getRoleAssertion(String role, + String i1, String i2) { + Individual ind1 = getIndividual(i1); + Individual ind2 = getIndividual(i2); + ObjectProperty ar = getRole(role); + return new ObjectPropertyAssertion(ar, ind1, ind2); + } + + private static ObjectProperty getRole(String name) { + return new ObjectProperty(ontologyIRI + "#" + name); + } + + private static void generateConfFile(File file) { + String confHeader = "import(\"mammographic.owl\");\n\n"; + confHeader += "reasoner = fastInstanceChecker;\n"; + confHeader += "algorithm = refexamples;\n"; + confHeader += "refexamples.noisePercentage = 5;\n"; + confHeader += "refexamples.startClass = " + getURI2("Patient") + ";\n"; + confHeader += "refexamples.writeSearchTree = false;\n"; + confHeader += "refexamples.searchTreeFile = \"log/mammographic/searchTree.log\";\n"; + confHeader += "\n"; + Files.appendFile(file, confHeader); + } + + private static void generateExamples(File file) { + StringBuffer content = new StringBuffer(); + Set<String> keys = patients.keySet(); + for(String key: keys) { + Integer subsValue = patients.get(key); + if(subsValue == 1) { + content.append("+\"" + getIndividual(key) + "\"\n"); + } else { + content.append("-\"" + getIndividual(key) + "\"\n"); + } + } + Files.appendFile(file, content.toString()); + } + + private static String getURI(String name) { + return ontologyIRI + "#" + name; + } + + // returns URI including quotationsmark (need for KBparser) + private static String getURI2(String name) { + return "\"" + getURI(name) + "\""; + } + + private static void setMeasures() { + measures.add("Density"); + measures.add("Margin"); + measures.add("Shape"); + + shape.add("unknown"); + shape.add("round"); + shape.add("oval"); + shape.add("lobular"); + shape.add("irregular"); + + margin.add("unknown"); + margin.add("circumscribed"); + margin.add("microlobulated"); + margin.add("obscured"); + margin.add("ill-defined"); + margin.add("spiculated"); + + density.add("unknown"); + density.add("high"); + density.add("iso"); + density.add("low"); + density.add("fat-containing"); + } + + private static DoubleDatatypePropertyAssertion getDoubleDatatypePropertyAssertion( + String individual, String datatypeProperty, double value) { + Individual ind = getIndividual(individual); + DatatypeProperty dp = getDatatypeProperty(datatypeProperty); + return new DoubleDatatypePropertyAssertion(dp, ind, value); + } + + private static DatatypeProperty getDatatypeProperty(String name) { + return new DatatypeProperty(ontologyIRI + "#" + name); + } + + private static String generateDomainAndRangeForObjectProperties() { + String kbString = "OPDOMAIN(" + getURI2("hasDensity") + ") = " + + getURI2("Patient") + ".\n"; + kbString += "OPRANGE(" + getURI2("hasDensity") + ") = " + getURI2("Density") + + ".\n"; + + kbString += "OPDOMAIN(" + getURI2("hasShape") + ") = " + + getURI2("Patient") + ".\n"; + kbString += "OPRANGE(" + getURI2("hasShape") + ") = " + getURI2("Shape") + + ".\n"; + + kbString += "OPDOMAIN(" + getURI2("hasMargin") + ") = " + + getURI2("Patient") + ".\n"; + kbString += "OPRANGE(" + getURI2("hasMargin") + ") = " + getURI2("Margin") + + ".\n"; + + kbString += "DPDOMAIN(" + getURI2("hasAge") + ") = " + + getURI2("Patient") + ".\n"; + kbString += "DPRANGE(" + getURI2("hasAge") + ") = DOUBLE.\n"; + + kbString += "DPDOMAIN(" + getURI2("hasBiRads") + ") = " + + getURI2("Patient") + ".\n"; + kbString += "DPRANGE(" + getURI2("hasBiRads") + ") = DOUBLE.\n"; + + return kbString; + } + +} Added: trunk/test/mammographic/files/mammographic_masses.data =================================================================== --- trunk/test/mammographic/files/mammographic_masses.data (rev 0) +++ trunk/test/mammographic/files/mammographic_masses.data 2010-08-20 09:02:10 UTC (rev 2265) @@ -0,0 +1,961 @@ +5,67,3,5,3,1 +4,43,1,1,0,1 +5,58,4,5,3,1 +4,28,1,1,3,0 +5,74,1,5,0,1 +4,65,1,0,3,0 +4,70,0,0,3,0 +5,42,1,0,3,0 +5,57,1,5,3,1 +5,60,0,5,1,1 +5,76,1,4,3,1 +3,42,2,1,3,1 +4,64,1,0,3,0 +4,36,3,1,2,0 +4,60,2,1,2,0 +4,54,1,1,3,0 +3,52,3,4,3,0 +4,59,2,1,3,1 +4,54,1,1,3,1 +4,40,1,0,0,0 +0,66,0,0,1,1 +5,56,4,3,1,1 +4,43,1,0,0,0 +5,42,4,4,3,1 +4,59,2,4,3,1 +5,75,4,5,3,1 +2,66,1,1,0,0 +5,63,3,0,3,0 +5,45,4,5,3,1 +5,55,4,4,3,0 +4,46,1,5,2,0 +5,54,4,4,3,1 +5,57,4,4,3,1 +4,39,1,1,2,0 +4,81,1,1,3,0 +4,77,3,0,0,0 +4,60,2,1,3,0 +5,67,3,4,2,1 +4,48,4,5,0,1 +4,55,3,4,2,0 +4,59,2,1,0,0 +4,78,1,1,1,0 +4,50,1,1,3,0 +4,61,2,1,0,0 +5,62,3,5,2,1 +5,44,2,4,0,1 +5,64,4,5,3,1 +4,23,1,1,0,0 +2,42,0,0,4,0 +5,67,4,5,3,1 +4,74,2,1,2,0 +5,80,3,5,3,1 +4,23,1,1,0,0 +4,63,2,1,0,0 +4,53,0,5,3,1 +4,43,3,4,0,0 +4,49,2,1,1,0 +5,51,2,4,0,0 +4,45,2,1,0,0 +5,59,2,0,0,1 +5,52,4,3,3,1 +5,60,4,3,3,1 +4,57,2,5,3,0 +3,57,2,1,0,0 +5,74,4,4,3,1 +4,25,2,1,0,0 +4,49,1,1,3,0 +5,72,4,3,0,1 +4,45,2,1,3,0 +4,64,2,1,3,0 +4,73,2,1,2,0 +5,68,4,3,3,1 +5,52,4,5,3,0 +5,66,4,4,3,1 +5,70,0,4,0,1 +4,25,1,1,3,0 +5,74,1,1,2,1 +4,64,1,1,3,0 +5,60,4,3,2,1 +5,67,2,4,1,0 +4,67,4,5,3,0 +5,44,4,4,2,1 +3,68,1,1,3,1 +4,57,0,4,1,0 +5,51,4,0,0,1 +4,33,1,0,0,0 +5,58,4,4,3,1 +5,36,1,0,0,0 +4,63,1,1,0,0 +5,62,1,5,3,1 +4,73,3,4,3,1 +4,80,4,4,3,1 +4,67,1,1,0,0 +5,59,2,1,3,1 +5,60,1,0,3,0 +5,54,4,4,3,1 +4,40,1,1,0,0 +4,47,2,1,0,0 +5,62,4,4,3,0 +4,33,2,1,3,0 +5,59,2,0,0,0 +4,65,2,0,0,0 +4,58,4,4,0,0 +4,29,2,0,0,0 +4,58,1,1,0,0 +4,54,1,1,0,0 +4,44,1,1,0,1 +3,34,2,1,0,0 +4,57,1,1,3,0 +5,33,4,4,0,1 +4,45,4,4,3,0 +5,71,4,4,3,1 +5,59,4,4,2,0 +4,56,2,1,0,0 +4,40,3,4,0,0 +4,56,1,1,3,0 +4,45,2,1,0,0 +4,57,2,1,2,0 +5,55,3,4,3,1 +5,84,4,5,3,0 +5,51,4,4,3,1 +4,43,1,1,0,0 +4,24,2,1,2,0 +4,66,1,1,3,0 +5,33,4,4,3,0 +4,59,4,3,2,0 +4,76,2,3,0,0 +4,40,1,1,0,0 +4,52,0,4,0,0 +5,40,4,5,3,1 +5,67,4,4,3,1 +5,75,4,3,3,1 +5,86,4,4,3,0 +4,60,2,0,0,0 +5,66,4,4,3,1 +5,46,4,5,3,1 +4,59,4,4,3,1 +5,65,4,4,3,1 +4,53,1,1,3,0 +5,67,3,5,3,1 +5,80,4,5,3,1 +4,55,2,1,3,0 +4,48,1,1,0,0 +4,47,1,1,2,0 +4,50,2,1,0,0 +5,62,4,5,3,1 +5,63,4,4,3,1 +4,63,4,0,3,1 +4,71,4,4,3,1 +4,41,1,1,3,0 +5,57,4,4,4,1 +5,71,4,4,4,1 +4,66,1,1,3,0 +4,47,2,4,2,0 +3,34,4,4,3,0 +4,59,3,4,3,0 +5,55,2,0,0,1 +4,51,0,0,3,0 +4,62,2,1,0,0 +4,58,4,0,3,1 +5,67,4,4,3,1 +4,41,2,1,3,0 +4,23,3,1,3,0 +4,53,0,4,3,0 +4,42,2,1,3,0 +5,87,4,5,3,1 +4,68,1,1,3,1 +4,64,1,1,3,0 +5,54,3,5,3,1 +5,86,4,5,3,1 +4,21,2,1,3,0 +4,39,1,1,0,0 +4,53,4,4,3,0 +4,44,4,4,3,0 +4,54,1,1,3,0 +5,63,4,5,3,1 +4,62,2,1,0,0 +4,45,2,1,2,0 +5,71,4,5,3,0 +5,49,4,4,3,1 +4,49,4,4,3,0 +5,66,4,4,4,0 +4,19,1,1,3,0 +4,35,1,1,2,0 +4,71,3,3,0,1 +5,74,4,5,3,1 +5,37,4,4,3,1 +4,67,1,0,3,0 +5,81,3,4,3,1 +5,59,4,4,3,1 +4,34,1,1,3,0 +5,79,4,3,3,1 +5,60,3,1,3,0 +4,41,1,1,3,1 +4,50,1,1,3,0 +5,85,4,4,3,1 +4,46,1,1,3,0 +5,66,4,4,3,1 +4,73,3,1,2,0 +4,55,1,1,3,0 +4,49,2,1,3,0 +3,49,4,4,3,0 +4,51,4,5,3,1 +2,48,4,4,3,0 +4,58,4,5,3,0 +5,72,4,5,3,1 +4,46,2,3,3,0 +4,43,4,3,3,1 +0,52,4,4,3,0 +4,66,2,1,0,0 +4,46,1,1,1,0 +4,69,3,1,3,0 +2,59,1,1,0,1 +5,43,2,1,3,1 +5,76,4,5,3,1 +4,46,1,1,3,0 +4,59,2,4,3,0 +4,57,1,1,3,0 +5,43,4,5,0,0 +3,45,2,1,3,0 +3,43,2,1,3,0 +4,45,2,1,3,0 +5,57,4,5,3,1 +5,79,4,4,3,1 +5,54,2,1,3,1 +4,40,3,4,3,0 +5,63,4,4,3,1 +2,55,1,0,1,0 +4,52,2,1,3,0 +4,38,1,1,3,0 +3,72,4,3,3,0 +5,80,4,3,3,1 +5,76,4,3,3,1 +4,62,3,1,3,0 +5,64,4,5,3,1 +5,42,4,5,3,0 +3,60,0,3,1,0 +4,64,4,5,3,0 +4,63,4,4,3,1 +4,24,2,1,2,0 +5,72,4,4,3,1 +4,63,2,1,3,0 +4,46,1,1,3,0 +3,33,1,1,3,0 +5,76,4,4,3,1 +4,36,2,3,3,0 +4,40,2,1,3,0 +5,58,1,5,3,1 +4,43,2,1,3,0 +3,42,1,1,3,0 +4,32,1,1,3,0 +5,57,4,4,2,1 +4,37,1,1,3,0 +4,70,4,4,3,1 +5,56,4,2,3,1 +3,76,0,3,2,0 +5,73,4,4,3,1 +5,77,4,5,3,1 +5,67,4,4,1,1 +5,71,4,3,3,1 +5,65,4,4,3,1 +4,43,1,1,3,0 +4,40,2,1,0,0 +4,49,2,1,3,0 +5,76,4,2,3,1 +4,55,4,4,3,0 +5,72,4,5,3,1 +3,53,4,3,3,0 +5,75,4,4,3,1 +5,61,4,5,3,1 +5,67,4,4,3,1 +5,55,4,2,3,1 +5,66,4,4,3,1 +2,76,1,1,2,0 +4,57,4,4,3,1 +5,71,3,1,3,0 +5,70,4,5,3,1 +4,35,4,2,0,0 +5,79,1,0,3,1 +4,63,2,1,3,0 +5,40,1,4,3,1 +4,41,1,1,3,0 +4,47,2,1,2,0 +4,68,1,1,3,1 +4,64,4,3,3,1 +4,65,4,4,0,1 +4,73,4,3,3,0 +4,39,4,3,3,0 +5,55,4,5,4,1 +5,53,3,4,4,0 +5,66,4,4,3,1 +4,43,3,1,2,0 +5,44,4,5,3,1 +4,77,4,4,3,1 +4,62,2,4,3,0 +5,80,4,4,3,1 +4,33,4,4,3,0 +4,50,4,5,3,1 +4,71,1,0,3,0 +5,46,4,4,3,1 +5,49,4,5,3,1 +4,53,1,1,3,0 +3,46,2,1,2,0 +4,57,1,1,3,0 +4,54,3,1,3,0 +4,54,1,0,0,0 +2,49,2,1,2,0 +4,47,3,1,3,0 +4,40,1,1,3,0 +4,45,1,1,3,0 +4,50,4,5,3,1 +5,54,4,4,3,1 +4,67,4,1,3,1 +4,77,4,4,3,1 +4,66,4,3,3,0 +4,71,2,0,3,1 +4,36,2,3,3,0 +4,69,4,4,3,0 +4,48,1,1,3,0 +4,64,4,4,3,1 +4,71,4,2,3,1 +5,60,4,3,3,1 +4,24,1,1,3,0 +5,34,4,5,2,1 +4,79,1,1,2,0 +4,45,1,1,3,0 +4,37,2,1,2,0 +4,42,1,1,2,0 +4,72,4,4,3,1 +5,60,4,5,3,1 +5,85,3,5,3,1 +4,51,1,1,3,0 +5,54,4,5,3,1 +5,55,4,3,3,1 +4,64,4,4,3,0 +5,67,4,5,3,1 +5,75,4,3,3,1 +5,87,4,4,3,1 +4,46,4,4,3,1 +4,59,2,1,0,0 +55,46,4,3,3,1 +5,61,1,1,3,1 +4,44,1,4,3,0 +4,32,1,1,3,0 +4,62,1,1,3,0 +5,59,4,5,3,1 +4,61,4,1,3,0 +5,78,4,4,3,1 +5,42,4,5,3,0 +4,45,1,2,3,0 +5,34,2,1,3,1 +5,39,4,3,0,1 +4,27,3,1,3,0 +4,43,1,1,3,0 +5,83,4,4,3,1 +4,36,2,1,3,0 +4,37,2,1,3,0 +4,56,3,1,3,1 +5,55,4,4,3,1 +5,46,3,0,3,0 +4,88,4,4,3,1 +5,71,4,4,3,1 +4,41,2,1,3,0 +5,49,4,4,3,1 +3,51,1,1,4,0 +4,39,1,3,3,0 +4,46,2,1,3,0 +5,52,4,4,3,1 +5,58,4,4,3,1 +4,67,4,5,3,1 +5,80,4,4,3,1 +3,46,1,0,0,0 +3,43,1,0,0,0 +4,45,1,1,3,0 +5,68,4,4,3,1 +4,54,4,4,0,1 +4,44,2,3,3,0 +5,74,4,3,3,1 +5,55,4,5,3,0 +4,49,4,4,3,1 +4,49,1,1,3,0 +5,50,4,3,3,1 +5,52,3,5,3,1 +4,45,1,1,3,0 +4,66,1,1,3,0 +4,68,4,4,3,1 +4,72,2,1,3,0 +5,64,0,0,3,0 +2,49,0,3,3,0 +3,44,0,4,3,0 +5,74,4,4,3,1 +5,58,4,4,3,1 +4,77,2,3,3,0 +4,49,3,1,3,0 +4,34,0,0,4,0 +5,60,4,3,3,1 +5,69,4,3,3,1 +4,53,2,1,3,0 +3,46,3,4,3,0 +5,74,4,4,3,1 +4,58,1,1,3,0 +5,68,4,4,3,1 +5,46,4,3,3,0 +5,61,2,4,3,1 +5,70,4,3,3,1 +5,37,4,4,3,1 +3,65,4,5,3,1 +4,67,4,4,3,0 +5,69,3,4,3,0 +5,76,4,4,3,1 +4,65,4,3,3,0 +5,72,4,2,3,1 +4,62,4,2,3,0 +5,42,4,4,3,1 +5,66,4,3,3,1 +5,48,4,4,3,1 +4,35,1,1,3,0 +5,60,4,4,3,1 +5,67,4,2,3,1 +5,78,4,4,3,1 +4,66,1,1,3,1 +4,26,1,1,0,0 +4,48,1,1,3,0 +4,31,1,1,3,0 +5,43,4,3,3,1 +5,72,2,4,3,0 +5,66,1,1,3,1 +4,56,4,4,3,0 +5,58,4,5,3,1 +5,33,2,4,3,1 +4,37,1,1,3,0 +5,36,4,3,3,1 +4,39,2,3,3,0 +4,39,4,4,3,1 +5,83,4,4,3,1 +4,68,4,5,3,1 +5,63,3,4,3,1 +5,78,4,4,3,1 +4,38,2,3,3,0 +5,46,4,3,3,1 +5,60,4,4,3,1 +5,56,2,3,3,1 +4,33,1,1,3,0 +4,0,4,5,3,1 +4,69,1,5,3,1 +5,66,1,4,3,1 +4,72,1,3,3,0 +4,29,1,1,3,0 +5,54,4,5,3,1 +5,80,4,4,3,1 +5,68,4,3,3,1 +4,35,2,1,3,0 +4,57,3,0,3,0 +5,0,4,4,3,1 +4,50,1,1,3,0 +4,32,4,3,3,0 +0,69,4,5,3,1 +4,71,4,5,3,1 +5,87,4,5,3,1 +3,40,2,0,3,0 +4,31,1,1,0,0 +4,64,1,1,3,0 +5,55,4,5,3,1 +4,18,1,1,3,0 +3,50,2,1,0,0 +4,53,1,1,3,0 +5,84,4,5,3,1 +5,80,4,3,3,1 +4,32,1,1,3,0 +5,77,3,4,3,1 +4,38,1,1,3,0 +5,54,4,5,3,1 +4,63,1,1,3,0 +4,61,1,1,3,0 +4,52,1,1,3,0 +4,36,1,1,3,0 +4,41,0,0,3,0 +4,59,1,1,3,0 +5,51,4,4,2,1 +4,36,1,1,3,0 +5,40,4,3,3,1 +4,49,1,1,3,0 +4,37,2,3,3,0 +4,46,1,1,3,0 +4,63,1,1,3,0 +4,28,2,1,3,0 +4,47,2,1,3,0 +4,42,2,1,3,1 +5,44,4,5,3,1 +4,49,4,4,3,0 +5,47,4,5,3,1 +5,52,4,5,3,1 +4,53,1,1,3,1 +5,83,3,3,3,1 +4,50,4,4,0,1 +5,63,4,4,3,1 +4,82,0,5,3,1 +4,54,1,1,3,0 +4,50,4,4,3,0 +5,80,4,5,3,1 +5,45,2,4,3,0 +5,59,4,4,0,1 +4,28,2,1,3,0 +4,31,1,1,3,0 +4,41,2,1,3,0 +4,21,3,1,3,0 +5,44,3,4,3,1 +5,49,4,4,3,1 +5,71,4,5,3,1 +5,75,4,5,3,1 +4,38,2,1,3,0 +4,60,1,3,3,0 +5,87,4,5,3,1 +4,70,4,4,3,1 +5,55,4,5,3,1 +3,21,1,1,3,0 +4,50,1,1,3,0 +5,76,4,5,3,1 +4,23,1,1,3,0 +3,68,0,0,3,0 +4,62,4,0,3,1 +5,65,1,0,3,1 +5,73,4,5,3,1 +4,38,2,3,3,0 +2,57,1,1,3,0 +5,65,4,5,3,1 +5,67,2,4,3,1 +5,61,2,4,3,1 +5,56,4,4,3,0 +5,71,2,4,3,1 +4,49,2,2,3,0 +4,55,0,0,3,0 +4,44,2,1,3,0 +0,58,4,4,3,0 +4,27,2,1,3,0 +5,73,4,5,3,1 +4,34,2,1,3,0 +5,63,0,4,3,1 +4,50,2,1,3,1 +4,62,2,1,3,0 +3,21,3,1,3,0 +4,49,2,0,3,0 +4,36,3,1,3,0 +4,45,2,1,3,1 +5,67,4,5,3,1 +4,21,1,1,3,0 +4,57,2,1,3,0 +5,66,4,5,3,1 +4,71,4,4,3,1 +5,69,3,4,3,1 +6,80,4,5,3,1 +3,27,2,1,3,0 +4,38,2,1,3,0 +4,23,2,1,3,0 +5,70,0,5,3,1 +4,46,4,3,3,0 +4,61,2,3,3,0 +5,65,4,5,3,1 +4,60,4,3,3,0 +5,83,4,5,3,1 +5,40,4,4,3,1 +2,59,0,4,3,0 +4,53,3,4,3,0 +4,76,4,4,3,0 +5,79,1,4,3,1 +5,38,2,4,3,1 +4,61,3,4,3,0 +4,56,2,1,3,0 +4,44,2,1,3,0 +4,64,3,4,0,1 +4,66,3,3,3,0 +4,50,3,3,3,0 +4,46,1,1,3,0 +4,39,1,1,3,0 +4,60,3,0,0,0 +5,55,4,5,3,1 +4,40,2,1,3,0 +4,26,1,1,3,0 +5,84,3,2,3,1 +4,41,2,2,3,0 +4,63,1,1,3,0 +2,65,0,1,2,0 +4,49,1,1,3,0 +4,56,2,2,3,1 +5,65,4,4,3,0 +4,54,1,1,3,0 +4,36,1,1,3,0 +5,49,4,4,3,0 +4,59,4,4,3,1 +5,75,4,4,3,1 +5,59,4,2,3,0 +5,59,4,4,3,1 +4,28,4,4,3,1 +5,53,4,5,3,0 +5,57,4,4,3,0 +5,77,4,3,4,0 +5,85,4,3,3,1 +4,59,4,4,3,0 +5,59,1,5,3,1 +4,65,3,3,3,1 +4,54,2,1,3,0 +5,46,4,5,3,1 +4,63,4,4,3,1 +4,53,1,1,3,1 +4,56,1,1,3,0 +5,66,4,4,3,1 +5,66,4,5,3,1 +4,55,1,1,3,0 +4,44,1,1,3,0 +5,86,3,4,3,1 +5,47,4,5,3,1 +5,59,4,5,3,1 +5,66,4,5,3,0 +5,61,4,3,3,1 +3,46,0,5,0,1 +4,69,1,1,3,0 +5,93,1,5,3,1 +4,39,1,3,3,0 +5,44,4,5,3,1 +4,45,2,2,3,0 +4,51,3,4,3,0 +4,56,2,4,3,0 +4,66,4,4,3,0 +5,61,4,5,3,1 +4,64,3,3,3,1 +5,57,2,4,3,0 +5,79,4,4,3,1 +4,57,2,1,0,0 +4,44,4,1,1,0 +4,31,2,1,3,0 +4,63,4,4,3,0 +4,64,1,1,3,0 +5,47,4,5,3,0 +5,68,4,5,3,1 +4,30,1,1,3,0 +5,43,4,5,3,1 +4,56,1,1,3,0 +4,46,2,1,3,0 +4,67,2,1,3,0 +5,52,4,5,3,1 +4,67,4,4,3,1 +4,47,2,1,3,0 +5,58,4,5,3,1 +4,28,2,1,3,0 +4,43,1,1,3,0 +4,57,2,4,3,0 +5,68,4,5,3,1 +4,64,2,4,3,0 +4,64,2,4,3,0 +5,62,4,4,3,1 +4,38,4,1,3,0 +5,68,4,4,3,1 +4,41,2,1,3,0 +4,35,2,1,3,1 +4,68,2,1,3,0 +5,55,4,4,3,1 +5,67,4,4,3,1 +4,51,4,3,3,0 +2,40,1,1,3,0 +5,73,4,4,3,1 +4,58,0,4,3,1 +4,51,0,4,3,0 +3,50,0,0,3,1 +5,59,4,3,3,1 +6,60,3,5,3,1 +4,27,2,1,0,0 +5,54,4,3,3,0 +4,56,1,1,3,0 +5,53,4,5,3,1 +4,54,2,4,3,0 +5,79,1,4,3,1 +5,67,4,3,3,1 +5,64,3,3,3,1 +4,70,1,2,3,1 +5,55,4,3,3,1 +5,65,3,3,3,1 +5,45,4,2,3,1 +4,57,4,4,0,1 +5,49,1,1,3,1 +4,24,2,1,3,0 +4,52,1,1,3,0 +4,50,2,1,3,0 +4,35,1,1,3,0 +5,0,3,3,3,1 +5,64,4,3,3,1 +5,40,4,1,1,1 +5,66,4,4,3,1 +4,64,4,4,3,1 +5,52,4,3,3,1 +5,43,1,4,3,1 +4,56,4,4,3,0 +4,72,3,0,3,0 +6,51,4,4,3,1 +4,79,4,4,3,1 +4,22,2,1,3,0 +4,73,2,1,3,0 +4,53,3,4,3,0 +4,59,2,1,3,1 +4,46,4,4,2,0 +5,66,4,4,3,1 +4,50,4,3,3,1 +4,58,1,1,3,1 +4,55,1,1,3,0 +4,62,2,4,3,1 +4,60,1,1,3,0 +5,57,4,3,3,1 +4,57,1,1,3,0 +6,41,2,1,3,0 +4,71,2,1,3,1 +4,32,2,1,3,0 +4,57,2,1,3,0 +4,19,1,1,3,0 +4,62,2,4,3,1 +5,67,4,5,3,1 +4,50,4,5,3,0 +4,65,2,3,2,0 +4,40,2,4,2,0 +6,71,4,4,3,1 +6,68,4,3,3,1 +4,68,1,1,3,0 +4,29,1,1,3,0 +4,53,2,1,3,0 +5,66,4,4,3,1 +4,60,3,0,4,0 +5,76,4,4,3,1 +4,58,2,1,2,0 +5,96,3,4,3,1 +5,70,4,4,3,1 +4,34,2,1,3,0 +4,59,2,1,3,0 +4,45,3,1,3,1 +5,65,4,4,3,1 +4,59,1,1,3,0 +4,21,2,1,3,0 +3,43,2,1,3,0 +4,53,1,1,3,0 +4,65,2,1,3,0 +4,64,2,4,3,1 +4,53,4,4,3,0 +4,51,1,1,3,0 +4,59,2,4,3,0 +4,56,2,1,3,0 +4,60,2,1,3,0 +4,22,1,1,3,0 +4,25,2,1,3,0 +6,76,3,0,3,0 +5,69,4,4,3,1 +4,58,2,1,3,0 +5,62,4,3,3,1 +4,56,4,4,3,0 +4,64,1,1,3,0 +4,32,2,1,3,0 +5,48,0,4,0,1 +5,59,4,4,2,1 +4,52,1,1,3,0 +4,63,4,4,3,0 +5,67,4,4,3,1 +5,61,4,4,3,1 +5,59,4,5,3,1 +5,52,4,3,3,1 +4,35,4,4,3,0 +5,77,3,3,3,1 +5,71,4,3,3,1 +5,63,4,3,3,1 +4,38,2,1,2,0 +5,72,4,3,3,1 +4,76,4,3,3,1 +4,53,3,3,3,0 +4,67,4,5,3,0 +5,69,2,4,3,1 +4,54,1,1,3,0 +2,35,2,1,2,0 +5,68,4,3,3,1 +4,68,4,4,3,0 +4,67,2,4,3,1 +3,39,1,1,3,0 +4,44,2,1,3,0 +4,33,1,1,3,0 +4,60,0,4,3,0 +4,58,1,1,3,0 +4,31,1,1,3,0 +3,23,1,1,3,0 +5,56,4,5,3,1 +4,69,2,1,3,1 +6,63,1,1,3,0 +4,65,1,1,3,1 +4,44,2,1,2,0 +4,62,3,3,3,1 +4,67,4,4,3,1 +4,56,2,1,3,0 +4,52,3,4,3,0 +4,43,1,1,3,1 +4,41,4,3,2,1 +4,42,3,4,2,0 +3,46,1,1,3,0 +5,55,4,4,3,1 +5,58,4,4,2,1 +5,87,4,4,3,1 +4,66,2,1,3,0 +0,72,4,3,3,1 +5,60,4,3,3,1 +5,83,4,4,2,1 +4,31,2,1,3,0 +4,53,2,1,3,0 +4,64,2,3,3,0 +5,31,4,4,2,1 +5,62,4,4,2,1 +4,56,2,1,3,0 +5,58,4,4,3,1 +4,67,1,4,3,0 +5,75,4,5,3,1 +5,65,3,4,3,1 +5,74,3,2,3,1 +4,59,2,1,3,0 +4,57,4,4,4,1 +4,76,3,2,3,0 +4,63,1,4,3,0 +4,44,1,1,3,0 +4,42,3,1,2,0 +4,35,3,0,2,0 +5,65,4,3,3,1 +4,70,2,1,3,0 +4,48,1,1,3,0 +4,74,1,1,1,1 +6,40,0,3,4,1 +4,63,1,1,3,0 +5,60,4,4,3,1 +5,86,4,3,3,1 +4,27,1,1,3,0 +4,71,4,5,2,1 +5,85,4,4,3,1 +4,51,3,3,3,0 +6,72,4,3,3,1 +5,52,4,4,3,1 +4,66,2,1,3,0 +5,71,4,5,3,1 +4,42,2,1,3,0 +4,64,4,4,2,1 +4,41,2,2,3,0 +4,50,2,1,3,0 +4,30,1,1,3,0 +4,67,1,1,3,0 +5,62,4,4,3,1 +4,46,2,1,2,0 +4,35,1,1,3,0 +4,53,1,1,2,0 +4,59,2,1,3,0 +4,19,3,1,3,0 +5,86,2,1,3,1 +4,72,2,1,3,0 +4,37,2,1,2,0 +4,46,3,1,3,1 +4,45,1,1,3,0 +4,48,4,5,3,0 +4,58,4,4,3,1 +4,42,1,1,3,0 +4,56,2,4,3,1 +4,47,2,1,3,0 +4,49,4,4,3,1 +5,76,2,5,3,1 +5,62,4,5,3,1 +5,64,4,4,3,1 +5,53,4,3,3,1 +4,70,4,2,2,1 +5,55,4,4,3,1 +4,34,4,4,3,0 +5,76,4,4,3,1 +4,39,1,1,3,0 +2,23,1,1,3,0 +4,19,1,1,3,0 +5,65,4,5,3,1 +4,57,2,1,3,0 +5,41,4,4,3,1 +4,36,4,5,3,1 +4,62,3,3,3,0 +4,69,2,1,3,0 +4,41,3,1,3,0 +3,51,2,4,3,0 +5,50,3,2,3,1 +4,47,4,4,3,0 +4,54,4,5,3,1 +5,52,4,4,3,1 +4,30,1,1,3,0 +3,48,4,4,3,1 +5,0,4,4,3,1 +4,65,2,4,3,1 +4,50,1,1,3,0 +5,65,4,5,3,1 +5,66,4,3,3,1 +6,41,3,3,2,1 +5,72,3,2,3,1 +4,42,1,1,1,1 +4,80,4,4,3,1 +0,45,2,4,3,0 +4,41,1,1,3,0 +4,72,3,3,3,1 +4,60,4,5,3,0 +5,67,4,3,3,1 +4,55,2,1,3,0 +4,61,3,4,3,1 +4,55,3,4,3,1 +4,52,4,4,3,1 +4,42,1,1,3,0 +5,63,4,4,3,1 +4,62,4,5,3,1 +4,46,1,1,3,0 +4,65,2,1,3,0 +4,57,3,3,3,1 +4,66,4,5,3,1 +4,45,1,1,3,0 +4,77,4,5,3,1 +4,35,1,1,3,0 +4,50,4,5,3,1 +4,57,4,4,3,0 +4,74,3,1,3,1 +4,59,4,5,3,0 +4,51,1,1,3,0 +4,42,3,4,3,1 +4,35,2,4,3,0 +4,42,1,1,3,0 +4,43,2,1,3,0 +4,62,4,4,3,1 +4,27,2,1,3,0 +5,0,4,3,3,1 +4,57,4,4,3,1 +4,59,2,1,3,0 +5,40,3,2,3,1 +4,20,1,1,3,0 +5,74,4,3,3,1 +4,22,1,1,3,0 +4,57,4,3,3,0 +4,57,4,3,3,1 +4,55,2,1,2,0 +4,62,2,1,3,0 +4,54,1,1,3,0 +4,71,1,1,3,1 +4,65,3,3,3,0 +4,68,4,4,3,0 +4,64,1,1,3,0 +4,54,2,4,3,0 +4,48,4,4,3,1 +4,58,4,3,3,0 +5,58,3,4,3,1 +4,70,1,1,1,0 +5,70,1,4,3,1 +4,59,2,1,3,0 +4,57,2,4,3,0 +4,53,4,5,3,0 +4,54,4,4,3,1 +4,53,2,1,3,0 +0,71,4,4,3,1 +5,67,4,5,3,1 +4,68,4,4,3,1 +4,56,2,4,3,0 +4,35,2,1,3,0 +4,52,4,4,3,1 +4,47,2,1,3,0 +4,56,4,5,3,1 +4,64,4,5,3,0 +5,66,4,5,3,1 +4,62,3,3,3,0 \ No newline at end of file Added: trunk/test/mammographic/mammographic.owl =================================================================== --- trunk/test/mammographic/mammographic.owl (rev 0) +++ trunk/test/mammographic/mammographic.owl 2010-08-20 09:02:10 UTC (rev 2265) @@ -0,0 +1,12873 @@ +<?xml version="1.0"?> +<rdf:RDF xmlns="http://dl-learner.org/mammographic#" + xml:base="http://dl-learner.org/mammographic" + 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#" + xmlns:mammographic="http://dl-learner.org/mammographic#"> + <owl:Ontology rdf:about="http://dl-learner.org/mammographic"/> + + + + <!-- + /////////////////////////////////////////////////////////////////////////////////////// + // + // Object Properties + // + /////////////////////////////////////////////////////////////////////////////////////// + --> + + + + + <!-- http://dl-learner.org/mammographic#hasDensity --> + + <owl:ObjectProperty rdf:about="http://dl-learner.org/mammographic#hasDensity"> + <rdfs:range rdf:resource="http://dl-learner.org/mammographic#Density"/> + <rdfs:domain rdf:resource="http://dl-learner.org/mammographic#Patient"/> + </owl:ObjectProperty> + + + + <!-- http://dl-learner.org/mammographic#hasMargin --> + + <owl:ObjectProperty rdf:about="http://dl-learner.org/mammographic#hasMargin"> + <rdfs:range rdf:resource="http://dl-learner.org/mammographic#Margin"/> + <rdfs:domain rdf:resource="http://dl-learner.org/mammographic#Patient"/> + </owl:ObjectProperty> + + + + <!-- http://dl-learner.org/mammographic#hasShape --> + + <owl:ObjectProperty rdf:about="http://dl-learner.org/mammographic#hasShape"> + <rdfs:domain rdf:resource="http://dl-learner.org/mammographic#Patient"/> + <rdfs:range rdf:resource="http://dl-learner.org/mammographic#Shape"/> + </owl:ObjectProperty> + + + + <!-- + /////////////////////////////////////////////////////////////////////////////////////// + // + // Data properties + // + /////////////////////////////////////////////////////////////////////////////////////// + --> + + + + + <!-- http://dl-learner.org/mammographic#hasAge --> + + <owl:DatatypeProperty rdf:about="http://dl-learner.org/mammographic#hasAge"> + <rdfs:domain rdf:resource="http://dl-learner.org/mammographic#Patient"/> + <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#double"/> + </owl:DatatypeProperty> + + + + <!-- http://dl-learner.org/mammographic#hasBiRads --> + + <owl:DatatypeProperty rdf:about="http://dl-learner.org/mammographic#hasBiRads"> + <rdfs:domain rdf:resource="http://dl-learner.org/mammographic#Patient"/> + <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#double"/> + </owl:DatatypeProperty> + + + + <!-- + /////////////////////////////////////////////////////////////////////////////////////// + // + // Classes + // + /////////////////////////////////////////////////////////////////////////////////////// + --> + + + + + <!-- http://dl-learner.org/mammographic#Density --> + + <owl:Class rdf:about="http://dl-learner.org/mammographic#Density"> + <rdfs:subClassOf rdf:resource="http://dl-learner.org/mammographic#Measure"/> + </owl:Class> + + + + <!-- http://dl-learner.org/mammographic#Margin --> + + <owl:Class rdf:about="http://dl-learner.org/mammographic#Margin"> + <rdfs:subClassOf rdf:resource="http://dl-learner.org/mammographic#Measure"/> + </owl:Class> + + + + <!-- http://dl-learner.org/mammographic#Measure --> + + <owl:Class rdf:about="http://dl-learner.org/mammographic#Measure"/> + + + + <!-- http://dl-learner.org/mammographic#Patient --> + + <owl:Class rdf:about="http://dl-learner.org/mammographic#Patient"/> + + + + <!-- http://dl-learner.org/mammographic#Shape --> + + <owl:Class rdf:about="http://dl-learner.org/mammographic#Shape"> + <rdfs:subClassOf rdf:resource="http://dl-learner.org/mammographic#Measure"/> + </owl:Class> + + + + <!-- http://dl-learner.org/mammographic#circumscribed --> + + <owl:Class rdf:about="http://dl-learner.org/mammographic#circumscribed"> + <rdfs:subClassOf rdf:resource="http://dl-learner.org/mammographic#Margin"/> + </owl:Class> + + + + <!-- http://dl-learner.org/mammographic#fat-containing --> + + <owl:Class rdf:about="http://dl-learner.org/mammographic#fat-containing"> + <rdfs:subClassOf rdf:resource="http://dl-learner.org/mammographic#Density"/> + </owl:Class> + + + + <!-- http://dl-learner.org/mammographic#high --> + + <owl:Class rdf:about="http://dl-learner.org/mammographic#high"> + <rdfs:subClassOf rdf:resource="http://dl-learner.org/mammographic#Density"/> + </owl:Class> + + + + <!-- http://dl-learner.org/mammographic#ill-defined --> + + <owl:Class rdf:about="http://dl-learner.org/mammographic#ill-defined"> + <rdfs:subClassOf rdf:resource="http://dl-learner.org/mammographic#Margin"/> + </owl:Class> + + + + <!-- http://dl-learner.org/mammographic#irregular --> + + <owl:Class rdf:about="http://dl-learner.org/mammographic#irregular"> + <rdfs:subClassOf rdf:resource="http://dl-learner.org/mammographic#Shape"/> + </owl:Class> + + + + <!-- http://dl-learner.org/mammographic#iso --> + + <owl:Class rdf:about="http://dl-learner.org/mammographic#iso"> + <rdfs:subClassOf rdf:resource="http://dl-learner.org/mammographic#Density"/> + </owl:Class> + + + + <!-- http://dl-learner.org/mammographic#lobular --> + + <owl:Class rdf:about="http://dl-learner.org/mammographic#lobular"> + <rdfs:subClassOf rdf:resource="http://dl-learner.org/mammographic#Shape"/> + </owl:Class> + + + + <!-- http://dl-learner.org/mammographic#low --> + + <owl:Class rdf:about="http://dl-learner.org/mammographic#low"> + <rdfs:subClassOf rdf:resource="http://dl-learner.org/mammographic#Density"/> + </owl:Class> + + + + <!-- http://dl-learner.org/mammographic#microlobulated --> + + <owl:Class rdf:about="http://dl-learner.org/mammographic#microlobulated"> + <rdfs:subClassOf rdf:resource="http://dl-learner.org/mammographic#Margin"/> + </owl:Class> + + + + <!-- http://dl-learner.org/mammographic#obscured --> + + <owl:Class rdf:about="http://dl-learner.org/mammographic#obscured"> + <rdfs:subClassOf rdf:resource="http://dl-learner.org/mammographic#Margin"/> + </owl:Class> + + + + <!-- http://dl-learner.org/mammographic#oval --> + + <owl:Class rdf:about="http://dl-learner.org/mammographic#oval"> + <rdfs:subClassOf rdf:resource="http://dl-learner.org/mammographic#Shape"/> + </owl:Class> + + + + <!-- http://dl-learner.org/mammographic#round --> + + <owl:Class rdf:about="http://dl-learner.org/mammographic#round"> + <rdfs:subClassOf rdf:resource="http://dl-learner.org/mammographic#Shape"/> + </owl:Class> + + + + <!-- http://dl-learner.org/mammographic#spiculated --> + + <owl:Class rdf:about="http://dl-learner.org/mammographic#spiculated"> + <rdfs:subClassOf rdf:resource="http://dl-learner.org/mammographic#Margin"/> + </owl:Class> + + + + <!-- http://dl-learner.org/mammographic#unknown --> + + <owl:Class rdf:about="http://dl-learner.org/mammographic#unknown"> + <rdfs:subClassOf rdf:resource="http://dl-learner.org/mammographic#Density"/> + <rdfs:subClassOf rdf:resource="http://dl-learner.org/mammographic#Margin"/> + <rdfs:subClassOf rdf:resource="http://dl-learner.org/mammographic#Shape"/> + </owl:Class> + + + + <!-- + /////////////////////////////////////////////////////////////////////////////////////// + // + // Individuals + // + /////////////////////////////////////////////////////////////////////////////////////// + --> + + + + + <!-- http://dl-learner.org/mammographic#Patient0 --> + + <owl:NamedIndividual rdf:about="http://dl-learner.org/mammographic#Patient0"> + <rdf:type rdf:resource="http://dl-learner.org/mammographic#Patient"/> + <hasBiRads rdf:datatype="http://www.w3.org/2001/XMLSchema#double">5.0</hasBiRads> + <hasAge rdf:datatype="http://www.w3.org/2001/XMLSchema#double">67.0</hasAge> + <hasShape rdf:resource="http://dl-learner.org/mammographic#lobular"/> + <hasDensity rdf:resource="http://dl-learner.org/mammographic#low"/> + <hasMargin rdf:resource="http://dl-learner.org/mammographic#spiculated"/> + </owl:NamedIndividual> + + + + <!-- http://dl-learner.org/mammographic#Patient1 --> + + <owl:NamedIndividual rdf:about="http://dl-learner.org/mammographic#Patient1"> + <rdf:type rdf:resource="http://dl-learner.org/mammographic#Patient"/> + <hasBiRads rdf:datatype="http://www.w3.org/2001/XMLSchema#double">4.0</hasBiRads> + <hasAge rdf:datatype="http://www.w3.org/2001/XMLSchema#double">43.0</hasAge> + <hasMargin rdf:resource="http://dl-learner.org/mammographic#circumscribed"/> + <hasShape rdf:resource="http://dl-learner.org/mammographic#round"/> + <hasDensity rdf:resource="http://dl-learner.org/mammographic#unknown"/> + </owl:NamedIndividual> + + + + <!-- http://dl-learner.org/mammographic#Patient10 --> + + <owl:NamedIndividual rdf:about="http://dl-learner.org/mammographic#Patient10"> + <rdf:type rdf:resource="http://dl-learner.org/mammographic#Patient"/> + <hasBiRads rdf:datatype="http://www.w3.org/2001/XMLSchema#double">5.0</hasBiRads> + <hasAge rdf:datatype="http://www.w3.org/2001/XMLSchema#double">76.0</hasAge> + <hasMargin rdf:resource="http://dl-learner.org/mammographic#ill-defined"/> + <hasDensity rdf:resource="http://dl-learner.org/mammographic#low"/> + <hasShape rdf:resource="http://dl-learner.org/mammographic#round"/> + </owl:NamedIndividual> + + + + <!-- http://dl-learner.org/mammographic#Patient100 --> + + <owl:NamedIndividual rdf:about="http://dl-learner.org/mammographic#Patient100"> + <rdf:type rdf:resource="http://dl-learner.org/mammographic#Patient"/> + <hasBiRads rdf:datatype="http://www.w3.org/2001/XMLSchema#double">5.0</hasBiRads> + <hasAge rdf:datatype="http://www.w3.org/2001/XMLSchema#double">59.0</hasAge> + <hasShape rdf:resource="http://dl-learner.org/mammographic#oval"/> + <hasMargin rdf:resource="http://dl-learner.org/mammographic#unknown"/> + <hasDensity rdf:resource="http://dl-learner.org/mammographic#unknown"/> + </owl:NamedIndividual> + + + + <!-- http://dl-learner.org/mammographic#Patient101 --> + + <owl:NamedIndividual rdf:about="http://dl-learner.org/mammographic#Patient101"> + <rdf:type rdf:resource="http://dl-learner.org/mammographic#Patient"/> + <hasBiRads rdf:datatype="http://www.w3.org/2001/XMLSchema#double">4.0</hasBiRads> + <hasAge rdf:datatype="http://www.w3.org/2001/XMLSchema#double">65.0</hasAge> + <hasShape rdf:resource="http://dl-learner.org/mammographic#oval"/> + <hasMargin rdf:resource="http://dl-learner.org/mammographic#unknown"/> + <hasDensity rdf:resource="http://dl-learner.org/mammographic#unknown"/> + </owl:NamedIndividual> + + + + <!-- http://dl-learner.org/mammographic#Patient102 --> + + <owl:NamedIndividual rdf:about="http://dl-learner.org/mammographic#Patient102"> + <rdf:type rdf:resource="http://dl-learner.org/mammographic#Patient"/> + <hasBiRads rdf:datatype="http://www.w3.org/2001/XMLSchema#double">4.0</hasBiRads> + <hasAge rdf:datatype="http://www.w3.org/2001/XMLSchema#double">58.0</hasAge> + <hasMargin rdf:resource="http://dl-learner.org/mammographic#ill-defined"/> + <hasShape rdf:resource="http://dl-learner.org/mammographic#irregular"/> + <hasDensity rdf:resource="http://dl-learner.org/mammographic#unknown"/> + </owl:NamedIndividual> + + + + <!-- http://dl-learner.org/mammographic#Patient103 --> + + <owl:NamedIndividual rdf:about="http://dl-learner.org/mammographic#Patient103"> + <rdf:type rdf:resource="http://dl-learner.org/mammographic#Patient"/> + <hasAge rdf:datatype="http://www.w3.org/2001/XMLSchema#double">29.0</hasAge> + <hasBiRads rdf:datatype="http://www.w3.org/2001/XMLSchema#double">4.0</hasBiRads> + <hasShape rdf:resource="http://dl-learner.org/mammographic#oval"/> + <hasDensity rdf:resource="http://dl-learner.org/mammographic#unknown"/> + <hasMargin rdf:resource="http://dl-learner.org/mammographic#unknown"/> + </owl:NamedIndividual> + + + + <!-- http://dl-learner.org/mammographic#Patient104 --> + + <owl:NamedIndividual rdf:about="http://dl-learner.org/mammographic#Patient104"> + <rdf:type rdf:resource="http://dl-learner.org/mammographic#Patient"/> + <hasBiRads rdf:datatype="http://www.w3.org/2001/XMLSchema#double">4.0</hasBiRads> + <hasAge rdf:datatype="http://www.w3.org/2001/XMLSchema#double">58.0</hasAge> + <hasMargin rdf:resource="http://dl-learner.org/mammographic#circumscribed"/> + <hasShape rdf:resource="http://dl-learner.org/mammographic#round"/> + <hasDensity rdf:resource="http://dl-learner.org/mammographic#unknown"/> + </owl:NamedIndividual> + + + + <!-- http://dl-learner.org/mammographic#Patient105 --> + + <owl:NamedIndividual rdf:about="http://dl-learner.org/mammographic#Patient105"> + <rdf:type rdf:resource="http://dl-learner.org/mammographic#Patient"/> + <hasBiRads rdf:datatype="http://www.w3.org/2001/XMLSchema#double">4.0</hasBiRads> + <hasAge rdf:datatype="http://www.w3.org/2001/XMLSchema#double">54.0</hasAge> + <hasMargin rdf:resource="http://dl-learner.org/mammographic#circumscribed"/> + <hasShape rdf:resource="http://dl-learner.org/mammographic#round"/> + <hasDensity rdf:resource="http://dl-learner.org/mammographic#unknown"/> + </owl:NamedIndividual> + + + + <!-- http://dl-learner.org/mammographic#Patient106 --> + + <owl:NamedIndividual rdf:about="http://dl-learner.org/mammographic#Patient106"> + <rdf:type rdf:resource="http://dl-learner.org/mammographic#Patient"/> + <hasBiRads rdf:datatype="http://www.w3.org/2001/XMLSchema#double">4.0</hasBiRads> + <hasAge rdf:datatype="http://www.w3.org/2001/XMLSchema#double">44.0</hasAge> + <hasMargin rdf:resource="http://dl-learner.org/mammographic#circumscribed"/> + <hasShape rdf:resource="http://dl-learner.org/mammographic#round"/> + <hasDensity rdf:resource="http://dl-learner.org/mammographic#unknown"/> + </owl:NamedIndividual> + + + + <!-- http://dl-learner.org/mammographic#Patient107 --> + + <owl:NamedIndividual rdf:about="http://dl-learner.org/mammographic#Patient107"> + <rdf:type rdf:resource="http://dl-learner.org/mammographic#Patient"/> + <hasBiRads rdf:datatype="http://www.w3.org/2001/XMLSchema#double">3.0</hasBiRads> + <hasAge rdf:datatype="http://www.w3.org/2001/XMLSchema#double">34.0</hasAge> + <hasMargin rdf:resource="http://dl-learner.org/mammographic#circumscribed"/> + <hasShape rdf:resource="http://dl-learner.org/mammographic#oval"/> + <hasDensity rdf:resource="http://dl-learner.org/mammographic#unknown"/> + </owl:NamedIndividual> + + + + <!-- http://dl-learner.org/mammographic#Patient108 --> + + <owl:NamedIndividual rdf:about="http://dl-learner.org/mammographic#Patient108"> + <rdf:type rdf:resource="http://dl-learner.org/mammographic#Patient"/> + <hasBiRads rdf:datatype="http://www.w3.org/2001/XMLSchema#double">4.0</hasBiRads> + <hasAge rdf:datatype="http://www.w3.org/2001/XMLSchema#double">57.0</hasAge> + <hasMargin rdf:resource="http://dl-learner.org/mammographic#circumscribed"/> + <hasDensity rdf:resource="http://dl-learner.org/mammographic#low"/> + <hasShape rdf:resource="http://dl-learner.org/mammographic#round"/> + </owl:NamedIndividual> + + + + <!-- http://dl-learner.org/mammographic#Patient109 --> + + <owl:NamedIndividual rdf:about="http://dl-learner.org/mammographic#Patient109"> + <rdf:type rdf:resource="http://dl-learner.org/mammographic#Patient"/> + <hasAge rdf:datatype="http://www.w3.org/2001/XMLSchema#double">33.0</hasAge> + <hasBiRads rdf:datatype="http://www.w3.org/2001/XMLSchema#double">5.0</hasBiRads> + <hasMargin rdf:resource="http://dl-learner.org/mammographic#ill-defined"/> + <hasShape rdf:resource="http://dl-learner.org/mammographic#irregular"/> + <hasDensity rdf:resource="http://dl-learner.org/mammographic#unknown"/> + </owl:NamedIndividual> + + + + <!-- http://dl-learner.org/mammographic#Patient11 --> + + <owl:NamedIndividual rdf:about="http://dl-learner.org/mammographic#Patient11"> + <rdf:type rdf:resource="http://dl-learner.org/mammographic#Patient"/> + <hasBiRads rdf:datatype="http://www.w3.org/2001/XMLSchema#double">3.0</hasBiRads> + <hasAge rdf:datatype="http://www.w3.org/2001/XMLSchema#double">42.0</hasAge> + <hasMargin rdf:resource="http://dl-learner.org/mammographic#circumscribed"/> + <hasDensity rdf:resource="http://dl-learner.org/mammographic#low"/> + <hasShape rdf:resource="http://dl-learner.org/mammographic#oval"/> + </owl:NamedIndividual> + + + + <!-- http://dl-learner.org/mammographic#Patient110 --> + + <owl:NamedIndividual rdf:about="http://dl-learner.org/mammographic#Patient110"> + <rdf:type rdf:resource="http://dl-learner.org/mammographic#Patient"/> + <hasBiRads rdf:datatype="http://www.w3.org/2001/XMLSchema#double">4.0</hasBiRads> + <hasAge rdf:datatype="http://www.w3.org/2001/XMLSchema#double">45.0</hasAge> + <hasMargin rdf:resource="http://dl-learner.org/mammographic#ill-defined"/> + <hasShape rdf:resource="http://dl-learner.org/mammographic#irregular"/> + <hasDensity rdf:resource="http://dl-learner.org/mammographic#low"/> + </owl:NamedIndividual> + + + + <!-- http://dl-learner.org/mammographic#Patient111 --> + + <owl:NamedIndividual rdf:about="http://dl-learner.org/mammographic#Patient111"> + <rdf:type rdf:resource="http://dl-learner.org/mammographic#Patient"/> + <hasBiRads rdf:datatype="http://www.w3.org/2001/XMLSchema#double">5.0</hasBiRads> + <hasAge rdf:datatype="http://www.w3.org/2001/XMLSchema#double">71.0</hasAge> + <hasMargin rdf:resource="http://dl-learner.org/mammographic#ill-defined"/> + <hasShape rdf:resource="http://dl-learner.org/mammographic#irregular"/> + <hasDensity rdf:resource="http://dl-learner.org/mammographic#low"/> + </owl:NamedIndividual> + + + + <!-- http://dl-learner.org/mammographic#Patient112 --> + + <owl:NamedIndividual rdf:about="http://dl-learner.org/mammographic#Patient112"> + <rdf:type rdf:resource="http://dl-learner.org/mammographic#Patient"/> + <hasBiRads rdf:datatype="http://www.w3.org/2001/XMLSchema#double">5.0</hasBiRads> + <hasAge rdf:datatype="http://www.w3.org/2001/XMLSchema#double">59.0</hasAge> + <hasMargin rdf:resource="http://dl-learner.org/mammographic#ill-defined"/> + <hasShape rdf:resource="http://dl-learner.org/mammographic#irregular"/> + <hasDensity rdf:resource="http://dl-learner.org/mammographic#iso"/> + </owl:NamedIndividual> + + + + <!-- http://dl-learner.org/mammographic#Patient113 --> + + <owl:NamedIndividual rdf:about="http://dl-learner.org/mammographic#Patient113"> + <rdf:type rdf:resource="http://dl-learner.org/mammographic#Patient"/> + <hasBiRads rdf:datatype="http://www.w3.org/2001/XMLSchema#double">4.0</hasBiRads> + <hasAge rdf:datatype="http://www.w3.org/2001/XMLSchema#double">56.0</hasAge> + <hasMargin rdf:resource="http://dl-learner.org/mammographic#circumscribed"/> + <hasShape rdf:resource="http://dl-learner.org/mammographic#oval"/> + <hasDensity rdf:resource="http://dl-learner.org/mammographic#unknown"/> + </owl:NamedIndividual> + + + + <!-- http://dl-learner.org/mammographic#Patient114 --> + + <owl:NamedIndividual rdf:about="http://dl-learner.org/mammographic#Patient114"> + <rdf:type rdf:resource="http://dl-learner.org/mammographic#Patient"/> + <hasBiRads rdf:datatype="http://www.w3.org/2001/XMLSchema#double">4.0</hasBiRads> + <hasAge rdf:datatype="http://www.w3.org/2001/XMLSchema#double">40.0</hasAge> + <hasMargin rdf:resource="http://dl-learner.org/mammographic#ill-defined"/> + <hasShape rdf:resource="http://dl-learner.org/mammographic#lobular"/> + <hasDensity rdf:resource="http://dl-learner.org/mammographic#unknown"/> + </owl:NamedIndividual> + + + + <!-- http://dl-learner.org/mammographic#Patient115 --> + + <owl:NamedIndividual rdf:about="http://dl-learner.org/mammographic#Patient115"> + <rdf:type rdf:resource="http://dl-learner.org/mammographic#Patient"/> + <hasBiRads rdf:datatype="http://www.w3.org/2001/XMLSchema#double">4.0</hasBiRads> + <hasAge rdf:datatype="http://www.w3.org/2001/XMLSchema#double">56.0</hasAge> + <hasMargin rdf:resource="http://dl-learner.org/mammographic#circumscribed"/> + <hasDensity rdf:resource="http://dl-learner.org/mammographic#low"/> + <hasShape rdf:resource="http://dl-learner.org/mammographic#round"/> + </owl:NamedIndividual> + + + + <!-- http://dl-learner.org/mammographic#Patient116 --> + + <owl:NamedIndividual rdf:about="http://dl-learner.org/mammographic#Patient116"> + <rdf:type rdf:resource="http://dl-learner.org/mammographic#Patient"/> + <hasBiRads rdf:datatype="http://www.w3.org/2001/XMLSchema#double">4.0</hasBiRads> + <hasAge rdf:datatype="http://www.w3.org/2001/XMLSchema#double">45.0</hasAge> + <hasMargin rdf:resource="http://dl-learner.org/mammographic#circumscribed"/> + <hasShape rdf:resource="http://dl-learner.org/mammographic#oval"/> + <hasDensity rdf:resource="http://dl-learner.org/mammographic#unknown"/> + </owl:NamedIndividual> + + + + <!-- http://dl-learner.org/mammographic#Patient117 --> + + <owl:NamedIndividual rdf:about="http://dl-learner.org/mammographic#Patient117"> + <rdf:type rdf:resource="http://dl-learner.org/mammographic#Patient"/> + <hasBiRads rdf:datatype="http://www.w3.org/2001/XMLSchema#double">4.0</hasBiRads> + <hasAge rdf:datatype="http://www.w3.org/2001/XMLSchema#double">57.0</hasAge> + <hasMargin rdf:resource="http://dl-learner.org/mammographic#circumscribed"/> + <hasDensity rdf:resource="http://dl-learner.org/mammographic#iso"/> + <hasShape rdf:resource="http://dl-learner.org/mammographic#oval"/> + </owl:NamedIndividual> + + + + <!-- http://dl-learner.org/mammographic#Patient118 --> + + <owl:NamedIndividual rdf:about="http://dl-learner.org/mammographic#Patient118"> + <rdf:type rdf:resource="http://dl-learner.org/mammographic#Patient"/> + <hasBiRads rdf:datatype="http://www.w3.org/2001/XMLSchema#double">5.0</hasBiRads> + <hasAge rdf:datatype="http://www.w3.org/2001/XMLSchema#double">55.0</hasAge> + <hasMargin rdf:resource="http://dl-learner.org/mammographic#ill-defined"/> + <hasShape rdf:resource="http://dl-learner.org/mammographic#lobular"/> + <hasDensity rdf:resource="http://dl-learner.org/mammographic#low"/> + </owl:NamedIndividual> + + + + <!-- http://dl-learner.org/mammographic#Patient119 --> + + <owl:NamedIndividual rdf:about="http://dl-learner.org/mammographic#Patient119"> + <rdf:type rdf:resource="http://dl-learner.org/mammographic#Patient"/> + <hasBiRads rdf:datatype="http://www.w3.org/2001/XMLSchema#double">5.0</hasBiRads> + <hasAge rdf:datatype="http://www.w3.org/2001/XMLSchema#double">84.0</hasAge> + <hasShape rdf:resource="http://dl-learner.org/mammographic#irregular"/> + <hasDensity rdf:resource="http://dl-learner.org/mammographic#low"/> + <hasMargin rdf:resource="http://dl-learner.org/mammographic#spiculated"/> + </owl:NamedIndividual> + + + + <!-- http://dl-learner.org/mammographic#Patient12 --> + + <owl:NamedIndividual rdf:about="http://dl-learner.org/mammographic#Patient12"> + <rdf:type rdf:resource="http://dl-learner.org/mammographic#Patient"/> + <hasBiRads rdf:datatype="http://www.w3.org/2001/XMLSchema#double">4.0</hasBiRads> + <hasAge rdf:datatype="http://www.w3.org/2001/XMLSchema#double">64.0</hasAge> + <hasDensity rdf:resource="http://dl-learner.org/mammographic#low"/> + <hasShape rdf:resource="http://dl-learner.org/mammographic#round"/> + <hasMargin rdf:resource="http://dl-learner.org/mammographic#unknown"/> + </owl:NamedIndividual> + + + + <!-- http://dl-learner.org/mammographic#Patient120 --> + + <owl:NamedIndividual rdf:about="http://dl-learner.org/mammographic#Patient120"> + <rdf:type rdf:resource="http://dl-learner.org/mammographic#Patient"/> + <hasBiRads rdf:datatype="http://www.w3.org/2001/XMLSchema#double">5.0</hasBiRads> + <hasAge rdf:datatype="http://www.w3.org/2001/XMLSchema#double">51.0</hasAge> + <hasMargin rdf:resource="http://dl-learner.org/mammographic#ill-defined"/> + <hasShape rdf:resource="http://dl-learner.org/mammographic#irregular"/> + <hasDensity rdf:resource="http://dl-learner.org/mammographic#low"/> + </owl:NamedIndividual> + + + + <!-- http://dl-learner.org/mammographic#Patient121 --> + + <owl:NamedIndividual rdf:about="http://dl-learner.org/mammographic#Patient121"> + <rdf:type rdf:resource="http://dl-learner.org/mammographic#Patient"/> + <hasBiRads rdf:datatype="http://www.w3.org/2001/XMLSchema#double">4.0</hasBiRads> + <hasAge rdf:datatype="http://www.w3.org/2001/XMLSchema#double">43.0</hasAge> + <hasMargin rdf:resource="http://dl-learner.org/mammographic#circumscribed"/> + <hasShape rdf:resource="http://dl-learner.org/mammographic#round"/> + <hasDensity rdf:resource="http://dl-learner.org/mammographic#unknown"/> + </owl:NamedIndividual> + + + + <!-- http://dl-learner.org/mammographic#Patient122 --> + + <owl:NamedIndividual rdf:about="http://dl-learner.org/mammographic#Patient122"> + <rdf:type rdf:resource="http://dl-learner.org/mammographic#Patient"/> + <hasAge rdf:datatype="http://www.w3.org/2001/XMLSchema#double">24.0</hasAge> + <hasBiRads rdf:datatype="http://www.w3.org/2001/XMLSchema#double">4.0</hasBiRads> + <hasMargin rdf:resource="http://dl-learner.org/mammographic#circumscribed"/> + <hasDensity rdf:resource="http://dl-learner.org/mammographic#iso"/> + <hasShape rdf:resource="http://dl-learner.org/mammographic#oval"/> + </owl:NamedIndividual> + + + + <!-- http://dl-learner.org/mammographic#Patient123 --> + + <owl:NamedIndividual rdf:about="http://dl-learner.org/mammographic#Patient123"> + <rdf:type rdf:resource="http://dl-learner.org/mammographic#Patient"/> + <hasBiRads rdf:datatype="http://www.w3.org/2001/XMLSchema#double">4.0</hasBiRads> + <hasAge rdf:datatype="http://www.w3.org/2001/XMLSchema#double">66.0</hasAge> + <hasMargin rdf:resource="http://dl-learner.org/mammographic#circumscribed"/> + <hasDensity rdf:resource="http://dl-learner.org/mammographic#low"/> + <hasShape rdf:resource="http://dl-learner.org/mammographic#round"/> + </owl:NamedIndividual> + + + + <!-- http://dl-learner.org/mammographic#Patient124 --> + + <owl:NamedIndividual rdf:about="http://dl-learner.org/mammographic#Patient124"> + <rdf:type rdf:resource="http://dl-learner.org/mammographic#Patient"/> + <hasAge rdf:datatype="http://www.w3.org/2001/XMLSchema#double">33.0</hasAge> + <hasBiRads rdf:datatype="http://www.w3.org/2001/XMLSchema#double">5.0</hasBiRads> + <hasMargin rdf:resource="http://dl-learner.org/mammographic#ill-defined"/> + <hasShape rdf:resource="http://dl-learner.org/mammographic#irregular"/> + <hasDensity rdf:resource="http://dl-learner.org/mammographic#low"/> + </owl:NamedIndividual> + + + + <!-- http://dl-learner.org/mammographic#Patient125 --> + + <owl:NamedIndividual rdf:about="http://dl-learner.org/mammographic#Patient125"> + <rdf:type rdf:resource="http://dl-learner.org/mammographic#Patient"/> + <hasBiRads rdf:datatype="http://www.w3.org/2001/XMLSchema#double">4.0</hasBiRads> + <hasAge rdf:datatype="http://www.w3.org/2001/XMLSchema#double">59.0</hasAge> + <hasShape rdf:resource="http://dl-learner.org/mammographic#irregular"/> + <hasDensity rdf:resource="http://dl-learner.org/mammographic#iso"/> + <hasMargin rdf:resource="http://dl-learner.org/mammographic#obscured"/> + </owl:NamedIndividual> + + + + <!-- http://dl-learner.org/mammographic#Patient126 --> + + <owl:NamedIndividual rdf:about="http://dl-learner.org/mammographic#Patient126"> + <rdf:type rdf:resource="http://dl-learner.org/mammographic#Patient"/> + <hasBiRads rdf:datatype="http://www.w3.org/2001/XMLSchema#double">4.0</hasBiRads> + <hasAge rdf:datatype="http://www.w3.org/2001/XMLSchema#double">76.0</hasAge> + <hasMargin rdf:resource="http://dl-learner.org/mammographic#obscured"/> + <hasShape rdf:resource="http://dl-learner.org/mammographic#oval"/> + <hasDensity rdf:resource="http://dl-learner.org/mammographic#unknown"/> + </owl:NamedIndividual> + + + + <!-- http://dl-learner.org/mammographic#Patient127 --> + + <owl:NamedIndividual rdf:about="http://dl-learner.org/mammographic#Patient127"> + <rdf:type rdf:resource="http://dl-learner.org/mammographic#Patient"/> + <hasBiRads rdf:datatype="http://www.w3.org/2001/XMLSchema#double">4.0</hasBiRads> + <hasAge rdf:datatype="http://www.w3.org/2001/XMLSchema#double">40.0</hasAge> + <hasMargin rdf:resource="http://dl-learner.org/mammographic#circumscribed"/> + <hasShape rdf:resource="http://dl-learner.org/mammographic#round"/> + <hasDensity rdf:resource="http://dl-learner.org/mammographic#unknown"/> + </owl:NamedIndividual> + + + + <!-- http://dl-learner.org/mammographic#Patient128 --> + + <owl:NamedIndividual rdf:about="http://dl-learner.org/mammographic#Patient128"> + <rdf:type rdf:resource="http://dl-learner.org/mammographic#Patient"/> + <hasBiRads rdf:datatype="http://www.w3.org/2001/XMLSchema#double">4.0</hasBiRads> + <hasAge rdf:datatype="http://www.w3.org/2001/XMLSchema#double">52.0</hasAge> + <hasMargin rdf:resource="http://dl-learner.org/mammographic#ill-defined"/> + <hasShape rdf:resource="http://dl-learner.org/mammographic#unknown"/> + <hasDensity rdf:resource="http://dl-learner.org/mammographic#unknown"/> + </owl:NamedIndividual> + + + + <!-- http://dl-learner.org/mammographic#Patient129 --> + + <owl:NamedIndividual rdf:about="http://dl-learner.org/mammographic#Patient129"> + <rdf:type rdf:resource="http://dl-learner.org/mammographic#Patient"/> + <hasAge rdf:datatype="http://www.w3.org/2001/XMLSchema#double">40.0</hasAge> + <hasBiRads rdf:datatype="http://www.w3.org/2001/XMLSchema#double">5.0</hasBiRads> + <hasShape rdf:resource="http://dl-learner.org/mammographic#irregular"/> + <hasDensity rdf:resource="http://dl-learner.org/mammographic#low"/> + <hasMargin rdf:resource="http://dl-learner.org/mammographic#spiculated"/> + </owl:NamedIndividual> + + + + <!-- http://dl-learner.org/mammographic#Patient13 --> + + <owl:NamedIndividual rdf:about="http://dl-learner.org/mammographic#Patient13"> + <rdf:type rdf:resource="http://dl-learner.org/mammographic#Patient"/> + <hasAge rdf:datatype="http://www.w3.org/2001/XMLSchema#double">36.0</hasAge> + <hasBiRads rdf:datatype="http://www.w3.org/2001/XMLSchema#double">4.0</hasBiRads> + <hasMargin rdf:resource="http://dl-learner.org/mammographic#circumscribed"/> + <hasDensity rdf:resource="http://dl-learner.org/mammographic#iso"/> + <hasShape rdf:resource="http://dl-learner.org/mammographic#lobular"/> + </owl:NamedIndividual> + + + + <!-- http://dl-learner.org/mammographic#Patient130 --> + + <owl:NamedIndividual rdf:about="http://dl-learner.org/mammographic#Patient130"> + <rdf:type rdf:resource="http://dl-learner.org/mammographic#Patient"/> + <hasBiRads rdf:datatype="http://www.w3.org/2001/XMLSchema#double">5.0</hasBiRads> + <hasAge rdf:datatype="http://www.w3.org/2001/XMLSchema#double">67.0</hasAge> + <hasMargin rdf:resource="http://dl-learner.org/mammographic#ill-defined"/> + <hasShape rdf:resource="http://dl-learner.org/mammographic#irregular"/> + <hasDensity rdf:resource="http://dl-learner.org/mammographic#low"/> + </owl:NamedIndividual> + + + + <!-- http://dl-learner.org/mammographic#Patient131 --> + + <owl:NamedIndividual rdf:about="http://dl-learner.org/mammographic#Patient131"> + <rdf:type rdf:resource="http://dl-learner.org/mammographic#Patient"/> + <hasBiRads rdf:datatype="http://www.w3.org/2001/XMLSchema#double">5.0</hasBiRads> + <hasAge rdf:datatype="http://www.w3.org/2001/XMLSchema#double">75.0</hasAge> + <hasShape rdf:resource="http://dl-learner.org/mammographic#irregular"/> + <hasDensity rdf:resource="http://dl-learner.org/mammographic#low"/> + <hasMargin rdf:resource="http://dl-learner.org/mammographic#obscured"/> + </owl:NamedIndividual> + + + + <!-- http://dl-learner.org/mammographic#Patient132 --> + + <owl:NamedIndividual rdf:about="http://dl-learner.org/mammographic#Patient132"> + <rdf:type rdf:resource="http://dl-learner.org/mammographic#Patient"/> ... [truncated message content] |
From: <hee...@us...> - 2010-09-14 07:50:20
|
Revision: 2303 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=2303&view=rev Author: heeroyuy Date: 2010-09-14 07:50:11 +0000 (Tue, 14 Sep 2010) Log Message: ----------- -added ontology for parkinsons Added Paths: ----------- trunk/src/dl-learner/org/dllearner/examples/Parkinsons.java trunk/test/parkinsons/ trunk/test/parkinsons/files/ trunk/test/parkinsons/files/parkinsons.data trunk/test/parkinsons/parkinsons.owl trunk/test/parkinsons/train.conf Added: trunk/src/dl-learner/org/dllearner/examples/Parkinsons.java =================================================================== --- trunk/src/dl-learner/org/dllearner/examples/Parkinsons.java (rev 0) +++ trunk/src/dl-learner/org/dllearner/examples/Parkinsons.java 2010-09-14 07:50:11 UTC (rev 2303) @@ -0,0 +1,416 @@ +package org.dllearner.examples; + +import java.io.File; +import java.io.FileNotFoundException; +import java.util.HashMap; +import java.util.LinkedList; +import java.util.List; +import java.util.Scanner; +import java.util.Set; + +import org.dllearner.core.owl.Axiom; +import org.dllearner.core.owl.ClassAssertionAxiom; +import org.dllearner.core.owl.DatatypeProperty; +import org.dllearner.core.owl.DatatypePropertyAssertion; +import org.dllearner.core.owl.DoubleDatatypePropertyAssertion; +import org.dllearner.core.owl.Individual; +import org.dllearner.core.owl.KB; +import org.dllearner.core.owl.NamedClass; +import org.dllearner.parser.KBParser; +import org.dllearner.parser.ParseException; +import org.dllearner.reasoning.OWLAPIReasoner; +import org.dllearner.utilities.Files; +import org.dllearner.utilities.Helper; +import org.semanticweb.owlapi.model.IRI; + +public class Parkinsons { + + private static IRI ontologyIRI = IRI + .create("http://dl-learner.org/parkinsons"); + private static final String fileName = "test/parkinsons/files/parkinsons.data"; + private static HashMap<String, Integer> patients = new HashMap<String, Integer>(); + private static List<Axiom> axioms = new LinkedList<Axiom>(); + + public static void main(String agrs[]) throws FileNotFoundException, + ParseException { + Scanner input = new Scanner(new File(fileName), "UTF-8"); + File owlFile = new File("test/parkinsons/parkinsons.owl"); + long startTime, duration; + String time; + KB kb = new KB(); + + String kbString = generateDomainAndRangeForObjectProperties(); + KB kb2 = KBParser.parseKBFile(kbString); + kb.addKB(kb2); + + System.out.print("Reading in parkinsons files ... "); + startTime = System.nanoTime(); + + while (input.hasNextLine()) { + String nextLine = input.next(); + + String name = nextLine.substring(0, nextLine.indexOf(",")); + nextLine = nextLine.replaceFirst(name + ",", ""); + + String MDVPFo = nextLine.substring(0, nextLine.indexOf(",")); + nextLine = nextLine.replaceFirst(MDVPFo + ",", ""); + + String MDVPFhi = nextLine.substring(0, nextLine.indexOf(",")); + nextLine = nextLine.replaceFirst(MDVPFhi + ",", ""); + + String MDVPFlo = nextLine.substring(0, nextLine.indexOf(",")); + nextLine = nextLine.replaceFirst(MDVPFlo + ",", ""); + + String MDVPJitter = nextLine.substring(0, nextLine.indexOf(",")); + nextLine = nextLine.replaceFirst(MDVPJitter + ",", ""); + + String MDVPJitterAbs = nextLine.substring(0, nextLine.indexOf(",")); + nextLine = nextLine.replaceFirst(MDVPJitterAbs + ",", ""); + + String MDVPRAP = nextLine.substring(0, nextLine.indexOf(",")); + nextLine = nextLine.replaceFirst(MDVPRAP + ",", ""); + + String MDVPPPQ = nextLine.substring(0, nextLine.indexOf(",")); + nextLine = nextLine.replaceFirst(MDVPPPQ + ",", ""); + + String JitterDDP = nextLine.substring(0, nextLine.indexOf(",")); + nextLine = nextLine.replaceFirst(JitterDDP + ",", ""); + + String MDVPShimmer = nextLine.substring(0, nextLine.indexOf(",")); + nextLine = nextLine.replaceFirst(MDVPShimmer + ",", ""); + + String MDVPShimmerdB = nextLine.substring(0, nextLine.indexOf(",")); + nextLine = nextLine.replaceFirst(MDVPShimmerdB + ",", ""); + + String ShimmerAPQ3 = nextLine.substring(0, nextLine.indexOf(",")); + nextLine = nextLine.replaceFirst(ShimmerAPQ3 + ",", ""); + + String ShimmerAPQ5 = nextLine.substring(0, nextLine.indexOf(",")); + nextLine = nextLine.replaceFirst(ShimmerAPQ5 + ",", ""); + + String MDVPAPQ = nextLine.substring(0, nextLine.indexOf(",")); + nextLine = nextLine.replaceFirst(MDVPAPQ + ",", ""); + + String ShimmerDDA = nextLine.substring(0, nextLine.indexOf(",")); + nextLine = nextLine.replaceFirst(ShimmerDDA + ",", ""); + + String NHR = nextLine.substring(0, nextLine.indexOf(",")); + nextLine = nextLine.replaceFirst(NHR + ",", ""); + + String HNR = nextLine.substring(0, nextLine.indexOf(",")); + nextLine = nextLine.replaceFirst(HNR + ",", ""); + + String status = nextLine.substring(0, nextLine.indexOf(",")); + nextLine = nextLine.replaceFirst(status + ",", ""); + + String RPDE = nextLine.substring(0, nextLine.indexOf(",")); + nextLine = nextLine.replaceFirst(RPDE + ",", ""); + + String DFA = nextLine.substring(0, nextLine.indexOf(",")); + nextLine = nextLine.replaceFirst(DFA + ",", ""); + + String spread1 = nextLine.substring(0, nextLine.indexOf(",")); + nextLine = nextLine.replaceFirst(spread1 + ",", ""); + + String spread2 = nextLine.substring(0, nextLine.indexOf(",")); + nextLine = nextLine.replaceFirst(spread2 + ",", ""); + + String D2 = nextLine.substring(0, nextLine.indexOf(",")); + nextLine = nextLine.replaceFirst(D2 + ",", ""); + + String PPE = nextLine; + + List<Axiom> axioms = mapClauses(name, MDVPFo, MDVPFhi, MDVPFlo, + MDVPJitter, MDVPJitterAbs, MDVPRAP, MDVPPPQ, JitterDDP, + MDVPShimmer, MDVPShimmerdB, ShimmerAPQ3, ShimmerAPQ5, + MDVPAPQ, ShimmerDDA, NHR, HNR, status, RPDE, DFA, spread1, + spread2, D2, PPE); + for (Axiom axiom : axioms) + kb.addAxiom(axiom); + + } + duration = System.nanoTime() - startTime; + time = Helper.prettyPrintNanoSeconds(duration, false, false); + System.out.println("OK (" + time + ")."); + + // writing generated knowledge base + System.out.print("Writing OWL file ... "); + startTime = System.nanoTime(); + OWLAPIReasoner.exportKBToOWL(owlFile, kb, ontologyIRI); + duration = System.nanoTime() - startTime; + time = Helper.prettyPrintNanoSeconds(duration, false, false); + System.out.println("OK (" + time + ")."); + + // generating second conf file + System.out.print("Generating conf file ... "); + File confTrainFile = new File("test/parkinsons/train.conf"); + Files.clearFile(confTrainFile); + generateConfFile(confTrainFile); + generateExamples(confTrainFile); + duration = System.nanoTime() - startTime; + time = Helper.prettyPrintNanoSeconds(duration, false, false); + System.out.println("OK (" + time + ")."); + System.out.println("Finished"); + + } + + private static List<Axiom> mapClauses(String name, String MDVPFo, + String MDVPFhi, String MDVPFlo, String MDVPJitter, + String MDVPJitterAbs, String MDVPRAP, String MDVPPPQ, + String JitterDDP, String MDVPShimmer, String MDVPShimmerdB, + String ShimmerAPQ3, String ShimmerAPQ5, String MDVPAPQ, + String ShimmerDDA, String NHR, String HNR, String status, + String RPDE, String DFA, String spread1, String spread2, String D2, + String PPE) { + ClassAssertionAxiom cmpAxiom = getConceptAssertion("Patient", + name); + axioms.add(cmpAxiom); + + DatatypePropertyAssertion dpa = getDoubleDatatypePropertyAssertion( + name, "hasMDVPFo", Double.parseDouble(MDVPFo)); + axioms.add(dpa); + + DatatypePropertyAssertion dpb = getDoubleDatatypePropertyAssertion( + name, "hasMDVPFhi", Double.parseDouble(MDVPFhi)); + axioms.add(dpb); + + DatatypePropertyAssertion dpc = getDoubleDatatypePropertyAssertion( + name, "hasMDVPFlo", Double.parseDouble(MDVPFlo)); + axioms.add(dpc); + + DatatypePropertyAssertion dpd = getDoubleDatatypePropertyAssertion( + name, "hasMDVPJitter", Double.parseDouble(MDVPJitter)); + axioms.add(dpd); + + DatatypePropertyAssertion dpe = getDoubleDatatypePropertyAssertion( + name, "hasMDVPJitterAbs", Double.parseDouble(MDVPJitterAbs)); + axioms.add(dpe); + + DatatypePropertyAssertion dpf = getDoubleDatatypePropertyAssertion( + name, "hasMDVPRAP", Double.parseDouble(MDVPRAP)); + axioms.add(dpf); + + DatatypePropertyAssertion dpg = getDoubleDatatypePropertyAssertion( + name, "hasMDVPPPQ", Double.parseDouble(MDVPPPQ)); + axioms.add(dpg); + + DatatypePropertyAssertion dph = getDoubleDatatypePropertyAssertion( + name, "hasJitterDDP", Double.parseDouble(JitterDDP)); + axioms.add(dph); + + DatatypePropertyAssertion dpi = getDoubleDatatypePropertyAssertion( + name, "hasMDVPShimmer", Double.parseDouble(MDVPShimmer)); + axioms.add(dpi); + + DatatypePropertyAssertion dpj = getDoubleDatatypePropertyAssertion( + name, "hasMDVPShimmerdB", Double.parseDouble(MDVPShimmerdB)); + axioms.add(dpj); + + DatatypePropertyAssertion dpk = getDoubleDatatypePropertyAssertion( + name, "hasShimmerAPQ3", Double.parseDouble(ShimmerAPQ3)); + axioms.add(dpk); + + DatatypePropertyAssertion dpl = getDoubleDatatypePropertyAssertion( + name, "hasShimmerAPQ5", Double.parseDouble(ShimmerAPQ5)); + axioms.add(dpl); + + DatatypePropertyAssertion dpm = getDoubleDatatypePropertyAssertion( + name, "hasMDVPAPQ", Double.parseDouble(MDVPAPQ)); + axioms.add(dpm); + + DatatypePropertyAssertion dpn = getDoubleDatatypePropertyAssertion( + name, "hasShimmerDDA", Double.parseDouble(ShimmerDDA)); + axioms.add(dpn); + + DatatypePropertyAssertion dpo = getDoubleDatatypePropertyAssertion( + name, "hasNHR", Double.parseDouble(NHR)); + axioms.add(dpo); + + DatatypePropertyAssertion dpp = getDoubleDatatypePropertyAssertion( + name, "hasHNR", Double.parseDouble(HNR)); + axioms.add(dpp); + + DatatypePropertyAssertion dpq = getDoubleDatatypePropertyAssertion( + name, "hasRPDE", Double.parseDouble(RPDE)); + axioms.add(dpq); + + + DatatypePropertyAssertion dpr = getDoubleDatatypePropertyAssertion( + name, "hasDFA", Double.parseDouble(DFA)); + axioms.add(dpr); + + DatatypePropertyAssertion dps = getDoubleDatatypePropertyAssertion( + name, "hasSpread1", Double.parseDouble(spread1)); + axioms.add(dps); + + DatatypePropertyAssertion dpt = getDoubleDatatypePropertyAssertion( + name, "hasSpread2", Double.parseDouble(spread2)); + axioms.add(dpt); + + DatatypePropertyAssertion dpu = getDoubleDatatypePropertyAssertion( + name, "hasD2", Double.parseDouble(D2)); + axioms.add(dpu); + + DatatypePropertyAssertion dpv = getDoubleDatatypePropertyAssertion( + name, "hasPPE", Double.parseDouble(PPE)); + axioms.add(dpv); + + patients.put(name, new Integer(status)); + return axioms; + } + + private static NamedClass getAtomicConcept(String name) { + return new NamedClass(ontologyIRI + "#" + name); + } + + private static ClassAssertionAxiom getConceptAssertion(String concept, + String i) { + Individual ind = getIndividual(i); + NamedClass c = getAtomicConcept(concept); + return new ClassAssertionAxiom(c, ind); + } + + private static Individual getIndividual(String name) { + return new Individual(ontologyIRI + "#" + name); + } + + private static void generateConfFile(File file) { + String confHeader = "import(\"parkinsons.owl\");\n\n"; + confHeader += "reasoner = fastInstanceChecker;\n"; + confHeader += "algorithm = refexamples;\n"; + confHeader += "refexamples.noisePercentage = 0;\n"; + confHeader += "refexamples.startClass = " + getURI2("Patient") + ";\n"; + confHeader += "refexamples.writeSearchTree = false;\n"; + confHeader += "refexamples.searchTreeFile = \"log/parkinsons/searchTree.log\";\n"; + confHeader += "\n"; + Files.appendFile(file, confHeader); + } + + private static void generateExamples(File file) { + StringBuffer content = new StringBuffer(); + Set<String> keys = patients.keySet(); + for (String key : keys) { + Integer subsValue = patients.get(key); + if (subsValue == 0) { + content.append("+\"" + getIndividual(key) + "\"\n"); + } else { + content.append("-\"" + getIndividual(key) + "\"\n"); + } + } + Files.appendFile(file, content.toString()); + } + + private static String getURI(String name) { + return ontologyIRI + "#" + name; + } + + // returns URI including quotationsmark (need for KBparser) + private static String getURI2(String name) { + return "\"" + getURI(name) + "\""; + } + + private static DoubleDatatypePropertyAssertion getDoubleDatatypePropertyAssertion( + String individual, String datatypeProperty, double value) { + Individual ind = getIndividual(individual); + DatatypeProperty dp = getDatatypeProperty(datatypeProperty); + return new DoubleDatatypePropertyAssertion(dp, ind, value); + } + + private static DatatypeProperty getDatatypeProperty(String name) { + return new DatatypeProperty(ontologyIRI + "#" + name); + } + + private static String generateDomainAndRangeForObjectProperties() + throws ParseException { + String kbString = "DPDOMAIN(" + getURI2("hasMDVPFo") + ") = " + + getURI2("Patient") + ".\n"; + kbString += "DPRANGE(" + getURI2("hasMDVPFo") + ") = DOUBLE.\n"; + + kbString += "DPDOMAIN(" + getURI2("hasMDVPFhi") + ") = " + + getURI2("Patient") + ".\n"; + kbString += "DPRANGE(" + getURI2("hasMDVPFhi") + ") = DOUBLE.\n"; + + kbString += "DPDOMAIN(" + getURI2("hasMDVPFlo") + ") = " + + getURI2("Patient") + ".\n"; + kbString += "DPRANGE(" + getURI2("hasMDVPFlo") + ") = DOUBLE.\n"; + + kbString += "DPDOMAIN(" + getURI2("hasMDVPJitter") + ") = " + + getURI2("Patient") + ".\n"; + kbString += "DPRANGE(" + getURI2("hasMDVPJitter") + ") = DOUBLE.\n"; + + kbString += "DPDOMAIN(" + getURI2("hasMDVPJitterAbs") + ") = " + + getURI2("Patient") + ".\n"; + kbString += "DPRANGE(" + getURI2("hasMDVPJitterAbs") + ") = DOUBLE.\n"; + + kbString += "DPDOMAIN(" + getURI2("hasMDVPRAP") + ") = " + + getURI2("Patient") + ".\n"; + kbString += "DPRANGE(" + getURI2("hasMDVPRAP") + ") = DOUBLE.\n"; + + kbString += "DPDOMAIN(" + getURI2("hasMDVPPPQ") + ") = " + + getURI2("Patient") + ".\n"; + kbString += "DPRANGE(" + getURI2("hasMDVPPPQ") + ") = DOUBLE.\n"; + + kbString += "DPDOMAIN(" + getURI2("hasJitterDDP") + ") = " + + getURI2("Patient") + ".\n"; + kbString += "DPRANGE(" + getURI2("hasJitterDDP") + ") = DOUBLE.\n"; + + kbString += "DPDOMAIN(" + getURI2("hasMDVPShimmer") + ") = " + + getURI2("Patient") + ".\n"; + kbString += "DPRANGE(" + getURI2("hasMDVPShimmer") + ") = DOUBLE.\n"; + + kbString += "DPDOMAIN(" + getURI2("hasMDVPShimmerdB") + ") = " + + getURI2("Patient") + ".\n"; + kbString += "DPRANGE(" + getURI2("hasMDVPShimmerdB") + ") = DOUBLE.\n"; + + kbString += "DPDOMAIN(" + getURI2("hasShimmerAPQ3") + ") = " + + getURI2("Patient") + ".\n"; + kbString += "DPRANGE(" + getURI2("hasShimmerAPQ3") + ") = DOUBLE.\n"; + + kbString += "DPDOMAIN(" + getURI2("hasShimmerAPQ5") + ") = " + + getURI2("Patient") + ".\n"; + kbString += "DPRANGE(" + getURI2("hasShimmerAPQ5") + ") = DOUBLE.\n"; + + kbString += "DPDOMAIN(" + getURI2("hasMDVPAPQ") + ") = " + + getURI2("Patient") + ".\n"; + kbString += "DPRANGE(" + getURI2("hasMDVPAPQ") + ") = DOUBLE.\n"; + + kbString += "DPDOMAIN(" + getURI2("hasShimmerDDA") + ") = " + + getURI2("Patient") + ".\n"; + kbString += "DPRANGE(" + getURI2("hasShimmerDDA") + ") = DOUBLE.\n"; + + kbString += "DPDOMAIN(" + getURI2("hasNHR") + ") = " + + getURI2("Patient") + ".\n"; + kbString += "DPRANGE(" + getURI2("hasNHR") + ") = DOUBLE.\n"; + + kbString += "DPDOMAIN(" + getURI2("hasHNR") + ") = " + + getURI2("Patient") + ".\n"; + kbString += "DPRANGE(" + getURI2("hasHNR") + ") = DOUBLE.\n"; + + kbString += "DPDOMAIN(" + getURI2("hasRPDE") + ") = " + + getURI2("Patient") + ".\n"; + kbString += "DPRANGE(" + getURI2("hasRPDE") + ") = DOUBLE.\n"; + + kbString += "DPDOMAIN(" + getURI2("hasDFA") + ") = " + + getURI2("Patient") + ".\n"; + kbString += "DPRANGE(" + getURI2("hasDFA") + ") = DOUBLE.\n"; + + kbString += "DPDOMAIN(" + getURI2("hasSpread1") + ") = " + + getURI2("Patient") + ".\n"; + kbString += "DPRANGE(" + getURI2("hasSpread1") + ") = DOUBLE.\n"; + + kbString += "DPDOMAIN(" + getURI2("hasSpread2") + ") = " + + getURI2("Patient") + ".\n"; + kbString += "DPRANGE(" + getURI2("hasSpread2") + ") = DOUBLE.\n"; + + kbString += "DPDOMAIN(" + getURI2("hasD2") + ") = " + + getURI2("Patient") + ".\n"; + kbString += "DPRANGE(" + getURI2("hasD2") + ") = DOUBLE.\n"; + + kbString += "DPDOMAIN(" + getURI2("hasPPE") + ") = " + + getURI2("Patient") + ".\n"; + kbString += "DPRANGE(" + getURI2("hasPPE") + ") = DOUBLE.\n"; + + return kbString; + + } +} Added: trunk/test/parkinsons/files/parkinsons.data =================================================================== --- trunk/test/parkinsons/files/parkinsons.data (rev 0) +++ trunk/test/parkinsons/files/parkinsons.data 2010-09-14 07:50:11 UTC (rev 2303) @@ -0,0 +1,195 @@ +phon_R01_S01_1,119.99200,157.30200,74.99700,0.00784,0.00007,0.00370,0.00554,0.01109,0.04374,0.42600,0.02182,0.03130,0.02971,0.06545,0.02211,21.03300,1,0.414783,0.815285,-4.813031,0.266482,2.301442,0.284654 +phon_R01_S01_2,122.40000,148.65000,113.81900,0.00968,0.00008,0.00465,0.00696,0.01394,0.06134,0.62600,0.03134,0.04518,0.04368,0.09403,0.01929,19.08500,1,0.458359,0.819521,-4.075192,0.335590,2.486855,0.368674 +phon_R01_S01_3,116.68200,131.11100,111.55500,0.01050,0.00009,0.00544,0.00781,0.01633,0.05233,0.48200,0.02757,0.03858,0.03590,0.08270,0.01309,20.65100,1,0.429895,0.825288,-4.443179,0.311173,2.342259,0.332634 +phon_R01_S01_4,116.67600,137.87100,111.36600,0.00997,0.00009,0.00502,0.00698,0.01505,0.05492,0.51700,0.02924,0.04005,0.03772,0.08771,0.01353,20.64400,1,0.434969,0.819235,-4.117501,0.334147,2.405554,0.368975 +phon_R01_S01_5,116.01400,141.78100,110.65500,0.01284,0.00011,0.00655,0.00908,0.01966,0.06425,0.58400,0.03490,0.04825,0.04465,0.10470,0.01767,19.64900,1,0.417356,0.823484,-3.747787,0.234513,2.332180,0.410335 +phon_R01_S01_6,120.55200,131.16200,113.78700,0.00968,0.00008,0.00463,0.00750,0.01388,0.04701,0.45600,0.02328,0.03526,0.03243,0.06985,0.01222,21.37800,1,0.415564,0.825069,-4.242867,0.299111,2.187560,0.357775 +phon_R01_S02_1,120.26700,137.24400,114.82000,0.00333,0.00003,0.00155,0.00202,0.00466,0.01608,0.14000,0.00779,0.00937,0.01351,0.02337,0.00607,24.88600,1,0.596040,0.764112,-5.634322,0.257682,1.854785,0.211756 +phon_R01_S02_2,107.33200,113.84000,104.31500,0.00290,0.00003,0.00144,0.00182,0.00431,0.01567,0.13400,0.00829,0.00946,0.01256,0.02487,0.00344,26.89200,1,0.637420,0.763262,-6.167603,0.183721,2.064693,0.163755 +phon_R01_S02_3,95.73000,132.06800,91.75400,0.00551,0.00006,0.00293,0.00332,0.00880,0.02093,0.19100,0.01073,0.01277,0.01717,0.03218,0.01070,21.81200,1,0.615551,0.773587,-5.498678,0.327769,2.322511,0.231571 +phon_R01_S02_4,95.05600,120.10300,91.22600,0.00532,0.00006,0.00268,0.00332,0.00803,0.02838,0.25500,0.01441,0.01725,0.02444,0.04324,0.01022,21.86200,1,0.547037,0.798463,-5.011879,0.325996,2.432792,0.271362 +phon_R01_S02_5,88.33300,112.24000,84.07200,0.00505,0.00006,0.00254,0.00330,0.00763,0.02143,0.19700,0.01079,0.01342,0.01892,0.03237,0.01166,21.11800,1,0.611137,0.776156,-5.249770,0.391002,2.407313,0.249740 +phon_R01_S02_6,91.90400,115.87100,86.29200,0.00540,0.00006,0.00281,0.00336,0.00844,0.02752,0.24900,0.01424,0.01641,0.02214,0.04272,0.01141,21.41400,1,0.583390,0.792520,-4.960234,0.363566,2.642476,0.275931 +phon_R01_S04_1,136.92600,159.86600,131.27600,0.00293,0.00002,0.00118,0.00153,0.00355,0.01259,0.11200,0.00656,0.00717,0.01140,0.01968,0.00581,25.70300,1,0.460600,0.646846,-6.547148,0.152813,2.041277,0.138512 +phon_R01_S04_2,139.17300,179.13900,76.55600,0.00390,0.00003,0.00165,0.00208,0.00496,0.01642,0.15400,0.00728,0.00932,0.01797,0.02184,0.01041,24.88900,1,0.430166,0.665833,-5.660217,0.254989,2.519422,0.199889 +phon_R01_S04_3,152.84500,163.30500,75.83600,0.00294,0.00002,0.00121,0.00149,0.00364,0.01828,0.15800,0.01064,0.00972,0.01246,0.03191,0.00609,24.92200,1,0.474791,0.654027,-6.105098,0.203653,2.125618,0.170100 +phon_R01_S04_4,142.16700,217.45500,83.15900,0.00369,0.00003,0.00157,0.00203,0.00471,0.01503,0.12600,0.00772,0.00888,0.01359,0.02316,0.00839,25.17500,1,0.565924,0.658245,-5.340115,0.210185,2.205546,0.234589 +phon_R01_S04_5,144.18800,349.25900,82.76400,0.00544,0.00004,0.00211,0.00292,0.00632,0.02047,0.19200,0.00969,0.01200,0.02074,0.02908,0.01859,22.33300,1,0.567380,0.644692,-5.440040,0.239764,2.264501,0.218164 +phon_R01_S04_6,168.77800,232.18100,75.60300,0.00718,0.00004,0.00284,0.00387,0.00853,0.03327,0.34800,0.01441,0.01893,0.03430,0.04322,0.02919,20.37600,1,0.631099,0.605417,-2.931070,0.434326,3.007463,0.430788 +phon_R01_S05_1,153.04600,175.82900,68.62300,0.00742,0.00005,0.00364,0.00432,0.01092,0.05517,0.54200,0.02471,0.03572,0.05767,0.07413,0.03160,17.28000,1,0.665318,0.719467,-3.949079,0.357870,3.109010,0.377429 +phon_R01_S05_2,156.40500,189.39800,142.82200,0.00768,0.00005,0.00372,0.00399,0.01116,0.03995,0.34800,0.01721,0.02374,0.04310,0.05164,0.03365,17.15300,1,0.649554,0.686080,-4.554466,0.340176,2.856676,0.322111 +phon_R01_S05_3,153.84800,165.73800,65.78200,0.00840,0.00005,0.00428,0.00450,0.01285,0.03810,0.32800,0.01667,0.02383,0.04055,0.05000,0.03871,17.53600,1,0.660125,0.704087,-4.095442,0.262564,2.739710,0.365391 +phon_R01_S05_4,153.88000,172.86000,78.12800,0.00480,0.00003,0.00232,0.00267,0.00696,0.04137,0.37000,0.02021,0.02591,0.04525,0.06062,0.01849,19.49300,1,0.629017,0.698951,-5.186960,0.237622,2.557536,0.259765 +phon_R01_S05_5,167.93000,193.22100,79.06800,0.00442,0.00003,0.00220,0.00247,0.00661,0.04351,0.37700,0.02228,0.02540,0.04246,0.06685,0.01280,22.46800,1,0.619060,0.679834,-4.330956,0.262384,2.916777,0.285695 +phon_R01_S05_6,173.91700,192.73500,86.18000,0.00476,0.00003,0.00221,0.00258,0.00663,0.04192,0.36400,0.02187,0.02470,0.03772,0.06562,0.01840,20.42200,1,0.537264,0.686894,-5.248776,0.210279,2.547508,0.253556 +phon_R01_S06_1,163.65600,200.84100,76.77900,0.00742,0.00005,0.00380,0.00390,0.01140,0.01659,0.16400,0.00738,0.00948,0.01497,0.02214,0.01778,23.83100,1,0.397937,0.732479,-5.557447,0.220890,2.692176,0.215961 +phon_R01_S06_2,104.40000,206.00200,77.96800,0.00633,0.00006,0.00316,0.00375,0.00948,0.03767,0.38100,0.01732,0.02245,0.03780,0.05197,0.02887,22.06600,1,0.522746,0.737948,-5.571843,0.236853,2.846369,0.219514 +phon_R01_S06_3,171.04100,208.31300,75.50100,0.00455,0.00003,0.00250,0.00234,0.00750,0.01966,0.18600,0.00889,0.01169,0.01872,0.02666,0.01095,25.90800,1,0.418622,0.720916,-6.183590,0.226278,2.589702,0.147403 +phon_R01_S06_4,146.84500,208.70100,81.73700,0.00496,0.00003,0.00250,0.00275,0.00749,0.01919,0.19800,0.00883,0.01144,0.01826,0.02650,0.01328,25.11900,1,0.358773,0.726652,-6.271690,0.196102,2.314209,0.162999 +phon_R01_S06_5,155.35800,227.38300,80.05500,0.00310,0.00002,0.00159,0.00176,0.00476,0.01718,0.16100,0.00769,0.01012,0.01661,0.02307,0.00677,25.97000,1,0.470478,0.676258,-7.120925,0.279789,2.241742,0.108514 +phon_R01_S06_6,162.56800,198.34600,77.63000,0.00502,0.00003,0.00280,0.00253,0.00841,0.01791,0.16800,0.00793,0.01057,0.01799,0.02380,0.01170,25.67800,1,0.427785,0.723797,-6.635729,0.209866,1.957961,0.135242 +phon_R01_S07_1,197.07600,206.89600,192.05500,0.00289,0.00001,0.00166,0.00168,0.00498,0.01098,0.09700,0.00563,0.00680,0.00802,0.01689,0.00339,26.77500,0,0.422229,0.741367,-7.348300,0.177551,1.743867,0.085569 +phon_R01_S07_2,199.22800,209.51200,192.09100,0.00241,0.00001,0.00134,0.00138,0.00402,0.01015,0.08900,0.00504,0.00641,0.00762,0.01513,0.00167,30.94000,0,0.432439,0.742055,-7.682587,0.173319,2.103106,0.068501 +phon_R01_S07_3,198.38300,215.20300,193.10400,0.00212,0.00001,0.00113,0.00135,0.00339,0.01263,0.11100,0.00640,0.00825,0.00951,0.01919,0.00119,30.77500,0,0.465946,0.738703,-7.067931,0.175181,1.512275,0.096320 +phon_R01_S07_4,202.26600,211.60400,197.07900,0.00180,0.000009,0.00093,0.00107,0.00278,0.00954,0.08500,0.00469,0.00606,0.00719,0.01407,0.00072,32.68400,0,0.368535,0.742133,-7.695734,0.178540,1.544609,0.056141 +phon_R01_S07_5,203.18400,211.52600,196.16000,0.00178,0.000009,0.00094,0.00106,0.00283,0.00958,0.08500,0.00468,0.00610,0.00726,0.01403,0.00065,33.04700,0,0.340068,0.741899,-7.964984,0.163519,1.423287,0.044539 +phon_R01_S07_6,201.46400,210.56500,195.70800,0.00198,0.000010,0.00105,0.00115,0.00314,0.01194,0.10700,0.00586,0.00760,0.00957,0.01758,0.00135,31.73200,0,0.344252,0.742737,-7.777685,0.170183,2.447064,0.057610 +phon_R01_S08_1,177.87600,192.92100,168.01300,0.00411,0.00002,0.00233,0.00241,0.00700,0.02126,0.18900,0.01154,0.01347,0.01612,0.03463,0.00586,23.21600,1,0.360148,0.778834,-6.149653,0.218037,2.477082,0.165827 +phon_R01_S08_2,176.17000,185.60400,163.56400,0.00369,0.00002,0.00205,0.00218,0.00616,0.01851,0.16800,0.00938,0.01160,0.01491,0.02814,0.00340,24.95100,1,0.341435,0.783626,-6.006414,0.196371,2.536527,0.173218 +phon_R01_S08_3,180.19800,201.24900,175.45600,0.00284,0.00002,0.00153,0.00166,0.00459,0.01444,0.13100,0.00726,0.00885,0.01190,0.02177,0.00231,26.73800,1,0.403884,0.766209,-6.452058,0.212294,2.269398,0.141929 +phon_R01_S08_4,187.73300,202.32400,173.01500,0.00316,0.00002,0.00168,0.00182,0.00504,0.01663,0.15100,0.00829,0.01003,0.01366,0.02488,0.00265,26.31000,1,0.396793,0.758324,-6.006647,0.266892,2.382544,0.160691 +phon_R01_S08_5,186.16300,197.72400,177.58400,0.00298,0.00002,0.00165,0.00175,0.00496,0.01495,0.13500,0.00774,0.00941,0.01233,0.02321,0.00231,26.82200,1,0.326480,0.765623,-6.647379,0.201095,2.374073,0.130554 +phon_R01_S08_6,184.05500,196.53700,166.97700,0.00258,0.00001,0.00134,0.00147,0.00403,0.01463,0.13200,0.00742,0.00901,0.01234,0.02226,0.00257,26.45300,1,0.306443,0.759203,-7.044105,0.063412,2.361532,0.115730 +phon_R01_S10_1,237.22600,247.32600,225.22700,0.00298,0.00001,0.00169,0.00182,0.00507,0.01752,0.16400,0.01035,0.01024,0.01133,0.03104,0.00740,22.73600,0,0.305062,0.654172,-7.310550,0.098648,2.416838,0.095032 +phon_R01_S10_2,241.40400,248.83400,232.48300,0.00281,0.00001,0.00157,0.00173,0.00470,0.01760,0.15400,0.01006,0.01038,0.01251,0.03017,0.00675,23.14500,0,0.457702,0.634267,-6.793547,0.158266,2.256699,0.117399 +phon_R01_S10_3,243.43900,250.91200,232.43500,0.00210,0.000009,0.00109,0.00137,0.00327,0.01419,0.12600,0.00777,0.00898,0.01033,0.02330,0.00454,25.36800,0,0.438296,0.635285,-7.057869,0.091608,2.330716,0.091470 +phon_R01_S10_4,242.85200,255.03400,227.91100,0.00225,0.000009,0.00117,0.00139,0.00350,0.01494,0.13400,0.00847,0.00879,0.01014,0.02542,0.00476,25.03200,0,0.431285,0.638928,-6.995820,0.102083,2.365800,0.102706 +phon_R01_S10_5,245.51000,262.09000,231.84800,0.00235,0.000010,0.00127,0.00148,0.00380,0.01608,0.14100,0.00906,0.00977,0.01149,0.02719,0.00476,24.60200,0,0.467489,0.631653,-7.156076,0.127642,2.392122,0.097336 +phon_R01_S10_6,252.45500,261.48700,182.78600,0.00185,0.000007,0.00092,0.00113,0.00276,0.01152,0.10300,0.00614,0.00730,0.00860,0.01841,0.00432,26.80500,0,0.610367,0.635204,-7.319510,0.200873,2.028612,0.086398 +phon_R01_S13_1,122.18800,128.61100,115.76500,0.00524,0.00004,0.00169,0.00203,0.00507,0.01613,0.14300,0.00855,0.00776,0.01433,0.02566,0.00839,23.16200,0,0.579597,0.733659,-6.439398,0.266392,2.079922,0.133867 +phon_R01_S13_2,122.96400,130.04900,114.67600,0.00428,0.00003,0.00124,0.00155,0.00373,0.01681,0.15400,0.00930,0.00802,0.01400,0.02789,0.00462,24.97100,0,0.538688,0.754073,-6.482096,0.264967,2.054419,0.128872 +phon_R01_S13_3,124.44500,135.06900,117.49500,0.00431,0.00003,0.00141,0.00167,0.00422,0.02184,0.19700,0.01241,0.01024,0.01685,0.03724,0.00479,25.13500,0,0.553134,0.775933,-6.650471,0.254498,1.840198,0.103561 +phon_R01_S13_4,126.34400,134.23100,112.77300,0.00448,0.00004,0.00131,0.00169,0.00393,0.02033,0.18500,0.01143,0.00959,0.01614,0.03429,0.00474,25.03000,0,0.507504,0.760361,-6.689151,0.291954,2.431854,0.105993 +phon_R01_S13_5,128.00100,138.05200,122.08000,0.00436,0.00003,0.00137,0.00166,0.00411,0.02297,0.21000,0.01323,0.01072,0.01677,0.03969,0.00481,24.69200,0,0.459766,0.766204,-7.072419,0.220434,1.972297,0.119308 +phon_R01_S13_6,129.33600,139.86700,118.60400,0.00490,0.00004,0.00165,0.00183,0.00495,0.02498,0.22800,0.01396,0.01219,0.01947,0.04188,0.00484,25.42900,0,0.420383,0.785714,-6.836811,0.269866,2.223719,0.147491 +phon_R01_S16_1,108.80700,134.65600,102.87400,0.00761,0.00007,0.00349,0.00486,0.01046,0.02719,0.25500,0.01483,0.01609,0.02067,0.04450,0.01036,21.02800,1,0.536009,0.819032,-4.649573,0.205558,1.986899,0.316700 +phon_R01_S16_2,109.86000,126.35800,104.43700,0.00874,0.00008,0.00398,0.00539,0.01193,0.03209,0.30700,0.01789,0.01992,0.02454,0.05368,0.01180,20.76700,1,0.558586,0.811843,-4.333543,0.221727,2.014606,0.344834 +phon_R01_S16_3,110.41700,131.06700,103.37000,0.00784,0.00007,0.00352,0.00514,0.01056,0.03715,0.33400,0.02032,0.02302,0.02802,0.06097,0.00969,21.42200,1,0.541781,0.821364,-4.438453,0.238298,1.922940,0.335041 +phon_R01_S16_4,117.27400,129.91600,110.40200,0.00752,0.00006,0.00299,0.00469,0.00898,0.02293,0.22100,0.01189,0.01459,0.01948,0.03568,0.00681,22.81700,1,0.530529,0.817756,-4.608260,0.290024,2.021591,0.314464 +phon_R01_S16_5,116.87900,131.89700,108.15300,0.00788,0.00007,0.00334,0.00493,0.01003,0.02645,0.26500,0.01394,0.01625,0.02137,0.04183,0.00786,22.60300,1,0.540049,0.813432,-4.476755,0.262633,1.827012,0.326197 +phon_R01_S16_6,114.84700,271.31400,104.68000,0.00867,0.00008,0.00373,0.00520,0.01120,0.03225,0.35000,0.01805,0.01974,0.02519,0.05414,0.01143,21.66000,1,0.547975,0.817396,-4.609161,0.221711,1.831691,0.316395 +phon_R01_S17_1,209.14400,237.49400,109.37900,0.00282,0.00001,0.00147,0.00152,0.00442,0.01861,0.17000,0.00975,0.01258,0.01382,0.02925,0.00871,25.55400,0,0.341788,0.678874,-7.040508,0.066994,2.460791,0.101516 +phon_R01_S17_2,223.36500,238.98700,98.66400,0.00264,0.00001,0.00154,0.00151,0.00461,0.01906,0.16500,0.01013,0.01296,0.01340,0.03039,0.00301,26.13800,0,0.447979,0.686264,-7.293801,0.086372,2.321560,0.098555 +phon_R01_S17_3,222.23600,231.34500,205.49500,0.00266,0.00001,0.00152,0.00144,0.00457,0.01643,0.14500,0.00867,0.01108,0.01200,0.02602,0.00340,25.85600,0,0.364867,0.694399,-6.966321,0.095882,2.278687,0.103224 +phon_R01_S17_4,228.83200,234.61900,223.63400,0.00296,0.00001,0.00175,0.00155,0.00526,0.01644,0.14500,0.00882,0.01075,0.01179,0.02647,0.00351,25.96400,0,0.256570,0.683296,-7.245620,0.018689,2.498224,0.093534 +phon_R01_S17_5,229.40100,252.22100,221.15600,0.00205,0.000009,0.00114,0.00113,0.00342,0.01457,0.12900,0.00769,0.00957,0.01016,0.02308,0.00300,26.41500,0,0.276850,0.673636,-7.496264,0.056844,2.003032,0.073581 +phon_R01_S17_6,228.96900,239.54100,113.20100,0.00238,0.00001,0.00136,0.00140,0.00408,0.01745,0.15400,0.00942,0.01160,0.01234,0.02827,0.00420,24.54700,0,0.305429,0.681811,-7.314237,0.006274,2.118596,0.091546 +phon_R01_S18_1,140.34100,159.77400,67.02100,0.00817,0.00006,0.00430,0.00440,0.01289,0.03198,0.31300,0.01830,0.01810,0.02428,0.05490,0.02183,19.56000,1,0.460139,0.720908,-5.409423,0.226850,2.359973,0.226156 +phon_R01_S18_2,136.96900,166.60700,66.00400,0.00923,0.00007,0.00507,0.00463,0.01520,0.03111,0.30800,0.01638,0.01759,0.02603,0.04914,0.02659,19.97900,1,0.498133,0.729067,-5.324574,0.205660,2.291558,0.226247 +phon_R01_S18_3,143.53300,162.21500,65.80900,0.01101,0.00008,0.00647,0.00467,0.01941,0.05384,0.47800,0.03152,0.02422,0.03392,0.09455,0.04882,20.33800,1,0.513237,0.731444,-5.869750,0.151814,2.118496,0.185580 +phon_R01_S18_4,148.09000,162.82400,67.34300,0.00762,0.00005,0.00467,0.00354,0.01400,0.05428,0.49700,0.03357,0.02494,0.03635,0.10070,0.02431,21.71800,1,0.487407,0.727313,-6.261141,0.120956,2.137075,0.141958 +phon_R01_S18_5,142.72900,162.40800,65.47600,0.00831,0.00006,0.00469,0.00419,0.01407,0.03485,0.36500,0.01868,0.01906,0.02949,0.05605,0.02599,20.26400,1,0.489345,0.730387,-5.720868,0.158830,2.277927,0.180828 +phon_R01_S18_6,136.35800,176.59500,65.75000,0.00971,0.00007,0.00534,0.00478,0.01601,0.04978,0.48300,0.02749,0.02466,0.03736,0.08247,0.03361,18.57000,1,0.543299,0.733232,-5.207985,0.224852,2.642276,0.242981 +phon_R01_S19_1,120.08000,139.71000,111.20800,0.00405,0.00003,0.00180,0.00220,0.00540,0.01706,0.15200,0.00974,0.00925,0.01345,0.02921,0.00442,25.74200,1,0.495954,0.762959,-5.791820,0.329066,2.205024,0.188180 +phon_R01_S19_2,112.01400,588.51800,107.02400,0.00533,0.00005,0.00268,0.00329,0.00805,0.02448,0.22600,0.01373,0.01375,0.01956,0.04120,0.00623,24.17800,1,0.509127,0.789532,-5.389129,0.306636,1.928708,0.225461 +phon_R01_S19_3,110.79300,128.10100,107.31600,0.00494,0.00004,0.00260,0.00283,0.00780,0.02442,0.21600,0.01432,0.01325,0.01831,0.04295,0.00479,25.43800,1,0.437031,0.815908,-5.313360,0.201861,2.225815,0.244512 +phon_R01_S19_4,110.70700,122.61100,105.00700,0.00516,0.00005,0.00277,0.00289,0.00831,0.02215,0.20600,0.01284,0.01219,0.01715,0.03851,0.00472,25.19700,1,0.463514,0.807217,-5.477592,0.315074,1.862092,0.228624 +phon_R01_S19_5,112.87600,148.82600,106.98100,0.00500,0.00004,0.00270,0.00289,0.00810,0.03999,0.35000,0.02413,0.02231,0.02704,0.07238,0.00905,23.37000,1,0.489538,0.789977,-5.775966,0.341169,2.007923,0.193918 +phon_R01_S19_6,110.56800,125.39400,106.82100,0.00462,0.00004,0.00226,0.00280,0.00677,0.02199,0.19700,0.01284,0.01199,0.01636,0.03852,0.00420,25.82000,1,0.429484,0.816340,-5.391029,0.250572,1.777901,0.232744 +phon_R01_S20_1,95.38500,102.14500,90.26400,0.00608,0.00006,0.00331,0.00332,0.00994,0.03202,0.26300,0.01803,0.01886,0.02455,0.05408,0.01062,21.87500,1,0.644954,0.779612,-5.115212,0.249494,2.017753,0.260015 +phon_R01_S20_2,100.77000,115.69700,85.54500,0.01038,0.00010,0.00622,0.00576,0.01865,0.03121,0.36100,0.01773,0.01783,0.02139,0.05320,0.02220,19.20000,1,0.594387,0.790117,-4.913885,0.265699,2.398422,0.277948 +phon_R01_S20_3,96.10600,108.66400,84.51000,0.00694,0.00007,0.00389,0.00415,0.01168,0.04024,0.36400,0.02266,0.02451,0.02876,0.06799,0.01823,19.05500,1,0.544805,0.770466,-4.441519,0.155097,2.645959,0.327978 +phon_R01_S20_4,95.60500,107.71500,87.54900,0.00702,0.00007,0.00428,0.00371,0.01283,0.03156,0.29600,0.01792,0.01841,0.02190,0.05377,0.01825,19.65900,1,0.576084,0.778747,-5.132032,0.210458,2.232576,0.260633 +phon_R01_S20_5,100.96000,110.01900,95.62800,0.00606,0.00006,0.00351,0.00348,0.01053,0.02427,0.21600,0.01371,0.01421,0.01751,0.04114,0.01237,20.53600,1,0.554610,0.787896,-5.022288,0.146948,2.428306,0.264666 +phon_R01_S20_6,98.80400,102.30500,87.80400,0.00432,0.00004,0.00247,0.00258,0.00742,0.02223,0.20200,0.01277,0.01343,0.01552,0.03831,0.00882,22.24400,1,0.576644,0.772416,-6.025367,0.078202,2.053601,0.177275 +phon_R01_S21_1,176.85800,205.56000,75.34400,0.00747,0.00004,0.00418,0.00420,0.01254,0.04795,0.43500,0.02679,0.03022,0.03510,0.08037,0.05470,13.89300,1,0.556494,0.729586,-5.288912,0.343073,3.099301,0.242119 +phon_R01_S21_2,180.97800,200.12500,155.49500,0.00406,0.00002,0.00220,0.00244,0.00659,0.03852,0.33100,0.02107,0.02493,0.02877,0.06321,0.02782,16.17600,1,0.583574,0.727747,-5.657899,0.315903,3.098256,0.200423 +phon_R01_S21_3,178.22200,202.45000,141.04700,0.00321,0.00002,0.00163,0.00194,0.00488,0.03759,0.32700,0.02073,0.02415,0.02784,0.06219,0.03151,15.92400,1,0.598714,0.712199,-6.366916,0.335753,2.654271,0.144614 +phon_R01_S21_4,176.28100,227.38100,125.61000,0.00520,0.00003,0.00287,0.00312,0.00862,0.06511,0.58000,0.03671,0.04159,0.04683,0.11012,0.04824,13.92200,1,0.602874,0.740837,-5.515071,0.299549,3.136550,0.220968 +phon_R01_S21_5,173.89800,211.35000,74.67700,0.00448,0.00003,0.00237,0.00254,0.00710,0.06727,0.65000,0.03788,0.04254,0.04802,0.11363,0.04214,14.73900,1,0.599371,0.743937,-5.783272,0.299793,3.007096,0.194052 +phon_R01_S21_6,179.71100,225.93000,144.87800,0.00709,0.00004,0.00391,0.00419,0.01172,0.04313,0.44200,0.02297,0.02768,0.03455,0.06892,0.07223,11.86600,1,0.590951,0.745526,-4.379411,0.375531,3.671155,0.332086 +phon_R01_S21_7,166.60500,206.00800,78.03200,0.00742,0.00004,0.00387,0.00453,0.01161,0.06640,0.63400,0.03650,0.04282,0.05114,0.10949,0.08725,11.74400,1,0.653410,0.733165,-4.508984,0.389232,3.317586,0.301952 +phon_R01_S22_1,151.95500,163.33500,147.22600,0.00419,0.00003,0.00224,0.00227,0.00672,0.07959,0.77200,0.04421,0.04962,0.05690,0.13262,0.01658,19.66400,1,0.501037,0.714360,-6.411497,0.207156,2.344876,0.134120 +phon_R01_S22_2,148.27200,164.98900,142.29900,0.00459,0.00003,0.00250,0.00256,0.00750,0.04190,0.38300,0.02383,0.02521,0.03051,0.07150,0.01914,18.78000,1,0.454444,0.734504,-5.952058,0.087840,2.344336,0.186489 +phon_R01_S22_3,152.12500,161.46900,76.59600,0.00382,0.00003,0.00191,0.00226,0.00574,0.05925,0.63700,0.03341,0.03794,0.04398,0.10024,0.01211,20.96900,1,0.447456,0.697790,-6.152551,0.173520,2.080121,0.160809 +phon_R01_S22_4,157.82100,172.97500,68.40100,0.00358,0.00002,0.00196,0.00196,0.00587,0.03716,0.30700,0.02062,0.02321,0.02764,0.06185,0.00850,22.21900,1,0.502380,0.712170,-6.251425,0.188056,2.143851,0.160812 +phon_R01_S22_5,157.44700,163.26700,149.60500,0.00369,0.00002,0.00201,0.00197,0.00602,0.03272,0.28300,0.01813,0.01909,0.02571,0.05439,0.01018,21.69300,1,0.447285,0.705658,-6.247076,0.180528,2.344348,0.164916 +phon_R01_S22_6,159.11600,168.91300,144.81100,0.00342,0.00002,0.00178,0.00184,0.00535,0.03381,0.30700,0.01806,0.02024,0.02809,0.05417,0.00852,22.66300,1,0.366329,0.693429,-6.417440,0.194627,2.473239,0.151709 +phon_R01_S24_1,125.03600,143.94600,116.18700,0.01280,0.00010,0.00743,0.00623,0.02228,0.03886,0.34200,0.02135,0.02174,0.03088,0.06406,0.08151,15.33800,1,0.629574,0.714485,-4.020042,0.265315,2.671825,0.340623 +phon_R01_S24_2,125.79100,140.55700,96.20600,0.01378,0.00011,0.00826,0.00655,0.02478,0.04689,0.42200,0.02542,0.02630,0.03908,0.07625,0.10323,15.43300,1,0.571010,0.690892,-5.159169,0.202146,2.441612,0.260375 +phon_R01_S24_3,126.51200,141.75600,99.77000,0.01936,0.00015,0.01159,0.00990,0.03476,0.06734,0.65900,0.03611,0.03963,0.05783,0.10833,0.16744,12.43500,1,0.638545,0.674953,-3.760348,0.242861,2.634633,0.378483 +phon_R01_S24_4,125.64100,141.06800,116.34600,0.03316,0.00026,0.02144,0.01522,0.06433,0.09178,0.89100,0.05358,0.04791,0.06196,0.16074,0.31482,8.86700,1,0.671299,0.656846,-3.700544,0.260481,2.991063,0.370961 +phon_R01_S24_5,128.45100,150.44900,75.63200,0.01551,0.00012,0.00905,0.00909,0.02716,0.06170,0.58400,0.03223,0.03672,0.05174,0.09669,0.11843,15.06000,1,0.639808,0.643327,-4.202730,0.310163,2.638279,0.356881 +phon_R01_S24_6,139.22400,586.56700,66.15700,0.03011,0.00022,0.01854,0.01628,0.05563,0.09419,0.93000,0.05551,0.05005,0.06023,0.16654,0.25930,10.48900,1,0.596362,0.641418,-3.269487,0.270641,2.690917,0.444774 +phon_R01_S25_1,150.25800,154.60900,75.34900,0.00248,0.00002,0.00105,0.00136,0.00315,0.01131,0.10700,0.00522,0.00659,0.01009,0.01567,0.00495,26.75900,1,0.296888,0.722356,-6.878393,0.089267,2.004055,0.113942 +phon_R01_S25_2,154.00300,160.26700,128.62100,0.00183,0.00001,0.00076,0.00100,0.00229,0.01030,0.09400,0.00469,0.00582,0.00871,0.01406,0.00243,28.40900,1,0.263654,0.691483,-7.111576,0.144780,2.065477,0.093193 +phon_R01_S25_3,149.68900,160.36800,133.60800,0.00257,0.00002,0.00116,0.00134,0.00349,0.01346,0.12600,0.00660,0.00818,0.01059,0.01979,0.00578,27.42100,1,0.365488,0.719974,-6.997403,0.210279,1.994387,0.112878 +phon_R01_S25_4,155.07800,163.73600,144.14800,0.00168,0.00001,0.00068,0.00092,0.00204,0.01064,0.09700,0.00522,0.00632,0.00928,0.01567,0.00233,29.74600,1,0.334171,0.677930,-6.981201,0.184550,2.129924,0.106802 +phon_R01_S25_5,151.88400,157.76500,133.75100,0.00258,0.00002,0.00115,0.00122,0.00346,0.01450,0.13700,0.00633,0.00788,0.01267,0.01898,0.00659,26.83300,1,0.393563,0.700246,-6.600023,0.249172,2.499148,0.105306 +phon_R01_S25_6,151.98900,157.33900,132.85700,0.00174,0.00001,0.00075,0.00096,0.00225,0.01024,0.09300,0.00455,0.00576,0.00993,0.01364,0.00238,29.92800,1,0.311369,0.676066,-6.739151,0.160686,2.296873,0.115130 +phon_R01_S26_1,193.03000,208.90000,80.29700,0.00766,0.00004,0.00450,0.00389,0.01351,0.03044,0.27500,0.01771,0.01815,0.02084,0.05312,0.00947,21.93400,1,0.497554,0.740539,-5.845099,0.278679,2.608749,0.185668 +phon_R01_S26_2,200.71400,223.98200,89.68600,0.00621,0.00003,0.00371,0.00337,0.01112,0.02286,0.20700,0.01192,0.01439,0.01852,0.03576,0.00704,23.23900,1,0.436084,0.727863,-5.258320,0.256454,2.550961,0.232520 +phon_R01_S26_3,208.51900,220.31500,199.02000,0.00609,0.00003,0.00368,0.00339,0.01105,0.01761,0.15500,0.00952,0.01058,0.01307,0.02855,0.00830,22.40700,1,0.338097,0.712466,-6.471427,0.184378,2.502336,0.136390 +phon_R01_S26_4,204.66400,221.30000,189.62100,0.00841,0.00004,0.00502,0.00485,0.01506,0.02378,0.21000,0.01277,0.01483,0.01767,0.03831,0.01316,21.30500,1,0.498877,0.722085,-4.876336,0.212054,2.376749,0.268144 +phon_R01_S26_5,210.14100,232.70600,185.25800,0.00534,0.00003,0.00321,0.00280,0.00964,0.01680,0.14900,0.00861,0.01017,0.01301,0.02583,0.00620,23.67100,1,0.441097,0.722254,-5.963040,0.250283,2.489191,0.177807 +phon_R01_S26_6,206.32700,226.35500,92.02000,0.00495,0.00002,0.00302,0.00246,0.00905,0.02105,0.20900,0.01107,0.01284,0.01604,0.03320,0.01048,21.86400,1,0.331508,0.715121,-6.729713,0.181701,2.938114,0.115515 +phon_R01_S27_1,151.87200,492.89200,69.08500,0.00856,0.00006,0.00404,0.00385,0.01211,0.01843,0.23500,0.00796,0.00832,0.01271,0.02389,0.06051,23.69300,1,0.407701,0.662668,-4.673241,0.261549,2.702355,0.274407 +phon_R01_S27_2,158.21900,442.55700,71.94800,0.00476,0.00003,0.00214,0.00207,0.00642,0.01458,0.14800,0.00606,0.00747,0.01312,0.01818,0.01554,26.35600,1,0.450798,0.653823,-6.051233,0.273280,2.640798,0.170106 +phon_R01_S27_3,170.75600,450.24700,79.03200,0.00555,0.00003,0.00244,0.00261,0.00731,0.01725,0.17500,0.00757,0.00971,0.01652,0.02270,0.01802,25.69000,1,0.486738,0.676023,-4.597834,0.372114,2.975889,0.282780 +phon_R01_S27_4,178.28500,442.82400,82.06300,0.00462,0.00003,0.00157,0.00194,0.00472,0.01279,0.12900,0.00617,0.00744,0.01151,0.01851,0.00856,25.02000,1,0.470422,0.655239,-4.913137,0.393056,2.816781,0.251972 +phon_R01_S27_5,217.11600,233.48100,93.97800,0.00404,0.00002,0.00127,0.00128,0.00381,0.01299,0.12400,0.00679,0.00631,0.01075,0.02038,0.00681,24.58100,1,0.462516,0.582710,-5.517173,0.389295,2.925862,0.220657 +phon_R01_S27_6,128.94000,479.69700,88.25100,0.00581,0.00005,0.00241,0.00314,0.00723,0.02008,0.22100,0.00849,0.01117,0.01734,0.02548,0.02350,24.74300,1,0.487756,0.684130,-6.186128,0.279933,2.686240,0.152428 +phon_R01_S27_7,176.82400,215.29300,83.96100,0.00460,0.00003,0.00209,0.00221,0.00628,0.01169,0.11700,0.00534,0.00630,0.01104,0.01603,0.01161,27.16600,1,0.400088,0.656182,-4.711007,0.281618,2.655744,0.234809 +phon_R01_S31_1,138.19000,203.52200,83.34000,0.00704,0.00005,0.00406,0.00398,0.01218,0.04479,0.44100,0.02587,0.02567,0.03220,0.07761,0.01968,18.30500,1,0.538016,0.741480,-5.418787,0.160267,2.090438,0.229892 +phon_R01_S31_2,182.01800,197.17300,79.18700,0.00842,0.00005,0.00506,0.00449,0.01517,0.02503,0.23100,0.01372,0.01580,0.01931,0.04115,0.01813,18.78400,1,0.589956,0.732903,-5.445140,0.142466,2.174306,0.215558 +phon_R01_S31_3,156.23900,195.10700,79.82000,0.00694,0.00004,0.00403,0.00395,0.01209,0.02343,0.22400,0.01289,0.01420,0.01720,0.03867,0.02020,19.19600,1,0.618663,0.728421,-5.944191,0.143359,1.929715,0.181988 +phon_R01_S31_4,145.17400,198.10900,80.63700,0.00733,0.00005,0.00414,0.00422,0.01242,0.02362,0.23300,0.01235,0.01495,0.01944,0.03706,0.01874,18.85700,1,0.637518,0.735546,-5.594275,0.127950,1.765957,0.222716 +phon_R01_S31_5,138.14500,197.23800,81.11400,0.00544,0.00004,0.00294,0.00327,0.00883,0.02791,0.24600,0.01484,0.01805,0.02259,0.04451,0.01794,18.17800,1,0.623209,0.738245,-5.540351,0.087165,1.821297,0.214075 +phon_R01_S31_6,166.88800,198.96600,79.51200,0.00638,0.00004,0.00368,0.00351,0.01104,0.02857,0.25700,0.01547,0.01859,0.02301,0.04641,0.01796,18.33000,1,0.585169,0.736964,-5.825257,0.115697,1.996146,0.196535 +phon_R01_S32_1,119.03100,127.53300,109.21600,0.00440,0.00004,0.00214,0.00192,0.00641,0.01033,0.09800,0.00538,0.00570,0.00811,0.01614,0.01724,26.84200,1,0.457541,0.699787,-6.890021,0.152941,2.328513,0.112856 +phon_R01_S32_2,120.07800,126.63200,105.66700,0.00270,0.00002,0.00116,0.00135,0.00349,0.01022,0.09000,0.00476,0.00588,0.00903,0.01428,0.00487,26.36900,1,0.491345,0.718839,-5.892061,0.195976,2.108873,0.183572 +phon_R01_S32_3,120.28900,128.14300,100.20900,0.00492,0.00004,0.00269,0.00238,0.00808,0.01412,0.12500,0.00703,0.00820,0.01194,0.02110,0.01610,23.94900,1,0.467160,0.724045,-6.135296,0.203630,2.539724,0.169923 +phon_R01_S32_4,120.25600,125.30600,104.77300,0.00407,0.00003,0.00224,0.00205,0.00671,0.01516,0.13800,0.00721,0.00815,0.01310,0.02164,0.01015,26.01700,1,0.468621,0.735136,-6.112667,0.217013,2.527742,0.170633 +phon_R01_S32_5,119.05600,125.21300,86.79500,0.00346,0.00003,0.00169,0.00170,0.00508,0.01201,0.10600,0.00633,0.00701,0.00915,0.01898,0.00903,23.38900,1,0.470972,0.721308,-5.436135,0.254909,2.516320,0.232209 +phon_R01_S32_6,118.74700,123.72300,109.83600,0.00331,0.00003,0.00168,0.00171,0.00504,0.01043,0.09900,0.00490,0.00621,0.00903,0.01471,0.00504,25.61900,1,0.482296,0.723096,-6.448134,0.178713,2.034827,0.141422 +phon_R01_S33_1,106.51600,112.77700,93.10500,0.00589,0.00006,0.00291,0.00319,0.00873,0.04932,0.44100,0.02683,0.03112,0.03651,0.08050,0.03031,17.06000,1,0.637814,0.744064,-5.301321,0.320385,2.375138,0.243080 +phon_R01_S33_2,110.45300,127.61100,105.55400,0.00494,0.00004,0.00244,0.00315,0.00731,0.04128,0.37900,0.02229,0.02592,0.03316,0.06688,0.02529,17.70700,1,0.653427,0.706687,-5.333619,0.322044,2.631793,0.228319 +phon_R01_S33_3,113.40000,133.34400,107.81600,0.00451,0.00004,0.00219,0.00283,0.00658,0.04879,0.43100,0.02385,0.02973,0.04370,0.07154,0.02278,19.01300,1,0.647900,0.708144,-4.378916,0.300067,2.445502,0.259451 +phon_R01_S33_4,113.16600,130.27000,100.67300,0.00502,0.00004,0.00257,0.00312,0.00772,0.05279,0.47600,0.02896,0.03347,0.04134,0.08689,0.03690,16.74700,1,0.625362,0.708617,-4.654894,0.304107,2.672362,0.274387 +phon_R01_S33_5,112.23900,126.60900,104.09500,0.00472,0.00004,0.00238,0.00290,0.00715,0.05643,0.51700,0.03070,0.03530,0.04451,0.09211,0.02629,17.36600,1,0.640945,0.701404,-5.634576,0.306014,2.419253,0.209191 +phon_R01_S33_6,116.15000,131.73100,109.81500,0.00381,0.00003,0.00181,0.00232,0.00542,0.03026,0.26700,0.01514,0.01812,0.02770,0.04543,0.01827,18.80100,1,0.624811,0.696049,-5.866357,0.233070,2.445646,0.184985 +phon_R01_S34_1,170.36800,268.79600,79.54300,0.00571,0.00003,0.00232,0.00269,0.00696,0.03273,0.28100,0.01713,0.01964,0.02824,0.05139,0.02485,18.54000,1,0.677131,0.685057,-4.796845,0.397749,2.963799,0.277227 +phon_R01_S34_2,208.08300,253.79200,91.80200,0.00757,0.00004,0.00428,0.00428,0.01285,0.06725,0.57100,0.04016,0.04003,0.04464,0.12047,0.04238,15.64800,1,0.606344,0.665945,-5.410336,0.288917,2.665133,0.231723 +phon_R01_S34_3,198.45800,219.29000,148.69100,0.00376,0.00002,0.00182,0.00215,0.00546,0.03527,0.29700,0.02055,0.02076,0.02530,0.06165,0.01728,18.70200,1,0.606273,0.661735,-5.585259,0.310746,2.465528,0.209863 +phon_R01_S34_4,202.80500,231.50800,86.23200,0.00370,0.00002,0.00189,0.00211,0.00568,0.01997,0.18000,0.01117,0.01177,0.01506,0.03350,0.02010,18.68700,1,0.536102,0.632631,-5.898673,0.213353,2.470746,0.189032 +phon_R01_S34_5,202.54400,241.35000,164.16800,0.00254,0.00001,0.00100,0.00133,0.00301,0.02662,0.22800,0.01475,0.01558,0.02006,0.04426,0.01049,20.68000,1,0.497480,0.630409,-6.132663,0.220617,2.576563,0.159777 +phon_R01_S34_6,223.36100,263.87200,87.63800,0.00352,0.00002,0.00169,0.00188,0.00506,0.02536,0.22500,0.01379,0.01478,0.01909,0.04137,0.01493,20.36600,1,0.566849,0.574282,-5.456811,0.345238,2.840556,0.232861 +phon_R01_S35_1,169.77400,191.75900,151.45100,0.01568,0.00009,0.00863,0.00946,0.02589,0.08143,0.82100,0.03804,0.05426,0.08808,0.11411,0.07530,12.35900,1,0.561610,0.793509,-3.297668,0.414758,3.413649,0.457533 +phon_R01_S35_2,183.52000,216.81400,161.34000,0.01466,0.00008,0.00849,0.00819,0.02546,0.06050,0.61800,0.02865,0.04101,0.06359,0.08595,0.06057,14.36700,1,0.478024,0.768974,-4.276605,0.355736,3.142364,0.336085 +phon_R01_S35_3,188.62000,216.30200,165.98200,0.01719,0.00009,0.00996,0.01027,0.02987,0.07118,0.72200,0.03474,0.04580,0.06824,0.10422,0.08069,12.29800,1,0.552870,0.764036,-3.377325,0.335357,3.274865,0.418646 +phon_R01_S35_4,202.63200,565.74000,177.25800,0.01627,0.00008,0.00919,0.00963,0.02756,0.07170,0.83300,0.03515,0.04265,0.06460,0.10546,0.07889,14.98900,1,0.427627,0.775708,-4.892495,0.262281,2.910213,0.270173 +phon_R01_S35_5,186.69500,211.96100,149.44200,0.01872,0.00010,0.01075,0.01154,0.03225,0.05830,0.78400,0.02699,0.03714,0.06259,0.08096,0.10952,12.52900,1,0.507826,0.762726,-4.484303,0.340256,2.958815,0.301487 +phon_R01_S35_6,192.81800,224.42900,168.79300,0.03107,0.00016,0.01800,0.01958,0.05401,0.11908,1.30200,0.05647,0.07940,0.13778,0.16942,0.21713,8.44100,1,0.625866,0.768320,-2.434031,0.450493,3.079221,0.527367 +phon_R01_S35_7,198.11600,233.09900,174.47800,0.02714,0.00014,0.01568,0.01699,0.04705,0.08684,1.01800,0.04284,0.05556,0.08318,0.12851,0.16265,9.44900,1,0.584164,0.754449,-2.839756,0.356224,3.184027,0.454721 +phon_R01_S37_1,121.34500,139.64400,98.25000,0.00684,0.00006,0.00388,0.00332,0.01164,0.02534,0.24100,0.01340,0.01399,0.02056,0.04019,0.04179,21.52000,1,0.566867,0.670475,-4.865194,0.246404,2.013530,0.168581 +phon_R01_S37_2,119.10000,128.44200,88.83300,0.00692,0.00006,0.00393,0.00300,0.01179,0.02682,0.23600,0.01484,0.01405,0.02018,0.04451,0.04611,21.82400,1,0.651680,0.659333,-4.239028,0.175691,2.451130,0.247455 +phon_R01_S37_3,117.87000,127.34900,95.65400,0.00647,0.00005,0.00356,0.00300,0.01067,0.03087,0.27600,0.01659,0.01804,0.02402,0.04977,0.02631,22.43100,1,0.628300,0.652025,-3.583722,0.207914,2.439597,0.206256 +phon_R01_S37_4,122.33600,142.36900,94.79400,0.00727,0.00006,0.00415,0.00339,0.01246,0.02293,0.22300,0.01205,0.01289,0.01771,0.03615,0.03191,22.95300,1,0.611679,0.623731,-5.435100,0.230532,2.699645,0.220546 +phon_R01_S37_5,117.96300,134.20900,100.75700,0.01813,0.00015,0.01117,0.00718,0.03351,0.04912,0.43800,0.02610,0.02161,0.02916,0.07830,0.10748,19.07500,1,0.630547,0.646786,-3.444478,0.303214,2.964568,0.261305 +phon_R01_S37_6,126.14400,154.28400,97.54300,0.00975,0.00008,0.00593,0.00454,0.01778,0.02852,0.26600,0.01500,0.01581,0.02157,0.04499,0.03828,21.53400,1,0.635015,0.627337,-5.070096,0.280091,2.892300,0.249703 +phon_R01_S39_1,127.93000,138.75200,112.17300,0.00605,0.00005,0.00321,0.00318,0.00962,0.03235,0.33900,0.01360,0.01650,0.03105,0.04079,0.02663,19.65100,1,0.654945,0.675865,-5.498456,0.234196,2.103014,0.216638 +phon_R01_S39_2,114.23800,124.39300,77.02200,0.00581,0.00005,0.00299,0.00316,0.00896,0.04009,0.40600,0.01579,0.01994,0.04114,0.04736,0.02073,20.43700,1,0.653139,0.694571,-5.185987,0.259229,2.151121,0.244948 +phon_R01_S39_3,115.32200,135.73800,107.80200,0.00619,0.00005,0.00352,0.00329,0.01057,0.03273,0.32500,0.01644,0.01722,0.02931,0.04933,0.02810,19.38800,1,0.577802,0.684373,-5.283009,0.226528,2.442906,0.238281 +phon_R01_S39_4,114.55400,126.77800,91.12100,0.00651,0.00006,0.00366,0.00340,0.01097,0.03658,0.36900,0.01864,0.01940,0.03091,0.05592,0.02707,18.95400,1,0.685151,0.719576,-5.529833,0.242750,2.408689,0.220520 +phon_R01_S39_5,112.15000,131.66900,97.52700,0.00519,0.00005,0.00291,0.00284,0.00873,0.01756,0.15500,0.00967,0.01033,0.01363,0.02902,0.01435,21.21900,1,0.557045,0.673086,-5.617124,0.184896,1.871871,0.212386 +phon_R01_S39_6,102.27300,142.83000,85.90200,0.00907,0.00009,0.00493,0.00461,0.01480,0.02814,0.27200,0.01579,0.01553,0.02073,0.04736,0.03882,18.44700,1,0.671378,0.674562,-2.929379,0.396746,2.560422,0.367233 +phon_R01_S42_1,236.20000,244.66300,102.13700,0.00277,0.00001,0.00154,0.00153,0.00462,0.02448,0.21700,0.01410,0.01426,0.01621,0.04231,0.00620,24.07800,0,0.469928,0.628232,-6.816086,0.172270,2.235197,0.119652 +phon_R01_S42_2,237.32300,243.70900,229.25600,0.00303,0.00001,0.00173,0.00159,0.00519,0.01242,0.11600,0.00696,0.00747,0.00882,0.02089,0.00533,24.67900,0,0.384868,0.626710,-7.018057,0.176316,1.852402,0.091604 +phon_R01_S42_3,260.10500,264.91900,237.30300,0.00339,0.00001,0.00205,0.00186,0.00616,0.02030,0.19700,0.01186,0.01230,0.01367,0.03557,0.00910,21.08300,0,0.440988,0.628058,-7.517934,0.160414,1.881767,0.075587 +phon_R01_S42_4,197.56900,217.62700,90.79400,0.00803,0.00004,0.00490,0.00448,0.01470,0.02177,0.18900,0.01279,0.01272,0.01439,0.03836,0.01337,19.26900,0,0.372222,0.725216,-5.736781,0.164529,2.882450,0.202879 +phon_R01_S42_5,240.30100,245.13500,219.78300,0.00517,0.00002,0.00316,0.00283,0.00949,0.02018,0.21200,0.01176,0.01191,0.01344,0.03529,0.00965,21.02000,0,0.371837,0.646167,-7.169701,0.073298,2.266432,0.100881 +phon_R01_S42_6,244.99000,272.21000,239.17000,0.00451,0.00002,0.00279,0.00237,0.00837,0.01897,0.18100,0.01084,0.01121,0.01255,0.03253,0.01049,21.52800,0,0.522812,0.646818,-7.304500,0.171088,2.095237,0.096220 +phon_R01_S43_1,112.54700,133.37400,105.71500,0.00355,0.00003,0.00166,0.00190,0.00499,0.01358,0.12900,0.00664,0.00786,0.01140,0.01992,0.00435,26.43600,0,0.413295,0.756700,-6.323531,0.218885,2.193412,0.160376 +phon_R01_S43_2,110.73900,113.59700,100.13900,0.00356,0.00003,0.00170,0.00200,0.00510,0.01484,0.13300,0.00754,0.00950,0.01285,0.02261,0.00430,26.55000,0,0.369090,0.776158,-6.085567,0.192375,1.889002,0.174152 +phon_R01_S43_3,113.71500,116.44300,96.91300,0.00349,0.00003,0.00171,0.00203,0.00514,0.01472,0.13300,0.00748,0.00905,0.01148,0.02245,0.00478,26.54700,0,0.380253,0.766700,-5.943501,0.192150,1.852542,0.179677 +phon_R01_S43_4,117.00400,144.46600,99.92300,0.00353,0.00003,0.00176,0.00218,0.00528,0.01657,0.14500,0.00881,0.01062,0.01318,0.02643,0.00590,25.44500,0,0.387482,0.756482,-6.012559,0.229298,1.872946,0.163118 +phon_R01_S43_5,115.38000,123.10900,108.63400,0.00332,0.00003,0.00160,0.00199,0.00480,0.01503,0.13700,0.00812,0.00933,0.01133,0.02436,0.00401,26.00500,0,0.405991,0.761255,-5.966779,0.197938,1.974857,0.184067 +phon_R01_S43_6,116.38800,129.03800,108.97000,0.00346,0.00003,0.00169,0.00213,0.00507,0.01725,0.15500,0.00874,0.01021,0.01331,0.02623,0.00415,26.14300,0,0.361232,0.763242,-6.016891,0.109256,2.004719,0.174429 +phon_R01_S44_1,151.73700,190.20400,129.85900,0.00314,0.00002,0.00135,0.00162,0.00406,0.01469,0.13200,0.00728,0.00886,0.01230,0.02184,0.00570,24.15100,1,0.396610,0.745957,-6.486822,0.197919,2.449763,0.132703 +phon_R01_S44_2,148.79000,158.35900,138.99000,0.00309,0.00002,0.00152,0.00186,0.00456,0.01574,0.14200,0.00839,0.00956,0.01309,0.02518,0.00488,24.41200,1,0.402591,0.762508,-6.311987,0.182459,2.251553,0.160306 +phon_R01_S44_3,148.14300,155.98200,135.04100,0.00392,0.00003,0.00204,0.00231,0.00612,0.01450,0.13100,0.00725,0.00876,0.01263,0.02175,0.00540,23.68300,1,0.398499,0.778349,-5.711205,0.240875,2.845109,0.192730 +phon_R01_S44_4,150.44000,163.44100,144.73600,0.00396,0.00003,0.00206,0.00233,0.00619,0.02551,0.23700,0.01321,0.01574,0.02148,0.03964,0.00611,23.13300,1,0.352396,0.759320,-6.261446,0.183218,2.264226,0.144105 +phon_R01_S44_5,148.46200,161.07800,141.99800,0.00397,0.00003,0.00202,0.00235,0.00605,0.01831,0.16300,0.00950,0.01103,0.01559,0.02849,0.00639,22.86600,1,0.408598,0.768845,-5.704053,0.216204,2.679185,0.197710 +phon_R01_S44_6,149.81800,163.41700,144.78600,0.00336,0.00002,0.00174,0.00198,0.00521,0.02145,0.19800,0.01155,0.01341,0.01666,0.03464,0.00595,23.00800,1,0.329577,0.757180,-6.277170,0.109397,2.209021,0.156368 +phon_R01_S49_1,117.22600,123.92500,106.65600,0.00417,0.00004,0.00186,0.00270,0.00558,0.01909,0.17100,0.00864,0.01223,0.01949,0.02592,0.00955,23.07900,0,0.603515,0.669565,-5.619070,0.191576,2.027228,0.215724 +phon_R01_S49_2,116.84800,217.55200,99.50300,0.00531,0.00005,0.00260,0.00346,0.00780,0.01795,0.16300,0.00810,0.01144,0.01756,0.02429,0.01179,22.08500,0,0.663842,0.656516,-5.198864,0.206768,2.120412,0.252404 +phon_R01_S49_3,116.28600,177.29100,96.98300,0.00314,0.00003,0.00134,0.00192,0.00403,0.01564,0.13600,0.00667,0.00990,0.01691,0.02001,0.00737,24.19900,0,0.598515,0.654331,-5.592584,0.133917,2.058658,0.214346 +phon_R01_S49_4,116.55600,592.03000,86.22800,0.00496,0.00004,0.00254,0.00263,0.00762,0.01660,0.15400,0.00820,0.00972,0.01491,0.02460,0.01397,23.95800,0,0.566424,0.667654,-6.431119,0.153310,2.161936,0.120605 +phon_R01_S49_5,116.34200,581.28900,94.24600,0.00267,0.00002,0.00115,0.00148,0.00345,0.01300,0.11700,0.00631,0.00789,0.01144,0.01892,0.00680,25.02300,0,0.528485,0.663884,-6.359018,0.116636,2.152083,0.138868 +phon_R01_S49_6,114.56300,119.16700,86.64700,0.00327,0.00003,0.00146,0.00184,0.00439,0.01185,0.10600,0.00557,0.00721,0.01095,0.01672,0.00703,24.77500,0,0.555303,0.659132,-6.710219,0.149694,1.913990,0.121777 +phon_R01_S50_1,201.77400,262.70700,78.22800,0.00694,0.00003,0.00412,0.00396,0.01235,0.02574,0.25500,0.01454,0.01582,0.01758,0.04363,0.04441,19.36800,0,0.508479,0.683761,-6.934474,0.159890,2.316346,0.112838 +phon_R01_S50_2,174.18800,230.97800,94.26100,0.00459,0.00003,0.00263,0.00259,0.00790,0.04087,0.40500,0.02336,0.02498,0.02745,0.07008,0.02764,19.51700,0,0.448439,0.657899,-6.538586,0.121952,2.657476,0.133050 +phon_R01_S50_3,209.51600,253.01700,89.48800,0.00564,0.00003,0.00331,0.00292,0.00994,0.02751,0.26300,0.01604,0.01657,0.01879,0.04812,0.01810,19.14700,0,0.431674,0.683244,-6.195325,0.129303,2.784312,0.168895 +phon_R01_S50_4,174.68800,240.00500,74.28700,0.01360,0.00008,0.00624,0.00564,0.01873,0.02308,0.25600,0.01268,0.01365,0.01667,0.03804,0.10715,17.88300,0,0.407567,0.655683,-6.787197,0.158453,2.679772,0.131728 +phon_R01_S50_5,198.76400,396.96100,74.90400,0.00740,0.00004,0.00370,0.00390,0.01109,0.02296,0.24100,0.01265,0.01321,0.01588,0.03794,0.07223,19.02000,0,0.451221,0.643956,-6.744577,0.207454,2.138608,0.123306 +phon_R01_S50_6,214.28900,260.27700,77.97300,0.00567,0.00003,0.00295,0.00317,0.00885,0.01884,0.19000,0.01026,0.01161,0.01373,0.03078,0.04398,21.20900,0,0.462803,0.664357,-5.724056,0.190667,2.555477,0.148569 \ No newline at end of file Added: trunk/test/parkinsons/parkinsons.owl =================================================================== --- trunk/test/parkinsons/parkinsons.owl (rev 0) +++ trunk/test/parkinsons/parkinsons.owl 2010-09-14 07:50:11 UTC (rev 2303) @@ -0,0 +1,6102 @@ +<?xml version="1.0"?> +<rdf:RDF xmlns="http://dl-learner.org/parkinsons#" + xml:base="http://dl-learner.org/parkinsons" + 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#" + xmlns:parkinsons="http://dl-learner.org/parkinsons#"> + <owl:Ontology rdf:about="http://dl-learner.org/parkinsons"/> + + + + <!-- + /////////////////////////////////////////////////////////////////////////////////////// + // + // Data properties + // + /////////////////////////////////////////////////////////////////////////////////////// + --> + + + + + <!-- http://dl-learner.org/parkinsons#hasD2 --> + + <owl:DatatypeProperty rdf:about="http://dl-learner.org/parkinsons#hasD2"> + <rdfs:domain rdf:resource="http://dl-learner.org/parkinsons#Patient"/> + <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#double"/> + </owl:DatatypeProperty> + + + + <!-- http://dl-learner.org/parkinsons#hasDFA --> + + <owl:DatatypeProperty rdf:about="http://dl-learner.org/parkinsons#hasDFA"> + <rdfs:domain rdf:resource="http://dl-learner.org/parkinsons#Patient"/> + <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#double"/> + </owl:DatatypeProperty> + + + + <!-- http://dl-learner.org/parkinsons#hasHNR --> + + <owl:DatatypeProperty rdf:about="http://dl-learner.org/parkinsons#hasHNR"> + <rdfs:domain rdf:resource="http://dl-learner.org/parkinsons#Patient"/> + <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#double"/> + </owl:DatatypeProperty> + + + + <!-- http://dl-learner.org/parkinsons#hasJitterDDP --> + + <owl:DatatypeProperty rdf:about="http://dl-learner.org/parkinsons#hasJitterDDP"> + <rdfs:domain rdf:resource="http://dl-learner.org/parkinsons#Patient"/> + <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#double"/> + </owl:DatatypeProperty> + + + + <!-- http://dl-learner.org/parkinsons#hasMDVPAPQ --> + + <owl:DatatypeProperty rdf:about="http://dl-learner.org/parkinsons#hasMDVPAPQ"> + <rdfs:domain rdf:resource="http://dl-learner.org/parkinsons#Patient"/> + <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#double"/> + </owl:DatatypeProperty> + + + + <!-- http://dl-learner.org/parkinsons#hasMDVPFhi --> + + <owl:DatatypeProperty rdf:about="http://dl-learner.org/parkinsons#hasMDVPFhi"> + <rdfs:domain rdf:resource="http://dl-learner.org/parkinsons#Patient"/> + <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#double"/> + </owl:DatatypeProperty> + + + + <!-- http://dl-learner.org/parkinsons#hasMDVPFlo --> + + <owl:DatatypeProperty rdf:about="http://dl-learner.org/parkin... [truncated message content] |
From: <ku...@us...> - 2010-09-17 09:24:27
|
Revision: 2310 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=2310&view=rev Author: kurzum Date: 2010-09-17 09:24:18 +0000 (Fri, 17 Sep 2010) Log Message: ----------- deleted premaven version Removed Paths: ------------- trunk/INSTALL trunk/LICENSE trunk/README trunk/bin/ trunk/build.xml trunk/doc/ trunk/examples/ trunk/javadoc.css trunk/lib/ trunk/maven.todo trunk/pom.xml trunk/pom_not_working.xml trunk/resources/ Deleted: trunk/INSTALL =================================================================== --- trunk/INSTALL 2010-09-17 09:17:53 UTC (rev 2309) +++ trunk/INSTALL 2010-09-17 09:24:18 UTC (rev 2310) @@ -1,46 +0,0 @@ -Requirements -============ -Java 6 is required. (All other libraries are included in the release.) - -Installation -============ -No further installation is necessary. Just download and extract DL-Learner. - -Running Instructions -==================== - -Linux (and other systems) - -Make sure the file "dllearner" is executable and run it on the command line -followed by the name of the file to process, e.g. -"./dllearner examples/father.conf". - -Windows: - -Run "dllearner.bat" followed by the name of the file to process, e.g. -"dllearner.bat examples/father.conf". - -As a convenience method, you can also run "quickstart". The script will present a -numbered list of all examples found in the examples folder, where you can choose -an examples. You can also call "gui" and load one of the conf files, change try -differnt configuration options etc. - -Note: You can also use the "java" command to run the program directly. Have a look at -"dllearner" and "dllearner.bat" to see what the command looks like. - -Web-Service -=========== - -If you want to run DL-Learner as a Web Service, you can run the scripts "ws" or -"ws.bat". They create an own local webserver running DL-Learner. Some simple -PHP examples for using the web service are available at our SVN Repository: -http://dl-learner.svn.sourceforge.net/viewvc/dl-learner/trunk/src/php-examples/ - - -Developers -==================== - -An example script on how to use DL-Learner is available in Java at -src/dl-learner/org/dllearner/scripts/NewSample.java. Please drop us a note -(mail: le...@in...) if you plan to use DL-Learner or -have further questions. Deleted: trunk/LICENSE =================================================================== --- trunk/LICENSE 2010-09-17 09:17:53 UTC (rev 2309) +++ trunk/LICENSE 2010-09-17 09:24:18 UTC (rev 2310) @@ -1,674 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - <one line to give the program's name and a brief idea of what it does.> - Copyright (C) <year> <name of author> - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - <program> Copyright (C) <year> <name of author> - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -<http://www.gnu.org/licenses/>. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -<http://www.gnu.org/philosophy/why-not-lgpl.html>. Deleted: trunk/README =================================================================== --- trunk/README 2010-09-17 09:17:53 UTC (rev 2309) +++ trunk/README 2010-09-17 09:24:18 UTC (rev 2310) @@ -1,28 +0,0 @@ -README -====== - -DL-Learner is a tool to learn Description Logic concepts from positive and -negative examples. Equivalently, it can learn OWL classes given objects as -positive and negative instances. - -Homepage: http://dl-learner.org -Sourceforge.net Project Page: http://sourceforge.net/projects/dl-learner/ -Bugs & Feature Requests: http://sourceforge.net/tracker/?group_id=203619 -Mailing Lists: http://sourceforge.net/mail/?group_id=203619 -Latest Release: http://sourceforge.net/project/showfiles.php?group_id=203619 - -Documentation for DL-Learner (e.g. various configuration options) can be found -in the "doc" directory and at http://dl-learner.org. We recommend to read -doc/manual.pdf to get started. - -DL-Learner is Open Source and licensed under the GNU General Public License. -(Copyright (c) 2007-2010, Jens Lehmann). - -DL-Learner uses several other libraries. An incomplete list is as follows: - * OWL API (licensed under LGPL) - * Pellet (licensed under AGPL 3 , (c) Clark & Parsia LLC) - * FaCT++ (licensed under LGPL, (c) The Victoria University of Manchester) - * HermiT (licensed under LGPL) - * Jena (Jena license, (c) Copyright Hewlett-Packard) - * Protege (licensed under MPL) - \ No newline at end of file Deleted: trunk/build.xml =================================================================== --- trunk/build.xml 2010-09-17 09:17:53 UTC (rev 2309) +++ trunk/build.xml 2010-09-17 09:24:18 UTC (rev 2310) @@ -1,627 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<project basedir="." default="build" name="dl_learner"> - - <!-- directory settings --> - <property name="lib_dir" value="lib" /> - <property name="source_dir" value="src/dl-learner" /> - <property name="class_dir" value="classes" /> - <property name="ontowiki_dir" value="${user.home}/workspace/ontowiki/ontowiki/src/extensions/components/dllearner/dllearner" /> - - <property name="php_client_dir" value="src/php-client" /> - <tstamp> - <format property="today" pattern="yyyy-MM-dd" locale="en" /> - </tstamp> - <property name="version_dir" value="dllearner-${today}" /> - <property name="release_tmp_dir" value="release/${version_dir}" /> - <property name="release_php_client_tmp_dir" value="release/php-client-${today}" /> - <property name="release_ore_dir" value="release/ore-${today}" /> - <property name="version_ore_dir" value="ore-${today}" /> - - <property environment="env"/> - <property name = "protege.home" location="${env.PROTEGE_HOME}"/> - <property name = "protege.plugins" location="${protege.home}/plugins"/> - - <!-- other settings --> - <!-- maximum amount of allocated memory in startup scripts --> - <property name ="max_memory" value="1024" /> - - <!-- set up classpath --> - <path id="classpath"> - <pathelement location="."/> - <fileset dir="${lib_dir}"> - <include name="**/*.jar"/> - </fileset> - </path> - - <!-- build target --> - <target name="full_release" depends="manual,javadoc,build" description="full release, javadoc, scripts"> - </target> - - <!-- build target --> - <target name="jar" description="makes dllearner.jar"> - <!-- compile project into temporary directory --> - <mkdir dir="classes_tmp"/> - <javac destdir="classes_tmp" target="1.6"> - <src path="${source_dir}"/> - <classpath refid="classpath"/> - </javac> - - <jar jarfile="dllearner.jar"> - <fileset dir="classes_tmp"/> - </jar> - <delete dir="classes_tmp"/> - </target> - - - <!-- build target --> - <target name="local" depends="createScripts" description="fast build including scripts, - no javadoc, no tar, just executables in local, can be used on a server"> - - - <!-- compile project into temporary directory --> - <mkdir dir="classes_tmp"/> - <javac destdir="classes_tmp" target="1.5" debug="on"> - <src path="${source_dir}"/> - <classpath refid="classpath"/> - </javac> - <copy toDir="classes_tmp" > - <fileset dir="${source_dir}" includes="**/*.gif,**/*.png,**/*.html,**/*.ini"/> - </copy> - - <mkdir dir="${release_tmp_dir}"/> - <mkdir dir="${release_tmp_dir}/lib/"/> - <jar jarfile="${release_tmp_dir}/lib/dllearner.jar"> - <fileset dir="classes_tmp"/> - </jar> - <delete dir="classes_tmp"/> - - <!-- copy all other libraries --> - <copy toDir="${release_tmp_dir}/lib"> - <fileset dir="${lib_dir}" /> - </copy> - - <!-- copy binary files and examples --> - <copy toDir="${release_tmp_dir}/examples"> - <fileset dir="examples"/> - </copy> - <copy toDir="${release_tmp_dir}"> - <fileset dir="bin"/> - </copy> - - <!-- create file containing the build info --> - <echo file="${release_tmp_dir}/build.txt" append="false">DL-Learner Build ${today}</echo> - - <!-- create empty log directory for release --> - <mkdir dir="${release_tmp_dir}/log" /> - <mkdir dir="${release_tmp_dir}/cache" /> - - <mkdir dir="local" /> - <move toDir="local"> - <fileset dir="${release_tmp_dir}"/> - </move> - <delete dir="${release_tmp_dir}" /> - <delete dir="release" /> - - </target> - - - <!-- build target --> - <target name="build" depends="createScripts,manual" description="fast build including scripts, no javadoc"> - - <!-- write current build date into Info.java --> - <echo file="${source_dir}/org/dllearner/Info.java" append="false"> -// File is updated automatically when a new version is created -package org.dllearner; - -public class Info { - public static final String build = "${today}"; -} - </echo> - - <!-- compile project into temporary directory --> - <mkdir dir="classes_tmp"/> - <javac destdir="classes_tmp" target="1.5" debug="on"> - <src path="${source_dir}"/> - <classpath refid="classpath"/> - </javac> - <!-- we also need to copy some images, which should be - included in dllearner.jar --> - <copy toDir="classes_tmp" > - <fileset dir="${source_dir}" includes="**/*.gif,**/*.png,**/*.html,**/*.ini"/> - </copy> - <mkdir dir="${release_tmp_dir}"/> - <mkdir dir="${release_tmp_dir}/lib/"/> - <jar jarfile="${release_tmp_dir}/lib/dllearner.jar"> - <fileset dir="classes_tmp"/> - </jar> - <delete dir="classes_tmp"/> - - <!-- copy all other libraries --> - <copy toDir="${release_tmp_dir}/lib"> - <fileset dir="${lib_dir}" /> - </copy> - - <!-- copy binary files and examples --> - <copy toDir="${release_tmp_dir}/examples"> - <fileset dir="examples"/> - </copy> - <copy toDir="${release_tmp_dir}"> - <fileset dir="bin"/> - </copy> - - <!-- create file containing the build info --> - <echo file="${release_tmp_dir}/build.txt" append="false">DL-Learner Build ${today}</echo> - - <!-- create empty log directory for release --> - <mkdir dir="${release_tmp_dir}/log" /> - - <!-- copy documentation excluding developer documentation --> - <copy toDir="${release_tmp_dir}/doc"> - <fileset dir="doc"> - <!-- <exclude name="eclipse/" /> - <exclude name="javadoc/" /> --> - <exclude name="manual/" /> - </fileset> - </copy> - - <!-- copy special files (INSTALL, README) --> - <copy file="INSTALL" toDir="${release_tmp_dir}" /> - <copy file="README" toDir="${release_tmp_dir}" /> - <copy file="LICENSE" toDir="${release_tmp_dir}" /> - - <!-- create tar.gz files (allows storing whether a file is executable) --> - <tar longfile="gnu" destfile="dllearner-nosource-${today}.tar.gz" compression="gzip"> - <!-- extra set for executable files --> - <tarfileset dir="release/" mode="755"> - <include name="${version_dir}/dllearner" /> - <include name="${version_dir}/quickstart" /> - <include name="${version_dir}/ws" /> - <include name="${version_dir}/gui" /> - </tarfileset> - <tarfileset dir="release/"> - <exclude name="${version_dir}/dllearner"/> - <exclude name="${version_dir}/quickstart" /> - <exclude name="${version_dir}/ws" /> - <exclude name="${version_dir}/gui" /> - </tarfileset> - </tar> - - <!-- copy source code --> - <mkdir dir="${release_tmp_dir}/src/"/> - <copy toDir="${release_tmp_dir}/src/"> - <fileset dir="${source_dir}" includes="**/*.java,**/*.html,**/*.gif,**/*.jjt,build.xml"/> - </copy> - - <!-- copy manual --> - <copy toFile="${release_tmp_dir}/doc/manual.pdf" file="doc/manual/manual.pdf" /> - - <!-- create copy developer documentation --> - <!-- - <copy todir="${release_tmp_dir}/doc/eclipse/"> - <fileset dir="doc/eclipse/"/> - </copy> - <copy todir="${release_tmp_dir}/doc/javadoc/"> - <fileset dir="doc/javadoc/"/> - </copy> - --> - - <!-- create backup (= standard build + source code + developer documentation) --> - <tar longfile="gnu" destfile="dllearner-${today}.tar.gz" compression="gzip"> - <tarfileset dir="release/" mode="755"> - <include name="${version_dir}/dllearner" /> - <include name="${version_dir}/quickstart" /> - <include name="${version_dir}/ws" /> - <include name="${version_dir}/gui" /> - </tarfileset> - <tarfileset dir="release/"> - <exclude name="${version_dir}/dllearner"/> - <exclude name="${version_dir}/quickstart" /> - <exclude name="${version_dir}/ws" /> - <exclude name="${version_dir}/gui" /> - </tarfileset> - </tar> - <delete dir="release"/> - </target> - - <!-- build PHP client release --> - <target name="php_client"> - <mkdir dir="${release_php_client_tmp_dir}" /> - - <!-- copy PHP-client to a temporary directory exluding some files --> - <copy toDir="${release_php_client_tmp_dir}"> - <fileset dir="${php_client_dir}"> - <exclude name="main.wsdl" /> - <exclude name="*.xsd" /> - <!-- <exclude name="save/" /> --> - </fileset> - </copy> - - <!-- copy over all owl ontologies in examples directory --> - <copy toDir="${release_php_client_tmp_dir}/ontologies/" flatten="true"> - <fileset dir="examples" includes="**/*.owl" /> - </copy> - - <!-- create release --> - <tar destfile="php-client-${today}.tar.gz" compression="gzip"> - <tarfileset dir="release" /> - </tar> - - <delete dir="release" /> - </target> - - <!-- generate JAXWS classes --> - <target name="wsgen" > - <path id="wsgen"> - <path refid="classpath"/> - <path location="${class_dir}"/> - </path> - <pathconvert refid="wsgen" property="wsgenpath"/> - <exec dir="${source_dir}" executable="wsgen"> - <arg value="-keep"/> - <arg value="-verbose"/> - <arg value="-cp"/> - <arg value="${wsgenpath}"/> - <arg value="org.dllearner.server.DLLearnerWS"/> - </exec> - </target> - - <!-- generate startup scripts --> - <target name="createScripts" > - <path id="addjar"> - <path refid="classpath"/> - <pathelement location="${lib_dir}/dllearner.jar"/> - </path> - <path id="removeprefix"> - <pathelement location="."/> - </path> - <pathconvert refid="removeprefix" property="removeprefix" /> - - <pathconvert refid="addjar" property="pathStringUnix" targetos="unix"> - <map from="${removeprefix}" to="."/> - </pathconvert> - <pathconvert refid="addjar" property="pathStringWin" targetos="windows"> - <map from="${removeprefix}" to="."/> - </pathconvert> - - <echo file="bin/quickstart.bat" message="java -Xmx${max_memory}m -Djava.library.path=lib/fact/64bit/ -cp ${pathStringWin} org.dllearner.cli.QuickStart"/> - <echo file="bin/dllearner.bat" message="java -Xmx${max_memory}m -Djava.library.path=lib/fact/64bit/ -cp ${pathStringWin} org.dllearner.cli.Start %*"/> - <echo file="bin/ws.bat" message="java -Xmx${max_memory}m -Djava.library.path=lib/fact/64bit/ -cp ${pathStringWin} org.dllearner.server.DLLearnerWSStart %*"/> - <echo file="bin/gui.bat" message="java -Xmx${max_memory}m -Djava.library.path=lib/fact/64bit/ -cp ${pathStringWin} org.dllearner.gui.StartGUI %*"/> - <echo file="bin/quickstart" message="#!/bin/bash${line.separator}java -Xmx${max_memory}m -Djava.library.path=lib/fact/64bit/ -cp ${pathStringUnix} org.dllearner.cli.QuickStart"/> - <echo file="bin/dllearner" message="#!/bin/bash${line.separator}java -Xmx${max_memory}m -Djava.library.path=lib/fact/64bit/ -cp ${pathStringUnix} org.dllearner.cli.Start $@"/> - <echo file="bin/ws" message="#!/bin/bash${line.separator}java -Xmx${max_memory}m -Djava.library.path=lib/fact/64bit/ -cp ${pathStringUnix} org.dllearner.server.DLLearnerWSStart $@"/> - <echo file="bin/gui" message="#!/bin/bash${line.separator}java -Xmx${max_memory}m -Djava.library.path=lib/fact/64bit/ -cp ${pathStringUnix} org.dllearner.gui.StartGUI $@"/> - </target> - - <!-- generate manual --> - <taskdef name="latex" classname="de.dokutransdata.antlatex.LaTeX" - classpath="lib/ant_latex.jar"/> - <target name="manual"> - - <!-- automatically adds correct build number in manual --> - <replaceregexp file="doc/manual/manual.tex" - match="DL-Learner (.*) command line interface" - replace="DL-Learner ${today} command line interface" - byline="true"/> - - <!-- run pdflatex and bibtex over doc/manual/ --> - <latex - latexfile="manual.tex" - verbose="off" - clean="on" - pdftex="on" - workingDir="doc/manual"> - <bibtex - run="on" - workingDir="doc/manual/" - /> - </latex> - </target> - - <!-- generate Javadoc --> - <target name="javadoc"> - <pathconvert refid="classpath" property="jdocclasspath"/> - <javadoc access="public" - author="true" - classpath="${jdocclasspath}" - destdir="doc/javadoc" - doctitle="DL-Learner Javadoc" - nodeprecated="false" - nodeprecatedlist="false" - noindex="false" - nonavbar="false" - notree="false" - overview="src/dl-learner/overview.html" - source="1.6" - sourcepath="src/dl-learner" - splitindex="true" - stylesheetfile="javadoc.css" - use="true" - version="true" - linksource="true" - bottom="<img style='float:right' src='http://sflogo.sourceforge.net/sflogo.php?group_id=203619&type=1' width='88' height='31' border='0' alt='SourceForge.net Logo' /> DL-Learner is licenced under the terms of the GNU General Public License.<br />Copyright &#169; 2007-2008 Jens Lehmann" - Encoding="ISO-8859-1" - windowtitle="DL-Learner Javadoc"> - <link href="http://java.sun.com/javase/6/docs/api/"/> - </javadoc> - </target> - - <!-- copy all necessary files in a folder to build the jar or a release bundle --> - <target name="buildProtegePlugin"> - <property name="source" value="src/dl-learner/org/dllearner/tools/protege" /> - <property name="temp" value="${source}/temp" /> - <property name="release" value="${source}/release" /> - - <mkdir dir="${temp}" /> - <mkdir dir="${release}" /> - <mkdir dir="${temp}/META-INF" /> - <mkdir dir="${temp}/lib" /> - <mkdir dir="${temp}/lib/jena" /> - <mkdir dir="${temp}/lib/ore-tool" /> - <copy toDir="${temp}/META-INF" > - <fileset dir="${source}/META-INF" includes="MANIFEST.MF," /> - </copy> - <copy toDir="${temp}/lib/ore-tool" > - <fileset dir="${lib_dir}/ore-tool" includes="swingx-1.6.jar" /> - </copy> - <copy toDir="${temp}/lib" > - <fileset dir="${lib_dir}" includes="junit-4.4.jar,jamon-2.7.jar" /> - </copy> - <copy toDir="${temp}/lib/jena" > - <fileset dir="${lib_dir}/jena" includes="commons-logging-1.1.1.jar,json.jar" /> - </copy> - <copy toDir="${temp}" > - <fileset dir="${class_dir}" /> - </copy> - <copy toDir="${temp}" > - <fileset dir="${source}/META-INF" includes="**/*.xml," excludes="build.xml" /> - </copy> - <javac srcdir="${source}" - destdir="${temp}" - debug="on" - target="1.5"> - <classpath refid="classpath"/> - </javac> - <jar destfile="${release}/DL-Learner-protege-plugin.jar" manifest="${temp}/META-INF/MANIFEST.MF"> - <fileset dir="${temp}" /> - </jar> - - </target> - - <!--Copy the DL-Learner-Protege-plugin jar file into the Protege plugin folder --> - <target name="copyProtegePluginToProtegeDir" depends="buildProtegePlugin"> - <copy toDir="${protege.plugins}" > - <fileset dir="${release}" includes="DL-Learner-protege-plugin.jar" /> - </copy> - <delete dir="${temp}" /> - <delete dir="${release}" /> - </target> - - <!--Builds the Releasebundle --> - <target name="buildProtegePluginRelease" depends="buildProtegePlugin"> - <copy file="LICENSE" toDir="${release}" /> - <copy toDir="${release}" > - <fileset dir="${source}" includes="INSTALL,README" excludes="**/*.java,**/*.gif" /> - </copy> - <property name="ProtRelease" value="releaseProtege/" /> - <mkdir dir="${ProtRelease}" /> - <zip destfile="${ProtRelease}/DL-Learner-plugin.zip" - basedir="${release}" - /> - <delete dir="${temp}" /> - <delete dir="${release}" /> - </target> - - <!--Builds the Ontowiki DL-Learner Jar --> - - <target name="buildOntowikiDLLearnerJar"> - <mkdir dir="${temp}"/> - <mkdir dir="${release}"/> - <mkdir dir="${release}/lib"/> - <mkdir dir="${release}/lib/pellet"/> - <mkdir dir="${release}/lib/jena"/> - <mkdir dir="${release}/lib/owlapi"/> - - <copy toDir="${release}/lib"> - <fileset dir="${lib_dir}" includes="jamon-2.7.jar,log4j.jar,components.ini"/> - </copy> - - <copy toDir="${release}/lib/owlapi"> - <fileset dir="${lib_dir}/owlapi" includes="owlapi-bin.jar"/> - </copy> - <copy toDir="${release}/lib/pellet"> - <fileset dir="${lib_dir}/pellet" includes="pellet-core.jar, pellet-owlapi.jar"/> - </copy> - - <copy toDir="${release}/lib/jena"> - <fileset dir="${lib_dir}/jena" includes="commons-logging-1.1.1.jar,json.jar"/> - </copy> - - <copy toDir="${temp}"> - <fileset dir="${class_dir}"/> - </copy> - - <jar destfile="${release}/dllearner.jar"> - <fileset dir="${temp}"/> - </jar> - <copy toDir="${ontowiki_dir}"> - <fileset dir="${release}"/> - </copy> - - <delete dir="${temp}" /> - <delete dir="${release}" /> - </target> - - <!-- build the ORE tool --> - <target name="buildORE" description="build ore including scripts, no javadoc"> - <property name="ore_source" value="src/dl-learner/org/dllearner/tools/ore" /> - <!-- build scripts --> - <path id="addjar"> - <path refid="classpath"/> - <pathelement location="${lib_dir}/dllearner.jar"/> - </path> - <path id="removeprefix"> - <pathelement location="."/> - </path> - <pathconvert refid="removeprefix" property="removeprefix" /> - - <pathconvert refid="addjar" property="pathStringUnix" targetos="unix"> - <map from="${removeprefix}" to="."/> - </pathconvert> - <pathconvert refid="addjar" property="pathStringWin" targetos="windows"> - <map from="${removeprefix}" to="."/> - </pathconvert> - - - - <!-- write current build date into Info.java --> - <echo file="${source_dir}/org/dllearner/Info.java" append="false"> - // File is updated automatically when a new version is created - package org.dllearner; - - public class Info { - public static final String build = "${today}"; - } - </echo> - - <!-- compile project into temporary directory --> - <mkdir dir="classes_tmp"/> - <javac destdir="classes_tmp" target="1.5"> - <src path="${source_dir}"/> - <classpath refid="classpath"/> - </javac> - <!-- we also need to copy some images, which should be - included in dllearner.jar --> - <copy toDir="classes_tmp" > - <fileset dir="${source_dir}" includes="**/*.gif,**/*.png,**/*.html,**/*.txt,**/*.ini"/> - </copy> - <mkdir dir="${release_ore_dir}"/> - <mkdir dir="${release_ore_dir}/lib/"/> - - - <jar jarfile="${release_ore_dir}/lib/dllearner.jar"> - <fileset dir="classes_tmp"/> - </jar> - <delete dir="classes_tmp"/> - - <!-- copy all other libraries --> - <copy toDir="${release_ore_dir}/lib"> - <fileset dir="${lib_dir}" includes="*.jar" excludes="xbean.jar, secondstring-20060615.jar - dig1.1-xmlbeans.jar, ant_latex.jar, jopt-simple-3.1.jar, ini4j-0.3.2.jar, junit-4.4.jar"/> - </copy> - <copy toDir="${release_ore_dir}/lib/pellet"> - <fileset dir="${lib_dir}/pellet" /> - </copy> - <copy toDir="${release_ore_dir}/lib/ore-tool"> - <fileset dir="${lib_dir}/ore-tool" /> - </copy> - <copy toDir="${release_ore_dir}/lib/protege"> - <fileset dir="${lib_dir}/protege" /> - </copy> - <copy toDir="${release_ore_dir}/lib/jena"> - <fileset dir="${lib_dir}/jena" /> - </copy> - <copy toDir="${release_ore_dir}/lib/owlapi"> - <fileset dir="${lib_dir}/owlapi" /> - </copy> - - <!-- copy binary files and examples --> - <copy toDir="${release_ore_dir}/examples"> - <fileset dir="examples/ore"/> - </copy> - <echo file="${release_ore_dir}/ore.bat" message="java -Xmx${max_memory}m -Djava.library.path=lib/fact/64bit/ -cp ${pathStringWin} org.dllearner.tools.ore.OREApplication"/> - <echo file="${release_ore_dir}/ore" message="#!/bin/bash${line.separator}java -Xmx${max_memory}m -Djava.library.path=lib/fact/64bit/ -cp ${pathStringUnix} org.dllearner.tools.ore.OREApplication $@"/> - - - <!-- create file containing the build info --> - <echo file="${release_ore_dir}/build.txt" append="false">ORE Build ${today}</echo> - - <!-- create empty log directory for release --> - <mkdir dir="${release_ore_dir}/log" /> - - <!-- create cache directory for SPARQL extraction --> - <mkdir dir="${release_ore_dir}/cache" /> - - <!-- copy README and INSTALL file --> - <copy toDir="${release_ore_dir}" > - <fileset dir="${ore_source}" includes="INSTALL,README"/> - </copy> - - <!-- copy LICENSE file --> - <copy file="LICENSE" toDir="${release_ore_dir}" /> - - <!-- create tar.gz files (allows storing whether a file is executable) --> - <tar longfile="gnu" destfile="ore-nosource-${today}.tar.gz" compression="gzip"> - <!-- extra set for executable files --> - <tarfileset dir="release/" mode="755"> - <include name="${version_ore_dir}/ore" /> - </tarfileset> - <tarfileset dir="release/"> - <exclude name="${version_ore_dir}/ore"/> - </tarfileset> - </tar> - - <!-- copy source code --> - <mkdir dir="${release_ore_dir}/src/"/> - <copy toDir="${release_ore_dir}/src/"> - <fileset dir="${source_dir}" includes="**/*.java,**/*.html,**/*.gif,**/*.png,*/*.jjt,build.xml"/> - </copy> - - <!-- create backup (= standard build + source code + developer documentation) --> - <tar longfile="gnu" destfile="ore-${... [truncated message content] |
From: <ku...@us...> - 2010-09-17 09:25:47
|
Revision: 2311 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=2311&view=rev Author: kurzum Date: 2010-09-17 09:25:41 +0000 (Fri, 17 Sep 2010) Log Message: ----------- deleted with --force Removed Paths: ------------- trunk/src/ trunk/test/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ku...@us...> - 2010-09-17 10:00:13
|
Revision: 2313 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=2313&view=rev Author: kurzum Date: 2010-09-17 10:00:04 +0000 (Fri, 17 Sep 2010) Log Message: ----------- changes before the transition Modified Paths: -------------- trunk/components-core/src/main/java/org/dllearner/examples/MonogenicDiseases.java Added Paths: ----------- trunk/components-core/src/main/java/org/dllearner/examples/Parkinsons.java trunk/components-core/src/main/java/org/dllearner/examples/flags/ trunk/components-core/src/main/java/org/dllearner/examples/flags/FlagScript.java trunk/components-core/src/main/java/org/dllearner/examples/flags/Script.java trunk/test/ trunk/test/parkinsons/ trunk/test/parkinsons/files/ trunk/test/parkinsons/parkinsons.data trunk/test/parkinsons/parkinsons.owl trunk/test/parkinsons/train.conf Modified: trunk/components-core/src/main/java/org/dllearner/examples/MonogenicDiseases.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/examples/MonogenicDiseases.java 2010-09-17 09:32:51 UTC (rev 2312) +++ trunk/components-core/src/main/java/org/dllearner/examples/MonogenicDiseases.java 2010-09-17 10:00:04 UTC (rev 2313) @@ -54,21 +54,68 @@ * */ public class MonogenicDiseases { + +//---> OPTIONS: + private static int algorithmus = 1; // 1 = pos/neg Algorithmus 2 = Celoe + private static boolean writeAlephFiles = true; // Add AlephFiles + private static boolean writeYYFiles = true; // Add YinYangFiles + private static int posEx = 25; // Number of pos-Ex. + private static int negEx = 25; // Number of neg-Ex. + private static boolean cvAleph = true; // add Files for Aleph 10-Fold Cross Validation +//<--- OPTIONS end + private static IRI ontologyURI = IRI.create("http://dl-learner.org/mutation"); private static File owlFile = new File("examples/mutation/mutation.owl"); private static File confFile = new File("examples/mutation/mutation.conf"); + private static File badFile = new File("examples/mutation/mutation1.n"); // AlephFile + private static File posFile = new File("examples/mutation/mutation1.f"); // AlephFile + private static File yybadFile = new File("examples/mutation/mutationNegatives.txt"); //YYFile + private static File yyposFile = new File("examples/mutation/mutationPositives.txt"); //YYFile + + private static File split1n = new File("examples/mutation/split1.n"); + private static File split1f = new File("examples/mutation/split1.f"); + private static File split2n = new File("examples/mutation/split2.n"); + private static File split2f = new File("examples/mutation/split2.f"); + private static File split3n = new File("examples/mutation/split3.n"); + private static File split3f = new File("examples/mutation/split3.f"); + private static File split4n = new File("examples/mutation/split4.n"); + private static File split4f = new File("examples/mutation/split4.f"); + private static File split5n = new File("examples/mutation/split5.n"); + private static File split5f = new File("examples/mutation/split5.f"); + private static File split6n = new File("examples/mutation/split6.n"); + private static File split6f = new File("examples/mutation/split6.f"); + private static File split7n = new File("examples/mutation/split7.n"); + private static File split7f = new File("examples/mutation/split7.f"); + private static File split8n = new File("examples/mutation/split8.n"); + private static File split8f = new File("examples/mutation/split8.f"); + private static File split9n = new File("examples/mutation/split9.n"); + private static File split9f = new File("examples/mutation/split9.f"); + private static File split10n = new File("examples/mutation/split10.n"); + private static File split10f = new File("examples/mutation/split10.f"); + + // whether to generate a class containing the positive examples - private static boolean generatePosExampleClass = true; + private static boolean generatePosExampleClass = false; // set to true if accessing PostreSQL and false for MySQL private static boolean pgSQL = true; // generate fragment => limits the number of individuals in the ontology // to speed up learning -// private static boolean onlyFragment = true; + private static boolean learnMutation = true; + // private static boolean onlyFragment = true; public static void main(String[] args) throws ClassNotFoundException, BackingStoreException, SQLException { + + if (algorithmus == 1) { // LearnAlgo-Check + generatePosExampleClass = false; + } + if (algorithmus == 2) { // LearnAlgo-Check + generatePosExampleClass = true; + } + + // reading values for db connection from ini file String iniFile = "src/dl-learner/org/dllearner/examples/mutation.ini"; Preferences prefs = new IniFile(new File(iniFile)); @@ -251,12 +298,204 @@ rs = stmt.executeQuery("SELECT * FROM " + table + " WHERE (gain_contact is not null) AND (gain_contact != 0)"); } - int count = 0; - while(rs.next()) { +int count = 1; +int pos_count = 0; +int neg_count = 1; + + + if (writeAlephFiles){ // Clear AlephFiles + Files.clearFile(badFile); + Files.clearFile(posFile); + } + + if (writeYYFiles) { // Clear YinYangFiles + Files.clearFile(yybadFile); + Files.clearFile(yyposFile); + } + + if (cvAleph) { // Clear Aleph CV-Files + Files.clearFile(split1n); + Files.clearFile(split1f); + Files.clearFile(split2n); + Files.clearFile(split2f); + Files.clearFile(split3n); + Files.clearFile(split3f); + Files.clearFile(split4n); + Files.clearFile(split4f); + Files.clearFile(split5n); + Files.clearFile(split5f); + Files.clearFile(split6n); + Files.clearFile(split6f); + Files.clearFile(split7n); + Files.clearFile(split7f); + Files.clearFile(split8n); + Files.clearFile(split8f); + Files.clearFile(split9n); + Files.clearFile(split9f); + Files.clearFile(split10n); + Files.clearFile(split10f); + } + + int kp = 1; // k for CV positiv + int kn = 1; // k for CV negativ + int peps = posEx/10; // positiv Examples per Splitfile + int neps = negEx/10; // negative Examples per Splitfile + int aneg = 0; // aktuell negativ + int apos = 0; // aktuell positiv + + + while((rs.next()) && ((pos_count < posEx) || (neg_count < negEx))) { + + + // generate an individual for each entry in the table int mutationID = rs.getInt("id"); Individual mutationInd = new Individual(getURI("mutation" + mutationID)); + + String pt = rs.getString("phenotype"); + if ((pt.toLowerCase().contains("polymorphism"))&&( neg_count<=negEx )) { + if (writeAlephFiles) { + Files.appendFile(badFile, "deleterious(id"+mutationID+").\n"); + } + if (writeYYFiles) { + Files.appendFile(yybadFile, "http://example.com/mutation/mutation#mutation"+mutationID+"\n"); + } + if (cvAleph){ + switch (kn) { + case 1: + aneg++; + Files.appendFile(split1n, "deleterious(id"+mutationID+").\n"); + if (aneg == neps) {aneg = 0; kn++;} + break; + case 2: + aneg++; + Files.appendFile(split2n, "deleterious(id"+mutationID+").\n"); + if (aneg == neps) {aneg = 0; kn++;} + break; + case 3: + aneg++; + Files.appendFile(split3n, "deleterious(id"+mutationID+").\n"); + if (aneg == neps) {aneg = 0; kn++;} + break; + case 4: + aneg++; + Files.appendFile(split4n, "deleterious(id"+mutationID+").\n"); + if (aneg == neps) {aneg = 0; kn++;} + break; + case 5: + aneg++; + Files.appendFile(split5n, "deleterious(id"+mutationID+").\n"); + if (aneg == neps) {aneg = 0; kn++;} + break; + case 6: + aneg++; + Files.appendFile(split6n, "deleterious(id"+mutationID+").\n"); + if (aneg == neps) {aneg = 0; kn++;} + break; + case 7: + aneg++; + Files.appendFile(split7n, "deleterious(id"+mutationID+").\n"); + if (aneg == neps) {aneg = 0; kn++;} + break; + case 8: + aneg++; + Files.appendFile(split8n, "deleterious(id"+mutationID+").\n"); + if (aneg == neps) {aneg = 0; kn++;} + break; + case 9: + aneg++; + Files.appendFile(split9n, "deleterious(id"+mutationID+").\n"); + if (aneg == neps) {aneg = 0; kn++;} + break; + case 10: + aneg++; + Files.appendFile(split10n, "deleterious(id"+mutationID+").\n"); +// if (aneg == neps) {aneg = 0; kn++;} + break; +// case 11: // without comment its round negExamples / 10 +// break; + } + } + + neg_count++; + } + if ((!pt.toLowerCase().contains("polymorphism"))&& ( pos_count<=posEx)) { + if (writeAlephFiles) { + Files.appendFile(posFile, "deleterious(id"+mutationID+").\n"); + } + if (writeYYFiles) { + Files.appendFile(yyposFile, "http://example.com/mutation/mutation#mutation"+mutationID+"\n"); + } + if (cvAleph){ + switch (kp) { + case 1: + apos++; + Files.appendFile(split1f, "deleterious(id"+mutationID+").\n"); + if (apos == peps) {apos = 0; kp++;} + break; + case 2: + apos++; + Files.appendFile(split2f, "deleterious(id"+mutationID+").\n"); + if (apos == peps) {apos = 0; kp++;} + break; + case 3: + apos++; + Files.appendFile(split3f, "deleterious(id"+mutationID+").\n"); + if (apos == peps) {apos = 0; kp++;} + break; + case 4: + apos++; + Files.appendFile(split4f, "deleterious(id"+mutationID+").\n"); + if (apos == peps) {apos = 0; kp++;} + break; + case 5: + apos++; + Files.appendFile(split5f, "deleterious(id"+mutationID+").\n"); + if (apos == peps) {apos = 0; kp++;} + break; + case 6: + apos++; + Files.appendFile(split6f, "deleterious(id"+mutationID+").\n"); + if (apos == peps) {apos = 0; kp++;} + break; + case 7: + apos++; + Files.appendFile(split7f, "deleterious(id"+mutationID+").\n"); + if (apos == peps) {apos = 0; kp++;} + break; + case 8: + apos++; + Files.appendFile(split8f, "deleterious(id"+mutationID+").\n"); + if (apos == peps) {apos = 0; kp++;} + break; + case 9: + apos++; + Files.appendFile(split9f, "deleterious(id"+mutationID+").\n"); + if (apos == peps) {apos = 0; kp++;} + break; + case 10: + apos++; + Files.appendFile(split10f, "deleterious(id"+mutationID+").\n"); +// if (apos == peps) {apos = 0; kp++;} + break; +// case 11: // without comments its round to posExamples / 10 +// break; + } + } + + + pos_count++; + } + + if ((pt.toLowerCase().contains("polymorphism"))&&( neg_count > negEx )) { + continue; + } + if ((!pt.toLowerCase().contains("polymorphism"))&& ( pos_count > posEx)) { + continue; + } + + // size change is represented via 3 classes String modifSize = rs.getString("modif_size"); convertThreeValuedColumn(kb, mutationInd, modifSize, protSizeIncClass, protSizeUnchangedClass, protSizeDecClass); @@ -340,7 +579,7 @@ double identicalN1Contact = rs.getDouble("identical_n1_contact"); kb.addAxiom(new DoubleDatatypePropertyAssertion(identicalN1ContactProp, mutationInd, identicalN1Contact)); - // TODO Vorsicht bei 0-Werten in den weitern Feldern (klären, ob in dem + // TODO Vorsicht bei 0-Werten in den weitern Feldern (kl\xE4ren, ob in dem // Fall gar nichts geschrieben werden soll) // wt_accessibility @@ -372,10 +611,17 @@ // generate a class with all positive examples (optional) if(generatePosExampleClass) { String phenotype = rs.getString("phenotype"); + + if(!phenotype.toLowerCase().contains("polymorphism")) { kb.addAxiom(new ClassAssertionAxiom(deleteriousMutationClass, mutationInd)); } + } + +// String pt = rs.getString("phenotype"); +// if (pt.toLowerCase().contains("polymorphism")) { neg_count++; } +// if (!pt.toLowerCase().contains("polymorphism")) { pos_count++; } count++; @@ -387,6 +633,8 @@ OWLAPIReasoner.exportKBToOWL(owlFile, kb, ontologyURI); long writeDuration = System.nanoTime() - startWriteTime; System.out.println("OK (entities: " + count + "; time: " + Helper.prettyPrintNanoSeconds(writeDuration) + "; file size: " + owlFile.length()/1024 + " KB)."); + + // selecting examples // -> only a fraction of examples are selected as positive/negative @@ -399,52 +647,80 @@ } List<Individual> posExamples = new LinkedList<Individual>(); List<Individual> negExamples = new LinkedList<Individual>(); - while(rs.next()) { + +count = 1; +pos_count = 0; +neg_count = 0; + + + + while((rs.next()) && (pos_count < posEx) || (neg_count < negEx)) { int mutationID = rs.getInt("id"); String phenotype = rs.getString("phenotype"); - if(phenotype.toLowerCase().contains("polymorphism")) { - negExamples.add(new Individual(getURI("mutation" + mutationID))); - } else { - posExamples.add(new Individual(getURI("mutation" + mutationID))); +// if(phenotype.toLowerCase().contains("polymorphism")) { +// negExamples.add(new Individual(getURI("mutation" + mutationID))); neg_count++; +// } else { +// posExamples.add(new Individual(getURI("mutation" + mutationID))); pos_count++; +// } + + if((phenotype.toLowerCase().contains("polymorphism")) && (neg_count < negEx)) { + negExamples.add(new Individual(getURI("mutation" + mutationID))); neg_count++; + } + if((!phenotype.toLowerCase().contains("polymorphism")) && (pos_count < posEx)) { + posExamples.add(new Individual(getURI("mutation" + mutationID))); pos_count++; } + + +count++; } // writing conf file Files.clearFile(confFile); String confHeader = "import(\"" + owlFile.getName() + "\");\n\n"; confHeader += "reasoner = fastInstanceChecker;\n"; + + if (algorithmus == 1) { + confHeader += "problem = posNegLPStandard;\n"; + confHeader += "posNegLPStandard.useApproximations = true;\n"; + confHeader += "posNegLPStandard.accuracyMethod = \"fmeasure\";\n"; + confHeader += "posNegLPStandard.approxAccuracy = 0.03;\n"; + confHeader += "refexamples.noisePercentage = 15;\n"; + confHeader += "refexamples.startClass = \"" + getURI("Mutation") + "\";\n"; + confHeader += "refexamples.writeSearchTree = false;\n"; + confHeader += "refexamples.searchTreeFile = \"log/mutation/searchTree.log\";\n"; - confHeader += "problem = classLearning;\n"; - confHeader += "classLearning.classToDescribe = \"" + deleteriousMutationClass + "\";\n"; - confHeader += "classLearning.accuracyMethod = \"fmeasure\";\n"; - confHeader += "classLearning.approxAccuracy = 0.03;\n"; + confHeader += "\n"; + } -// confHeader += "problem = posNegLPStandard;\n"; -// confHeader += "posNegLPStandard.useApproximations = true;\n"; -// confHeader += "posNegLPStandard.accuracyMethod = \"fmeasure\";\n"; -// confHeader += "posNegLPStandard.approxAccuracy = 0.03;\n"; + if (algorithmus == 2) + { + confHeader += "problem = classLearning;\n"; + confHeader += "classLearning.classToDescribe = \"" + deleteriousMutationClass + "\";\n"; + confHeader += "classLearning.accuracyMethod = \"fmeasure\";\n"; + confHeader += "classLearning.approxAccuracy = 0.03;\n"; + confHeader += "algorithm = celoe;\n"; + confHeader += "celoe.maxExecutionTimeInSeconds = 10;\n"; + confHeader += "celoe.noisePercentage = 10;\n"; + confHeader += "celoe.singleSuggestionMode = true;\n"; + confHeader += "celoe.useNegation = true;\n"; + + confHeader += "\n"; + } - confHeader += "algorithm = celoe;\n"; - confHeader += "celoe.maxExecutionTimeInSeconds = 10;\n"; - confHeader += "celoe.noisePercentage = 10;\n"; - confHeader += "celoe.singleSuggestionMode = true;\n"; - confHeader += "celoe.useNegation = true;\n"; - -// confHeader += "refexamples.noisePercentage = 15;\n"; -// confHeader += "refexamples.startClass = \"" + getURI("Mutation") + "\";\n"; -// confHeader += "refexamples.writeSearchTree = false;\n"; -// confHeader += "refexamples.searchTreeFile = \"log/mutation/searchTree.log\";\n"; - confHeader += "\n"; Files.appendFile(confFile, confHeader); if(!generatePosExampleClass) { - Carcinogenesis.appendPosExamples(confFile, posExamples); - Carcinogenesis.appendNegExamples(confFile, negExamples); + MonogenicDiseases.appendPosExamples(confFile, posExamples); + MonogenicDiseases.appendNegExamples(confFile, negExamples); } long runTime = System.nanoTime() - startTime; System.out.println("Conf file written with " + posExamples.size() + " positive and " + negExamples.size() + " negative examples."); System.out.println("Database successfully converted in " + Helper.prettyPrintNanoSeconds(runTime) + "."); + if (writeAlephFiles) System.out.println("Added Aleph Files."); + if (writeYYFiles) System.out.println("Added YinYang Files."); + if (cvAleph) System.out.println("Added Aleph Split Filles for 10-Fold CrossValidation."); + } // a table column with values "+", "=", "-" is converted to subclasses @@ -460,5 +736,27 @@ private static String getURI(String name) { return ontologyURI + "#" + name; + } + + public static void appendPosExamples(File file, List<Individual> examples) { + StringBuffer content = new StringBuffer(); + for(Individual example : examples) { + if(learnMutation) + content.append("+\""+example.toString()+"\"\n"); + else + content.append("-\""+example.toString()+"\"\n"); + } + Files.appendFile(file, content.toString()); + } + + public static void appendNegExamples(File file, List<Individual> examples) { + StringBuffer content = new StringBuffer(); + for(Individual example : examples) { + if(learnMutation) + content.append("-\""+example.toString()+"\"\n"); + else + content.append("+\""+example.toString()+"\"\n"); + } + Files.appendFile(file, content.toString()); } } Added: trunk/components-core/src/main/java/org/dllearner/examples/Parkinsons.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/examples/Parkinsons.java (rev 0) +++ trunk/components-core/src/main/java/org/dllearner/examples/Parkinsons.java 2010-09-17 10:00:04 UTC (rev 2313) @@ -0,0 +1,416 @@ +package org.dllearner.examples; + +import java.io.File; +import java.io.FileNotFoundException; +import java.util.HashMap; +import java.util.LinkedList; +import java.util.List; +import java.util.Scanner; +import java.util.Set; + +import org.dllearner.core.owl.Axiom; +import org.dllearner.core.owl.ClassAssertionAxiom; +import org.dllearner.core.owl.DatatypeProperty; +import org.dllearner.core.owl.DatatypePropertyAssertion; +import org.dllearner.core.owl.DoubleDatatypePropertyAssertion; +import org.dllearner.core.owl.Individual; +import org.dllearner.core.owl.KB; +import org.dllearner.core.owl.NamedClass; +import org.dllearner.parser.KBParser; +import org.dllearner.parser.ParseException; +import org.dllearner.reasoning.OWLAPIReasoner; +import org.dllearner.utilities.Files; +import org.dllearner.utilities.Helper; +import org.semanticweb.owlapi.model.IRI; + +public class Parkinsons { + + private static IRI ontologyIRI = IRI + .create("http://dl-learner.org/parkinsons"); + private static final String fileName = "test/parkinsons/files/parkinsons.data"; + private static HashMap<String, Integer> patients = new HashMap<String, Integer>(); + private static List<Axiom> axioms = new LinkedList<Axiom>(); + + public static void main(String agrs[]) throws FileNotFoundException, + ParseException { + Scanner input = new Scanner(new File(fileName), "UTF-8"); + File owlFile = new File("test/parkinsons/parkinsons.owl"); + long startTime, duration; + String time; + KB kb = new KB(); + + String kbString = generateDomainAndRangeForObjectProperties(); + KB kb2 = KBParser.parseKBFile(kbString); + kb.addKB(kb2); + + System.out.print("Reading in parkinsons files ... "); + startTime = System.nanoTime(); + + while (input.hasNextLine()) { + String nextLine = input.next(); + + String name = nextLine.substring(0, nextLine.indexOf(",")); + nextLine = nextLine.replaceFirst(name + ",", ""); + + String MDVPFo = nextLine.substring(0, nextLine.indexOf(",")); + nextLine = nextLine.replaceFirst(MDVPFo + ",", ""); + + String MDVPFhi = nextLine.substring(0, nextLine.indexOf(",")); + nextLine = nextLine.replaceFirst(MDVPFhi + ",", ""); + + String MDVPFlo = nextLine.substring(0, nextLine.indexOf(",")); + nextLine = nextLine.replaceFirst(MDVPFlo + ",", ""); + + String MDVPJitter = nextLine.substring(0, nextLine.indexOf(",")); + nextLine = nextLine.replaceFirst(MDVPJitter + ",", ""); + + String MDVPJitterAbs = nextLine.substring(0, nextLine.indexOf(",")); + nextLine = nextLine.replaceFirst(MDVPJitterAbs + ",", ""); + + String MDVPRAP = nextLine.substring(0, nextLine.indexOf(",")); + nextLine = nextLine.replaceFirst(MDVPRAP + ",", ""); + + String MDVPPPQ = nextLine.substring(0, nextLine.indexOf(",")); + nextLine = nextLine.replaceFirst(MDVPPPQ + ",", ""); + + String JitterDDP = nextLine.substring(0, nextLine.indexOf(",")); + nextLine = nextLine.replaceFirst(JitterDDP + ",", ""); + + String MDVPShimmer = nextLine.substring(0, nextLine.indexOf(",")); + nextLine = nextLine.replaceFirst(MDVPShimmer + ",", ""); + + String MDVPShimmerdB = nextLine.substring(0, nextLine.indexOf(",")); + nextLine = nextLine.replaceFirst(MDVPShimmerdB + ",", ""); + + String ShimmerAPQ3 = nextLine.substring(0, nextLine.indexOf(",")); + nextLine = nextLine.replaceFirst(ShimmerAPQ3 + ",", ""); + + String ShimmerAPQ5 = nextLine.substring(0, nextLine.indexOf(",")); + nextLine = nextLine.replaceFirst(ShimmerAPQ5 + ",", ""); + + String MDVPAPQ = nextLine.substring(0, nextLine.indexOf(",")); + nextLine = nextLine.replaceFirst(MDVPAPQ + ",", ""); + + String ShimmerDDA = nextLine.substring(0, nextLine.indexOf(",")); + nextLine = nextLine.replaceFirst(ShimmerDDA + ",", ""); + + String NHR = nextLine.substring(0, nextLine.indexOf(",")); + nextLine = nextLine.replaceFirst(NHR + ",", ""); + + String HNR = nextLine.substring(0, nextLine.indexOf(",")); + nextLine = nextLine.replaceFirst(HNR + ",", ""); + + String status = nextLine.substring(0, nextLine.indexOf(",")); + nextLine = nextLine.replaceFirst(status + ",", ""); + + String RPDE = nextLine.substring(0, nextLine.indexOf(",")); + nextLine = nextLine.replaceFirst(RPDE + ",", ""); + + String DFA = nextLine.substring(0, nextLine.indexOf(",")); + nextLine = nextLine.replaceFirst(DFA + ",", ""); + + String spread1 = nextLine.substring(0, nextLine.indexOf(",")); + nextLine = nextLine.replaceFirst(spread1 + ",", ""); + + String spread2 = nextLine.substring(0, nextLine.indexOf(",")); + nextLine = nextLine.replaceFirst(spread2 + ",", ""); + + String D2 = nextLine.substring(0, nextLine.indexOf(",")); + nextLine = nextLine.replaceFirst(D2 + ",", ""); + + String PPE = nextLine; + + List<Axiom> axioms = mapClauses(name, MDVPFo, MDVPFhi, MDVPFlo, + MDVPJitter, MDVPJitterAbs, MDVPRAP, MDVPPPQ, JitterDDP, + MDVPShimmer, MDVPShimmerdB, ShimmerAPQ3, ShimmerAPQ5, + MDVPAPQ, ShimmerDDA, NHR, HNR, status, RPDE, DFA, spread1, + spread2, D2, PPE); + for (Axiom axiom : axioms) + kb.addAxiom(axiom); + + } + duration = System.nanoTime() - startTime; + time = Helper.prettyPrintNanoSeconds(duration, false, false); + System.out.println("OK (" + time + ")."); + + // writing generated knowledge base + System.out.print("Writing OWL file ... "); + startTime = System.nanoTime(); + OWLAPIReasoner.exportKBToOWL(owlFile, kb, ontologyIRI); + duration = System.nanoTime() - startTime; + time = Helper.prettyPrintNanoSeconds(duration, false, false); + System.out.println("OK (" + time + ")."); + + // generating second conf file + System.out.print("Generating conf file ... "); + File confTrainFile = new File("test/parkinsons/train.conf"); + Files.clearFile(confTrainFile); + generateConfFile(confTrainFile); + generateExamples(confTrainFile); + duration = System.nanoTime() - startTime; + time = Helper.prettyPrintNanoSeconds(duration, false, false); + System.out.println("OK (" + time + ")."); + System.out.println("Finished"); + + } + + private static List<Axiom> mapClauses(String name, String MDVPFo, + String MDVPFhi, String MDVPFlo, String MDVPJitter, + String MDVPJitterAbs, String MDVPRAP, String MDVPPPQ, + String JitterDDP, String MDVPShimmer, String MDVPShimmerdB, + String ShimmerAPQ3, String ShimmerAPQ5, String MDVPAPQ, + String ShimmerDDA, String NHR, String HNR, String status, + String RPDE, String DFA, String spread1, String spread2, String D2, + String PPE) { + ClassAssertionAxiom cmpAxiom = getConceptAssertion("Patient", + name); + axioms.add(cmpAxiom); + + DatatypePropertyAssertion dpa = getDoubleDatatypePropertyAssertion( + name, "hasMDVPFo", Double.parseDouble(MDVPFo)); + axioms.add(dpa); + + DatatypePropertyAssertion dpb = getDoubleDatatypePropertyAssertion( + name, "hasMDVPFhi", Double.parseDouble(MDVPFhi)); + axioms.add(dpb); + + DatatypePropertyAssertion dpc = getDoubleDatatypePropertyAssertion( + name, "hasMDVPFlo", Double.parseDouble(MDVPFlo)); + axioms.add(dpc); + + DatatypePropertyAssertion dpd = getDoubleDatatypePropertyAssertion( + name, "hasMDVPJitter", Double.parseDouble(MDVPJitter)); + axioms.add(dpd); + + DatatypePropertyAssertion dpe = getDoubleDatatypePropertyAssertion( + name, "hasMDVPJitterAbs", Double.parseDouble(MDVPJitterAbs)); + axioms.add(dpe); + + DatatypePropertyAssertion dpf = getDoubleDatatypePropertyAssertion( + name, "hasMDVPRAP", Double.parseDouble(MDVPRAP)); + axioms.add(dpf); + + DatatypePropertyAssertion dpg = getDoubleDatatypePropertyAssertion( + name, "hasMDVPPPQ", Double.parseDouble(MDVPPPQ)); + axioms.add(dpg); + + DatatypePropertyAssertion dph = getDoubleDatatypePropertyAssertion( + name, "hasJitterDDP", Double.parseDouble(JitterDDP)); + axioms.add(dph); + + DatatypePropertyAssertion dpi = getDoubleDatatypePropertyAssertion( + name, "hasMDVPShimmer", Double.parseDouble(MDVPShimmer)); + axioms.add(dpi); + + DatatypePropertyAssertion dpj = getDoubleDatatypePropertyAssertion( + name, "hasMDVPShimmerdB", Double.parseDouble(MDVPShimmerdB)); + axioms.add(dpj); + + DatatypePropertyAssertion dpk = getDoubleDatatypePropertyAssertion( + name, "hasShimmerAPQ3", Double.parseDouble(ShimmerAPQ3)); + axioms.add(dpk); + + DatatypePropertyAssertion dpl = getDoubleDatatypePropertyAssertion( + name, "hasShimmerAPQ5", Double.parseDouble(ShimmerAPQ5)); + axioms.add(dpl); + + DatatypePropertyAssertion dpm = getDoubleDatatypePropertyAssertion( + name, "hasMDVPAPQ", Double.parseDouble(MDVPAPQ)); + axioms.add(dpm); + + DatatypePropertyAssertion dpn = getDoubleDatatypePropertyAssertion( + name, "hasShimmerDDA", Double.parseDouble(ShimmerDDA)); + axioms.add(dpn); + + DatatypePropertyAssertion dpo = getDoubleDatatypePropertyAssertion( + name, "hasNHR", Double.parseDouble(NHR)); + axioms.add(dpo); + + DatatypePropertyAssertion dpp = getDoubleDatatypePropertyAssertion( + name, "hasHNR", Double.parseDouble(HNR)); + axioms.add(dpp); + + DatatypePropertyAssertion dpq = getDoubleDatatypePropertyAssertion( + name, "hasRPDE", Double.parseDouble(RPDE)); + axioms.add(dpq); + + + DatatypePropertyAssertion dpr = getDoubleDatatypePropertyAssertion( + name, "hasDFA", Double.parseDouble(DFA)); + axioms.add(dpr); + + DatatypePropertyAssertion dps = getDoubleDatatypePropertyAssertion( + name, "hasSpread1", Double.parseDouble(spread1)); + axioms.add(dps); + + DatatypePropertyAssertion dpt = getDoubleDatatypePropertyAssertion( + name, "hasSpread2", Double.parseDouble(spread2)); + axioms.add(dpt); + + DatatypePropertyAssertion dpu = getDoubleDatatypePropertyAssertion( + name, "hasD2", Double.parseDouble(D2)); + axioms.add(dpu); + + DatatypePropertyAssertion dpv = getDoubleDatatypePropertyAssertion( + name, "hasPPE", Double.parseDouble(PPE)); + axioms.add(dpv); + + patients.put(name, new Integer(status)); + return axioms; + } + + private static NamedClass getAtomicConcept(String name) { + return new NamedClass(ontologyIRI + "#" + name); + } + + private static ClassAssertionAxiom getConceptAssertion(String concept, + String i) { + Individual ind = getIndividual(i); + NamedClass c = getAtomicConcept(concept); + return new ClassAssertionAxiom(c, ind); + } + + private static Individual getIndividual(String name) { + return new Individual(ontologyIRI + "#" + name); + } + + private static void generateConfFile(File file) { + String confHeader = "import(\"parkinsons.owl\");\n\n"; + confHeader += "reasoner = fastInstanceChecker;\n"; + confHeader += "algorithm = refexamples;\n"; + confHeader += "refexamples.noisePercentage = 0;\n"; + confHeader += "refexamples.startClass = " + getURI2("Patient") + ";\n"; + confHeader += "refexamples.writeSearchTree = false;\n"; + confHeader += "refexamples.searchTreeFile = \"log/parkinsons/searchTree.log\";\n"; + confHeader += "\n"; + Files.appendFile(file, confHeader); + } + + private static void generateExamples(File file) { + StringBuffer content = new StringBuffer(); + Set<String> keys = patients.keySet(); + for (String key : keys) { + Integer subsValue = patients.get(key); + if (subsValue == 0) { + content.append("+\"" + getIndividual(key) + "\"\n"); + } else { + content.append("-\"" + getIndividual(key) + "\"\n"); + } + } + Files.appendFile(file, content.toString()); + } + + private static String getURI(String name) { + return ontologyIRI + "#" + name; + } + + // returns URI including quotationsmark (need for KBparser) + private static String getURI2(String name) { + return "\"" + getURI(name) + "\""; + } + + private static DoubleDatatypePropertyAssertion getDoubleDatatypePropertyAssertion( + String individual, String datatypeProperty, double value) { + Individual ind = getIndividual(individual); + DatatypeProperty dp = getDatatypeProperty(datatypeProperty); + return new DoubleDatatypePropertyAssertion(dp, ind, value); + } + + private static DatatypeProperty getDatatypeProperty(String name) { + return new DatatypeProperty(ontologyIRI + "#" + name); + } + + private static String generateDomainAndRangeForObjectProperties() + throws ParseException { + String kbString = "DPDOMAIN(" + getURI2("hasMDVPFo") + ") = " + + getURI2("Patient") + ".\n"; + kbString += "DPRANGE(" + getURI2("hasMDVPFo") + ") = DOUBLE.\n"; + + kbString += "DPDOMAIN(" + getURI2("hasMDVPFhi") + ") = " + + getURI2("Patient") + ".\n"; + kbString += "DPRANGE(" + getURI2("hasMDVPFhi") + ") = DOUBLE.\n"; + + kbString += "DPDOMAIN(" + getURI2("hasMDVPFlo") + ") = " + + getURI2("Patient") + ".\n"; + kbString += "DPRANGE(" + getURI2("hasMDVPFlo") + ") = DOUBLE.\n"; + + kbString += "DPDOMAIN(" + getURI2("hasMDVPJitter") + ") = " + + getURI2("Patient") + ".\n"; + kbString += "DPRANGE(" + getURI2("hasMDVPJitter") + ") = DOUBLE.\n"; + + kbString += "DPDOMAIN(" + getURI2("hasMDVPJitterAbs") + ") = " + + getURI2("Patient") + ".\n"; + kbString += "DPRANGE(" + getURI2("hasMDVPJitterAbs") + ") = DOUBLE.\n"; + + kbString += "DPDOMAIN(" + getURI2("hasMDVPRAP") + ") = " + + getURI2("Patient") + ".\n"; + kbString += "DPRANGE(" + getURI2("hasMDVPRAP") + ") = DOUBLE.\n"; + + kbString += "DPDOMAIN(" + getURI2("hasMDVPPPQ") + ") = " + + getURI2("Patient") + ".\n"; + kbString += "DPRANGE(" + getURI2("hasMDVPPPQ") + ") = DOUBLE.\n"; + + kbString += "DPDOMAIN(" + getURI2("hasJitterDDP") + ") = " + + getURI2("Patient") + ".\n"; + kbString += "DPRANGE(" + getURI2("hasJitterDDP") + ") = DOUBLE.\n"; + + kbString += "DPDOMAIN(" + getURI2("hasMDVPShimmer") + ") = " + + getURI2("Patient") + ".\n"; + kbString += "DPRANGE(" + getURI2("hasMDVPShimmer") + ") = DOUBLE.\n"; + + kbString += "DPDOMAIN(" + getURI2("hasMDVPShimmerdB") + ") = " + + getURI2("Patient") + ".\n"; + kbString += "DPRANGE(" + getURI2("hasMDVPShimmerdB") + ") = DOUBLE.\n"; + + kbString += "DPDOMAIN(" + getURI2("hasShimmerAPQ3") + ") = " + + getURI2("Patient") + ".\n"; + kbString += "DPRANGE(" + getURI2("hasShimmerAPQ3") + ") = DOUBLE.\n"; + + kbString += "DPDOMAIN(" + getURI2("hasShimmerAPQ5") + ") = " + + getURI2("Patient") + ".\n"; + kbString += "DPRANGE(" + getURI2("hasShimmerAPQ5") + ") = DOUBLE.\n"; + + kbString += "DPDOMAIN(" + getURI2("hasMDVPAPQ") + ") = " + + getURI2("Patient") + ".\n"; + kbString += "DPRANGE(" + getURI2("hasMDVPAPQ") + ") = DOUBLE.\n"; + + kbString += "DPDOMAIN(" + getURI2("hasShimmerDDA") + ") = " + + getURI2("Patient") + ".\n"; + kbString += "DPRANGE(" + getURI2("hasShimmerDDA") + ") = DOUBLE.\n"; + + kbString += "DPDOMAIN(" + getURI2("hasNHR") + ") = " + + getURI2("Patient") + ".\n"; + kbString += "DPRANGE(" + getURI2("hasNHR") + ") = DOUBLE.\n"; + + kbString += "DPDOMAIN(" + getURI2("hasHNR") + ") = " + + getURI2("Patient") + ".\n"; + kbString += "DPRANGE(" + getURI2("hasHNR") + ") = DOUBLE.\n"; + + kbString += "DPDOMAIN(" + getURI2("hasRPDE") + ") = " + + getURI2("Patient") + ".\n"; + kbString += "DPRANGE(" + getURI2("hasRPDE") + ") = DOUBLE.\n"; + + kbString += "DPDOMAIN(" + getURI2("hasDFA") + ") = " + + getURI2("Patient") + ".\n"; + kbString += "DPRANGE(" + getURI2("hasDFA") + ") = DOUBLE.\n"; + + kbString += "DPDOMAIN(" + getURI2("hasSpread1") + ") = " + + getURI2("Patient") + ".\n"; + kbString += "DPRANGE(" + getURI2("hasSpread1") + ") = DOUBLE.\n"; + + kbString += "DPDOMAIN(" + getURI2("hasSpread2") + ") = " + + getURI2("Patient") + ".\n"; + kbString += "DPRANGE(" + getURI2("hasSpread2") + ") = DOUBLE.\n"; + + kbString += "DPDOMAIN(" + getURI2("hasD2") + ") = " + + getURI2("Patient") + ".\n"; + kbString += "DPRANGE(" + getURI2("hasD2") + ") = DOUBLE.\n"; + + kbString += "DPDOMAIN(" + getURI2("hasPPE") + ") = " + + getURI2("Patient") + ".\n"; + kbString += "DPRANGE(" + getURI2("hasPPE") + ") = DOUBLE.\n"; + + return kbString; + + } +} Added: trunk/components-core/src/main/java/org/dllearner/examples/flags/FlagScript.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/examples/flags/FlagScript.java (rev 0) +++ trunk/components-core/src/main/java/org/dllearner/examples/flags/FlagScript.java 2010-09-17 10:00:04 UTC (rev 2313) @@ -0,0 +1,22 @@ +/** + * + */ +package org.dllearner.examples.flags; + +import org.dllearner.examples.flags.Script; + +/** + * @author flo + * + */ +public class FlagScript { + + /** + * @param args + */ + public static void main(String[] args) { + // TODO Auto-generated method stub + Script.createKB(); + } + +} Added: trunk/components-core/src/main/java/org/dllearner/examples/flags/Script.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/examples/flags/Script.java (rev 0) +++ trunk/components-core/src/main/java/org/dllearner/examples/flags/Script.java 2010-09-17 10:00:04 UTC (rev 2313) @@ -0,0 +1,739 @@ +/** + * + */ +package org.dllearner.examples.flags; + +import org.dllearner.core.OntologyFormat; +import org.dllearner.core.owl.BooleanDatatypePropertyAssertion; +import org.dllearner.core.owl.ClassAssertionAxiom; +import org.dllearner.core.owl.Datatype; +import org.dllearner.core.owl.DatatypeProperty; +import org.dllearner.core.owl.DatatypePropertyDomainAxiom; +import org.dllearner.core.owl.DatatypePropertyRangeAxiom; +import org.dllearner.core.owl.DoubleDatatypePropertyAssertion; +import org.dllearner.core.owl.Individual; +import org.dllearner.core.owl.KB; +import org.dllearner.core.owl.NamedClass; +import org.dllearner.core.owl.ObjectProperty; +import org.dllearner.core.owl.ObjectPropertyAssertion; +import org.dllearner.core.owl.ObjectPropertyDomainAxiom; +import org.dllearner.core.owl.ObjectPropertyRangeAxiom; +import org.dllearner.core.owl.StringDatatypePropertyAssertion; +import org.semanticweb.owlapi.model.*; + + +import java.io.BufferedReader; +import java.io.File; +import java.io.FileNotFoundException; +import java.io.FileReader; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; + +/** + * @author flo + * + */ +public class Script { + + private static final String flagDataPath = "C:/temp/Uni/Semantic Web Praktikum 10/flag.data"; + //private static final String flagNamesPath = "D:/Dokumente/Uni/Semantic Web Praktikum 10/flag.names"; + private static final String kbOutputPath = "D:/Dokumente/develop/java/eclipseWorkspace/DL-Learner/examples/flags/flag.owl"; + private static final String dataSeparator = ","; + //private static String ontoIri = "http://www.semanticweb.org/owlapi/ontologies/uniLpz/semWeb"; + + /*private static final String ontoFlagClassName = "Flag"; + private static final String ontoCountryClassName = "Country"; + private static String ontoLandmassClassName = "Landmass"; + private static String ontoHemisphereClassName = "Hemisphere"; + private static String ontoLanguageClassName = "Language"; + private static String ontoLanguageGroupClassName = "LanguageGroup"; + private static String ontoReligionClassName = "Religion"; + private static String ontoReligionGroupClassName = "ReligionGroup"; + private static String ontoColorClassName = "Color";*/ + private static final String ontoFlagClassName = "Flag"; + private static final String ontoCountryClassName = ""; + private static String ontoLandmassClassName = ""; + private static String ontoHemisphereClassName = ""; + private static String ontoLanguageClassName = ""; + private static String ontoLanguageGroupClassName = ""; + private static String ontoReligionClassName = ""; + private static String ontoReligionGroupClassName = ""; + private static String ontoColorClassName = ""; + + private static final String iriSeperator = "#"; + + //private static OWLOntologyManager manager = OWLManager.createOWLOntologyManager(); + //private static OWLDataFactory factory = manager.getOWLDataFactory(); + + //OWLClass flagClass = factory.getOWLClass(IRI.create(ontoIri + iriSeperator + ontoFlagClassName)); + + private static final KB kb = new KB(); + private static ArrayList<Individual> flags = new ArrayList<Individual>(); + private static ArrayList<Individual> countries = new ArrayList<Individual>(); + + + /*private static NamedClass Flag = new NamedClass(getIRI(ontoFlagClassName)); + private static NamedClass Country = new NamedClass(getIRI(ontoCountryClassName)); + private static NamedClass Landmass = new NamedClass(getIRI(ontoLandmassClassName)); + private static NamedClass Hemisphere = new NamedClass(getIRI(ontoHemisphereClassName)); + private static NamedClass Language = new NamedClass(getIRI(ontoLanguageClassName)); + private static NamedClass LanguageGroup = new NamedClass(getIRI(ontoLanguageGroupClassName)); + private static NamedClass Religion = new NamedClass(getIRI(ontoReligionClassName)); + private static NamedClass ReligionGroup = new NamedClass(getIRI(ontoReligionGroupClassName)); + private static NamedClass Color = new NamedClass(getIRI(ontoColorClassName));*/ + private static NamedClass Flag = new NamedClass(getIRI("Flag")); + private static NamedClass Country = new NamedClass(getIRI("Country")); + private static NamedClass Landmass = new NamedClass(getIRI("Landmass")); + private static NamedClass Hemisphere = new NamedClass(getIRI("Hemisphere")); + private static NamedClass Language = new NamedClass(getIRI("Language")); + private static NamedClass LanguageGroup = new NamedClass(getIRI("LanguageGroup")); + private static NamedClass Religion = new NamedClass(getIRI("Religion")); + private static NamedClass ReligionGroup = new NamedClass(getIRI("ReligionGroup")); + private static NamedClass Color = new NamedClass(getIRI("Color")); + + // Objektbeziehungen + private static ObjectProperty isFlagOf = new ObjectProperty(getIRI("isFlagOf")); + private static ObjectProperty isOnLandmass = new ObjectProperty(getIRI("isOnLandmass")); + private static ObjectProperty isInZone = new ObjectProperty(getIRI("isInZone")); + private static ObjectProperty spokenLanguage = new ObjectProperty(getIRI("spokenLanguage")); + private static ObjectProperty spokenLanguageGroup = new ObjectProperty(getIRI("spokenLanguageGroup")); + private static ObjectProperty hasReligion = new ObjectProperty(getIRI("hasReligion")); + private static ObjectProperty hasReligionGroup = new ObjectProperty(getIRI("hasReligionGroup")); + private static ObjectProperty hasColor = new ObjectProperty(getIRI("hasColor")); + private static ObjectProperty hasPredominationColor = new ObjectProperty(getIRI("hasPredominationColor")); + private static ObjectProperty hasTopleftColor = new ObjectProperty(getIRI("hasTopleftColor")); + private static ObjectProperty hasBottomRightColor = new ObjectProperty(getIRI("hasBottomRightColor")); + + // Objekteigenschaften + private static DatatypeProperty hasName = new DatatypeProperty(getIRI("hasName")); + private static DatatypeProperty hasArea = new DatatypeProperty(getIRI("hasArea")); + private static DatatypeProperty hasPopulation = new DatatypeProperty(getIRI("hasPopulation")); + private static DatatypeProperty numberOfVericalBars = new DatatypeProperty(getIRI("numberOfVericalBars")); + private static DatatypeProperty numberOfHorizontalStripes = new DatatypeProperty(getIRI("numberOfHorizontalStripes")); + private static DatatypeProperty numberOfDifferentColors = new DatatypeProperty(getIRI("numberOfVericalBars")); + private static DatatypeProperty hasColorRed = new DatatypeProperty(getIRI("hasColorRed")); + private static DatatypeProperty hasColorGreen = new DatatypeProperty(getIRI("hasColorGreen")); + private static DatatypeProperty hasColorBlue = new DatatypeProperty(getIRI("hasColorBlue")); + private static DatatypeProperty hasColorGold = new DatatypeProperty(getIRI("hasColorGold")); + private static DatatypeProperty hasColorWhite = new DatatypeProperty(getIRI("hasColorWhite")); + private static DatatypeProperty hasColorBlack = new DatatypeProperty(getIRI("hasColorBlack")); + private static DatatypeProperty hasColorOrange = new DatatypeProperty(getIRI("hasColorOrange")); + private static DatatypeProperty numberOfCircles = new DatatypeProperty(getIRI("numberOfCircles")); + private static DatatypeProperty numberOfUprightCrosses = new DatatypeProperty(getIRI("numberOfUprightCrosses")); + private static DatatypeProperty numberOfDiagonalCrosses = new DatatypeProperty(getIRI("numberOfDiagonalCrosses")); + private static DatatypeProperty numberOfQuarterSections = new DatatypeProperty(getIRI("numberOfQuarterSections")); + private static DatatypeProperty numberOfQuarteredSections = new DatatypeProperty(getIRI("numberOfQuarteredSections")); + private static DatatypeProperty numberOfSunOrStarSymbols = new DatatypeProperty(getIRI("numberOfSunOrStarSymbols")); + private static DatatypeProperty hasCrescentMoonSymbol = new DatatypeProperty(getIRI("hasCrescentMoonSymbol")); + private static DatatypeProperty hasTriangle = new DatatypeProperty(getIRI("hasTriangle")); + private static DatatypeProperty hasImageInanimate = new DatatypeProperty(getIRI("hasImageInanimate")); + private static DatatypeProperty hasImageAnimate = new DatatypeProperty(getIRI("hasImageAnimate")); + private static DatatypeProperty hasText = new DatatypeProperty(getIRI("hasText")); + + private static Individual landmassNorthAmerica = new Individual(getIRI(ontoLandmassClassName + "NorthAmerica")); + private static Individual landmassSouthAmerica = new Individual(getIRI(ontoLandmassClassName + "SouthAmerica")); + private static Individual landmassEurope = new Individual(getIRI(ontoLandmassClassName + "Europe")); + private static Individual landmassAfrica = new Individual(getIRI(ontoLandmassClassName + "Africa")); + private static Individual landmassAsia = new Individual(getIRI(ontoLandmassClassName + "Asia")); + private static Individual landmassOceania = new Individual(getIRI(ontoLandmassClassName + "Oceania")); + + private static Individual hemisphereNorthEast = new Individual(getIRI(ontoHemisphereClassName + "NorthEast")); + private static Individual hemisphereSouthEast = new Individual(getIRI(ontoHemisphereClassName + "SouthEast")); + private static Individual hemisphereSouthWest = new Individual(getIRI(ontoHemisphereClassName + "SouthWest")); + private static Individual hemisphereNorthWest = new Individual(getIRI(ontoHemisphereClassName + "NorthWest")); + + private static Individual languageGroupEnglish = new Individual(getIRI(ontoLanguageGroupClassName + "English")); + private static Individual languageGroupSpanish = new Individual(getIRI(ontoLanguageGroupClassName + "Spanish")); + private static Individual languageGroupFrench = new Individual(getIRI(ontoLanguageGroupClassName + "French")); + private static Individual languageGroupGerman = new Individual(getIRI(ontoLanguageGroupClassName + "German")); + private static Individual languageGroupSlavic = new Individual(getIRI(ontoLanguageGroupClassName + "Slavic")); + private static Individual languageGroupIndoEuropean = new Individual(getIRI(ontoLanguageGroupClassName + "IndoEuropean")); + private static Individual languageGroupChinese = new Individual(getIRI(ontoLanguageGroupClassName + "Chinese")); + private static Individual languageGroupArabic = new Individual(getIRI(ontoLanguageGroupClassName + "Arabic")); + private static Individual languageGroupJapTurkFinnMag = new Individual(getIRI(ontoLanguageGroupClassName + "JapaneseTurkishFinnishMagyar")); + private static Individual languageGroupOthers = new Individual(getIRI(ontoLanguageGroupClassName + "Others")); + + private static Individual religionGroupCatholic = new Individual(getIRI(ontoReligionGroupClassName + "Catholic")); + private static Individual religionGroupOtherChristian = new Individual(getIRI(ontoReligionGroupClassName + "OtherChristian")); + private static Individual religionGroupMuslim = new Individual(getIRI(ontoReligionGroupClassName + "Muslim")); + private static Individual religionGroupBuddhist = new Individual(getIRI(ontoReligionGroupClassName + "Buddhist")); + private static Individual religionGroupHindu = new Individual(getIRI(ontoReligionGroupClassName + "Hindu")); + private static Individual religionGroupEthnic = new Individual(getIRI(ontoReligionGroupClassName + "Ethnic")); + private static Individual religionGroupMarxist = new Individual(getIRI(ontoReligionGroupClassName + "Marxist")); + private static Individual religionGroupOthers = new Individual(getIRI(ontoReligionGroupClassName + "Others")); + + private static Individual colorRed = new Individual(getIRI(ontoColorClassName + "red")); + private static Individual colorGreen = new Individual(getIRI(ontoColorClassName + "green")); + private static Individual colorBlue = new Individual(getIRI(ontoColorClassName + "blue")); + private static Individual colorGold = new Individual(getIRI(ontoColorClassName + "gold")); + private static Individual colorYellow = new Individual(getIRI(ontoColorClassName + "yellow")); + private static Individual colorWhite = new Individual(getIRI(ontoColorClassName + "white")); + private static Individual colorBlack = new Individual(getIRI(ontoColorClassName + "black")); + private static Individual colorOrange = new Individual(getIRI(ontoColorClassName + "orange")); + private static Individual colorBrown = new Individual(getIRI(ontoColorClassName + "brown")); + private static HashMap<String, Individual> newColors = new HashMap<String, Individual>(); + + /** + * @param args + */ + + + // Klassen +// NamedClass Flag = new NamedClass(getIRI(ontoFlagClassName)); +// NamedClass Country = new NamedClass(getIRI(ontoCountryClassName)); +// NamedClass Landmass = new NamedClass(getIRI(ontoLandmassClassName)); +// NamedClass Hemisphere = new NamedClass(getIRI(ontoHemisphereClassName)); +// NamedClass Language = new NamedClass(getIRI(ontoLanguageClassName)); +// NamedClass LanguageGroup = new NamedClass(getIRI(ontoLanguageGroupClassName)); +// NamedClass Religion = new NamedClass(getIRI(ontoReligionClassName)); +// NamedClass ReligionGroup = new NamedClass(getIRI(ontoReligionGroupClassName)); +// NamedClass Color = new NamedClass(getIRI(ontoColorClassName)); + + public static boolean createKB() + { + + // Objektbeziehungen +// ObjectProperty isFlagOf = new ObjectProperty(getIRI("isFlagOf")); + kb.addAxiom(new ObjectPropertyDomainAxiom(isFlagOf, Flag)); + kb.addAxiom(new ObjectPropertyRangeAxiom(isFlagOf, Country)); + +// ObjectProperty isOnLandmass = new ObjectProperty(getIRI("isOnLandmass")); + kb.addAxiom(new ObjectPropertyDomainAxiom(isOnLandmass, Country)); + kb.addAxiom(new ObjectPropertyRangeAxiom(isOnLandmass, Landmass)); + +// ObjectProperty isInZone = new ObjectProperty(getIRI("isInZone")); + kb.addAxiom(new ObjectPropertyDomainAxiom(isInZone, Country)); + kb.addAxiom(new ObjectPropertyRangeAxiom(isInZone, Hemisphere)); + +// ObjectProperty spokenLanguage = new ObjectProperty(getIRI("spokenLanguage")); + kb.addAxiom(new ObjectPropertyDomainAxiom(spokenLanguage, Country)); + kb.addAxiom(new ObjectPropertyRangeAxiom(spokenLanguage, LanguageGroup)); + kb.addAxiom(new ObjectPropertyRangeAxiom(spokenLanguage, Language)); + +// ObjectProperty spokenLanguageGroup = new ObjectProperty(getIRI("spokenLanguageGroup")); + kb.addAxiom(new ObjectPropertyDomainAxiom(spokenLanguageGroup, Country)); + kb.addAxiom(new ObjectPropertyRangeAxiom(spokenLanguageGroup, LanguageGroup)); + +// ObjectProperty hasReligion = new ObjectProperty(getIRI("hasReligion")); + kb.addAxiom(new ObjectPropertyDomainAxiom(hasReligion, Country)); + kb.addAxiom(new ObjectPropertyDomainAxiom(hasReligion, ReligionGroup)); + kb.addAxiom(new ObjectPropertyRangeAxiom(hasReligion, Religion)); + +// ObjectProperty hasReligionGroup = new ObjectProperty(getIRI("hasReligionGroup")); + kb.addAxiom(new ObjectPropertyDomainAxiom(hasReligionGroup, Country)); + kb.addAxiom(new ObjectPropertyRangeAxiom(hasReligionGroup, ReligionGroup)); + +// ObjectProperty hasColor = new ObjectProperty(getIRI("hasColor")); + kb.addAxiom(new ObjectPropertyDomainAxiom(hasColor, Flag)); + kb.addAxiom(new ObjectPropertyRangeAxiom(hasColor, Color)); + +// ObjectProperty hasPredominationColor = new ObjectProperty(getIRI("hasPredominationColor")); + kb.addAxiom(new ObjectPropertyDomainAxiom(hasPredominationColor, Flag)); + kb.addAxiom(new ObjectPropertyRangeAxiom(hasPredominationColor, Color)); + +// ObjectProperty hasTopleftColor = new ObjectProperty(getIRI("hasTopleftColor")); + kb.addAxiom(new ObjectPropertyDomainAxiom(hasTopleftColor, Flag)); + kb.addAxiom(new ObjectPropertyRangeAxiom(hasTopleftColor, Color)); + +// ObjectProperty hasBottomRightColor = new ObjectProperty(getIRI("hasBottomRightColor")); + kb.addAxiom(new ObjectPropertyDomainAxiom(hasBottomRightColor, Flag)); + kb.addAxiom(new ObjectPropertyRangeAxiom(hasBottomRightColor, Color)); + + // Objekteigenschaften +// private static DatatypeProperty hasName = new DatatypeProperty(getIRI("hasName")); + kb.addAxiom(new DatatypePropertyDomainAxiom(hasName, Country)); + kb.addAxiom(new DatatypePropertyDomainAxiom(hasName, Landmass)); + kb.addAxiom(new DatatypePropertyDomainAxiom(hasName, Hemisphere)); + kb.addAxiom(new DatatypePropertyDomainAxiom(hasName, ReligionGroup)); + kb.addAxiom(new DatatypePropertyDomainAxiom(hasName, LanguageGroup)); + kb.addAxiom(new DatatypePropertyDomainAxiom(hasName, Religion)); + kb.addAxiom(new DatatypePropertyDomainAxiom(hasName, Language)); + kb.addAxiom(new DatatypePropertyDomainAxiom(hasName, Color)); + kb.addAxiom(new DatatypePropertyDomainAxiom(hasName, Flag)); + kb.addAxiom(new DatatypePropertyRangeAxiom(hasName, Datatype.STRING)); + +// DatatypeProperty hasArea = new DatatypeProperty(getIRI("hasArea")); + kb.addAxiom(new DatatypePropertyDomainAxiom(hasArea, Country)); + kb.addAxiom(new DatatypePropertyDomainAxiom(hasArea, Landmass)); + kb.addAxiom(new DatatypePropertyDomainAxiom(hasArea, Hemisphere)); + kb.addAxiom(new DatatypePropertyRangeAxiom(hasArea, Datatype.DOUBLE)); + +// DatatypeProperty hasPopulation = new DatatypeProperty(getIRI("hasPopulation")); + kb.addAxiom(new DatatypePropertyDomainAxiom(hasPopulation, Country)); + kb.addAxiom(new DatatypePropertyDomainAxiom(hasPopulation, Landmass)); + kb.addAxiom(new DatatypePropertyDomainAxiom(hasPopulation, Hemisphere)); + kb.addAxiom(new DatatypePropertyRangeAxiom(hasPopulation, Datatype.DOUBLE)); + +// DatatypeProperty numberOfVericalBars = new DatatypeProperty(getIRI("numberOfVericalBars")); + kb.addAxiom(new DatatypePropertyDomainAxiom(numberOfVericalBars, Flag)); + kb.addAxiom(new DatatypePropertyRangeAxiom(numberOfVericalBars, Datatype.DOUBLE)); + +// DatatypeProperty numberOfHorizontalStripes = new DatatypeProperty(getIRI("numberOfHorizontalStripes")); + kb.addAxiom(new DatatypePropertyDomainAxiom(numberOfHorizontalStripes, Flag)); + kb.addAxiom(new DatatypePropertyRangeAxiom(numberOfHorizontalStripes, Datatype.DOUBLE)); + +// DatatypeProperty numberOfDifferentColors = new DatatypeProperty(getIRI("numberOfVericalBars")); + kb.addAxiom(new DatatypePropertyDomainAxiom(numberOfDifferentColors, Flag)); + kb.addAxiom(new DatatypePropertyRangeAxiom(numberOfDifferentColors, Datatype.DOUBLE)); + +// DatatypeProperty hasColorRed = new DatatypeProperty(getIRI("hasColorRed")); + kb.addAxiom(new DatatypePropertyDomainAxiom(hasColorRed, Flag)); + kb.addAxiom(new DatatypePropertyRangeAxiom(hasColorRed, Datatype.BOOLEAN)); + +// DatatypeProperty hasColorGreen = new DatatypeProperty(getIRI("hasColorGreen")); + kb.addAxiom(new DatatypePropertyDomainAxiom(hasColorGreen, Flag)); + kb.addAxiom(new DatatypePropertyRangeAxiom(hasColorGreen, Datatype.BOOLEAN)); + +// DatatypeProperty hasColorBlue = new DatatypeProperty(getIRI("hasColorBlue")); + kb.addAxiom(new DatatypePropertyDomainAxiom(hasColorBlue, Flag)); + kb.addAxiom(new DatatypePropertyRangeAxiom(hasColorBlue, Datatype.BOOLEAN)); + +// DatatypeProperty hasColorGold = new DatatypeProperty(getIRI("hasColorGold")); + kb.addAxiom(new DatatypePropertyDomainAxiom(hasColorGold, Flag)); + kb.addAxiom(new DatatypePropertyRangeAxiom(hasColorGold, Datatype.BOOLEAN)); + +// DatatypeProperty hasColorWhite = new DatatypeProperty(getIRI("hasColorWhite")); + kb.addAxiom(new DatatypePropertyDomainAxiom(hasColorWhite, Flag)); + kb.addAxiom(new DatatypePropertyRangeAxiom(hasColorWhite, Datatype.BOOLEAN)); + +// DatatypeProperty hasColorBlack = new DatatypeProperty(getIRI("hasColorBlack")); + kb.addAxiom(new DatatypePropertyDomainAxiom(hasColorBlack, Flag)); + kb.addAxiom(new DatatypePropertyRangeAxiom(hasColorBlack, Datatype.BOOLEAN)); + +// DatatypeProperty hasColorOrange = new DatatypeProperty(getIRI("hasColorOrange")); + kb.addAxiom(new DatatypePropertyDomainAxiom(hasColorOrange, Flag)); + kb.addAxiom(new DatatypePropertyRangeAxiom(hasColorOrange, Datatype.BOOLEAN)); + +// DatatypeProperty numberOfCircles = new DatatypeProperty(getIRI("numberOfCircles")); + kb.addAxiom(new DatatypePropertyDomainAxiom(numberOfCircles, Flag)); + kb.addAxiom(new DatatypePropertyRangeAxiom(numberOfCircles, Datatype.DOUBLE)); + +// DatatypeProperty numberOfUprightCrosses = new DatatypeProperty(getIRI("numberOfUprightCrosses")); + kb.addAxiom(new DatatypePropertyDomainAxiom(numberOfUprightCrosses, Flag)); + kb.addAxiom(new DatatypePropertyRangeAxiom(numberOfUprightCrosses, Datatype.DOUBLE)); + +// DatatypeProperty numberOfDiagonalCrosses = new DatatypeProperty(getIRI("numberOfDiagonalCrosses")); + kb.addAxiom(new DatatypePropertyDomainAxiom(numberOfDiagonalCrosses, Flag)); + kb.addAxiom(new DatatypePropertyRangeAxiom(numberOfDiagonalCrosses, Datatype.DOUBLE)); + +// DatatypeProperty numberOfQuarterSections = new DatatypeProperty(getIRI("numberOfQuarterSections")); + kb.addAxiom(new DatatypePropertyDomainAxiom(numberOfQuarterSections, Flag)); + kb.addAxiom(new DatatypePropertyRangeAxiom(numberOfQuarterSections, Datatype.DOUBLE)); + +// DatatypeProperty numberOfQuarteredSections = new DatatypeProperty(getIRI("numberOfQuarteredSections")); + kb.addAxiom(new DatatypePropertyDomainAxiom(numberOfQuarteredSections, Flag)); + kb.addAxiom(new DatatypePropertyRangeAxiom(numberOfQuarteredSections, Datatype.DOUBLE)); + +// DatatypeProperty numberOfSunOrStarSymbols = new DatatypeProperty(getIRI("numberOfSunOrStarSymbols")); + kb.addAxiom(new DatatypePropertyDomainAxiom(numberOfSunOrStarSymbols, Flag)); + kb.addAxiom(new DatatypePropertyRangeAxiom(numberOfSunOrStarSymbols, Datatype.DOUBLE)); + +// DatatypeProperty hasCrescentMoonSymbol = new DatatypeProperty(getIRI("hasCrescentMoonSymbol")); + kb.addAxiom(new DatatypePropertyDomainAxiom(hasCrescentMoonSymbol, Flag)); + kb.addAxiom(new DatatypePropertyRangeAxiom(hasCrescentMoonSymbol, Datatype.BOOLEAN)); + +// DatatypeProperty hasTriangle = new DatatypeProperty(getIRI("hasTriangle")); + kb.addAxiom(new DatatypePropertyDomainAxiom(hasTriangle, Flag)); + kb.addAxiom(new DatatypePropertyRangeAxiom(hasTriangle, Datatype.BOOLEAN)); + +// DatatypeProperty hasImageInanimate = new DatatypeProperty(getIRI("hasImageInanimate")); + kb.addAxiom(new DatatypePropertyDomainAxiom(hasImageInanimate, Flag)); + kb.addAxiom(new DatatypePropertyRangeAxiom(hasImageInanimate, Datatype.BOOLEAN)); + +// DatatypeProperty hasImageAnimate = new DatatypeProperty(getIRI("hasImageAnimate")); + kb.addAxiom(new DatatypePropertyDomainAxiom(hasImageAnimate, Flag)); + kb.addAxiom(new DatatypePropertyRangeAxiom(hasImageAnimate, Datatype.BOOLEAN)); + +// DatatypeProperty hasText = new DatatypeProperty(getIRI("hasText")); + kb.addAxiom(new DatatypePropertyDomainAxiom(hasText, Flag)); + kb.addAxiom(new DatatypePropertyRangeAxiom(hasText, Datatype.BOOLEAN)); + + + +// Individual landmassNorthAmerica = new Individual(getIRI(ontoLandmassClassName + "NorthAmerica")); + kb.addAxiom(new ClassAssertionAxiom(Landmass,landmassNorthAmerica)); + kb.addAxiom(new StringDatatypePropertyAssertion(hasName, landmassNorthAmerica, "North America")); +// Individual landmassSouthAmerica = new Individual(getIRI(ontoLandmassClassName + "SouthAmerica")); + kb.addAxiom(new ClassAssertionAxiom(Landmass,landmassSouthAmerica)); + kb.addAxiom(new StringDatatypePropertyAssertion(hasName, landmassNorthAmerica, "South America")); +// Individual landmassEurope = new Individual(getIRI(ontoLandmassClassName + "Europe")); + kb.addAxiom(new ClassAssertionAxiom(Landmass,landmassEurope)); + kb.addAxiom(new StringDatatypePropertyAssertion(hasName, landmassNorthAmerica, "Europe")); +// Individual landmassAfrica = new Individual(getIRI(ontoLandmassClassName + "Africa")); + kb.addAxiom(new ClassAssertionAxiom(Landmass,landmassAfrica)); + kb.addAxiom(new StringDatatypePropertyAssertion(hasName, landmassNorthAmerica, "Africa")); +// Individual landmassAsia = new Individual(getIRI(ontoLandmassClassName + "Asia")); + kb.addAxiom(new ClassAssertionAxiom(Landmass,landmassAsia)); + kb.addAxiom(new StringDatatypePropertyAssertion(hasName, landmassNorthAmerica, "Asia")); +// Individual landmassOceania = new Individual(getIRI(ontoLandmassClassName + "Oceania")); + kb.addAxiom(new ClassAssertionAxiom(Landmass,landmassOceania)); + kb.addAxiom(new StringDatatypePropertyAssertion(hasName, landmassNorthAmerica, "Oceania")); + + +// Individual hemisphereNorthEast = new Individual(getIRI(ontoHemisphereClassName + "NorthEast")); + kb.addAxiom(new ClassAssertionAxiom(Hemisphere,hemisphereNorthEast)); +// Individual hemisphereSouthEast = new Individual(getIRI(ontoHemisphereClassName + "SouthEast")); + kb.addAxiom(new ClassAssertionAxiom(Hemisphere,hemisphereSouthEast)); +// Individual hemisphereSouthWest = new Individual(getIRI(ontoHemisphereClassName... [truncated message content] |
From: <lor...@us...> - 2010-09-17 11:07:09
|
Revision: 2314 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=2314&view=rev Author: lorenz_b Date: 2010-09-17 11:07:03 +0000 (Fri, 17 Sep 2010) Log Message: ----------- Modified jamon-API dependency entries. Modified Paths: -------------- trunk/components-core/pom.xml trunk/pom.xml Modified: trunk/components-core/pom.xml =================================================================== --- trunk/components-core/pom.xml 2010-09-17 10:00:04 UTC (rev 2313) +++ trunk/components-core/pom.xml 2010-09-17 11:07:03 UTC (rev 2314) @@ -100,10 +100,12 @@ <artifactId>hermit</artifactId> </dependency> - <dependency> - <groupId>com.jamonapi</groupId> - <artifactId>jamon</artifactId> - </dependency> + <dependency> + <groupId>dllearnerDependency</groupId> + <artifactId>jamon-2.7.jar</artifactId> + <version>snapshot</version> + </dependency> + <!--JENA ARQ is in central - we use the latest--> <dependency> <groupId>com.hp.hpl.jena</groupId> Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2010-09-17 10:00:04 UTC (rev 2313) +++ trunk/pom.xml 2010-09-17 11:07:03 UTC (rev 2314) @@ -163,12 +163,13 @@ <version>2.2.0</version> </dependency> - <dependency> - <groupId>com.jamonapi</groupId> - <artifactId>jamon</artifactId> - <version>2.7</version> - </dependency> + <dependency> + <groupId>dllearnerDependency</groupId> + <artifactId>jamon-2.7.jar</artifactId> + <version>snapshot</version> + </dependency> + <!--JENA ARQ is in central - we use the latest--> <dependency> <groupId>com.hp.hpl.jena</groupId> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jen...@us...> - 2010-09-21 10:53:20
|
Revision: 2318 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=2318&view=rev Author: jenslehmann Date: 2010-09-21 10:53:10 +0000 (Tue, 21 Sep 2010) Log Message: ----------- - extracted gui and cli out of components-core - some code has been moved to interfaces - warning: some compile errors remaining Modified Paths: -------------- trunk/components-core/src/main/java/org/dllearner/core/ComponentManager.java trunk/components-core/src/main/java/org/dllearner/utilities/JamonMonitorLogger.java trunk/sparql-query-generator/.settings/org.eclipse.jdt.core.prefs trunk/sparql-query-generator/.settings/org.maven.ide.eclipse.prefs Added Paths: ----------- trunk/interfaces/src/main/java/org/dllearner/cli/DocumentationGenerator.java trunk/interfaces/src/main/java/org/dllearner/confparser/ trunk/interfaces/src/main/java/org/dllearner/confparser/ConfParser.java trunk/interfaces/src/main/java/org/dllearner/confparser/ConfParserConstants.java trunk/interfaces/src/main/java/org/dllearner/confparser/ConfParserTokenManager.java trunk/interfaces/src/main/java/org/dllearner/confparser/conf.jj trunk/interfaces/src/test/java/org/dllearner/test/ trunk/interfaces/src/test/java/org/dllearner/test/junit/ trunk/interfaces/src/test/java/org/dllearner/test/junit/ExampleTests.java trunk/interfaces/src/test/java/org/dllearner/test/junit/OWLlinkTest.java trunk/interfaces/src/test/java/org/dllearner/test/junit/ReasonerTests.java Removed Paths: ------------- trunk/components-core/src/main/java/org/dllearner/cli/ trunk/components-core/src/main/java/org/dllearner/gui/ trunk/components-core/src/main/java/org/dllearner/parser/ConfParser.java trunk/components-core/src/main/java/org/dllearner/parser/ConfParserConstants.java trunk/components-core/src/main/java/org/dllearner/parser/ConfParserTokenManager.java trunk/components-core/src/main/java/org/dllearner/parser/conf.jj trunk/components-core/src/main/java/org/dllearner/test/junit/ExampleTests.java trunk/components-core/src/main/java/org/dllearner/test/junit/OWLlinkTest.java trunk/components-core/src/main/java/org/dllearner/test/junit/ReasonerTests.java trunk/interfaces/src/test/java/org/dllearner/junit/ Modified: trunk/components-core/src/main/java/org/dllearner/core/ComponentManager.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/core/ComponentManager.java 2010-09-17 19:15:29 UTC (rev 2317) +++ trunk/components-core/src/main/java/org/dllearner/core/ComponentManager.java 2010-09-21 10:53:10 UTC (rev 2318) @@ -21,7 +21,6 @@ import java.io.BufferedReader; import java.io.DataInputStream; -import java.io.File; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; @@ -43,12 +42,9 @@ import java.util.Map.Entry; import org.apache.log4j.Logger; -import org.dllearner.cli.ConfMapper; import org.dllearner.core.options.ConfigEntry; import org.dllearner.core.options.ConfigOption; import org.dllearner.core.options.InvalidConfigOptionValueException; -import org.dllearner.kb.sparql.SparqlKnowledgeSource; -import org.dllearner.utilities.Files; import org.dllearner.utilities.datastructures.Maps; /** @@ -118,8 +114,6 @@ private static Map<Class<? extends LearningAlgorithm>, Collection<Class<? extends LearningProblem>>> algorithmProblemsMapping; private static Map<Class<? extends LearningProblem>, Collection<Class<? extends LearningAlgorithm>>> problemAlgorithmsMapping; - private ConfMapper confMapper = new ConfMapper(); - // list of default values of config options // private static Map<ConfigOption<?>,Object> configOptionDefaults; @@ -540,79 +534,6 @@ return getConfigOptionValue(component, option); } - /** - * Writes documentation for all components available in this - * <code>ComponentManager</code> instance. It goes through - * all components (sorted by their type) and all the configuration - * options of the components. Explanations, default values, allowed - * values for the options are collected and the obtained string is - * written in a file. - * @param file The documentation file. - */ - public void writeConfigDocumentation(File file) { - String doc = ""; - doc += "This file contains an automatically generated files of all components and their config options.\n\n"; - - // go through all types of components and write down their documentation - doc += "*********************\n"; - doc += "* Knowledge Sources *\n"; - doc += "*********************\n\n"; - doc += "BEGIN MANUAL PART\n"; - doc += "END MANUAL PART\n\n"; - for(Class<? extends Component> component : knowledgeSources) { - if(component != SparqlKnowledgeSource.class){continue;} - doc += getComponentConfigString(component, KnowledgeSource.class); - } - - doc += "*************\n"; - doc += "* Reasoners *\n"; - doc += "*************\n\n"; - for(Class<? extends Component> component : reasonerComponents) { - doc += getComponentConfigString(component, ReasonerComponent.class); - } - - doc += "*********************\n"; - doc += "* Learning Problems *\n"; - doc += "*********************\n\n"; - for(Class<? extends Component> component : learningProblems) { - doc += getComponentConfigString(component, LearningProblem.class); - } - - doc += "***********************\n"; - doc += "* Learning Algorithms *\n"; - doc += "***********************\n\n"; - for(Class<? extends Component> component : learningAlgorithms) { - doc += getComponentConfigString(component, LearningAlgorithm.class); - } - - Files.createFile(file, doc); - } - - private String getComponentConfigString(Class<? extends Component> component, Class<? extends Component> componentType) { - String componentDescription = "component: " + invokeStaticMethod(component, "getName") + " (" + component.getName() + ")"; - String str = componentDescription + "\n"; - String cli = confMapper.getComponentTypeString(componentType); - String usage = confMapper.getComponentString(component); - - for(int i=0; i<componentDescription.length(); i++) { - str += "="; - } - str += "\n\n"; - if (componentType.equals(KnowledgeSource.class)){ - str += "conf file usage: "+cli+" (\"$url\", \""+usage.toUpperCase()+"\");\n\n"; - }else{ - str += "conf file usage: "+cli+" = "+usage+";\n\n"; - } - - for(ConfigOption<?> option : componentOptions.get(component)) { - String val = (option.getDefaultValue()==null)?"":option.getDefaultValue()+""; - str += option.toString() + - "conf file usage: "+usage+"." - + option.getName()+" = "+val+";\n\n"; - } - return str+"\n"; - } - // convenience method for invoking a static method; // used as a central point for exception handling for Java reflection // static method calls Deleted: trunk/components-core/src/main/java/org/dllearner/parser/ConfParser.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/parser/ConfParser.java 2010-09-17 19:15:29 UTC (rev 2317) +++ trunk/components-core/src/main/java/org/dllearner/parser/ConfParser.java 2010-09-21 10:53:10 UTC (rev 2318) @@ -1,1050 +0,0 @@ -/* Generated By:JavaCC: Do not edit this line. ConfParser.java */ -package org.dllearner.parser; - -import java.util.HashMap; -import java.util.List; -import java.util.LinkedList; -import java.util.Map; -import java.util.Set; -import java.util.HashSet; -import java.util.SortedSet; -import java.util.TreeSet; - -import java.io.File; -import java.io.FileInputStream; -import java.io.FileNotFoundException; -import java.io.IOException; - -import org.dllearner.Info; - -import org.dllearner.cli.*; -import org.dllearner.utilities.datastructures.*; - -@SuppressWarnings("all") -public class ConfParser implements ConfParserConstants { - - // examples - private SortedSet<String> positiveExamples = new TreeSet<String>(); - private SortedSet<String> negativeExamples = new TreeSet<String>(); - - // conf file options - private List<ConfFileOption> confOptions = new LinkedList<ConfFileOption>(); - private Map<String,ConfFileOption> confOptionsByName = new HashMap<String,ConfFileOption>(); - private Map<String,List<ConfFileOption>> confOptionsByPrefix = new HashMap<String,List<ConfFileOption>>(); - - // Funktionsaufrufe (die gleiche Funktion darf mehrmals mit unterschiedlichen - // Argumenten aufgerufen werden) - // private static Map<String,Set<String>> functionCallsAlt = new TreeMap<String,Set<String>>(); - // jeder Funktionsaufruf hat eine Liste von n Argumenten; alle Funktionsaufrufe - // werden in einer Liste gespeichert - // private List<List<String>> functionCalls = new LinkedList<List<String>>(); - // => irgendwie Funktionsname + Argumente speichern - // => d.h. man bräuchte für jede Funktion so eine Liste oder das erste Element - // der Liste ist der Funktionsname <= ist noch die praktikabelste Variante - - private Map<String,List<List<String>>> functionCalls = new HashMap<String,List<List<String>>>(); - - private void addFunctionCall(String name, List<String> arguments) { - if(functionCalls.containsKey(name)) - functionCalls.get(name).add(arguments); - else { - List<List<String>> calls = new LinkedList<List<String>>(); - calls.add(arguments); - functionCalls.put(name,calls); - } - } - - private void addConfOption(ConfFileOption confOption) { - confOptions.add(confOption); - confOptionsByName.put(confOption.getFullName(), confOption); - String prefix = confOption.getOption(); - if(confOptionsByPrefix.containsKey(prefix)) - confOptionsByPrefix.get(prefix).add(confOption); - else { - LinkedList<ConfFileOption> optionList = new LinkedList<ConfFileOption>(); - optionList.add(confOption); - confOptionsByPrefix.put(prefix,optionList); - } - } - - public SortedSet<String> getPositiveExamples() { - return positiveExamples; - } - - public SortedSet<String> getNegativeExamples() { - return negativeExamples; - } - - public List<ConfFileOption> getConfOptions() { - return confOptions; - } - - public Map<String,ConfFileOption> getConfOptionsByName() { - return confOptionsByName; - } - - public ConfFileOption getConfOptionsByName(String name) { - return confOptionsByName.get(name); - } - - public Map<String,List<ConfFileOption>> getConfOptionsByPrefix() { - return confOptionsByPrefix; - } - - public List<ConfFileOption> getConfOptionsByPrefix(String prefix) { - return confOptionsByPrefix.get(prefix); - } - - public Map<String,List<List<String>>> getFunctionCalls() { - return functionCalls; - } - - /* - private static void addFunctionCall(String functionName, String argument) { - if(functionCalls.containsKey(functionName)) { - functionCalls.get(functionName).add(argument); - } else { - Set<String> newFunction = new TreeSet<String>(); - newFunction.add(argument); - functionCalls.put(functionName,newFunction); - } - } - */ - - - /* - public static SimpleNode parseString(String str) throws ParseException { - StringReader sr = new StringReader(str); - DLLearner learner = new DLLearner(sr); - SimpleNode n = learner.Start(); - return n; - } - */ - - public static ConfParser parseFile(File filename) throws FileNotFoundException, ParseException { - ConfParser learner = null; -// try { - learner = new ConfParser(new FileInputStream(filename)); - learner.Start(); -// } catch(FileNotFoundException e) { -// e.printStackTrace(); -// } catch(ParseException e) { -// e.printStackTrace(); -// } - return learner; - } - - public static void main(String args[]) { - - if(args.length==0) { - System.out.println("Please specify an input file."); - System.exit(0); - } - - System.out.println("Starting DL-Learner (Build " + Info.build + ")"); - // System.out.println(args); - - // System.out.println(args[0]); - // System.out.println(args[1]); - // System.out.println(args.length); - - File f = new File(args[args.length-1]); -// String baseDir = ""; - - System.out.print("Parsing " + f.getName() + " ... "); - long parseStartTime = System.currentTimeMillis(); - - // SimpleNode n = null; - ConfParser learner = null; - try { - learner = new ConfParser(new FileInputStream(args[args.length-1])); -// baseDir = f.getParentFile().getPath(); - } catch(IOException e) { - System.err.println(e); - System.exit(0); - } - try { - learner.Start(); - // n.dump(""); - // System.out.println("Thank you."); - } catch (Exception e) { - System.out.println("\u005cnParse exception occurred. Please follow the advise given below."); - System.out.println(e.getMessage()); - e.printStackTrace(); - System.exit(0); - } - - long parseDuration = System.currentTimeMillis() - parseStartTime; - System.out.println("OK (" + parseDuration + " ms)"); - -// boolean queryMode = false; - // solution test mode wird nicht unbedingt gebraucht, da man die covers - // gleich standardmäßig beim query mit anzeigen kann - // boolean solutionTestMode = false; - -// if(args.length>1 && args[0].equals("-q")) -// queryMode = true; - - //if(args.length>1 && args[0].equals("-qt")) { - // queryMode = true; - // solutionTestMode = true; - //} - - // new Main(n, baseDir, queryMode); - // Parser erstmal Standalone testen - // n.dump(""); - - // neuer Aufruf des Hauptprogramms - // TODO: remove (in the future, the parser will be called from whatever method - // needs it, instead of starting the learning process itself) - // new Main(kb,positiveExamples,negativeExamples,confOptions,functionCalls,baseDir,queryMode); - } - - final public void Start() throws ParseException { - ConfFileOption confOption; - label_1: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case POS_EX: - case NEG_EX: - case ID: - ; - break; - default: - jj_la1[0] = jj_gen; - break label_1; - } - if (jj_2_1(2147483647)) { - confOption = ConfOption(); - addConfOption(confOption); - } else if (jj_2_2(2147483647)) { - FunctionCall(); - } else if (jj_2_3(2147483647)) { - PosExample(); - } else if (jj_2_4(2147483647)) { - NegExample(); - } else { - jj_consume_token(-1); - throw new ParseException(); - } - } - jj_consume_token(0); - } - - final public ConfFileOption ConfOption() throws ParseException { - boolean containsSubOption=false, isNumeric=false, isDouble=false, isSet=false, isList=false; - String option="", subOption="", value="", tmp="", tmp2=""; - int number = 0; - double numberDouble = 0; - ConfFileOption confOption; - Set<String> values = new HashSet<String>(); - List<StringTuple> tuples = new LinkedList<StringTuple>(); - option = Id(); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case COMMAND_END: - jj_consume_token(COMMAND_END); - subOption = Id(); - containsSubOption=true; - break; - default: - jj_la1[1] = jj_gen; - ; - } - jj_consume_token(25); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case ID: - value = Id(); - break; - case STRING: - value = String(); - break; - case NUMBER: - number = Integer(); - isNumeric=true; - break; - case DOUBLE: - numberDouble = Double(); - isNumeric=true; isDouble=true; - break; - default: - jj_la1[8] = jj_gen; - if (jj_2_7(2147483647)) { - jj_consume_token(26); - jj_consume_token(31); - isSet=true; - } else { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 26: - jj_consume_token(26); - label_2: - while (true) { - if (jj_2_5(2)) { - ; - } else { - break label_2; - } - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case STRING: - tmp = String(); - break; - case ID: - tmp = Id(); - break; - default: - jj_la1[2] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - values.add(tmp); - jj_consume_token(29); - } - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case STRING: - tmp = String(); - break; - case ID: - tmp = Id(); - break; - default: - jj_la1[3] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - values.add(tmp); - jj_consume_token(31); - isSet=true; - break; - default: - jj_la1[9] = jj_gen; - if (jj_2_8(2147483647)) { - jj_consume_token(27); - jj_consume_token(32); - isList=true; - } else { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 27: - jj_consume_token(27); - label_3: - while (true) { - if (jj_2_6(6)) { - ; - } else { - break label_3; - } - jj_consume_token(28); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case STRING: - tmp = String(); - break; - case ID: - tmp = Id(); - break; - default: - jj_la1[4] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - jj_consume_token(29); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case STRING: - tmp2 = String(); - break; - case ID: - tmp2 = Id(); - break; - default: - jj_la1[5] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - jj_consume_token(30); - tuples.add(new StringTuple(tmp,tmp2)); - jj_consume_token(29); - } - jj_consume_token(28); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case STRING: - tmp = String(); - break; - case ID: - tmp = Id(); - break; - default: - jj_la1[6] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - jj_consume_token(29); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case STRING: - tmp2 = String(); - break; - case ID: - tmp2 = Id(); - break; - default: - jj_la1[7] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - jj_consume_token(30); - tuples.add(new StringTuple(tmp,tmp2)); - jj_consume_token(32); - isList=true; - break; - default: - jj_la1[10] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - } - } - } - } - jj_consume_token(CONF_END); - if(containsSubOption) { - if(isNumeric) - if(isDouble) - confOption = new ConfFileOption(option,subOption,numberDouble); - else - confOption = new ConfFileOption(option,subOption,number); - else - if(isSet) - confOption = new ConfFileOption(option,subOption,values); - else if(isList) - confOption = new ConfFileOption(option,subOption,tuples); - else - confOption = new ConfFileOption(option,subOption,value); - } else { - if(isNumeric) - if(isDouble) - confOption = new ConfFileOption(option,numberDouble); - else - confOption = new ConfFileOption(option,number); - else - if(isSet) - confOption = new ConfFileOption(option,values); - else if(isList) - confOption = new ConfFileOption(option,tuples); - else - confOption = new ConfFileOption(option,value); - } - {if (true) return confOption;} - // confOptions.add(confOption); - - throw new Error("Missing return statement in function"); - } - - final public void FunctionCall() throws ParseException { - String s, s1, s2; - List<String> list = new LinkedList<String>(); - s1 = Id(); - jj_consume_token(28); - s2 = String(); - list.add(s2); - label_4: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 29: - ; - break; - default: - jj_la1[11] = jj_gen; - break label_4; - } - jj_consume_token(29); - s = String(); - list.add(s); - } - jj_consume_token(30); - jj_consume_token(CONF_END); - addFunctionCall(s1,list); - } - - final public void PosExample() throws ParseException { - String i; - jj_consume_token(POS_EX); - i = Individual(); - positiveExamples.add(i); - } - - final public void NegExample() throws ParseException { - String i; - jj_consume_token(NEG_EX); - i = Individual(); - negativeExamples.add(i); - } - - final public String Individual() throws ParseException { - String name; - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case ID: - name = Id(); - break; - case STRING: - name = String(); - break; - default: - jj_la1[12] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - {if (true) return KBParser.getInternalURI(name);} - throw new Error("Missing return statement in function"); - } - - final public String Id() throws ParseException { - Token t; - t = jj_consume_token(ID); - {if (true) return t.image;} - throw new Error("Missing return statement in function"); - } - - final public double Double() throws ParseException { - Token t; - t = jj_consume_token(DOUBLE); - {if (true) return new Double(t.image);} - throw new Error("Missing return statement in function"); - } - - final public int Integer() throws ParseException { - Token t; - t = jj_consume_token(NUMBER); - {if (true) return new Integer(t.image);} - throw new Error("Missing return statement in function"); - } - - final public String String() throws ParseException { - Token t; - String s; - t = jj_consume_token(STRING); - // enclosing "" are removed - s = t.image; - s = s.substring(1, s.length() - 1); - {if (true) return s;} - throw new Error("Missing return statement in function"); - } - - private boolean jj_2_1(int xla) { - jj_la = xla; jj_lastpos = jj_scanpos = token; - try { return !jj_3_1(); } - catch(LookaheadSuccess ls) { return true; } - finally { jj_save(0, xla); } - } - - private boolean jj_2_2(int xla) { - jj_la = xla; jj_lastpos = jj_scanpos = token; - try { return !jj_3_2(); } - catch(LookaheadSuccess ls) { return true; } - finally { jj_save(1, xla); } - } - - private boolean jj_2_3(int xla) { - jj_la = xla; jj_lastpos = jj_scanpos = token; - try { return !jj_3_3(); } - catch(LookaheadSuccess ls) { return true; } - finally { jj_save(2, xla); } - } - - private boolean jj_2_4(int xla) { - jj_la = xla; jj_lastpos = jj_scanpos = token; - try { return !jj_3_4(); } - catch(LookaheadSuccess ls) { return true; } - finally { jj_save(3, xla); } - } - - private boolean jj_2_5(int xla) { - jj_la = xla; jj_lastpos = jj_scanpos = token; - try { return !jj_3_5(); } - catch(LookaheadSuccess ls) { return true; } - finally { jj_save(4, xla); } - } - - private boolean jj_2_6(int xla) { - jj_la = xla; jj_lastpos = jj_scanpos = token; - try { return !jj_3_6(); } - catch(LookaheadSuccess ls) { return true; } - finally { jj_save(5, xla); } - } - - private boolean jj_2_7(int xla) { - jj_la = xla; jj_lastpos = jj_scanpos = token; - try { return !jj_3_7(); } - catch(LookaheadSuccess ls) { return true; } - finally { jj_save(6, xla); } - } - - private boolean jj_2_8(int xla) { - jj_la = xla; jj_lastpos = jj_scanpos = token; - try { return !jj_3_8(); } - catch(LookaheadSuccess ls) { return true; } - finally { jj_save(7, xla); } - } - - private boolean jj_3R_11() { - if (jj_scan_token(STRING)) return true; - return false; - } - - private boolean jj_3_8() { - if (jj_scan_token(27)) return true; - if (jj_scan_token(32)) return true; - return false; - } - - private boolean jj_3R_7() { - if (jj_3R_5()) return true; - return false; - } - - private boolean jj_3_7() { - if (jj_scan_token(26)) return true; - if (jj_scan_token(31)) return true; - return false; - } - - private boolean jj_3R_12() { - if (jj_scan_token(29)) return true; - if (jj_3R_11()) return true; - return false; - } - - private boolean jj_3R_17() { - if (jj_3R_11()) return true; - return false; - } - - private boolean jj_3_6() { - if (jj_scan_token(28)) return true; - Token xsp; - xsp = jj_scanpos; - if (jj_3R_15()) { - jj_scanpos = xsp; - if (jj_3R_16()) return true; - } - if (jj_scan_token(29)) return true; - xsp = jj_scanpos; - if (jj_3R_17()) { - jj_scanpos = xsp; - if (jj_3R_18()) return true; - } - if (jj_scan_token(30)) return true; - if (jj_scan_token(29)) return true; - return false; - } - - private boolean jj_3_5() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_13()) { - jj_scanpos = xsp; - if (jj_3R_14()) return true; - } - if (jj_scan_token(29)) return true; - return false; - } - - private boolean jj_3R_19() { - if (jj_scan_token(NUMBER)) return true; - return false; - } - - private boolean jj_3R_10() { - if (jj_3R_11()) return true; - return false; - } - - private boolean jj_3R_6() { - if (jj_scan_token(COMMAND_END)) return true; - if (jj_3R_5()) return true; - return false; - } - - private boolean jj_3R_16() { - if (jj_3R_5()) return true; - return false; - } - - private boolean jj_3_4() { - if (jj_scan_token(NEG_EX)) return true; - return false; - } - - private boolean jj_3_3() { - if (jj_scan_token(POS_EX)) return true; - return false; - } - - private boolean jj_3R_20() { - if (jj_scan_token(DOUBLE)) return true; - return false; - } - - private boolean jj_3_2() { - if (jj_3R_5()) return true; - if (jj_scan_token(28)) return true; - if (jj_3R_11()) return true; - Token xsp; - while (true) { - xsp = jj_scanpos; - if (jj_3R_12()) { jj_scanpos = xsp; break; } - } - if (jj_scan_token(30)) return true; - if (jj_scan_token(CONF_END)) return true; - return false; - } - - private boolean jj_3R_14() { - if (jj_3R_5()) return true; - return false; - } - - private boolean jj_3_1() { - if (jj_3R_5()) return true; - Token xsp; - xsp = jj_scanpos; - if (jj_3R_6()) jj_scanpos = xsp; - if (jj_scan_token(25)) return true; - xsp = jj_scanpos; - if (jj_3R_7()) { - jj_scanpos = xsp; - if (jj_3R_8()) { - jj_scanpos = xsp; - if (jj_3R_9()) { - jj_scanpos = xsp; - if (jj_3R_10()) { - jj_scanpos = xsp; - if (jj_scan_token(26)) { - jj_scanpos = xsp; - if (jj_scan_token(27)) return true; - } - } - } - } - } - return false; - } - - private boolean jj_3R_9() { - if (jj_3R_20()) return true; - return false; - } - - private boolean jj_3R_5() { - if (jj_scan_token(ID)) return true; - return false; - } - - private boolean jj_3R_15() { - if (jj_3R_11()) return true; - return false; - } - - private boolean jj_3R_18() { - if (jj_3R_5()) return true; - return false; - } - - private boolean jj_3R_13() { - if (jj_3R_11()) return true; - return false; - } - - private boolean jj_3R_8() { - if (jj_3R_19()) return true; - return false; - } - - /** Generated Token Manager. */ - public ConfParserTokenManager token_source; - SimpleCharStream jj_input_stream; - /** Current token. */ - public Token token; - /** Next token. */ - public Token jj_nt; - private int jj_ntk; - private Token jj_scanpos, jj_lastpos; - private int jj_la; - private int jj_gen; - final private int[] jj_la1 = new int[13]; - static private int[] jj_la1_0; - static private int[] jj_la1_1; - static { - jj_la1_init_0(); - jj_la1_init_1(); - } - private static void jj_la1_init_0() { - jj_la1_0 = new int[] {0x1c00,0x100,0x1001000,0x1001000,0x1001000,0x1001000,0x1001000,0x1001000,0x1007000,0x4000000,0x8000000,0x20000000,0x1001000,}; - } - private static void jj_la1_init_1() { - jj_la1_1 = new int[] {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,}; - } - final private JJCalls[] jj_2_rtns = new JJCalls[8]; - private boolean jj_rescan = false; - private int jj_gc = 0; - - /** Constructor with InputStream. */ - public ConfParser(java.io.InputStream stream) { - this(stream, null); - } - /** Constructor with InputStream and supplied encoding */ - public ConfParser(java.io.InputStream stream, String encoding) { - try { jj_input_stream = new SimpleCharStream(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); } - token_source = new ConfParserTokenManager(jj_input_stream); - token = new Token(); - jj_ntk = -1; - jj_gen = 0; - for (int i = 0; i < 13; i++) jj_la1[i] = -1; - for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); - } - - /** Reinitialise. */ - public void ReInit(java.io.InputStream stream) { - ReInit(stream, null); - } - /** Reinitialise. */ - public void ReInit(java.io.InputStream stream, String encoding) { - try { jj_input_stream.ReInit(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); } - token_source.ReInit(jj_input_stream); - token = new Token(); - jj_ntk = -1; - jj_gen = 0; - for (int i = 0; i < 13; i++) jj_la1[i] = -1; - for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); - } - - /** Constructor. */ - public ConfParser(java.io.Reader stream) { - jj_input_stream = new SimpleCharStream(stream, 1, 1); - token_source = new ConfParserTokenManager(jj_input_stream); - token = new Token(); - jj_ntk = -1; - jj_gen = 0; - for (int i = 0; i < 13; i++) jj_la1[i] = -1; - for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); - } - - /** Reinitialise. */ - public void ReInit(java.io.Reader stream) { - jj_input_stream.ReInit(stream, 1, 1); - token_source.ReInit(jj_input_stream); - token = new Token(); - jj_ntk = -1; - jj_gen = 0; - for (int i = 0; i < 13; i++) jj_la1[i] = -1; - for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); - } - - /** Constructor with generated Token Manager. */ - public ConfParser(ConfParserTokenManager tm) { - token_source = tm; - token = new Token(); - jj_ntk = -1; - jj_gen = 0; - for (int i = 0; i < 13; i++) jj_la1[i] = -1; - for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); - } - - /** Reinitialise. */ - public void ReInit(ConfParserTokenManager tm) { - token_source = tm; - token = new Token(); - jj_ntk = -1; - jj_gen = 0; - for (int i = 0; i < 13; i++) jj_la1[i] = -1; - for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); - } - - private Token jj_consume_token(int kind) throws ParseException { - Token oldToken; - if ((oldToken = token).next != null) token = token.next; - else token = token.next = token_source.getNextToken(); - jj_ntk = -1; - if (token.kind == kind) { - jj_gen++; - if (++jj_gc > 100) { - jj_gc = 0; - for (int i = 0; i < jj_2_rtns.length; i++) { - JJCalls c = jj_2_rtns[i]; - while (c != null) { - if (c.gen < jj_gen) c.first = null; - c = c.next; - } - } - } - return token; - } - token = oldToken; - jj_kind = kind; - throw generateParseException(); - } - - static private final class LookaheadSuccess extends java.lang.Error { } - final private LookaheadSuccess jj_ls = new LookaheadSuccess(); - private boolean jj_scan_token(int kind) { - if (jj_scanpos == jj_lastpos) { - jj_la--; - if (jj_scanpos.next == null) { - jj_lastpos = jj_scanpos = jj_scanpos.next = token_source.getNextToken(); - } else { - jj_lastpos = jj_scanpos = jj_scanpos.next; - } - } else { - jj_scanpos = jj_scanpos.next; - } - if (jj_rescan) { - int i = 0; Token tok = token; - while (tok != null && tok != jj_scanpos) { i++; tok = tok.next; } - if (tok != null) jj_add_error_token(kind, i); - } - if (jj_scanpos.kind != kind) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) throw jj_ls; - return false; - } - - -/** Get the next Token. */ - final public Token getNextToken() { - if (token.next != null) token = token.next; - else token = token.next = token_source.getNextToken(); - jj_ntk = -1; - jj_gen++; - return token; - } - -/** Get the specific Token. */ - final public Token getToken(int index) { - Token t = token; - for (int i = 0; i < index; i++) { - if (t.next != null) t = t.next; - else t = t.next = token_source.getNextToken(); - } - return t; - } - - private int jj_ntk() { - if ((jj_nt=token.next) == null) - return (jj_ntk = (token.next=token_source.getNextToken()).kind); - else - return (jj_ntk = jj_nt.kind); - } - - private java.util.List<int[]> jj_expentries = new java.util.ArrayList<int[]>(); - private int[] jj_expentry; - private int jj_kind = -1; - private int[] jj_lasttokens = new int[100]; - private int jj_endpos; - - private void jj_add_error_token(int kind, int pos) { - if (pos >= 100) return; - if (pos == jj_endpos + 1) { - jj_lasttokens[jj_endpos++] = kind; - } else if (jj_endpos != 0) { - jj_expentry = new int[jj_endpos]; - for (int i = 0; i < jj_endpos; i++) { - jj_expentry[i] = jj_lasttokens[i]; - } - jj_entries_loop: for (java.util.Iterator<?> it = jj_expentries.iterator(); it.hasNext();) { - int[] oldentry = (int[])(it.next()); - if (oldentry.length == jj_expentry.length) { - for (int i = 0; i < jj_expentry.length; i++) { - if (oldentry[i] != jj_expentry[i]) { - continue jj_entries_loop; - } - } - jj_expentries.add(jj_expentry); - break jj_entries_loop; - } - } - if (pos != 0) jj_lasttokens[(jj_endpos = pos) - 1] = kind; - } - } - - /** Generate ParseException. */ - public ParseException generateParseException() { - jj_expentries.clear(); - boolean[] la1tokens = new boolean[33]; - if (jj_kind >= 0) { - la1tokens[jj_kind] = true; - jj_kind = -1; - } - for (int i = 0; i < 13; i++) { - if (jj_la1[i] == jj_gen) { - for (int j = 0; j < 32; j++) { - if ((jj_la1_0[i] & (1<<j)) != 0) { - la1tokens[j] = true; - } - if ((jj_la1_1[i] & (1<<j)) != 0) { - la1tokens[32+j] = true; - } - } - } - } - for (int i = 0; i < 33; i++) { - if (la1tokens[i]) { - jj_expentry = new int[1]; - jj_expentry[0] = i; - jj_expentries.add(jj_expentry); - } - } - jj_endpos = 0; - jj_rescan_token(); - jj_add_error_token(0, 0); - int[][] exptokseq = new int[jj_expentries.size()][]; - for (int i = 0; i < jj_expentries.size(); i++) { - exptokseq[i] = jj_expentries.get(i); - } - return new ParseException(token, exptokseq, tokenImage); - } - - /** Enable tracing. */ - final public void enable_tracing() { - } - - /** Disable tracing. */ - final public void disable_tracing() { - } - - private void jj_rescan_token() { - jj_rescan = true; - for (int i = 0; i < 8; i++) { - try { - JJCalls p = jj_2_rtns[i]; - do { - if (p.gen > jj_gen) { - jj_la = p.arg; jj_lastpos = jj_scanpos = p.first; - switch (i) { - case 0: jj_3_1(); break; - case 1: jj_3_2(); break; - case 2: jj_3_3(); break; - case 3: jj_3_4(); break; - case 4: jj_3_5(); break; - case 5: jj_3_6(); break; - case 6: jj_3_7(); break; - case 7: jj_3_8(); break; - } - } - p = p.next; - } while (p != null); - } catch(LookaheadSuccess ls) { } - } - jj_rescan = false; - } - - private void jj_save(int index, int xla) { - JJCalls p = jj_2_rtns[index]; - while (p.gen > jj_gen) { - if (p.next == null) { p = p.next = new JJCalls(); break; } - p = p.next; - } - p.gen = jj_gen + xla - jj_la; p.first = token; p.arg = xla; - } - - static final class JJCalls { - int gen; - Token first; - int arg; - JJCalls next; - } - -} Deleted: trunk/components-core/src/main/java/org/dllearner/parser/ConfParserConstants.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/parser/ConfParserConstants.java 2010-09-17 19:15:29 UTC (rev 2317) +++ trunk/components-core/src/main/java/org/dllearner/parser/ConfParserConstants.java 2010-09-21 10:53:10 UTC (rev 2318) @@ -1,95 +0,0 @@ -/* Generated By:JavaCC: Do not edit this line. ConfParserConstants.java */ -package org.dllearner.parser; - - -/** - * Token literal values and constants. - * Generated by org.javacc.parser.OtherFilesGen#start() - */ -@SuppressWarnings("all") -public interface ConfParserConstants { - - /** End of File. */ - int EOF = 0; - /** RegularExpression Id. */ - int SINGLE_LINE_COMMENT = 5; - /** RegularExpression Id. */ - int FORMAL_COMMENT = 6; - /** RegularExpression Id. */ - int MULTI_LINE_COMMENT = 7; - /** RegularExpression Id. */ - int COMMAND_END = 8; - /** RegularExpression Id. */ - int CONF_END = 9; - /** RegularExpression Id. */ - int POS_EX = 10; - /** RegularExpression Id. */ - int NEG_EX = 11; - /** RegularExpression Id. */ - int ID = 12; - /** RegularExpression Id. */ - int NUMBER = 13; - /** RegularExpression Id. */ - int DOUBLE = 14; - /** RegularExpression Id. */ - int TOP = 15; - /** RegularExpression Id. */ - int BOTTOM = 16; - /** RegularExpression Id. */ - int AND = 17; - /** RegularExpression Id. */ - int OR = 18; - /** RegularExpression Id. */ - int EXISTS = 19; - /** RegularExpression Id. */ - int ALL = 20; - /** RegularExpression Id. */ - int NOT = 21; - /** RegularExpression Id. */ - int GE = 22; - /** RegularExpression Id. */ - int LE = 23; - /** RegularExpression Id. */ - int STRING = 24; - - /** Lexical state. */ - int DEFAULT = 0; - - /** Literal token values. */ - String[] tokenImage = { - "<EOF>", - "\" \"", - "\"\\t\"", - "\"\\n\"", - "\"\\r\"", - "<SINGLE_LINE_COMMENT>", - "<FORMAL_COMMENT>", - "<MULTI_LINE_COMMENT>", - "\".\"", - "\";\"", - "\"+\"", - "\"-\"", - "<ID>", - "<NUMBER>", - "<DOUBLE>", - "\"TOP\"", - "\"BOTTOM\"", - "\"AND\"", - "\"OR\"", - "<EXISTS>", - "<ALL>", - "<NOT>", - "\">=\"", - "\"<=\"", - "<STRING>", - "\"=\"", - "\"{\"", - "\"[\"", - "\"(\"", - "\",\"", - "\")\"", - "\"}\"", - "\"]\"", - }; - -} Deleted: trunk/components-core/src/main/java/org/dllearner/parser/ConfParserTokenManager.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/parser/ConfParserTokenManager.java 2010-09-17 19:15:29 UTC (rev 2317) +++ trunk/components-core/src/main/java/org/dllearner/parser/ConfParserTokenManager.java 2010-09-21 10:53:10 UTC (rev 2318) @@ -1,772 +0,0 @@ -/* Generated By:JavaCC: Do not edit this line. ConfParserTokenManager.java */ -package org.dllearner.parser; -import java.util.HashMap; -import java.util.List; -import java.util.LinkedList; -import java.util.Map; -import java.util.Set; -import java.util.HashSet; -import java.util.SortedSet; -import java.util.TreeSet; -import java.io.File; -import java.io.FileInputStream; -import java.io.FileNotFoundException; -import java.io.IOException; -import org.dllearner.Info; -import org.dllearner.cli.*; -import org.dllearner.utilities.datastructures.*; - -/** Token Manager. */ -@SuppressWarnings("all") -public class ConfParserTokenManager implements ConfParserConstants -{ - - /** Debug output. */ - public java.io.PrintStream debugStream = System.out; - /** Set debug output. */ - public void setDebugStream(java.io.PrintStream ds) { debugStream = ds; } -private final int jjStopStringLiteralDfa_0(int pos, long active0) -{ - switch (pos) - { - case 0: - if ((active0 & 0x20000L) != 0L) - return 13; - return -1; - default : - return -1; - } -} -private final int jjStartNfa_0(int pos, long active0) -{ - return jjMoveNfa_0(jjStopStringLiteralDfa_0(pos, active0), pos + 1); -} -private int jjStopAtPos(int pos, int kind) -{ - jjmatchedKind = kind; - jjmatchedPos = pos; - return pos + 1; -} -private int jjMoveStringLiteralDfa0_0() -{ - switch(curChar) - { - case 40: - return jjStopAtPos(0, 28); - case 41: - return jjStopAtPos(0, 30); - case 43: - return jjStopAtPos(0, 10); - case 44: - return jjStopAtPos(0, 29); - case 45: - return jjStopAtPos(0, 11); - case 46: - return jjStopAtPos(0, 8); - case 59: - return jjStopAtPos(0, 9); - case 60: - return jjMoveStringLiteralDfa1_0(0x800000L); - case 61: - return jjStopAtPos(0, 25); - case 62: - return jjMoveStringLiteralDfa1_0(0x400000L); - case 65: - return jjMoveStringLiteralDfa1_0(0x20000L); - case 66: - return jjMoveStringLiteralDfa1_0(0x10000L); - case 79: - return jjMoveStringLiteralDfa1_0(0x40000L); - case 84: - return jjMoveStringLiteralDfa1_0(0x8000L); - case 91: - return jjStopAtPos(0, 27); - case 93: - return jjStopAtPos(0, 32); - case 123: - return jjStopAtPos(0, 26); - case 125: - return jjStopAtPos(0, 31); - default : - return jjMoveNfa_0(0, 0); - } -} -private int jjMoveStringLiteralDfa1_0(long active0) -{ - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { - jjStopStringLiteralDfa_0(0, active0); - return 1; - } - switch(curChar) - { - case 61: - if ((active0 & 0x400000L) != 0L) - return jjStopAtPos(1, 22); - else if ((active0 & 0x800000L) != 0L) - return jjStopAtPos(1, 23); - break; - case 78: - return jjMoveStringLiteralDfa2_0(active0, 0x20000L); - case 79: - return jjMoveStringLiteralDfa2_0(active0, 0x18000L); - case 82: - if ((active0 & 0x40000L) != 0L) - return jjStopAtPos(1, 18); - break; - default : - break; - } - return jjStartNfa_0(0, active0); -} -private int jjMoveStringLiteralDfa2_0(long old0, long active0) -{ - if (((active0 &= old0)) == 0L) - return jjStartNfa_0(0, old0); - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { - jjStopStringLiteralDfa_0(1, active0); - return 2; - } - switch(curChar) - { - case 68: - if ((active0 & 0x20000L) != 0L) - return jjStopAtPos(2, 17); - break; - case 80: - if ((active0 & 0x8000L) != 0L) - return jjStopAtPos(2, 15); - break; - case 84: - return jjMoveStringLiteralDfa3_0(active0, 0x10000L); - default : - break; - } - return jjStartNfa_0(1, active0); -} -private int jjMoveStringLiteralDfa3_0(long old0, long active0) -{ - if (((active0 &= old0)) == 0L) - return jjStartNfa_0(1, old0); - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { - jjStopStringLiteralDfa_0(2, active0); - return 3; - } - switch(curChar) - { - case 84: - return jjMoveStringLiteralDfa4_0(active0, 0x10000L); - default : - break; - } - return jjStartNfa_0(2, active0); -} -private int jjMoveStringLiteralDfa4_0(long old0, long active0) -{ - if (((active0 &= old0)) == 0L) - return jjStartNfa_0(2, old0); - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { - jjStopStringLiteralDfa_0(3, active0); - return 4; - } - switch(curChar) - { - case 79: - return jjMoveStringLiteralDfa5_0(active0, 0x10000L); - default : - break; - } - return jjStartNfa_0(3, active0); -} -private int jjMoveStringLiteralDfa5_0(long old0, long active0) -{ - if (((active0 &= old0)) == 0L) - return jjStartNfa_0(3, old0); - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { - jjStopStringLiteralDfa_0(4, active0); - return 5; - } - switch(curChar) - { - case 77: - if ((active0 & 0x10000L) != 0L) - return jjStopAtPos(5, 16); - break; - default : - break; - } - return jjStartNfa_0(4, active0); -} -static final long[] jjbitVec0 = { - 0x0L, 0x0L, 0xffffffffffffffffL, 0xffffffffffffffffL -}; -private int jjMoveNfa_0(int startState, int curPos) -{ - int startsAt = 0; - jjnewStateCnt = 53; - int i = 1; - jjstateSet[0] = startState; - int kind = 0x7fffffff; - for (;;) - { - if (++jjround == 0x7fffffff) - ReInitRounds(); - if (curChar < 64) - { - long l = 1L << curChar; - do - { - switch(jjstateSet[--i]) - { - case 0: - if ((0x3fe000000000000L & l) != 0L) - { - if (kind > 13) - kind = 13; - jjCheckNAddStates(0, 2); - } - else if (curChar == 48) - { - if (kind > 13) - kind = 13; - jjCheckNAdd(50); - } - else if (curChar == 47) - jjAddStates(3, 5); - else if (curChar == 34) - jjCheckNAddTwoStates(21, 22); - break; - case 1: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 12) - kind = 12; - jjstateSet[jjnewStateCnt++] = 1; - break; - case 20: - if (curChar == 34) - jjCheckNAddTwoStates(21, 22); - break; - case 21: - if ((0xfffffffbffffdbffL & l) != 0L) - jjCheckNAddTwoStates(21, 22); - break; - case 22: - if (curChar == 34 && kind > 24) - kind = 24; - break; - case 28: - if (curChar == 47) - jjAddStates(3, 5); - break; - case 29: - if (curChar == 47) - jjCheckNAddStates(6, 8); - break; - case 30: - if ((0xffffffffffffdbffL & l) != 0L) - jjCheckNAddStates(6, 8); - break; - case 31: - if ((0x2400L & l) != 0L && kind > 5) - kind = 5; - break; - case 32: - if (curChar == 10 && kind > 5) - kind = 5; - break; - case 33: - if (curChar == 13) - jjstateSet[jjnewStateCnt++] = 32; - break; - case 34: - if (curChar == 42) - jjCheckNAddTwoStates(35, 36); - break; - case 35: - if ((0xfffffbffffffffffL & l) != 0L) - jjCheckNAddTwoStates(35, 36); - break; - case 36: - if (curChar == 42) - jjCheckNAddStates(9, 11); - break; - case 37: - if ((0xffff7bffffffffffL & l) != 0L) - jjCheckNAddTwoStates(38, 36); - break; - case 38: - if ((0xfffffbffffffffffL & l) != 0L) - jjCheckNAddTwoStates(38, 36); - break; - case 39: - if (curChar == 47 && kind > 6) - kind = 6; - break; - case 40: - if (curChar == 42) - jjstateSet[jjnewStateCnt++] = 34; - break; - case 41: - if (curChar == 42) - jjCheckNAddTwoStates(42, 43); - break; - case 42: - if ((0xfffffbffffffffffL & l) != 0L) - jjCheckNAddTwoStates(42, 43); - break; - case 43: - if (curChar == 42) - jjCheckNAddStates(12, 14); - break; - case 44: - if ((0xffff7bffffffffffL & l) != 0L) - jjCheckNAddTwoStates(45, 43); - break; - case 45: - if ((0xfffffbffffffffffL & l) != 0L) - jjCheckNAddTwoStates(45, 43); - break; - case 46: - if (curChar == 47 && kind > 7) - kind = 7; - break; - case 47: - if ((0x3fe000000000000L & l) == 0L) - break; - if (kind > 13) - kind = 13; - jjCheckNAddStates(0, 2); - break; - case 48: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 13) - kind = 13; - jjCheckNAdd(48); - break; - case 49: - if ((0x3ff000000000000L & l) != 0L) - jjCheckNAddTwoStates(49, 50); - break; - case 50: - if (curChar != 46) - break; - if (kind > 14) - kind = 14; - jjCheckNAdd(51); - break; - case 51: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 14) - kind = 14; - jjCheckNAdd(51); - break; - case 52: - if (curChar != 48) - break; - if (kind > 13) - kind = 13; - jjCheckNAdd(50); - break; - default : break; - } - } while(i != startsAt); - } - else if (curChar < 128) - { - long l = 1L << (curChar & 077); - do - { - switch(jjstateSet[--i]) - { - case 0: - if ((0x7fffffe00000000L & l) != 0L) - { - if (kind > 12) - kind = 12; - jjCheckNAdd(1); - } - else if (curChar == 78) - jjAddStates(15, 16); - else if (curChar == 70) - jjstateSet[jjnewStateCnt++] = 18; - else if (curChar == 65) - jjstateSet[jjnewStateCnt++] = 13; - else if (curChar == 83) - jjstateSet[jjnewStateCnt++] = 10; - else if (curChar == 69) - jjstateSet[jjnewStateCnt++] = 6; - break; - case 1: - if ((0x7fffffe87fffffeL & l) == 0L) - break; - if (kind > 12) - kind = 12; - jjCheckNAdd(1); - break; - case 2: - if (curChar == 83 && kind > 19) - kind = 19; - break; - case 3: - if (curChar == 84) - jjstateSet[jjnewStateCnt++] = 2; - break; - case 4: - if (curChar == 83) - jjstateSet[jjnewStateCnt++] = 3; - break; - case 5: - if (curChar == 73) - jjstateSet[jjnewStateCnt++] = 4; - break; - case 6: - if (curChar == 88) - jjstateSet[jjnewStateCnt++] = 5; - break; - case 7: - if (curChar == 69) - jjstateSet[jjnewStateCnt++] = 6; - break; - case 8: - if (curChar == 69 && kind > 19) - kind = 19; - break; - case 9: - if (curChar == 77) - jjstateSet[jjnewStateCnt++] = 8; - break; - case 10: - if (curChar == 79) - jjstateSet[jjnewStateCnt++] = 9; - break; - case 11: - if (curChar == 83) - jjstateSet[jjnewStateCnt++] = 10; - break; - case 12: - if (curChar == 76 && kind > 20) - kind = 20; - break; - case 13: - case 15: - if (curChar == 76) - jjCheckNAdd(12); - break; - case 14: - if (curChar == 65) - jjstateSet[jjnewStateCnt++] = 13; - break; - case 16: - if (curChar == 65) - jjstateSet[jjnewStateCnt++] = 15; - break; - case 17: - if (curChar == 82) - jjstateSet[jjnewStateCnt++] = 16; - break; - case 18: - if (curChar == 79) - jjstateSet[jjnewStateCnt++] = 17; - break; - case 19: - if (curChar == 70) - jjstateSet[jjnewStateCnt++] = 18; - break; - case 21: - if ((0xffffffffefffffffL & l) != 0L) - jjAddStates(17, 18); - break; - case 23: - if (curChar == 78) - jjAddStates(15, 16); - break; - case 24: - if (curChar == 71 && kind > 21) - kind = 21; - break; - case 25: - if (curChar == 69) - jjstateSet[jjnewStateCnt++] = 24; - break; - case 26: - if (curChar == 84 && kind > 21) - kind = 21; - break; - case 27: - if (curChar == 79) - jjstateSet[jjnewStateCnt++] = 26; - break; - case 30: - jjAddStates(6, 8); - break; - case 35: - jjCheckNAddTwoStates(35, 36); - break; - case 37: - case 38: - jjCheckNAddTwoStates(38, 36); - break; - case 42: - jjCheckNAddTwoStates(42, 43); - break; - case 44: - case 45: - jjCheckNAddTwoStates(45, 43); - break; - default : break; - } - } while(i != startsAt); - } - else - { - int i2 = (curChar & 0xff) >> 6; - long l2 = 1L << (curChar & 077); - do - { - switch(jjstateSet[--i]) - { - case 21: - if ((jjbitVec0[i2] & l2) != 0L) - jjAddStates(17, 18); - break; - case 30: - if ((jjbitVec0[i2] & l2) != 0L) - jjAddStates(6, 8); - break; - case 35: - if ((jjbitVec0[i2] & l2) != 0L) - jjCheckNAddTwoStates(35, 36); - break; - case 37: - case 38: - if ((jjbitVec0[i2] & l2) != 0L) - jjCheckNAddTwoStates(38, 36); - break; - case 42: - if ((jjbitVec0[i2] & l2) != 0L) - jjCheckNAddTwoStates(42, 43); - break; - case 44: - case 45: - if ((jjbitVec0[i2] & l2) != 0L) - jjCheckNAddTwoStates(45, 43); - break; - default : break; - } - } while(i != startsAt); - } - if (kind != 0x7fffffff) - { - jjmatchedKind = kind; - jjmatchedPos = curPos; - kind = 0x7fffffff; - } - ++curPos; - if ((i = jjnewStateCnt) == (startsAt = 53 - (jjnewStateCnt = startsAt))) - return curPos; - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { return curPos; } - } -} -static final int[] jjnextStates = { - 48, 49, 50, 29, 40, 41, 30, 31, 33, 36, 37, 39, 43, 44, 46, 25, - 27, 21, 22, -}; - -/** Token literal values. */ -public static final String[] jjstrLiteralImages = { -"", null, null, null, null, null, null, null, "\56", "\73", "\53", "\55", null, -null, null, "\124\117\120", "\102\117\124\124\117\115", "\101\116\104", "\117\122", -null, null, null, "\76\75", "\74\75", null, "\75", "\173", "\133", "\50", "\54", -"\51", "\175", "\135", }; - -/** Lexer sta... [truncated message content] |
From: <jen...@us...> - 2010-09-21 11:41:16
|
Revision: 2319 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=2319&view=rev Author: jenslehmann Date: 2010-09-21 11:41:09 +0000 (Tue, 21 Sep 2010) Log Message: ----------- fixed compile errors in all modules except scripts Modified Paths: -------------- trunk/interfaces/src/main/java/org/dllearner/cli/DocumentationGenerator.java trunk/interfaces/src/main/java/org/dllearner/cli/Start.java trunk/interfaces/src/main/java/org/dllearner/confparser/ConfParser.java trunk/interfaces/src/main/java/org/dllearner/confparser/ConfParserConstants.java trunk/interfaces/src/main/java/org/dllearner/confparser/ConfParserTokenManager.java trunk/interfaces/src/main/java/org/dllearner/confparser/conf.jj trunk/interfaces/src/main/java/org/dllearner/gui/Config.java trunk/interfaces/src/test/java/org/dllearner/test/junit/ReasonerTests.java trunk/scripts/pom.xml Removed Paths: ------------- trunk/scripts/src/main/java/org/dllearner/scripts/ConfigDocumentationGenerator.java Modified: trunk/interfaces/src/main/java/org/dllearner/cli/DocumentationGenerator.java =================================================================== --- trunk/interfaces/src/main/java/org/dllearner/cli/DocumentationGenerator.java 2010-09-21 10:53:10 UTC (rev 2318) +++ trunk/interfaces/src/main/java/org/dllearner/cli/DocumentationGenerator.java 2010-09-21 11:41:09 UTC (rev 2319) @@ -22,7 +22,8 @@ import java.io.File; import org.dllearner.core.Component; -import org.dllearner.core.ConfMapper; +import org.dllearner.cli.ConfMapper; +import org.dllearner.core.ComponentManager; import org.dllearner.core.KnowledgeSource; import org.dllearner.core.LearningAlgorithm; import org.dllearner.core.LearningProblem; @@ -40,6 +41,12 @@ private ConfMapper confMapper = new ConfMapper(); + private ComponentManager cm; + + public DocumentationGenerator() { + cm = ComponentManager.getInstance(); + } + /** * Writes documentation for all components available in this * <code>ComponentManager</code> instance. It goes through @@ -59,7 +66,7 @@ doc += "*********************\n\n"; doc += "BEGIN MANUAL PART\n"; doc += "END MANUAL PART\n\n"; - for(Class<? extends Component> component : knowledgeSources) { + for(Class<? extends Component> component : cm.getKnowledgeSources()) { if(component != SparqlKnowledgeSource.class){continue;} doc += getComponentConfigString(component, KnowledgeSource.class); } @@ -67,21 +74,21 @@ doc += "*************\n"; doc += "* Reasoners *\n"; doc += "*************\n\n"; - for(Class<? extends Component> component : reasonerComponents) { + for(Class<? extends Component> component : cm.getReasonerComponents()) { doc += getComponentConfigString(component, ReasonerComponent.class); } doc += "*********************\n"; doc += "* Learning Problems *\n"; doc += "*********************\n\n"; - for(Class<? extends Component> component : learningProblems) { + for(Class<? extends Component> component : cm.getLearningProblems()) { doc += getComponentConfigString(component, LearningProblem.class); } doc += "***********************\n"; doc += "* Learning Algorithms *\n"; doc += "***********************\n\n"; - for(Class<? extends Component> component : learningAlgorithms) { + for(Class<? extends Component> component : cm.getLearningAlgorithms()) { doc += getComponentConfigString(component, LearningAlgorithm.class); } @@ -89,7 +96,8 @@ } private String getComponentConfigString(Class<? extends Component> component, Class<? extends Component> componentType) { - String componentDescription = "component: " + invokeStaticMethod(component, "getName") + " (" + component.getName() + ")"; +// String componentDescription = "component: " + invokeStaticMethod(component, "getName") + " (" + component.getName() + ")"; + String componentDescription = "component: " + cm.getComponentName(component); String str = componentDescription + "\n"; String cli = confMapper.getComponentTypeString(componentType); String usage = confMapper.getComponentString(component); @@ -104,7 +112,7 @@ str += "conf file usage: "+cli+" = "+usage+";\n\n"; } - for(ConfigOption<?> option : componentOptions.get(component)) { + for(ConfigOption<?> option : ComponentManager.getConfigOptions(component)) { String val = (option.getDefaultValue()==null)?"":option.getDefaultValue()+""; str += option.toString() + "conf file usage: "+usage+"." @@ -113,4 +121,14 @@ return str+"\n"; } + /** + * @param args + */ + public static void main(String[] args) { + File file = new File("doc/configOptions.txt"); + DocumentationGenerator dg = new DocumentationGenerator(); + dg.writeConfigDocumentation(file); + System.out.println("Done"); + } + } Modified: trunk/interfaces/src/main/java/org/dllearner/cli/Start.java =================================================================== --- trunk/interfaces/src/main/java/org/dllearner/cli/Start.java 2010-09-21 10:53:10 UTC (rev 2318) +++ trunk/interfaces/src/main/java/org/dllearner/cli/Start.java 2010-09-21 11:41:09 UTC (rev 2319) @@ -73,9 +73,9 @@ import org.dllearner.learningproblems.PosNegLPStandard; import org.dllearner.learningproblems.PosOnlyLP; import org.dllearner.learningproblems.ScorePosNeg; -import org.dllearner.parser.ConfParser; +import org.dllearner.confparser.ConfParser; import org.dllearner.parser.KBParser; -import org.dllearner.parser.ParseException; +import org.dllearner.confparser.ParseException; import org.dllearner.parser.TokenMgrError; import org.dllearner.reasoning.DIGReasoner; import org.dllearner.reasoning.FastInstanceChecker; @@ -222,6 +222,7 @@ * @throws ComponentInitException * @throws ParseException * @throws FileNotFoundException + * @throws * @throws IOException */ public Start(File file) throws ComponentInitException, ParseException, FileNotFoundException { @@ -777,16 +778,16 @@ try { concept = KBParser.parseConcept(queryStr); - } catch (ParseException e1) { - e1.printStackTrace(); - System.err - .println("The concept you entered could not be parsed. Please try again."); - parsedCorrectly = false; } catch (TokenMgrError e) { e.printStackTrace(); System.err .println("An error occured during parsing. Please enter a syntactically valid concept."); parsedCorrectly = false; + } catch (org.dllearner.parser.ParseException e) { + e.printStackTrace(); + System.err + .println("The concept you entered could not be parsed. Please try again."); + parsedCorrectly = false; } if (parsedCorrectly) { Modified: trunk/interfaces/src/main/java/org/dllearner/confparser/ConfParser.java =================================================================== --- trunk/interfaces/src/main/java/org/dllearner/confparser/ConfParser.java 2010-09-21 10:53:10 UTC (rev 2318) +++ trunk/interfaces/src/main/java/org/dllearner/confparser/ConfParser.java 2010-09-21 11:41:09 UTC (rev 2319) @@ -1,5 +1,5 @@ /* Generated By:JavaCC: Do not edit this line. ConfParser.java */ -package org.dllearner.parser; +package org.dllearner.confparser; import java.util.HashMap; import java.util.List; @@ -18,9 +18,9 @@ import org.dllearner.Info; import org.dllearner.cli.*; +import org.dllearner.parser.KBParser; import org.dllearner.utilities.datastructures.*; -@SuppressWarnings("all") public class ConfParser implements ConfParserConstants { // examples @@ -581,11 +581,6 @@ finally { jj_save(7, xla); } } - private boolean jj_3R_11() { - if (jj_scan_token(STRING)) return true; - return false; - } - private boolean jj_3_8() { if (jj_scan_token(27)) return true; if (jj_scan_token(32)) return true; @@ -755,6 +750,11 @@ return false; } + private boolean jj_3R_11() { + if (jj_scan_token(STRING)) return true; + return false; + } + /** Generated Token Manager. */ public ConfParserTokenManager token_source; SimpleCharStream jj_input_stream; Modified: trunk/interfaces/src/main/java/org/dllearner/confparser/ConfParserConstants.java =================================================================== --- trunk/interfaces/src/main/java/org/dllearner/confparser/ConfParserConstants.java 2010-09-21 10:53:10 UTC (rev 2318) +++ trunk/interfaces/src/main/java/org/dllearner/confparser/ConfParserConstants.java 2010-09-21 11:41:09 UTC (rev 2319) @@ -1,12 +1,11 @@ /* Generated By:JavaCC: Do not edit this line. ConfParserConstants.java */ -package org.dllearner.parser; +package org.dllearner.confparser; /** * Token literal values and constants. * Generated by org.javacc.parser.OtherFilesGen#start() */ -@SuppressWarnings("all") public interface ConfParserConstants { /** End of File. */ Modified: trunk/interfaces/src/main/java/org/dllearner/confparser/ConfParserTokenManager.java =================================================================== --- trunk/interfaces/src/main/java/org/dllearner/confparser/ConfParserTokenManager.java 2010-09-21 10:53:10 UTC (rev 2318) +++ trunk/interfaces/src/main/java/org/dllearner/confparser/ConfParserTokenManager.java 2010-09-21 11:41:09 UTC (rev 2319) @@ -1,5 +1,5 @@ /* Generated By:JavaCC: Do not edit this line. ConfParserTokenManager.java */ -package org.dllearner.parser; +package org.dllearner.confparser; import java.util.HashMap; import java.util.List; import java.util.LinkedList; @@ -14,10 +14,10 @@ import java.io.IOException; import org.dllearner.Info; import org.dllearner.cli.*; +import org.dllearner.parser.KBParser; import org.dllearner.utilities.datastructures.*; /** Token Manager. */ -@SuppressWarnings("all") public class ConfParserTokenManager implements ConfParserConstants { Modified: trunk/interfaces/src/main/java/org/dllearner/confparser/conf.jj =================================================================== --- trunk/interfaces/src/main/java/org/dllearner/confparser/conf.jj 2010-09-21 10:53:10 UTC (rev 2318) +++ trunk/interfaces/src/main/java/org/dllearner/confparser/conf.jj 2010-09-21 11:41:09 UTC (rev 2319) @@ -28,7 +28,7 @@ } PARSER_BEGIN(ConfParser) -package org.dllearner.parser; +package org.dllearner.confparser; import java.util.HashMap; import java.util.List; @@ -47,6 +47,7 @@ import org.dllearner.Info; import org.dllearner.cli.*; +import org.dllearner.parser.KBParser; import org.dllearner.utilities.datastructures.*; public class ConfParser { Modified: trunk/interfaces/src/main/java/org/dllearner/gui/Config.java =================================================================== --- trunk/interfaces/src/main/java/org/dllearner/gui/Config.java 2010-09-21 10:53:10 UTC (rev 2318) +++ trunk/interfaces/src/main/java/org/dllearner/gui/Config.java 2010-09-21 11:41:09 UTC (rev 2319) @@ -138,7 +138,7 @@ } catch (FileNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); - } catch (ParseException e) { + } catch (org.dllearner.confparser.ParseException e) { // TODO Auto-generated catch block e.printStackTrace(); } Modified: trunk/interfaces/src/test/java/org/dllearner/test/junit/ReasonerTests.java =================================================================== --- trunk/interfaces/src/test/java/org/dllearner/test/junit/ReasonerTests.java 2010-09-21 10:53:10 UTC (rev 2318) +++ trunk/interfaces/src/test/java/org/dllearner/test/junit/ReasonerTests.java 2010-09-21 11:41:09 UTC (rev 2319) @@ -345,7 +345,7 @@ } @Test - public void compareReasoners() throws FileNotFoundException, ComponentInitException, ParseException{ + public void compareReasoners() throws FileNotFoundException, ComponentInitException, ParseException, org.dllearner.confparser.ParseException{ ComponentManager cm = ComponentManager.getInstance(); Start start; Modified: trunk/scripts/pom.xml =================================================================== --- trunk/scripts/pom.xml 2010-09-21 10:53:10 UTC (rev 2318) +++ trunk/scripts/pom.xml 2010-09-21 11:41:09 UTC (rev 2319) @@ -24,7 +24,7 @@ <dependency> <groupId>org.dllearner</groupId> <artifactId>components-ext</artifactId> - </dependency> + </dependency> <dependency> <groupId>net.sourceforge.secondstring</groupId> <artifactId>secondstring</artifactId> Deleted: trunk/scripts/src/main/java/org/dllearner/scripts/ConfigDocumentationGenerator.java =================================================================== --- trunk/scripts/src/main/java/org/dllearner/scripts/ConfigDocumentationGenerator.java 2010-09-21 10:53:10 UTC (rev 2318) +++ trunk/scripts/src/main/java/org/dllearner/scripts/ConfigDocumentationGenerator.java 2010-09-21 11:41:09 UTC (rev 2319) @@ -1,46 +0,0 @@ -/** - * Copyright (C) 2007, Jens Lehmann - * - * This file is part of DL-Learner. - * - * DL-Learner is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * DL-Learner is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - */ -package org.dllearner.scripts; - -import java.io.File; - -import org.dllearner.core.ComponentManager; - -/** - * Collects information about all used configuration options and - * writes them into a file. This way the documentation is always - * in sync with the source code. - * - * @author Jens Lehmann - * - */ -public class ConfigDocumentationGenerator { - - /** - * @param args - */ - public static void main(String[] args) { - File file = new File("doc/configOptions.txt"); - ComponentManager cm = ComponentManager.getInstance(); - cm.writeConfigDocumentation(file); - System.out.println("Done"); - } - -} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jen...@us...> - 2010-09-21 12:02:28
|
Revision: 2321 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=2321&view=rev Author: jenslehmann Date: 2010-09-21 12:02:21 +0000 (Tue, 21 Sep 2010) Log Message: ----------- moved tests from Maven main to test Modified Paths: -------------- trunk/scripts/pom.xml Added Paths: ----------- trunk/components-core/src/test/java/org/dllearner/test/ Removed Paths: ------------- trunk/components-core/src/main/java/org/dllearner/test/ trunk/components-core/src/test/java/org/dllearner/junit/ trunk/components-core/src/test/java/org/dllearner/test/junit/ExampleTests.java trunk/components-core/src/test/java/org/dllearner/test/junit/OWLlinkTest.java trunk/components-core/src/test/java/org/dllearner/test/junit/ReasonerTests.java Deleted: trunk/components-core/src/test/java/org/dllearner/test/junit/ExampleTests.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/test/junit/ExampleTests.java 2010-09-17 19:15:29 UTC (rev 2317) +++ trunk/components-core/src/test/java/org/dllearner/test/junit/ExampleTests.java 2010-09-21 12:02:21 UTC (rev 2321) @@ -1,200 +0,0 @@ -/** - * Copyright (C) 2007-2008, Jens Lehmann - * - * This file is part of DL-Learner. - * - * DL-Learner is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * DL-Learner is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - */ -package org.dllearner.test.junit; - -import java.io.File; -import java.text.SimpleDateFormat; -import java.util.ArrayList; -import java.util.Collections; -import java.util.Date; -import java.util.HashMap; -import java.util.LinkedList; -import java.util.List; -import java.util.Map; -import java.util.Random; -import java.util.Set; -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.algorithms.gp.GP; -import org.dllearner.cli.QuickStart; -import org.dllearner.cli.Start; -import org.dllearner.core.ComponentInitException; -import org.dllearner.core.ComponentManager; -import org.dllearner.kb.sparql.SparqlKnowledgeSource; -import org.dllearner.utilities.Helper; -import org.junit.Test; - -/** - * Tests related to learning problems in the examples directory. - * - * @author Jens Lehmann - * - */ -public class ExampleTests { - - /** - * This test runs all conf files in the examples directory. Each conf file - * corresponds to one unit test, which is succesful if a concept was - * learned. This unit test takes several hours. - * - * @throws ComponentInitException - * If any component initialisation exception occurs in the - * process. - */ - @Test - public void testAllConfFiles() throws ComponentInitException { - - // if true, then examples are executed in random order (avoids the problem - // that the same examples are tested first on several runs); otherwise - // it runs the examples in alphabetical order - boolean randomize = true; - - // GPs can be excluded temporarily (because those tests are very time-consuming) - boolean testGP = false; - - // setting for SPARQL based tests (0 = no special treatment, 1 = test only SPARQL - // examples, 2 = skip SPARQL tests) - int sparql = 0; - - // we use a logger, which outputs few messages (warnings, errors) - SimpleLayout layout = new SimpleLayout(); - ConsoleAppender consoleAppender = new ConsoleAppender(layout); - Logger logger = Logger.getRootLogger(); - logger.removeAllAppenders(); - logger.addAppender(consoleAppender); - logger.setLevel(Level.WARN); - - // map containing a list of conf files for each path - HashMap<String, ArrayList<String>> confFiles = new HashMap<String, ArrayList<String>>(); - String exampleDir = "." + File.separator + "examples"; - File f = new File(exampleDir); - QuickStart.getAllConfs(f, exampleDir, confFiles); - - // put all examples in a flat list - List<String> examples = new LinkedList<String>(); - for(Map.Entry<String,ArrayList<String>> entry : confFiles.entrySet()) { - for(String file : entry.getValue()) { - examples.add(entry.getKey() + file + ".conf"); - } - } - - if(randomize) { - Collections.shuffle(examples, new Random()); - } else { - Collections.sort(examples); - } - - SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss"); - - // ignore list (examples which are temporarily not working due - // to server downtime, lack of features etc., but should still - // remain in the example directory - Set<String> ignore = new TreeSet<String>(); - - // "standard" ignores (no problem to keep those) - ignore.add("./examples/krk/complete_no_draw.conf"); // refers to an OWL file, which has to be auto-generated - ignore.add("./examples/krk/test_ZERO_against_1to16.conf"); // see above - ignore.add("./examples/semantic_bible/sparqlbible.conf"); // requires local Joseki - - // temporarily not working (have a look at those before next release) - // ignore.add("./examples/family/father_posonly.conf"); // ArrayOutOfBoundsException in Pellet - main problem: pos only not working/supported - - // ignored due to errors (should be fixed; in case of long running problems or - // our of memory, it is better to increase the noise parameter and add comments - // in the conf file about "optimal" parameters) - ignore.add("./examples/sparql/govtrack.conf"); // blank node handling error - ignore.add("./examples/sparql/difference/DBPediaSKOS_kohl_vs_angela.conf"); // XML parse error (works sometimes) - - //working fine here ignore.add("./examples/sparql/SKOSTEST_local.conf"); // Out of Memory Error - // ignore.add("./examples/sparql/scrobble.conf"); // HTTP 502 Proxy Error - // ignore.add("./examples/family-benchmark/Cousin.conf"); // Out of Memory Error => disallowing ALL helps (TODO find out details) - //also working fine ignore.add("./examples/sparql/SilentBobWorking2.conf"); // Out of Memory Error - // ignore.add("./examples/sparql/difference/DBPediaSKOS_kohl_vs_angela.conf"); // Pellet: literal cannot be cast to individual - // ignore.add("./examples/family-benchmark/Aunt.conf"); // did not terminate so far (waited 45 minutes) => disallowing ALL helps (TODO find out details) -// ignore.add("examples/krk/KRK_ZERO_against_1to5_fastInstance.conf"); // stack overflow -// ignore.add("examples/krk/KRK_ONE_ZERO_fastInstance.conf"); // stack overflow -// ignore.add("examples/krk/"); // too many stack overflows - - int failedCounter = 0; - int counter = 1; - int total = examples.size(); - for(String conf : examples) { - boolean ignored = false; - for(String ignoredConfExpression : ignore) { - if(conf.contains(ignoredConfExpression)) { - ignored = true; - break; - } - } - if(ignored) { - System.out.println("Skipping " + conf + " (is on ignore list)."); - } else { - System.out.println("Testing " + conf + " (example " + counter + " of " + total + ", time: " + sdf.format(new Date()) + ")."); - long startTime = System.nanoTime(); - boolean success = false, started = false; - try { - // start example - Start start = new Start(new File(conf)); -// System.out.println("algorithm: " + start.getLearningAlgorithm()); - boolean isSparql = start.getSources().iterator().next() instanceof SparqlKnowledgeSource; - if((testGP || !(start.getLearningAlgorithm() instanceof GP)) && - (sparql == 0 || (sparql == 1 && isSparql) || (sparql == 2 && !isSparql) ) ) { - started = true; - start.start(false); - // test is successful if a concept was learned - assert (start.getLearningAlgorithm().getCurrentlyBestDescription() != null); - start.getReasonerComponent().releaseKB(); - success = true; - } else { - System.out.println("Test skipped, because of GP or SPARQL settings."); - } - } catch (Exception e) { - // unit test not succesful (exceptions are caught explicitly to find - assert ( false ); - e.printStackTrace(); - failedCounter++; - } - long timeNeeded = System.nanoTime() - startTime; - ComponentManager.getInstance().freeAllComponents(); - if(!success && started) { - System.out.println("TEST FAILED."); - } - if(started) { - System.out.println("Test of " + conf + " completed in " + Helper.prettyPrintNanoSeconds(timeNeeded) + "."); - } - } - counter++; - } - -// for (String path : confFiles.keySet()) { -// for (String file : confFiles.get(path)) { -// String conf = path + file + ".conf"; -// -// } -// } - System.out.println("Finished. " + failedCounter + " tests failed."); - - } - -} Deleted: trunk/components-core/src/test/java/org/dllearner/test/junit/OWLlinkTest.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/test/junit/OWLlinkTest.java 2010-09-17 19:15:29 UTC (rev 2317) +++ trunk/components-core/src/test/java/org/dllearner/test/junit/OWLlinkTest.java 2010-09-21 12:02:21 UTC (rev 2321) @@ -1,85 +0,0 @@ -package org.dllearner.test.junit; - -import java.io.File; -import java.net.URL; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashMap; -import java.util.LinkedList; -import java.util.List; -import java.util.Map; -import java.util.Random; - -import org.dllearner.algorithms.gp.GP; -import org.dllearner.cli.QuickStart; -import org.dllearner.cli.Start; -import org.dllearner.core.ReasonerComponent; -import org.dllearner.kb.sparql.SparqlKnowledgeSource; -import org.dllearner.reasoning.FastInstanceChecker; -import org.dllearner.reasoning.OWLAPIReasoner; -import org.junit.Test; - -public class OWLlinkTest { - - private static final int EXAMPLE_COUNT = 5; - private static final boolean RANDOMIZE = true; - private static final String OWL_LINK_URL = "http://localhost:8080/"; - - @Test - public void testOWLlink(){ - try { - // map containing a list of conf files for each path - HashMap<String, ArrayList<String>> confFiles = new HashMap<String, ArrayList<String>>(); - String exampleDir = "." + File.separator + "examples"; - File f = new File(exampleDir); - QuickStart.getAllConfs(f, exampleDir, confFiles); - - // put all examples in a flat list - List<String> examples = new LinkedList<String>(); - for(Map.Entry<String,ArrayList<String>> entry : confFiles.entrySet()) { - for(String file : entry.getValue()) { - examples.add(entry.getKey() + file + ".conf"); - } - } - - if(RANDOMIZE) { - Collections.shuffle(examples, new Random()); - } else { - Collections.sort(examples); - } - - int cnt = 0; - Start start; - ReasonerComponent rc; - for(String conf : examples) { - if(cnt == EXAMPLE_COUNT){ - break; - } - start = new Start(new File(conf)); - if(start.getLearningAlgorithm() instanceof GP || start.getSources().iterator().next() instanceof SparqlKnowledgeSource){ - continue; - } - rc = start.getReasonerComponent(); - if(rc instanceof OWLAPIReasoner){ - ((OWLAPIReasoner)rc).getConfigurator().setReasonerType("owllink"); - ((OWLAPIReasoner)rc).getConfigurator().setOwlLinkURL(new URL(OWL_LINK_URL)); - } else if(rc instanceof FastInstanceChecker){ - ((FastInstanceChecker)rc).getConfigurator().setReasonerType("owllink"); - ((FastInstanceChecker)rc).getConfigurator().setOwlLinkURL(new URL(OWL_LINK_URL)); - } else { - continue; - } - System.out.println("Testing " + conf); - rc.init(); - start.getLearningAlgorithm().start(); - cnt++; - } - } catch (Exception e) { - e.printStackTrace(); - assert ( false ); - } - - - } - -} Deleted: trunk/components-core/src/test/java/org/dllearner/test/junit/ReasonerTests.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/test/junit/ReasonerTests.java 2010-09-17 19:15:29 UTC (rev 2317) +++ trunk/components-core/src/test/java/org/dllearner/test/junit/ReasonerTests.java 2010-09-21 12:02:21 UTC (rev 2321) @@ -1,448 +0,0 @@ -/** - * Copyright (C) 2007-2008, Jens Lehmann - * - * This file is part of DL-Learner. - * - * DL-Learner is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * DL-Learner is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - */ -package org.dllearner.test.junit; - -import static org.junit.Assert.assertTrue; - -import java.io.File; -import java.io.FileNotFoundException; -import java.net.MalformedURLException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedList; -import java.util.List; -import java.util.Set; -import java.util.SortedSet; -import java.util.TreeSet; - -import org.apache.log4j.Logger; -import org.dllearner.cli.Start; -import org.dllearner.core.ComponentInitException; -import org.dllearner.core.ComponentManager; -import org.dllearner.core.EvaluatedDescription; -import org.dllearner.core.KnowledgeSource; -import org.dllearner.core.LearningAlgorithm; -import org.dllearner.core.LearningProblem; -import org.dllearner.core.ReasonerComponent; -import org.dllearner.core.owl.Axiom; -import org.dllearner.core.owl.DatatypeProperty; -import org.dllearner.core.owl.Description; -import org.dllearner.core.owl.EquivalentClassesAxiom; -import org.dllearner.core.owl.Individual; -import org.dllearner.core.owl.KB; -import org.dllearner.core.owl.NamedClass; -import org.dllearner.core.owl.ObjectProperty; -import org.dllearner.core.owl.Thing; -import org.dllearner.kb.KBFile; -import org.dllearner.kb.OWLFile; -import org.dllearner.parser.KBParser; -import org.dllearner.parser.ParseException; -import org.dllearner.reasoning.DIGReasoner; -import org.dllearner.reasoning.FastInstanceChecker; -import org.dllearner.reasoning.OWLAPIReasoner; -import org.dllearner.reasoning.PelletReasoner; -import org.dllearner.reasoning.ProtegeReasoner; -import org.dllearner.test.junit.TestOntologies.TestOntology; -import org.dllearner.utilities.owl.ConceptComparator; -import org.junit.Test; - -/** - * A suite of JUnit tests related to the DL-Learner reasoning. - * - * @author Jens Lehmann - * - */ -public class ReasonerTests { - - private static Logger logger = Logger.getLogger(ReasonerTests.class); - - private String baseURI; - - private ConceptComparator comparator = new ConceptComparator(); - - public KB getSimpleKnowledgeBase() { - String kb = "person SUB TOP."; - kb += "man SUB person."; - kb += "man SUB male."; - kb += "woman SUB person."; - kb += "woman SUB female."; - kb += "(male AND female) = BOTTOM."; - kb += "man(stephen)."; - kb += "woman(maria)."; - kb += "hasChild(stephen,maria)."; - KB kbObject = null; - try { - kbObject = KBParser.parseKBFile(kb); - } catch (ParseException e) { - e.printStackTrace(); - } - return kbObject; - } - - /** - * Performs an instance checks on all reasoner components to verify that - * they all return the correct result. - */ - @Test - public void instanceCheckTest() { - - // DIG can be excluded from test since it requires a separate DIG reasoner and is no - // longer the default reasoning mechanism - boolean excludeDIG = true; - - try { - ComponentManager cm = ComponentManager.getInstance(); - KB kb = getSimpleKnowledgeBase(); - KnowledgeSource ks = new KBFile(kb); - ks.init(); - Description d; - // d = KBParser.parseConcept("man"); - d = KBParser.parseConcept("(person AND EXISTS hasChild.female)"); - Individual i = new Individual(KBParser.getInternalURI("stephen")); - List<Class<? extends ReasonerComponent>> reasonerClasses = cm.getReasonerComponents(); - for (Class<? extends ReasonerComponent> reasonerClass : reasonerClasses) { - //we skip the ProtegeReasoner, because the underlying OWLReasoner is not available in this test - if(reasonerClass.equals(ProtegeReasoner.class)){ - continue; - } - if(excludeDIG && reasonerClass.equals(DIGReasoner.class)) { - continue; - } - ReasonerComponent reasoner = cm.reasoner(reasonerClass, ks); - reasoner.init(); - //if it is the PelletReasoner we have to call a separate method to make the CWA - if(reasonerClass.equals(PelletReasoner.class)){ - ((PelletReasoner)reasoner).dematerialise(); - } -// long startTime = System.nanoTime(); - boolean result = false; -// for(int n=0; n<10000; n++) { - result = reasoner.hasType(d, i); -// } -// long time = System.nanoTime() - startTime; - logger.debug("instance check: " + reasoner + " " + d + " " + i + " " + result); - assertTrue(result); - } - } catch (ParseException e) { - e.printStackTrace(); -// } catch (ReasoningMethodUnsupportedException e) { -// e.printStackTrace(); - } catch (ComponentInitException e) { - e.printStackTrace(); - } - } - - /** - * Test of fast instance check algorithm on carcinogenesis data set. - * @throws ComponentInitException - * @throws ParseException - */ - @Test - public void fastInstanceCheckTest() throws ComponentInitException, ParseException { - String file = "examples/carcinogenesis/carcinogenesis.owl"; - ComponentManager cm = ComponentManager.getInstance(); - KnowledgeSource 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(); - ReasonerComponent reasoner = cm.reasoner(FastInstanceChecker.class, ks); - reasoner.init(); - baseURI = reasoner.getBaseURI(); - - List<Description> testDescriptions = new LinkedList<Description>(); - List<List<Individual>> posIndividuals = new LinkedList<List<Individual>>(); - List<List<Individual>> negIndividuals = new LinkedList<List<Individual>>(); - - // TODO manually verify that the results are indeed correct - testDescriptions.add(KBParser.parseConcept("(\"http://dl-learner.org/carcinogenesis#Compound\" AND ((\"http://dl-learner.org/carcinogenesis#amesTestPositive\" IS TRUE) OR >= 2 \"http://dl-learner.org/carcinogenesis#hasStructure\".\"http://dl-learner.org/carcinogenesis#Ar_halide\"))")); - posIndividuals.add(getIndSet("d113","d133","d171","d262","d265","d294","d68","d77","d79")); - negIndividuals.add(getIndSet("d139","d199","d202","d203","d283","d42")); - - // TODO add more descriptions and instances - - // make the specified assertions - for(int i=0; i<testDescriptions.size(); i++) { - Description description = testDescriptions.get(i); - List<Individual> pos = posIndividuals.get(i); - List<Individual> neg = negIndividuals.get(i); - - for(Individual ind : pos) { - System.out.println("description: " + description.toString(baseURI, null) + " individual: " + ind.toString(baseURI, null)); - assertTrue(reasoner.hasType(description, ind)); - } - - for(Individual ind : neg) { - System.out.println("description: " + description.toString(baseURI, null) + " individual: " + ind.toString(baseURI, null)); - assertTrue(!reasoner.hasType(description, ind)); - } - } - } - - @Test - public void fastInstanceCheck2() throws ComponentInitException, ParseException { - String file = "examples/epc/sap_epc.owl"; - ComponentManager cm = ComponentManager.getInstance(); - KnowledgeSource 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(); - ReasonerComponent reasoner = cm.reasoner(FastInstanceChecker.class, ks); - reasoner.init(); - baseURI = reasoner.getBaseURI(); - - Description description = KBParser.parseConcept("(\"http://localhost/aris/sap_model.owl#EPC\" AND EXISTS \"http://localhost/aris/sap_model.owl#hasModelElements\".(\"http://localhost/aris/sap_model.owl#Event\" AND >= 2 \"http://localhost/aris/sap_model.owl#previousObjects\".TOP))"); - Individual ind = new Individual("http://localhost/aris/sap_model.owl#e4j0__6_____u__"); - boolean result = reasoner.hasType(description, ind); - System.out.println(result); - } - - // simple unit test for new retrieval algorithm - @Test - public void fastInstanceCheck3() throws MalformedURLException, ComponentInitException, ParseException { - String file = "examples/family/father_oe.owl"; - ComponentManager cm = ComponentManager.getInstance(); - KnowledgeSource ks = cm.knowledgeSource(OWLFile.class); - cm.applyConfigEntry(ks, "url", new File(file).toURI().toURL()); - ks.init(); - ReasonerComponent reasoner = cm.reasoner(FastInstanceChecker.class, ks); - reasoner.init(); - baseURI = reasoner.getBaseURI(); - Description description = KBParser.parseConcept("(\"http://example.com/father#male\" AND EXISTS \"http://example.com/father#hasChild\".TOP)"); -// Description description = KBParser.parseConcept("EXISTS \"http://example.com/father#hasChild\".TOP"); - SortedSet<Individual> result = reasoner.getIndividuals(description); - assertTrue(result.size()==3); - assertTrue(result.contains(new Individual("http://example.com/father#markus"))); - assertTrue(result.contains(new Individual("http://example.com/father#martin"))); - assertTrue(result.contains(new Individual("http://example.com/father#stefan"))); -// System.out.println(result); - - Description description2 = KBParser.parseConcept("(\"http://example.com/father#male\" AND ALL \"http://example.com/father#hasChild\".\"http://example.com/father#father\")"); - SortedSet<Individual> result2 = reasoner.getIndividuals(description2); - assertTrue(result2.size()==2); - assertTrue(result2.contains(new Individual("http://example.com/father#heinz"))); - assertTrue(result2.contains(new Individual("http://example.com/father#stefan"))); - } - - @Test - public void domainTest() throws MalformedURLException, ComponentInitException, ParseException { - - ComponentManager cm = ComponentManager.getInstance(); - - String kb = "person SUB animal."; - kb += "man SUB (person AND male)."; - kb += "woman SUB (person AND female)."; - kb += "OPDOMAIN(hasChild) = (man AND woman)."; - kb += "male = male2."; - - - KB kbf = KBParser.parseKBFile(kb); - KnowledgeSource ks = new KBFile(kbf); - ks.init(); - ReasonerComponent reasoner = cm.reasoner(OWLAPIReasoner.class, ks); - reasoner.init(); - ObjectProperty property = new ObjectProperty(KBParser.getInternalURI("hasChild")); - Description description = KBParser.parseConcept("man"); - assertTrue(reasoner.getDomain(property).equals(description)); - -// reasoner.releaseKB(); -// ks = new KBFile(getSimpleKnowledgeBase()); -// ks.init(); -// reasoner = cm.reasoner(OWLAPIReasoner.class,ks); -// reasoner.init(); -// property = new ObjectProperty(KBParser.getInternalURI("hasChild")); -// description = KBParser.parseConcept("TOP"); -// assertTrue(reasoner.getDomain(property).equals(description)); - - String file = "examples/family/father_oe.owl"; - ks = cm.knowledgeSource(OWLFile.class); - cm.applyConfigEntry(ks, "url", new File(file).toURI().toURL()); - ks.init(); - reasoner = cm.reasoner(OWLAPIReasoner.class, ks); - reasoner.init(); - property = new ObjectProperty(reasoner.getBaseURI() + "hasChild"); - description = new NamedClass(reasoner.getBaseURI() + "person"); - assertTrue(reasoner.getDomain(property).equals(description)); - - file = "examples/arch/arch.owl"; - ks = cm.knowledgeSource(OWLFile.class); - cm.applyConfigEntry(ks, "url", new File(file).toURI().toURL()); - ks.init(); - reasoner = cm.reasoner(OWLAPIReasoner.class, ks); - reasoner.init(); - property = new ObjectProperty(reasoner.getBaseURI() + "hasParallelpipe"); - description = new NamedClass(reasoner.getBaseURI() + "construction"); - assertTrue(reasoner.getDomain(property).equals(description)); - - - file = "test/ore/koala.owl"; - ks = cm.knowledgeSource(OWLFile.class); - cm.applyConfigEntry(ks, "url", new File(file).toURI().toURL()); - ks.init(); - reasoner = cm.reasoner(OWLAPIReasoner.class, ks); - reasoner.init(); - DatatypeProperty dProperty = new DatatypeProperty(reasoner.getBaseURI() + "isHardWorking"); - description = new NamedClass(reasoner.getBaseURI() + "Person"); - assertTrue(reasoner.getDomain(dProperty).equals(description)); - - } - - @Test - public void pelletSlowConsistencyCheck() throws ParseException { - ReasonerComponent rs = TestOntologies.getTestOntology(TestOntology.SWORE); - Description d = KBParser.parseConcept("<= 1 \"http://ns.softwiki.de/req/defines\".\"http://ns.softwiki.de/req/AbstractRequirement\""); - NamedClass nc = new NamedClass("http://ns.softwiki.de/req/AbstractComment"); - Axiom axiom = new EquivalentClassesAxiom(nc, d); - boolean res = rs.remainsSatisfiable(axiom); - System.out.println(res); - } - - @Test - public void multipleKnowledgeSourcesTest() throws ComponentInitException { - String file1 = "examples/father.owl"; - String file2 = "examples/lymphography/lymphography.owl"; - ComponentManager cm = ComponentManager.getInstance(); - KnowledgeSource ks1 = cm.knowledgeSource(OWLFile.class); - KnowledgeSource ks2 = cm.knowledgeSource(OWLFile.class); - try { - cm.applyConfigEntry(ks1, "url", new File(file1).toURI().toURL()); - cm.applyConfigEntry(ks2, "url", new File(file2).toURI().toURL()); - } catch (MalformedURLException e) { - // should never happen - e.printStackTrace(); - } - ks1.init(); - ks2.init(); - ReasonerComponent reasoner = cm.reasoner(FastInstanceChecker.class, ks1, ks2); - reasoner.init(); - baseURI = reasoner.getBaseURI(); - System.out.println(reasoner.getSubClasses(Thing.instance)); - assertTrue(reasoner.getSubClasses(Thing.instance).size()==55); - } - - @Test - public void compareReasoners() throws FileNotFoundException, ComponentInitException, ParseException{ - - ComponentManager cm = ComponentManager.getInstance(); - Start start; - FastInstanceChecker reasoner; - LearningProblem lp; - LearningAlgorithm la; - KnowledgeSource ks; - - for(File conf : getTestConfigFiles()){ - System.out.println("Test file: " + conf.getName()); - start = new Start(conf); - lp = start.getLearningProblem(); - la = start.getLearningAlgorithm(); - ks = start.getSources().iterator().next(); - - TreeSet<? extends EvaluatedDescription> result = new TreeSet<EvaluatedDescription>(); - - for(String type : getReasonerTypes()){ - System.out.println("Using " + type + " reasoner..."); - try { - reasoner = cm.reasoner(FastInstanceChecker.class, ks); - reasoner.getConfigurator().setReasonerType(type); - reasoner.init(); - - lp.changeReasonerComponent(reasoner); - lp.init(); - - la.init(); - la.start(); - if(!result.isEmpty()){ - assertTrue(compareTreeSets(la.getCurrentlyBestEvaluatedDescriptions(), result)); - } - - result = la.getCurrentlyBestEvaluatedDescriptions(); - - } catch (Exception e) { - e.printStackTrace(); - } - } - - } - - } - - public boolean compareTreeSets(TreeSet<? extends EvaluatedDescription> tree1, TreeSet<? extends EvaluatedDescription> tree2){ - boolean equal = true; - - List<? extends EvaluatedDescription> list1 = new ArrayList<EvaluatedDescription>(tree1); - List<? extends EvaluatedDescription> list2 = new ArrayList<EvaluatedDescription>(tree2); - - EvaluatedDescription d1; - EvaluatedDescription d2; - for(int i = 0; i < list1.size(); i++){ - d1 = list1.get(i); - d2 = list2.get(i); - if(!(comparator.compare(d1.getDescription(), d2.getDescription()) == 0) && - d1.getAccuracy() == d2.getAccuracy()){ - equal = false; - break; - } - } - - return equal; - } - - private Set<File> getTestConfigFiles(){ - Set<File> files = new HashSet<File>(); - File directory = new File("test" + File.separator + "testReasoners"); - for(File file : directory.listFiles()){ - if(file.toString().endsWith(".conf")){ - files.add(file); - } - } - return files; - } - - private List<String> getReasonerTypes(){ - List<String> reasonerTypes = new LinkedList<String>(); - reasonerTypes.add("pellet"); -// reasonerTypes.add("hermit"); too slow at the moment - reasonerTypes.add("fact"); - reasonerTypes.add("owllink"); - - return reasonerTypes; - } - - private List<Individual> getIndSet(String... inds) { - List<Individual> individuals = new LinkedList<Individual>(); - for(String ind : inds) { - individuals.add(new Individual(uri(ind))); - } - return individuals; - } - - private String uri(String name) { -// return "\""+baseURI+name+"\""; - return baseURI+name; - } - -} Modified: trunk/scripts/pom.xml =================================================================== --- trunk/scripts/pom.xml 2010-09-21 11:44:50 UTC (rev 2320) +++ trunk/scripts/pom.xml 2010-09-21 12:02:21 UTC (rev 2321) @@ -24,7 +24,7 @@ <dependency> <groupId>org.dllearner</groupId> <artifactId>components-ext</artifactId> - </dependency> + </dependency> <dependency> <groupId>net.sourceforge.secondstring</groupId> <artifactId>secondstring</artifactId> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jen...@us...> - 2010-09-21 12:26:21
|
Revision: 2325 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=2325&view=rev Author: jenslehmann Date: 2010-09-21 12:26:12 +0000 (Tue, 21 Sep 2010) Log Message: ----------- restored/partially integrated pre-Maven non-Java code Added Paths: ----------- trunk/dbpedia-navigator/ trunk/interfaces/src/test/php/ trunk/interfaces/src/test/php/LearningClass.php trunk/interfaces/src/test/php/LearningSimple.php trunk/interfaces/src/test/php/LearningThreaded.php trunk/interfaces/src/test/php/Reasoning.php trunk/interfaces/src/test/php/Suggestions.php trunk/interfaces/src/test/php/Utilities.php trunk/interfaces/src/test/php/def0.xsd trunk/interfaces/src/test/php/def1.xsd trunk/interfaces/src/test/php/main.wsdl trunk/moosique.net/ Copied: trunk/interfaces/src/test/php/LearningClass.php (from rev 2320, tags/premaven/src/php-examples/LearningClass.php) =================================================================== --- trunk/interfaces/src/test/php/LearningClass.php (rev 0) +++ trunk/interfaces/src/test/php/LearningClass.php 2010-09-21 12:26:12 UTC (rev 2325) @@ -0,0 +1,68 @@ +<?php +/** + * Copyright (C) 2007-2009, Jens Lehmann + * + * This file is part of DL-Learner. + * + * DL-Learner is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * DL-Learner is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ + + /** + * Small example showing how to use DL-Learner for learning class definitions. + * + * @author Jens Lehmann + */ + +include('Utilities.php'); + +// load WSDL files (has to be done due to a Java web service bug) +ini_set("soap.wsdl_cache_enabled","0"); +$wsdluri="http://localhost:8181/services?wsdl"; +// Utilities::loadWSDLfiles($wsdluri); + +// specifiy ontology +$ontology = 'file:'.realpath("../../examples/swore/swore.rdf"); + +// create DL-Learner client +$client = new SoapClient("main.wsdl"); +// $client = new SoapClient($wsdluri); + +$id = $client->generateID(); +$ksID = $client->addKnowledgeSource($id, "owlfile", $ontology); +$rID = $client->setReasoner($id, "fastInstanceChecker"); + +// create a learning problem +$lp = $client->setLearningProblem($id, "classLearning"); +$client->applyConfigEntryURL($id, $lp, "classToDescribe", "http://ns.softwiki.de/req/CustomerRequirement"); + +$la_id = $client->setLearningAlgorithm($id, "celoe"); +$client->applyConfigEntryInt($id, $la_id, "maxExecutionTimeInSeconds", 5); + +$client->initAll($id); + +// learn concept +echo 'start learning ... '; +// get only concept +// $concept = $client->learn($id, "manchester"); +// get concept and additional information in JSON syntax +$concept = $client->learnDescriptionsEvaluated($id); +echo 'OK <br />'; +// echo htmlspecialchars($concept); + +echo 'solution: <pre>'; +var_dump(json_decode($concept, true)); +echo '</pre>'; + +?> Copied: trunk/interfaces/src/test/php/LearningSimple.php (from rev 2320, tags/premaven/src/php-examples/LearningSimple.php) =================================================================== --- trunk/interfaces/src/test/php/LearningSimple.php (rev 0) +++ trunk/interfaces/src/test/php/LearningSimple.php 2010-09-21 12:26:12 UTC (rev 2325) @@ -0,0 +1,77 @@ +<?php +/** + * Copyright (C) 2007-2008, Jens Lehmann + * + * This file is part of DL-Learner. + * + * DL-Learner is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * DL-Learner is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ + + /** + * Small example showing how to use DL-Learner for learning class definitions. + * + * @author Jens Lehmann + */ + +include('Utilities.php'); + +// load WSDL files (has to be done due to a Java web service bug) +ini_set("soap.wsdl_cache_enabled","0"); +$wsdluri="http://localhost:8181/services?wsdl"; +// Utilities::loadWSDLfiles($wsdluri); + +// specifiy ontology +$ontology = 'file:'.realpath("../../examples/family/father.owl"); + +// create DL-Learner client +$client = new SoapClient("main.wsdl"); +// $client = new SoapClient($wsdluri); + +// load owl file in DIG reasoner (you need a running DIG reasoner) +$id = $client->generateID(); +$ksID = $client->addKnowledgeSource($id, "owlfile", $ontology); +$rID = $client->setReasoner($id, "fastInstanceChecker"); + +// create a learning problem +$posExamples = array('http://example.com/father#stefan', + 'http://example.com/father#markus', + 'http://example.com/father#martin'); +$negExamples = array('http://example.com/father#heinz', + 'http://example.com/father#anna', + 'http://example.com/father#michelle'); +$client->setLearningProblem($id, "posNegLPStandard"); +$client->setPositiveExamples($id, $posExamples); +$client->setNegativeExamples($id, $negExamples); + +// choose refinement operator approach +$la_id = $client->setLearningAlgorithm($id, "refexamples"); +// you can add the following to apply a config option to a component, e.g. ignore a concept +$client->applyConfigEntryStringArray($id, $la_id, "ignoredConcepts", array('http://example.com/father#female')); + +$client->initAll($id); + +// learn concept +echo 'start learning ... '; +// get only concept +// $concept = $client->learn($id, "manchester"); +// get concept and additional information in JSON syntax +$concept = $client->learnDescriptionsEvaluatedLimit($id, 5); +echo 'OK <br />'; + +echo 'solution: <pre>'; +var_dump(json_decode($concept, true)); +echo '</pre>'; + +?> Copied: trunk/interfaces/src/test/php/LearningThreaded.php (from rev 2320, tags/premaven/src/php-examples/LearningThreaded.php) =================================================================== --- trunk/interfaces/src/test/php/LearningThreaded.php (rev 0) +++ trunk/interfaces/src/test/php/LearningThreaded.php 2010-09-21 12:26:12 UTC (rev 2325) @@ -0,0 +1,110 @@ +<?php +/** + * Copyright (C) 2007-2008, Jens Lehmann + * + * This file is part of DL-Learner. + * + * DL-Learner is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * DL-Learner is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ + + /** + * Small example showing how to use DL-Learner for learning + * a class definition using a separate learning thread. + * + * @author Jens Lehmann + */ + +include('Utilities.php'); + +// load WSDL files (has to be done due to a Java web service bug) +ini_set("soap.wsdl_cache_enabled","0"); +$wsdluri="http://localhost:8181/services?wsdl"; +Utilities::loadWSDLfiles($wsdluri); + +// specifiy ontology +$ontology = 'file:'.realpath("../../examples/family/uncle.owl"); + +// create DL-Learner client +$client = new SoapClient("main.wsdl"); + +// load owl file in reasoner +$id = $client->generateID(); + +$state = $client->getState($id); + +var_dump($state); +echo 'STATE END'; + +$ksID = $client->addKnowledgeSource($id, "owlfile", $ontology); +$rID = $client->setReasoner($id, "owlapi"); + +// create a learning problem +$posExamples = array( + 'http://localhost/foo#heinrich', + 'http://localhost/foo#alfred', + 'http://localhost/foo#heinz', + 'http://localhost/foo#hans', + 'http://localhost/foo#alex'); +$negExamples = array( + 'http://localhost/foo#jan', + 'http://localhost/foo#markus', + 'http://localhost/foo#susi', + 'http://localhost/foo#anna', + 'http://localhost/foo#maria', + 'http://localhost/foo#katrin', + 'http://localhost/foo#johanna', + 'http://localhost/foo#mandy', + 'http://localhost/foo#miriam', + 'http://localhost/foo#hanna'); +$client->setLearningProblem($id, "posNegLPStandard"); +$client->setPositiveExamples($id, $posExamples); +$client->setNegativeExamples($id, $negExamples); + +// choose refinement operator approach +$client->setLearningAlgorithm($id, "refinement"); + +$client->initAll($id); + +// start learning process in DL-Learner +$client->learnThreaded($id); + +$sleeptime = 2; +$seconds = 0; + +do { + // sleep a while + sleep($sleeptime); + + // see what we have learned so far + $concept=$client->getCurrentlyBestConcept($id); + $running=$client->isAlgorithmRunning($id); + + $seconds += $sleeptime; + if($seconds == 10) + $sleeptime = 5; + + echo 'result after '.$seconds.' seconds: '.$concept.'<br />'; + flush(); + +} while($running); + +// print best concepts found (not all of which are +// necessarily perfect solutions) +echo '<br />Algorithm finished. Best concepts: '; +echo '<pre>'; +print_r($client->getCurrentlyBestConcepts($id, 10)); +echo '</pre>'; + +?> Copied: trunk/interfaces/src/test/php/Reasoning.php (from rev 2320, tags/premaven/src/php-examples/Reasoning.php) =================================================================== --- trunk/interfaces/src/test/php/Reasoning.php (rev 0) +++ trunk/interfaces/src/test/php/Reasoning.php 2010-09-21 12:26:12 UTC (rev 2325) @@ -0,0 +1,59 @@ +<?php +/** + * Copyright (C) 2007-2008, Jens Lehmann + * + * This file is part of DL-Learner. + * + * DL-Learner is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * DL-Learner is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ + + /** + * Small example showing how to use DL-Learner for reasoning. + * + * @author Jens Lehmann + */ + +include('Utilities.php'); + +// load WSDL files (has to be done due to a Java web service bug) +ini_set("soap.wsdl_cache_enabled","0"); +$wsdluri="http://localhost:8181/services?wsdl"; +Utilities::loadWSDLfiles($wsdluri); + +// specifiy ontology +$ontology = 'file:'.realpath("../../examples/family/father.owl"); + +// create DL-Learner client +$client = new SoapClient("main.wsdl"); + +// load owl file in DIG reasoner (you need a running DIG reasoner) +$id = $client->generateID(); +$ksID = $client->addKnowledgeSource($id, "owlfile", $ontology); +$client->init($id, $ksID); +$rID = $client->setReasoner($id, "dig"); +$client->init($id, $rID); + +// create a concept in internal DL-Learner syntax +// ( = all female persons having at least one child) +$concept = '("http://example.com/father#female" AND EXISTS "http://example.com/father#hasChild".TOP)'; +$instances = $client->retrieval($id, $concept); + +// print instances +echo 'instances of ' . $concept . ': <br />'; +echo '<pre>'; +print_r($instances->item); +echo '</pre>'; + +?> \ No newline at end of file Copied: trunk/interfaces/src/test/php/Suggestions.php (from rev 2320, tags/premaven/src/php-examples/Suggestions.php) =================================================================== --- trunk/interfaces/src/test/php/Suggestions.php (rev 0) +++ trunk/interfaces/src/test/php/Suggestions.php 2010-09-21 12:26:12 UTC (rev 2325) @@ -0,0 +1,74 @@ +<?php + +// load WSDL files (has to be done due to a Java web service bug) +ini_set("soap.wsdl_cache_enabled","0"); +$wsdluri="http://127.0.0.1:8181/services?wsdl"; +if(!file_exists('main.wsdl')) { + include('Utilities.php'); + Utilities::loadWSDLfiles($wsdluri); +} + +$examples = array('http://dbpedia.org/resource/Leipzig', 'http://dbpedia.org/resource/Dresden'); + +$client = new SoapClient("main.wsdl",array('features' => SOAP_SINGLE_ELEMENT_ARRAYS)); + +$id = $client->generateID(); + +$ksID=$client->addKnowledgeSource($id,"sparql","http://dbpedia.org/sparql"); +$client->applyConfigEntryInt($id, $ksID, "recursionDepth", 2); +$filterClasses=array("http://xmlns.com/foaf/","http://dbpedia.org/class/yago/","http://dbpedia.org/ontology/Resource"); +// $relatedInstances = $client->getNegativeExamples($id,$ksID,$examples,count($examples),"http://dbpedia.org/resource/",$filterClasses); +// $relatedInstances = $relatedInstances->item; +$relatedInstances = array('http://dbpedia.org/resource/Berlin','http://dbpedia.org/resource/London'); +$instances = array_merge($examples, $relatedInstances); +$client->applyConfigEntryStringArray($id, $ksID, "instances", $instances); +$client->applyConfigEntryString($id, $ksID, "predefinedFilter", "DBPEDIA-NAVIGATOR"); +$client->applyConfigEntryString($id, $ksID, "predefinedEndpoint", "LOCALDBPEDIA"); +// $client->applyConfigEntryString($id, $ksID, "predefinedManipulator", "DBPEDIA-NAVIGATOR"); +$client->applyConfigEntryBoolean($id, $ksID, "saveExtractedFragment", true); +// $client->applyConfigEntryBoolean($id, $ksID, "useLits", true); +$client->applyConfigEntryBoolean($id, $ksID, "getPropertyInformation", true); + +$rID = $client->setReasoner($id, "fastInstanceChecker"); + +$client->setLearningProblem($id, "posOnlyLP"); +$client->setPositiveExamples($id, $examples); + +$laID = $client->setLearningAlgorithm($id, "celoe"); +$client->applyConfigEntryInt($id, $laID, "maxExecutionTimeInSeconds", 1); +$client->applyConfigEntryBoolean($id, $laID, "useHasValueConstructor", true); +$client->applyConfigEntryInt($id, $laID, "valueFrequencyThreshold", 2); + +$client->initAll($id); + +echo '<p>Positive examples:<br />'; +foreach($examples as $example) { + echo $example.'<br />'; +} +echo '</p>'; + +echo '<p>Additional instances:<br />'; +foreach($relatedInstances as $related) { + echo $related.'<br />'; +} +echo '</p>'; + +echo '<p>start learning ... '; +$startTime = microtime(true); +$concepts = $client->learnDescriptionsEvaluated($id, 10); +$runTime = microtime(true) - $startTime; +echo 'OK ('.$runTime.' seconds)</p>'; + +$concepts = json_decode($concepts); + +// var_dump($concepts); + +echo '<table border="1px"><tr><td><i>natural description</i></td><td><i>Manchester OWL Syntax</i></td><td><i>accuracy</i></td></tr>'; +foreach($concepts as $concept) { + $natural = $client->getNaturalDescription($id, $concept->descriptionKBSyntax); + // echo $natural . '(Manchester: ' . $concept->descriptionManchesterSyntax . ', acc. ' . $concept->scoreValue . ')<br />'; ; + echo '<tr><td>'.$natural.'</td><td>'.$concept->descriptionManchesterSyntax.'</td><td>'.$concept->scoreValue.'</td></tr>'; +} +echo '</table>'; + +?> Copied: trunk/interfaces/src/test/php/Utilities.php (from rev 2320, tags/premaven/src/php-examples/Utilities.php) =================================================================== --- trunk/interfaces/src/test/php/Utilities.php (rev 0) +++ trunk/interfaces/src/test/php/Utilities.php 2010-09-21 12:26:12 UTC (rev 2325) @@ -0,0 +1,173 @@ +<?php +/** + * Copyright (C) 2007-2008, Jens Lehmann + * + * This file is part of DL-Learner. + * + * DL-Learner is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * DL-Learner is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ + +// Pear HTTP_Request class required +include ('HTTP/Request.php'); + +/** + * Collection of static utility functions. + * + * @author Jens Lehmann + * @author Sebastian Hellmann + */ + +class Utilities { + + /** + * Loads WSDL and imported XSD files from web service and stores them + * locally. + */ + public static function loadWSDLfiles($wsdluri) { + $main = self :: getRequest($wsdluri); +// echo "loaded"; + $other = self :: getXSDImports($main); +// print_r($other); + $newMain = self :: changeXSDImports($main); + self :: writeToFile("main.wsdl", $newMain); + $x = 0; + foreach ($other as $o) { + self :: writeToFile("def" . ($x++) . ".xsd", self :: getRequest($o)); + } + } + + /** + * Change XSD imports in WSDL file to point to local imports. + */ + public static function changeXSDImports($wsdlFileContent) { + $before = "<xsd:import schemaLocation=\""; + $after = "\" namespace=\""; + $newWSDL = ""; + $desca = "def"; + $descb = ".xsd"; + $x = 0; + while ($posstart = strpos($wsdlFileContent, $before)) { + $posstart += strlen($before); + $newWSDL .= substr($wsdlFileContent, 0, $posstart); + $wsdlFileContent = substr($wsdlFileContent, $posstart); + $newWSDL .= $desca . ($x++) . $descb; + $posend = strpos($wsdlFileContent, $after); + $wsdlFileContent = substr($wsdlFileContent, $posend); + } + return $newWSDL . $wsdlFileContent; + } + + /** + * Extracts XSD imports from WSDL file. + */ + public static function getXSDImports($wsdlFileContent) { + /* + preg_match_all('/\"[^\"\?]*?\?xsd=[^\"]*?\"/',$wsdlFileContent, $matches); + return $matches; + */ + $before = "<xsd:import schemaLocation=\""; + $after = "\" namespace=\""; + $ret = array (); + while ($posstart = strpos($wsdlFileContent, $before)) { + $posstart += strlen($before); + $wsdlFileContent = substr($wsdlFileContent, $posstart); + $posend = strpos($wsdlFileContent, $after); + $tmp = substr($wsdlFileContent, 0, $posend); + $ret[] = $tmp; + $wsdlFileContent = substr($wsdlFileContent, $posend +strlen($after)); + } + return $ret; + } + + /** + * Peforms a GET request and returns body of result. + */ + public static function getRequest($uri) { + $req = & new HTTP_Request($uri); + $req->setMethod(HTTP_REQUEST_METHOD_GET); + $req->sendRequest(); + $ret = $req->getResponseBody(); + return $ret; + } + + /** + * Writes $content to file $filename. + */ + public static function writeToFile($filename, $content) { + $fp = fopen($filename, "w"); + fwrite($fp, $content); + fclose($fp); + } + + /** + * Prints a list of all Web Service components and their configuration options. + */ + public static function printWebserviceComponents($client) { + echo '<h1>Web Service Information</h1>'; + + echo '<h2>Knowledge Sources</h2>'; + Utilities :: printComponentsInfo($client, $client->getKnowledgeSources()->item); + + echo '<h2>Reasoners</h2>'; + Utilities :: printComponentsInfo($client, $client->getReasoners()->item); + + echo '<h2>Learning Problems</h2>'; + Utilities :: printComponentsInfo($client, $client->getLearningProblems()->item); + + echo '<h2>Learning Algorithms</h2>'; + Utilities :: printComponentsInfo($client, $client->getLearningAlgorithms()->item); + } + + /** + * Print information about all given components. + */ + public static function printComponentsInfo($client, $components) { + foreach ($components as $component) + Utilities :: printComponentInfo($client, $component); + } + + /** + * Print information about a component. + */ + public static function printComponentInfo($client, $component) { + echo '<h3>component: ' . $component . '</h3>'; + + $options = $client->getConfigOptions($component, true)->item; + if (!is_array($options)) + $options = array ( + $options + ); + + foreach ($options as $option) + Utilities :: printOption($option); + } + + /** + * Prints information about an option. + * + * @param String Option as returned by the DL-Learner web service + * getConfigOption() method. + */ + public static function printOption($option) { + $parts = split('#', $option); + echo 'option name: <b>' . $parts[0] . '</b><br />'; + echo 'option description: ' . $parts[1] . '<br />'; + echo 'option class: ' . $parts[2] . '<br />'; + if ($parts[3] != 'null') + echo 'option name: ' . $parts[3] . '<br />'; + echo '<br />'; + } +} +?> Copied: trunk/interfaces/src/test/php/def0.xsd (from rev 2320, tags/premaven/src/php-examples/def0.xsd) =================================================================== --- trunk/interfaces/src/test/php/def0.xsd (rev 0) +++ trunk/interfaces/src/test/php/def0.xsd 2010-09-21 12:26:12 UTC (rev 2325) @@ -0,0 +1,66 @@ +<?xml version="1.0" encoding="UTF-8"?><!-- Published by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.1.6 in JDK 6. --><xs:schema xmlns:tns="http://server.dllearner.org/" xmlns:xs="http://www.w3.org/2001/XMLSchema" version="1.0" targetNamespace="http://server.dllearner.org/"> + +<xs:element name="ClientNotKnownException" type="tns:ClientNotKnownException"></xs:element> + +<xs:element name="ComponentInitException" type="tns:ComponentInitException"></xs:element> + +<xs:element name="ConfigOptionTypeException" type="tns:ConfigOptionTypeException"></xs:element> + +<xs:element name="LearningProblemUnsupportedException" type="tns:LearningProblemUnsupportedException"></xs:element> + +<xs:element name="MalformedURLException" type="tns:MalformedURLException"></xs:element> + +<xs:element name="ParseException" type="tns:ParseException"></xs:element> + +<xs:element name="SparqlQueryException" type="tns:SparqlQueryException"></xs:element> + +<xs:element name="UnknownComponentException" type="tns:UnknownComponentException"></xs:element> + +<xs:complexType name="ParseException"> +<xs:sequence> +<xs:element name="message" type="xs:string" minOccurs="0"></xs:element> +</xs:sequence> +</xs:complexType> + +<xs:complexType name="ClientNotKnownException"> +<xs:sequence> +<xs:element name="message" type="xs:string" minOccurs="0"></xs:element> +</xs:sequence> +</xs:complexType> + +<xs:complexType name="SparqlQueryException"> +<xs:sequence> +<xs:element name="message" type="xs:string" minOccurs="0"></xs:element> +</xs:sequence> +</xs:complexType> + +<xs:complexType name="UnknownComponentException"> +<xs:sequence> +<xs:element name="message" type="xs:string" minOccurs="0"></xs:element> +</xs:sequence> +</xs:complexType> + +<xs:complexType name="ConfigOptionTypeException"> +<xs:sequence> +<xs:element name="message" type="xs:string" minOccurs="0"></xs:element> +</xs:sequence> +</xs:complexType> + +<xs:complexType name="ComponentInitException"> +<xs:sequence> +<xs:element name="message" type="xs:string" minOccurs="0"></xs:element> +</xs:sequence> +</xs:complexType> + +<xs:complexType name="LearningProblemUnsupportedException"> +<xs:sequence> +<xs:element name="message" type="xs:string" minOccurs="0"></xs:element> +</xs:sequence> +</xs:complexType> + +<xs:complexType name="MalformedURLException"> +<xs:sequence> +<xs:element name="message" type="xs:string" minOccurs="0"></xs:element> +</xs:sequence> +</xs:complexType> +</xs:schema> \ No newline at end of file Copied: trunk/interfaces/src/test/php/def1.xsd (from rev 2320, tags/premaven/src/php-examples/def1.xsd) =================================================================== --- trunk/interfaces/src/test/php/def1.xsd (rev 0) +++ trunk/interfaces/src/test/php/def1.xsd 2010-09-21 12:26:12 UTC (rev 2325) @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?><!-- Published by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.1.6 in JDK 6. --><xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" version="1.0" targetNamespace="http://jaxb.dev.java.net/array"> + +<xs:complexType name="stringArray" final="#all"> +<xs:sequence> +<xs:element name="item" type="xs:string" minOccurs="0" maxOccurs="unbounded" nillable="true"></xs:element> +</xs:sequence> +</xs:complexType> + +<xs:complexType name="intArray" final="#all"> +<xs:sequence> +<xs:element name="item" type="xs:int" minOccurs="0" maxOccurs="unbounded" nillable="true"></xs:element> +</xs:sequence> +</xs:complexType> +</xs:schema> \ No newline at end of file Copied: trunk/interfaces/src/test/php/main.wsdl (from rev 2320, tags/premaven/src/php-examples/main.wsdl) =================================================================== --- trunk/interfaces/src/test/php/main.wsdl (rev 0) +++ trunk/interfaces/src/test/php/main.wsdl 2010-09-21 12:26:12 UTC (rev 2325) @@ -0,0 +1,1491 @@ +<?xml version="1.0" encoding="UTF-8"?><!-- Published by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.1.1 in JDK 6. --><!-- Generated by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.1.1 in JDK 6. --><definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://server.dllearner.org/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://server.dllearner.org/" name="DLLearnerWSService"> +<types> +<xsd:schema> +<xsd:import namespace="http://server.dllearner.org/" schemaLocation="def0.xsd"></xsd:import> +</xsd:schema> +<xsd:schema> +<xsd:import namespace="http://jaxb.dev.java.net/array" schemaLocation="def1.xsd"></xsd:import> +</xsd:schema> +</types> +<message name="init"> +<part name="arg0" type="xsd:int"></part> +<part name="arg1" type="xsd:int"></part> +</message> +<message name="initResponse"></message> +<message name="ClientNotKnownException"> +<part name="fault" element="tns:ClientNotKnownException"></part> +</message> +<message name="UnknownComponentException"> +<part name="fault" element="tns:UnknownComponentException"></part> +</message> +<message name="ComponentInitException"> +<part name="fault" element="tns:ComponentInitException"></part> +</message> +<message name="stop"> +<part name="arg0" type="xsd:int"></part> +</message> +<message name="stopResponse"></message> +<message name="getBuild"></message> +<message name="getBuildResponse"> +<part name="return" type="xsd:string"></part> +</message> +<message name="ping"></message> +<message name="pingResponse"> +<part name="return" type="xsd:boolean"></part> +</message> +<message name="generateID"></message> +<message name="generateIDResponse"> +<part name="return" type="xsd:int"></part> +</message> +<message name="getComponents"></message> +<message name="getComponentsResponse"> +<part xmlns:ns1="http://jaxb.dev.java.net/array" name="return" type="ns1:stringArray"></part> +</message> +<message name="getKnowledgeSources"></message> +<message name="getKnowledgeSourcesResponse"> +<part xmlns:ns2="http://jaxb.dev.java.net/array" name="return" type="ns2:stringArray"></part> +</message> +<message name="getReasoners"></message> +<message name="getReasonersResponse"> +<part xmlns:ns3="http://jaxb.dev.java.net/array" name="return" type="ns3:stringArray"></part> +</message> +<message name="getLearningProblems"></message> +<message name="getLearningProblemsResponse"> +<part xmlns:ns4="http://jaxb.dev.java.net/array" name="return" type="ns4:stringArray"></part> +</message> +<message name="getLearningAlgorithms"></message> +<message name="getLearningAlgorithmsResponse"> +<part xmlns:ns5="http://jaxb.dev.java.net/array" name="return" type="ns5:stringArray"></part> +</message> +<message name="getConfigOptions"> +<part name="arg0" type="xsd:string"></part> +<part name="arg1" type="xsd:boolean"></part> +</message> +<message name="getConfigOptionsResponse"> +<part xmlns:ns6="http://jaxb.dev.java.net/array" name="return" type="ns6:stringArray"></part> +</message> +<message name="addKnowledgeSource"> +<part name="arg0" type="xsd:int"></part> +<part name="arg1" type="xsd:string"></part> +<part name="arg2" type="xsd:string"></part> +</message> +<message name="addKnowledgeSourceResponse"> +<part name="return" type="xsd:int"></part> +</message> +<message name="MalformedURLException"> +<part name="fault" element="tns:MalformedURLException"></part> +</message> +<message name="removeKnowledgeSource"> +<part name="arg0" type="xsd:int"></part> +<part name="arg1" type="xsd:int"></part> +</message> +<message name="removeKnowledgeSourceResponse"></message> +<message name="setReasoner"> +<part name="arg0" type="xsd:int"></part> +<part name="arg1" type="xsd:string"></part> +</message> +<message name="setReasonerResponse"> +<part name="return" type="xsd:int"></part> +</message> +<message name="setLearningProblem"> +<part name="arg0" type="xsd:int"></part> +<part name="arg1" type="xsd:string"></part> +</message> +<message name="setLearningProblemResponse"> +<part name="return" type="xsd:int"></part> +</message> +<message name="setLearningAlgorithm"> +<part name="arg0" type="xsd:int"></part> +<part name="arg1" type="xsd:string"></part> +</message> +<message name="setLearningAlgorithmResponse"> +<part name="return" type="xsd:int"></part> +</message> +<message name="LearningProblemUnsupportedException"> +<part name="fault" element="tns:LearningProblemUnsupportedException"></part> +</message> +<message name="initAll"> +<part name="arg0" type="xsd:int"></part> +</message> +<message name="initAllResponse"></message> +<message name="learn"> +<part name="arg0" type="xsd:int"></part> +<part name="arg1" type="xsd:string"></part> +</message> +<message name="learnResponse"> +<part name="return" type="xsd:string"></part> +</message> +<message name="learnDescriptionsEvaluated"> +<part name="arg0" type="xsd:int"></part> +</message> +<message name="learnDescriptionsEvaluatedResponse"> +<part name="return" type="xsd:string"></part> +</message> +<message name="getCurrentlyBestEvaluatedDescriptions"> +<part name="arg0" type="xsd:int"></part> +<part name="arg1" type="xsd:int"></part> +</message> +<message name="getCurrentlyBestEvaluatedDescriptionsResponse"> +<part name="return" type="xsd:string"></part> +</message> +<message name="learnDescriptionsEvaluatedLimit"> +<part name="arg0" type="xsd:int"></part> +<part name="arg1" type="xsd:int"></part> +</message> +<message name="learnDescriptionsEvaluatedLimitResponse"> +<part name="return" type="xsd:string"></part> +</message> +<message name="learnThreaded"> +<part name="arg0" type="xsd:int"></part> +</message> +<message name="learnThreadedResponse"></message> +<message name="getCurrentlyBestConcept"> +<part name="arg0" type="xsd:int"></part> +</message> +<message name="getCurrentlyBestConceptResponse"> +<part name="return" type="xsd:string"></part> +</message> +<message name="getCurrentlyBestConcepts"> +<part name="arg0" type="xsd:int"></part> +<part name="arg1" type="xsd:int"></part> +<part name="arg2" type="xsd:string"></part> +</message> +<message name="getCurrentlyBestConceptsResponse"> +<part xmlns:ns7="http://jaxb.dev.java.net/array" name="return" type="ns7:stringArray"></part> +</message> +<message name="getCurrentlyBestEvaluatedDescriptionsFiltered"> +<part name="arg0" type="xsd:int"></part> +<part name="arg1" type="xsd:int"></part> +<part name="arg2" type="xsd:double"></part> +<part name="arg3" type="xsd:boolean"></part> +</message> +<message name="getCurrentlyBestEvaluatedDescriptionsFilteredResponse"> +<part name="return" type="xsd:string"></part> +</message> +<message name="isAlgorithmRunning"> +<part name="arg0" type="xsd:int"></part> +</message> +<message name="isAlgorithmRunningResponse"> +<part name="return" type="xsd:boolean"></part> +</message> +<message name="setPositiveExamples"> +<part name="arg0" type="xsd:int"></part> +<part xmlns:ns8="http://jaxb.dev.java.net/array" name="arg1" type="ns8:stringArray"></part> +</message> +<message name="setPositiveExamplesResponse"></message> +<message name="setNegativeExamples"> +<part name="arg0" type="xsd:int"></part> +<part xmlns:ns9="http://jaxb.dev.java.net/array" name="arg1" type="ns9:stringArray"></part> +</message> +<message name="setNegativeExamplesResponse"></message> +<message name="applyConfigEntryInt"> +<part name="arg0" type="xsd:int"></part> +<part name="arg1" type="xsd:int"></part> +<part name="arg2" type="xsd:string"></part> +<part name="arg3" type="xsd:int"></part> +</message> +<message name="applyConfigEntryIntResponse"></message> +<message name="applyConfigEntryString"> +<part name="arg0" type="xsd:int"></part> +<part name="arg1" type="xsd:int"></part> +<part name="arg2" type="xsd:string"></part> +<part name="arg3" type="xsd:string"></part> +</message> +<message name="applyConfigEntryStringResponse"></message> +<message name="applyConfigEntryURL"> +<part name="arg0" type="xsd:int"></part> +<part name="arg1" type="xsd:int"></part> +<part name="arg2" type="xsd:string"></part> +<part name="arg3" type="xsd:string"></part> +</message> +<message name="applyConfigEntryURLResponse"></message> +<message name="applyConfigEntryStringArray"> +<part name="arg0" type="xsd:int"></part> +<part name="arg1" type="xsd:int"></part> +<part name="arg2" type="xsd:string"></part> +<part xmlns:ns10="http://jaxb.dev.java.net/array" name="arg3" type="ns10:stringArray"></part> +</message> +<message name="applyConfigEntryStringArrayResponse"></message> +<message name="applyConfigEntryBoolean"> +<part name="arg0" type="xsd:int"></part> +<part name="arg1" type="xsd:int"></part> +<part name="arg2" type="xsd:string"></part> +<part name="arg3" type="xsd:boolean"></part> +</message> +<message name="applyConfigEntryBooleanResponse"></message> +<message name="getConfigOptionValueStringArray"> +<part name="arg0" type="xsd:int"></part> +<part name="arg1" type="xsd:int"></part> +<part name="arg2" type="xsd:string"></part> +</message> +<message name="getConfigOptionValueStringArrayResponse"> +<part xmlns:ns11="http://jaxb.dev.java.net/array" name="return" type="ns11:stringArray"></part> +</message> +<message name="ConfigOptionTypeException"> +<part name="fault" element="tns:ConfigOptionTypeException"></part> +</message> +<message name="getConfigOptionValueString"> +<part name="arg0" type="xsd:int"></part> +<part name="arg1" type="xsd:int"></part> +<part name="arg2" type="xsd:string"></part> +</message> +<message name="getConfigOptionValueStringResponse"> +<part name="return" type="xsd:string"></part> +</message> +<message name="getConfigOptionValueURL"> +<part name="arg0" type="xsd:int"></part> +<part name="arg1" type="xsd:int"></part> +<part name="arg2" type="xsd:string"></part> +</message> +<message name="getConfigOptionValueURLResponse"> +<part name="return" type="xsd:string"></part> +</message> +<message name="getConfigOptionValueDouble"> +<part name="arg0" type="xsd:int"></part> +<part name="arg1" type="xsd:int"></part> +<part name="arg2" type="xsd:string"></part> +</message> +<message name="getConfigOptionValueDoubleResponse"> +<part name="return" type="xsd:double"></part> +</message> +<message name="getConfigOptionValueBoolean"> +<part name="arg0" type="xsd:int"></part> +<part name="arg1" type="xsd:int"></part> +<part name="arg2" type="xsd:string"></part> +</message> +<message name="getConfigOptionValueBooleanResponse"> +<part name="return" type="xsd:boolean"></part> +</message> +<message name="getConfigOptionValueInt"> +<part name="arg0" type="xsd:int"></part> +<part name="arg1" type="xsd:int"></part> +<part name="arg2" type="xsd:string"></part> +</message> +<message name="getConfigOptionValueIntResponse"> +<part name="return" type="xsd:int"></part> +</message> +<message name="getAtomicConcepts"> +<part name="arg0" type="xsd:int"></part> +</message> +<message name="getAtomicConceptsResponse"> +<part xmlns:ns12="http://jaxb.dev.java.net/array" name="return" type="ns12:stringArray"></part> +</message> +<message name="getSubsumptionHierarchy"> +<part name="arg0" type="xsd:int"></part> +</message> +<message name="getSubsumptionHierarchyResponse"> +<part name="return" type="xsd:string"></part> +</message> +<message name="retrieval"> +<part name="arg0" type="xsd:int"></part> +<part name="arg1" type="xsd:string"></part> +</message> +<message name="retrievalResponse"> +<part xmlns:ns13="http://jaxb.dev.java.net/array" name="return" type="ns13:stringArray"></part> +</message> +<message name="ParseException"> +<part name="fault" element="tns:ParseException"></part> +</message> +<message name="getConceptLength"> +<part name="arg0" type="xsd:string"></part> +</message> +<message name="getConceptLengthResponse"> +<part name="return" type="xsd:int"></part> +</message> +<message name="getAtomicRoles"> +<part name="arg0" type="xsd:int"></part> +</message> +<message name="getAtomicRolesResponse"> +<part xmlns:ns14="http://jaxb.dev.java.net/array" name="return" type="ns14:stringArray"></part> +</message> +<message name="getInstances"> +<part name="arg0" type="xsd:int"></part> +</message> +<message name="getInstancesResponse"> +<part xmlns:ns15="http://jaxb.dev.java.net/array" name="return" type="ns15:stringArray"></part> +</message> +<message name="getIndividualsForARole"> +<part name="arg0" type="xsd:int"></part> +<part name="arg1" type="xsd:string"></part> +</message> +<message name="getIndividualsForARoleResponse"> +<part xmlns:ns16="http://jaxb.dev.java.net/array" name="return" type="ns16:stringArray"></part> +</message> +<message name="getAsJSON"> +<part name="arg0" type="xsd:int"></part> +<part name="arg1" type="xsd:int"></part> +</message> +<message name="getAsJSONResponse"> +<part name="return" type="xsd:string"></part> +</message> +<message name="SparqlQueryException"> +<part name="fault" element="tns:SparqlQueryException"></part> +</message> +<message name="getAsXMLString"> +<part name="arg0" type="xsd:int"></part> +<part name="arg1" type="xsd:int"></part> +</message> +<message name="getAsXMLStringResponse"> +<part name="return" type="xsd:string"></part> +</message> +<message name="sparqlQueryThreaded"> +<part name="arg0" type="xsd:int"></part> +<part name="arg1" type="xsd:int"></part> +<part name="arg2" type="xsd:string"></part> +</message> +<message name="sparqlQueryThreadedResponse"> +<part name="return" type="xsd:int"></part> +</message> +<message name="sparqlQuery"> +<part name="arg0" type="xsd:int"></part> +<part name="arg1" type="xsd:int"></part> +<part name="arg2" type="xsd:string"></part> +</message> +<message name="sparqlQueryResponse"> +<part name="return" type="xsd:string"></part> +</message> +<message name="sparqlQueryPredefinedEndpoint"> +<part name="arg0" type="xsd:string"></part> +<part name="arg1" type="xsd:string"></part> +<part name="arg2" type="xsd:boolean"></part> +</message> +<message name="sparqlQueryPredefinedEndpointResponse"> +<part name="return" type="xsd:string"></part> +</message> +<message name="isSparqlQueryRunning"> +<part name="arg0" type="xsd:int"></part> +<part name="arg1" type="xsd:int"></part> +</message> +<message name="isSparqlQueryRunningResponse"> +<part name="return" type="xsd:boolean"></part> +</message> +<message name="stopSparqlThread"> +<part name="arg0" type="xsd:int"></part> +<part name="arg1" type="xsd:int"></part> +</message> +<message name="stopSparqlThreadResponse"></message> +<message name="getConceptDepth"> +<part name="arg0" type="xsd:int"></part> +<part name="arg1" type="xsd:int"></part> +</message> +<message name="getConceptDepthResponse"> +<part xmlns:ns17="http://jaxb.dev.java.net/array" name="return" type="ns17:intArray"></part> +</message> +<message name="getConceptArity"> +<part name="arg0" type="xsd:int"></part> +<part name="arg1" type="xsd:int"></part> +</message> +<message name="getConceptArityResponse"> +<part xmlns:ns18="http://jaxb.dev.java.net/array" name="return" type="ns18:intArray"></part> +</message> +<message name="SparqlRetrieval"> +<part name="arg0" type="xsd:string"></part> +<part name="arg1" type="xsd:int"></part> +</message> +<message name="SparqlRetrievalResponse"> +<part name="return" type="xsd:string"></part> +</message> +<message name="getNaturalDescription"> +<part name="arg0" type="xsd:int"></part> +<part name="arg1" type="xsd:string"></part> +<part name="arg2" type="xsd:string"></part> +</message> +<message name="getNaturalDescriptionResponse"> +<part name="return" type="xsd:string"></part> +</message> +<message name="getNegativeExamples"> +<part name="arg0" type="xsd:int"></part> +<part name="arg1" type="xsd:int"></part> +<part xmlns:ns19="http://jaxb.dev.java.net/array" name="arg2" type="ns19:stringArray"></part> +<part name="arg3" type="xsd:int"></part> +<part name="arg4" type="xsd:string"></part> +<part xmlns:ns20="http://jaxb.dev.java.net/array" name="arg5" type="ns20:stringArray"></part> +</message> +<message name="getNegativeExamplesResponse"> +<part xmlns:ns21="http://jaxb.dev.java.net/array" name="return" type="ns21:stringArray"></part> +</message> +<portType name="DLLearnerWebService"> +<operation name="init" parameterOrder="arg0 arg1"> +<input message="tns:init"></input> +<output message="tns:initResponse"></output> +<fault message="tns:ClientNotKnownException" name="ClientNotKnownException"></fault> +<fault message="tns:UnknownComponentException" name="UnknownComponentException"></fault> +<fault message="tns:ComponentInitException" name="ComponentInitException"></fault> +</operation> +<operation name="stop" parameterOrder="arg0"> +<input message="tns:stop"></input> +<output message="tns:stopResponse"></output> +<fault message="tns:ClientNotKnownException" name="ClientNotKnownException"></fault> +</operation> +<operation name="getBuild" parameterOrder=""> +<input message="tns:getBuild"></input> +<output message="tns:getBuildResponse"></output> +</operation> +<operation name="ping" parameterOrder=""> +<input message="tns:ping"></input> +<output message="tns:pingResponse"></output> +</operation> +<operation name="generateID" parameterOrder=""> +<input message="tns:generateID"></input> +<output message="tns:generateIDResponse"></output> +</operation> +<operation name="getComponents" parameterOrder=""> +<input message="tns:getComponents"></input> +<output message="tns:getComponentsResponse"></output> +</operation> +<operation name="getKnowledgeSources" parameterOrder=""> +<input message="tns:getKnowledgeSources"></input> +<output message="tns:getKnowledgeSourcesResponse"></output> +</operation> +<operation name="getReasoners" parameterOrder=""> +<input message="tns:getReasoners"></input> +<output message="tns:getReasonersResponse"></output> +</operation> +<operation name="getLearningProblems" parameterOrder=""> +<input message="tns:getLearningProblems"></input> +<output message="tns:getLearningProblemsResponse"></output> +</operation> +<operation name="getLearningAlgorithms" parameterOrder=""> +<input message="tns:getLearningAlgorithms"></input> +<output message="tns:getLearningAlgorithmsResponse"></output> +</operation> +<operation name="getConfigOptions" parameterOrder="arg0 arg1"> +<input message="tns:getConfigOptions"></input> +<output message="tns:getConfigOptionsResponse"></output> +<fault message="tns:UnknownComponentException" name="UnknownComponentException"></fault> +</operation> +<operation name="addKnowledgeSource" parameterOrder="arg0 arg1 arg2"> +<input message="tns:addKnowledgeSource"></input> +<output message="tns:addKnowledgeSourceResponse"></output> +<fault message="tns:ClientNotKnownException" name="ClientNotKnownException"></fault> +<fault message="tns:UnknownComponentException" name="UnknownComponentException"></fault> +<fault message="tns:MalformedURLException" name="MalformedURLException"></fault> +</operation> +<operation name="removeKnowledgeSource" parameterOrder="arg0 arg1"> +<input message="tns:removeKnowledgeSource"></input> +<output message="tns:removeKnowledgeSourceResponse"></output> +<fault message="tns:ClientNotKnownException" name="ClientNotKnownException"></fault> +</operation> +<operation name="setReasoner" parameterOrder="arg0 arg1"> +<input message="tns:setReasoner"></input> +<output message="tns:setReasonerResponse"></output> +<fault message="tns:ClientNotKnownException" name="ClientNotKnownException"></fault> +<fault message="tns:UnknownComponentException" name="UnknownComponentException"></fault> +</operation> +<operation name="setLearningProblem" parameterOrder="arg0 arg1"> +<input message="tns:setLearningProblem"></input> +<output message="tns:setLearningProblemResponse"></output> +<fault message="tns:ClientNotKnownException" name="ClientNotKnownException"></fault> +<fault message="tns:UnknownComponentException" name="UnknownComponentException"></fault> +</operation> +<operation name="setLearningAlgorithm" parameterOrder="arg0 arg1"> +<input message="tns:setLearningAlgorithm"></input> +<output message="tns:setLearningAlgorithmResponse"></output> +<fault message="tns:ClientNotKnownException" name="ClientNotKnownException"></fault> +<fault message="tns:UnknownComponentException" name="UnknownComponentException"></fault> +<fault message="tns:LearningProblemUnsupportedException" name="LearningProblemUnsupportedException"></fault> +</operation> +<operation name="initAll" parameterOrder="arg0"> +<input message="tns:initAll"></input> +<output message="tns:initAllResponse"></output> +<fault message="tns:ClientNotKnownException" name="ClientNotKnownException"></fault> +<fault message="tns:ComponentInitException" name="ComponentInitException"></fault> +</operation> +<operation name="learn" parameterOrder="arg0 arg1"> +<input message="tns:learn"></input> +<output message="tns:learnResponse"></output> +<fault message="tns:ClientNotKnownException" name="ClientNotKnownException"></fault> +</operation> +<operation name="learnDescriptionsEvaluated" parameterOrder="arg0"> +<input message="tns:learnDescriptionsEvaluated"></input> +<output message="tns:learnDescriptionsEvaluatedResponse"></output> +<fault message="tns:ClientNotKnownException" name="ClientNotKnownException"></fault> +</operation> +<operation name="getCurrentlyBestEvaluatedDescriptions" parameterOrder="arg0 arg1"> +<input message="tns:getCurrentlyBestEvaluatedDescriptions"></input> +<output message="tns:getCurrentlyBestEvaluatedDescriptionsResponse"></output> +<fault message="tns:ClientNotKnownException" name="ClientNotKnownException"></fault> +</operation> +<operation name="learnDescriptionsEvaluatedLimit" parameterOrder="arg0 arg1"> +<input message="tns:learnDescriptionsEvaluatedLimit"></input> +<output message="tns:learnDescriptionsEvaluatedLimitResponse"></output> +<fault message="tns:ClientNotKnownException" name="ClientNotKnownException"></fault> +</operation> +<operation name="learnThreaded" parameterOrder="arg0"> +<input message="tns:learnThreaded"></input> +<output message="tns:learnThreadedResponse"></output> +<fault message="tns:ClientNotKnownException" name="ClientNotKnownException"></fault> +</operation> +<operation name="getCurrentlyBestConcept" parameterOrder="arg0"> +<input message="tns:getCurrentlyBestConcept"></input> +<output message="tns:getCurrentlyBestConceptResponse"></output> +<fault message="tns:ClientNotKnownException" name="ClientNotKnownException"></fault> +</operation> +<operation name="getCurrentlyBestConcepts" parameterOrder="arg0 arg1 arg2"> +<input message="tns:getCurrentlyBestConcepts"></input> +<output message="tns:getCurrentlyBestConceptsResponse"></output> +<fault message="tns:ClientNotKnownException" name="ClientNotKnownException"></fault> +</operation> +<operation name="getCurrentlyBestEvaluatedDescriptionsFiltered" parameterOrder="arg0 arg1 arg2 arg3"> +<input message="tns:getCurrentlyBestEvaluatedDescriptionsFiltered"></input> +<output message="tns:getCurrentlyBestEvaluatedDescriptionsFilteredResponse"></output> +<fault message="tns:ClientNotKnownException" name="ClientNotKnownException"></fault> +</operation> +<operation name="isAlgorithmRunning" parameterOrder="arg0"> +<input message="tns:isAlgorithmRunning"></input> +<output message="tns:isAlgorithmRunningResponse"></output> +<fault message="tns:ClientNotKnownException" name="ClientNotKnownException"></fault> +</operation> +<operation name="setPositiveExamples" parameterOrder="arg0 arg1"> +<input message="tns:setPositiveExamples"></input> +<output message="tns:setPositiveExamplesResponse"></output> +<fault message="tns:ClientNotKnownException" name="ClientNotKnownException"></fault> +</operation> +<operation name="setNegativeExamples" parameterOrder="arg0 arg1"> +<input message="tns:setNegativeExamples"></input> +<output message="tns:setNegativeExamplesResponse"></output> +<fault message="tns:ClientNotKnownException" name="ClientNotKnownException"></fault> +</operation> +<operation name="applyConfigEntryInt" parameterOrder="arg0 arg1 arg2 arg3"> +<input message="tns:applyConfigEntryInt"></input> +<output message="tns:applyConfigEntryIntResponse"></output> +<fault message="tns:ClientNotKnownException" name="ClientNotKnownException"></fault> +<fault message="tns:UnknownComponentException" name="UnknownComponentException"></fault> +</operation> +<operation name="applyConfigEntryString" parameterOrder="arg0 arg1 arg2 arg3"> +<input message="tns:applyConfigEntryString"></input> +<output message="tns:applyConfigEntryStringResponse"></output> +<fault message="tns:ClientNotKnownException" name="ClientNotKnownException"></fault> +<fault message="tns:UnknownComponentException" name="UnknownComponentException"></fault> +</operation> +<operation name="applyConfigEntryURL" parameterOrder="arg0 arg1 arg2 arg3"> +<input message="tns:applyConfigEntryURL"></input> +<output message="tns:applyConfigEntryURLResponse"></output> +<fault message="tns:ClientNotKnownException" name="ClientNotKnownException"></fault> +<fault message="tns:UnknownComponentException" name="UnknownComponentException"></fault> +<fault message="tns:MalformedURLException" name="MalformedURLException"></fault> +</operation> +<operation name="applyConfigEntryStringArray" parameterOrder="arg0 arg1 arg2 arg3"> +<input message="tns:applyConfigEntryStringArray"></input> +<output message="tns:applyConfigEntryStringArrayResponse"></output> +<fault message="tns:ClientNotKnownException" name="ClientNotKnownException"></fault> +<fault message="tns:UnknownComponentException" name="UnknownComponentException"></fault> +</operation> +<operation name="applyConfigEntryBoolean" parameterOrder="arg0 arg1 arg2 arg3"> +<input message="tns:applyConfigEntryBoolean"></input> +<output message="tns:applyConfigEntryBooleanResponse"></output> +<fault message="tns:ClientNotKnownException" name="ClientNotKnownException"></fault> +<fault message="tns:UnknownComponentException" name="UnknownComponentException"></fault> +</operation> +<operation name="getConfigOptionValueStringArray" parameterOrder="arg0 arg1 arg2"> +<input message="tns:getConfigOptionValueStringArray"></input> +<output message="tns:getConfigOptionValueStringArrayResponse"></output> +<fault message="tns:ClientNotKnownException" name="ClientNotKnownException"></fault> +<fault message="tns:UnknownComponentException" name="UnknownComponentException"></fault> +<fault message="tns:ConfigOptionTypeException" name="ConfigOptionTypeException"></fault> +</operation> +<operation name="getConfigOptionValueString" parameterOrder="arg0 arg1 arg2"> +<input message="tns:getConfigOptionValueString"></input> +<output message="tns:getConfigOptionValueStringResponse"></output> +<fault message="tns:ClientNotKnownException" name="ClientNotKnownException"></fault> +<fault message="tns:UnknownComponentException" name="UnknownComponentException"></fault> +<fault message="tns:ConfigOptionTypeException" name="ConfigOptionTypeException"></fault> +</operation> +<operation name="getConfigOptionValueURL" parameterOrder="arg0 arg1 arg2"> +<input message="tns:getConfigOptionValueURL"></input> +<output message="tns:getConfigOptionValueURLResponse"></output> +<fault message="tns:ClientNotKnownException" name="ClientNotKnownException"></fault> +<fault message="tns:UnknownComponentException" name="UnknownComponentException"></fault> +<fault message="tns:ConfigOptionTypeException" name="ConfigOptionTypeException"></fault> +</operation> +<operation name="getConfigOptionValueDouble" parameterOrder="arg0 arg1 arg2"> +<input message="tns:getConfigOptionValueDouble"></input> +<output message="tns:getConfigOptionValueDoubleResponse"></output> +<fault message="tns:ClientNotKnownException" name="ClientNotKnownException"></fault> +<fault message="tns:UnknownComponentException" name="UnknownComponentException"></fault> +<fault message="tns:ConfigOptionTypeException" name="ConfigOptionTypeException"></fault> +</operation> +<operation name="getConfigOptionValueBoolean" parameterOrder="arg0 arg1 arg2"> +<input message="tns:getConfigOptionValueBoolean"></input> +<output message="tns:getConfigOptionValueBooleanResponse"></output> +<fault message="tns:ClientNotKnownException" name="ClientNotKnownException"></fault> +<fault message="tns:UnknownComponentException" name="UnknownComponentException"></fault> +<fault message="tns:ConfigOptionTypeException" name="ConfigOptionTypeException"></fault> +</operation> +<operation name="getConfigOptionValueInt" parameterOrder="arg0 arg1 arg2"> +<input message="tns:getConfigOptionValueInt"></input> +<output message="tns:getConfigOptionValueIntResponse"></output> +<fault message="tns:ClientNotKnownException" name="ClientNotKnownException"></fault> +<fault message="tns:UnknownComponentException" name="UnknownComponentException"></fault> +<fault message="tns:ConfigOptionTypeException" name="ConfigOptionTypeException"></fault> +</operation> +<operation name="getAtomicConcepts" parameterOrder="arg0"> +<input message="tns:getAtomicConcepts"></input> +<output message="tns:getAtomicConceptsResponse"></output> +<fault message="tns:ClientNotKnownException" name="ClientNotKnownException"></fault> +</operation> +<operation name="getSubsumptionHierarchy" parameterOrder="arg0"> +<input message="tns:getSubsumptionHierarchy"></input> +<output message="tns:getSubsumptionHierarchyResponse"></output> +<fault message="tns:ClientNotKnownException" name="ClientNotKnownException"></fault> +</operation> +<operation name="retrieval" parameterOrder="arg0 arg1"> +<input message="tns:retrieval"></input> +<output message="tns:retrievalResponse"></output> +<fault message="tns:ClientNotKnownException" name="ClientNotKnownException"></fault> +<fault message="tns:ParseException" name="ParseException"></fault> +</operation> +<operation name="getConceptLength" parameterOrder="arg0"> +<input message="tns:getConceptLength"></input> +<output message="tns:getConceptLengthResponse"></output> +<fault message="tns:ParseException" name="ParseException"></fault> +</operation> +<operation name="getAtomicRoles" parameterOrder="arg0"> +<input message="tns:getAtomicRoles"></input> +<output message="tns:getAtomicRolesResponse"></output> +<fault message="tns:ClientNotKnownException" name="ClientNotKnownException"></fault> +</operation> +<operation name="getInstances" parameterOrder="arg0"> +<input message="tns:getInstances"></input> +<output message="tns:getInstancesResponse"></output> +<fault message="tns:ClientNotKnownException" name="ClientNotKnownException"></fault> +</operation> +<operation name="getIndividualsForARole" parameterOrder="arg0 arg1"> +<input message="tns:getIndividualsForARole"></input> +<output message="tns:getIndividualsForARoleResponse"></output> +<fault message="tns:ClientNotKnownException" name="ClientNotKnownException"></fault> +</operation> +<operation name="getAsJSON" parameterOrder="arg0 arg1"> +<input message="tns:getAsJSON"></input> +<output message="tns:getAsJSONResponse"></output> +<fault message="tns:ClientNotKnownException" name="ClientNotKnownException"></fault> +<fault message="tns:SparqlQueryException" name="SparqlQueryException"></fault> +</operation> +<operation name="getAsXMLString" parameterOrder="arg0 arg1"> +<input message="tns:getAsXMLString"></input> +<output message="tns:getAsXMLStringResponse"></output> +<fault message="tns:ClientNotKnownException" name="ClientNotKnownException"></fault> +<fault message="tns:SparqlQueryException" name="SparqlQueryException"></fault> +</operation> +<operation name="sparqlQueryThreaded" parameterOrder="arg0 arg1 arg2"> +<input message="tns:sparqlQueryThreaded"></input> +<output message="tns:sparqlQueryThreadedResponse"></output> +<fault message="tns:ClientNotKnownException" name="ClientNotKnownException"></fault> +</operation> +<operation name="sparqlQuery" parameterOrder="arg0 arg1 arg2"> +<input message="tns:sparqlQuery"></input> +<output message="tns:sparqlQueryResponse"></output> +<fault message="tns:ClientNotKnownException" name="ClientNotKnownException"></fault> +</operation> +<operation name="sparqlQueryPredefinedEndpoint" parameterOrder="arg0 arg1 arg2"> +<input message="tns:sparqlQueryPredefinedEndpoint"></input> +<output message="tns:sparqlQueryPredefinedEndpointResponse"></output> +</operation> +<operation name="isSparqlQueryRunning" parameterOrder="arg0 arg1"> +<input message="tns:isSparqlQueryRunning"></input> +<output message="tns:isSparqlQueryRunningResponse"></output> +<fault message="tns:ClientNotKnownException" name="ClientNotKnownException"></fault> +</operation> +<operation name="stopSparqlThread" parameterOrder="arg0 arg1"> +<input message="tns:stopSparqlThread"></input> +<output message="tns:stopSparqlThreadResponse"></output> +<fault message="tns:ClientNotKnownException" name="ClientNotKnownException"></fault> +</operation> +<operation name="getConceptDepth" parameterOrder="arg0 arg1"> +<input message="tns:getConceptDepth"></input> +<output message="tns:getConceptDepthResponse"></output> +<fault message="tns:ClientNotKnownException" name="ClientNotKnownException"></fault> +</operation> +<operation name="getConceptArity" parameterOrder="arg0 arg1"> +<input message="tns:getConceptArity"></input> +<output message="tns:getConceptArityResponse"></output> +<fault message="tns:ClientNotKnownException" name="ClientNotKnownException"></fault> +</operation> +<operation name="SparqlRetrieval" parameterOrder="arg0 arg1"> +<input message="tns:SparqlRetrieval"></input> +<output message="tns:SparqlRetrievalResponse"></output> +<fault message="tns:ParseException" name="ParseException"></fault> +</operation> +<operation name="getNaturalDescription" parameterOrder="arg0 arg1 arg2"> +<input message="tns:getNaturalDescription"></input> +<output message="tns:getNaturalDescriptionResponse"></output> +<fault message="tns:ParseException" name="ParseException"></fault> +<fault message="tns:ClientNotKnownException" name="ClientNotKnownException"></fault> +</operation> +<operation name="getNegativeExamples" parameterOrder="arg0 arg1 arg2 arg3 arg4 arg5"> +<input message="tns:getNegativeExamples"></input> +<output message="tns:getNegativeExamplesResponse"></output> +<fault message="tns:ClientNotKnownException" name="ClientNotKnownException"></fault> +</operation> +</portType> +<binding name="DLLearnerWebServicePortBinding" type="tns:DLLearnerWebService"> +<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc"></soap:binding> +<operation name="init"> +<soap:operation soapAction=""></soap:operation> +<input> +<soap:body use="literal" namespace="http://server.dllearner.org/"></soap:body> +</input> +<output> +<soap:body use="literal" namespace="http://server.dllearner.org/"></soap:body> +</output> +<fault name="ClientNotKnownException"> +<soap:fault name="ClientNotKnownException" use="literal"></soap:fault> +</fault> +<fault name="UnknownComponentException"> +<soap:fault name="UnknownComponentException" use="literal"></soap:fault> +</fault> +<fault name="ComponentInitException"> +<soap:fault name="ComponentInitException" use="literal"></soap:fault> +</fault> +</operation> +<operation name="stop"> +<soap:operation soapAction=""></soap:operation> +<input> +<soap:bod... [truncated message content] |
From: <ku...@us...> - 2010-09-21 12:28:20
|
Revision: 2326 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=2326&view=rev Author: kurzum Date: 2010-09-21 12:28:13 +0000 (Tue, 21 Sep 2010) Log Message: ----------- slight changes in pom Modified Paths: -------------- trunk/interfaces/pom.xml trunk/pom.xml trunk/scripts/pom.xml Modified: trunk/interfaces/pom.xml =================================================================== --- trunk/interfaces/pom.xml 2010-09-21 12:26:12 UTC (rev 2325) +++ trunk/interfaces/pom.xml 2010-09-21 12:28:13 UTC (rev 2326) @@ -7,8 +7,9 @@ <version>${dllearner.version}</version> <packaging>jar</packaging> - <name>interfaces</name> + <name>Interfaces: GUI, CLI, Web Service </name> <url>http://maven.apache.org</url> + <parent> <groupId>org.dllearner</groupId> <artifactId>dllearner-parent</artifactId> Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2010-09-21 12:26:12 UTC (rev 2325) +++ trunk/pom.xml 2010-09-21 12:28:13 UTC (rev 2326) @@ -259,13 +259,13 @@ </repository> <repository> - <id>maven.aksw.internal/</id> + <id>maven.aksw.internal</id> <name>University Leipzig, AKSW Maven2 Repository</name> <url>http://db0.aksw.org:8081/archiva/repository/internal</url> </repository> <repository> - <id>maven.aksw.snapshot/</id> + <id>maven.aksw.snapshots</id> <name>University Leipzig, AKSW Maven2 Repository</name> <url>http://db0.aksw.org:8081/archiva/repository/snapshots</url> </repository> @@ -293,7 +293,7 @@ <url>http://db0.aksw.org:8081/archiva/repository/internal</url> </repository> <snapshotRepository> - <id>maven.aksw.snapshot</id> + <id>maven.aksw.snapshots</id> <name>AKSW Snapshot Repository</name> <url>http://db0.aksw.org:8081/archiva/repository/snapshots</url> </snapshotRepository> Modified: trunk/scripts/pom.xml =================================================================== --- trunk/scripts/pom.xml 2010-09-21 12:26:12 UTC (rev 2325) +++ trunk/scripts/pom.xml 2010-09-21 12:28:13 UTC (rev 2326) @@ -7,8 +7,9 @@ <version>${dllearner.version}</version> <packaging>jar</packaging> - <name>scripts</name> + <name>Executable scripts </name> <url>http://maven.apache.org</url> + <parent> <groupId>org.dllearner</groupId> <artifactId>dllearner-parent</artifactId> @@ -26,6 +27,11 @@ <artifactId>components-ext</artifactId> </dependency> <dependency> + <groupId>org.dllearner</groupId> + <artifactId>interfaces</artifactId> + <version>1.0-SNAPSHOT</version> + </dependency> + <dependency> <groupId>net.sourceforge.secondstring</groupId> <artifactId>secondstring</artifactId> </dependency> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jen...@us...> - 2010-09-21 12:48:43
|
Revision: 2328 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=2328&view=rev Author: jenslehmann Date: 2010-09-21 12:48:37 +0000 (Tue, 21 Sep 2010) Log Message: ----------- svn ignore for Eclipse files for all Maven modules Removed Paths: ------------- trunk/sparql-query-generator/target/ Property Changed: ---------------- trunk/components-core/ trunk/components-ext/ trunk/evalplugin/ trunk/interfaces/ trunk/protege/ trunk/scripts/ trunk/sparql-query-generator/ Property changes on: trunk/components-core ___________________________________________________________________ Modified: svn:ignore - components-core.iml target + components-core.iml target .classpath .project .settings Property changes on: trunk/components-ext ___________________________________________________________________ Modified: svn:ignore - components-ext.iml target + components-ext.iml target .classpath .project .settings Property changes on: trunk/evalplugin ___________________________________________________________________ Modified: svn:ignore - evalplugin.iml target + evalplugin.iml target .classpath .project .settings Property changes on: trunk/interfaces ___________________________________________________________________ Modified: svn:ignore - interfaces.iml target + interfaces.iml target .classpath .project .settings Property changes on: trunk/protege ___________________________________________________________________ Modified: svn:ignore - target protege.iml + target protege.iml .classpath .project .settings Property changes on: trunk/scripts ___________________________________________________________________ Modified: svn:ignore - target scripts.iml + target scripts.iml .classpath .project .settings Property changes on: trunk/sparql-query-generator ___________________________________________________________________ Modified: svn:ignore - .project .classpath /.settings /target/*.* + target .project .classpath .settings This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sha...@us...> - 2010-09-21 16:27:43
|
Revision: 2330 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=2330&view=rev Author: shadowtm Date: 2010-09-21 16:27:37 +0000 (Tue, 21 Sep 2010) Log Message: ----------- Added interfaces dependencies to dependencyManagement so that the child poms could use it as a dependency. Modified Paths: -------------- trunk/pom.xml trunk/scripts/pom.xml Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2010-09-21 13:22:06 UTC (rev 2329) +++ trunk/pom.xml 2010-09-21 16:27:37 UTC (rev 2330) @@ -223,6 +223,12 @@ <dependency> <groupId>org.dllearner</groupId> + <artifactId>interfaces</artifactId> + <version>${dllearner.version}</version> + </dependency> + + <dependency> + <groupId>org.dllearner</groupId> <artifactId>protege</artifactId> <version>${protege.version}</version> </dependency> Modified: trunk/scripts/pom.xml =================================================================== --- trunk/scripts/pom.xml 2010-09-21 13:22:06 UTC (rev 2329) +++ trunk/scripts/pom.xml 2010-09-21 16:27:37 UTC (rev 2330) @@ -29,7 +29,6 @@ <dependency> <groupId>org.dllearner</groupId> <artifactId>interfaces</artifactId> - <version>1.0-SNAPSHOT</version> </dependency> <dependency> <groupId>net.sourceforge.secondstring</groupId> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sha...@us...> - 2010-09-21 16:38:16
|
Revision: 2331 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=2331&view=rev Author: shadowtm Date: 2010-09-21 16:38:10 +0000 (Tue, 21 Sep 2010) Log Message: ----------- Updated the jamon maven coordinates and had child poms inherit the version numbers from the parent. Modified Paths: -------------- trunk/components-core/pom.xml trunk/interfaces/pom.xml trunk/pom.xml trunk/sparql-query-generator/pom.xml Modified: trunk/components-core/pom.xml =================================================================== --- trunk/components-core/pom.xml 2010-09-21 16:27:37 UTC (rev 2330) +++ trunk/components-core/pom.xml 2010-09-21 16:38:10 UTC (rev 2331) @@ -100,11 +100,10 @@ <artifactId>hermit</artifactId> </dependency> - <dependency> - <groupId>dllearnerDependency</groupId> - <artifactId>jamon-2.7.jar</artifactId> - <version>snapshot</version> - </dependency> + <dependency> + <groupId>com.jamonapi</groupId> + <artifactId>jamon</artifactId> + </dependency> <!--JENA ARQ is in central - we use the latest--> <dependency> Modified: trunk/interfaces/pom.xml =================================================================== --- trunk/interfaces/pom.xml 2010-09-21 16:27:37 UTC (rev 2330) +++ trunk/interfaces/pom.xml 2010-09-21 16:38:10 UTC (rev 2331) @@ -26,5 +26,9 @@ <groupId>org.dllearner</groupId> <artifactId>components-ext</artifactId> </dependency> + <dependency> + <groupId>com.jamonapi</groupId> + <artifactId>jamon</artifactId> + </dependency> </dependencies> </project> Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2010-09-21 16:27:37 UTC (rev 2330) +++ trunk/pom.xml 2010-09-21 16:38:10 UTC (rev 2331) @@ -165,9 +165,9 @@ </dependency> <dependency> - <groupId>dllearnerDependency</groupId> - <artifactId>jamon-2.7.jar</artifactId> - <version>snapshot</version> + <groupId>com.jamonapi</groupId> + <artifactId>jamon</artifactId> + <version>2.7</version> </dependency> Modified: trunk/sparql-query-generator/pom.xml =================================================================== --- trunk/sparql-query-generator/pom.xml 2010-09-21 16:27:37 UTC (rev 2330) +++ trunk/sparql-query-generator/pom.xml 2010-09-21 16:38:10 UTC (rev 2331) @@ -12,30 +12,18 @@ <dependency> <groupId>com.hp.hpl.jena</groupId> <artifactId>jena</artifactId> - <version>2.6.3</version> - <type>jar</type> - <scope>compile</scope> </dependency> <dependency> <groupId>com.hp.hpl.jena</groupId> <artifactId>arq</artifactId> - <version>2.8.5</version> - <type>jar</type> - <scope>compile</scope> </dependency> <dependency> <groupId>log4j</groupId> <artifactId>log4j</artifactId> - <version>1.2.14</version> - <type>jar</type> - <scope>compile</scope> </dependency> - <dependency> - <groupId>com.jamonapi</groupId> - <artifactId>jamon</artifactId> - <version>2.4</version> - <type>jar</type> - <scope>compile</scope> - </dependency> + <dependency> + <groupId>com.jamonapi</groupId> + <artifactId>jamon</artifactId> + </dependency> </dependencies> </project> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sha...@us...> - 2010-09-21 17:30:57
|
Revision: 2332 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=2332&view=rev Author: shadowtm Date: 2010-09-21 17:30:51 +0000 (Tue, 21 Sep 2010) Log Message: ----------- Updated to latest jena and arq versions. Added junit dependencies for tests. Modified Paths: -------------- trunk/components-core/pom.xml trunk/components-core/src/main/java/org/dllearner/kb/aquisitors/RDFBlankNode.java trunk/interfaces/pom.xml trunk/pom.xml Modified: trunk/components-core/pom.xml =================================================================== --- trunk/components-core/pom.xml 2010-09-21 16:38:10 UTC (rev 2331) +++ trunk/components-core/pom.xml 2010-09-21 17:30:51 UTC (rev 2332) @@ -111,6 +111,12 @@ <artifactId>arq</artifactId> </dependency> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <scope>test</scope> + </dependency> + <!--This will be removed after upgrade to latest JENA--> <dependency> <groupId>dllearnerDependency</groupId> <artifactId>dig1.1-xmlbeans.jar</artifactId> <version>snapshot</version> </dependency> Modified: trunk/components-core/src/main/java/org/dllearner/kb/aquisitors/RDFBlankNode.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/kb/aquisitors/RDFBlankNode.java 2010-09-21 16:38:10 UTC (rev 2331) +++ trunk/components-core/src/main/java/org/dllearner/kb/aquisitors/RDFBlankNode.java 2010-09-21 17:30:51 UTC (rev 2332) @@ -20,9 +20,7 @@ package org.dllearner.kb.aquisitors; import com.hp.hpl.jena.graph.Node; -import com.hp.hpl.jena.rdf.model.Model; -import com.hp.hpl.jena.rdf.model.RDFNode; -import com.hp.hpl.jena.rdf.model.RDFVisitor; +import com.hp.hpl.jena.rdf.model.*; /** * This class is used to save disambiguated information for a blankNode in an RDF @@ -102,6 +100,27 @@ return blankNode.asNode(); } - - + /** + *{@inheritDoc} + */ + @Override + public Model getModel() { + return blankNode.getModel(); + } + + /** + *{@inheritDoc} + */ + @Override + public Resource asResource() { + return blankNode.asResource(); + } + + /** + *{@inheritDoc} + */ + @Override + public Literal asLiteral() { + return blankNode.asLiteral(); + } } Modified: trunk/interfaces/pom.xml =================================================================== --- trunk/interfaces/pom.xml 2010-09-21 16:38:10 UTC (rev 2331) +++ trunk/interfaces/pom.xml 2010-09-21 17:30:51 UTC (rev 2332) @@ -30,5 +30,12 @@ <groupId>com.jamonapi</groupId> <artifactId>jamon</artifactId> </dependency> + + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <scope>test</scope> + </dependency> + </dependencies> </project> Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2010-09-21 16:38:10 UTC (rev 2331) +++ trunk/pom.xml 2010-09-21 17:30:51 UTC (rev 2332) @@ -121,7 +121,7 @@ <dependency> <groupId>com.hp.hpl.jena</groupId> <artifactId>jena</artifactId> - <version>2.6.2</version> + <version>2.6.3</version> </dependency> <!--SwingX is in central--> <dependency> @@ -175,7 +175,7 @@ <dependency> <groupId>com.hp.hpl.jena</groupId> <artifactId>arq</artifactId> - <version>2.8.2</version> + <version>2.8.5</version> </dependency> <!--Junits--> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sha...@us...> - 2010-09-21 19:25:36
|
Revision: 2333 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=2333&view=rev Author: shadowtm Date: 2010-09-21 19:25:30 +0000 (Tue, 21 Sep 2010) Log Message: ----------- Added correct dependency for dig-xmlbeans. Modified Paths: -------------- trunk/components-core/pom.xml trunk/pom.xml Modified: trunk/components-core/pom.xml =================================================================== --- trunk/components-core/pom.xml 2010-09-21 17:30:51 UTC (rev 2332) +++ trunk/components-core/pom.xml 2010-09-21 19:25:30 UTC (rev 2333) @@ -117,8 +117,10 @@ <scope>test</scope> </dependency> - <!--This will be removed after upgrade to latest JENA--> - <dependency> <groupId>dllearnerDependency</groupId> <artifactId>dig1.1-xmlbeans.jar</artifactId> <version>snapshot</version> </dependency> + <dependency> + <groupId>net.sourceforge.dig</groupId> + <artifactId>dig-xmlbeans</artifactId> + </dependency> </dependencies> </project> Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2010-09-21 17:30:51 UTC (rev 2332) +++ trunk/pom.xml 2010-09-21 19:25:30 UTC (rev 2333) @@ -251,6 +251,12 @@ <version>1.3</version> </dependency> + <dependency> + <groupId>net.sourceforge.dig</groupId> + <artifactId>dig-xmlbeans</artifactId> + <version>1.1</version> + </dependency> + </dependencies> </dependencyManagement> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jen...@us...> - 2010-09-24 09:26:11
|
Revision: 2334 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=2334&view=rev Author: jenslehmann Date: 2010-09-24 09:26:02 +0000 (Fri, 24 Sep 2010) Log Message: ----------- renamed refinement2 to OCEL (OWL Class Expression Learner) Modified Paths: -------------- trunk/components-core/src/main/java/org/dllearner/algorithms/ocel/ExampleBasedHeuristic.java trunk/components-core/src/main/java/org/dllearner/algorithms/ocel/ExampleBasedNode.java trunk/components-core/src/main/java/org/dllearner/algorithms/ocel/FlexibleHeuristic.java trunk/components-core/src/main/java/org/dllearner/algorithms/ocel/LexicographicHeuristic.java trunk/components-core/src/main/java/org/dllearner/algorithms/ocel/MultiHeuristic.java trunk/components-core/src/main/java/org/dllearner/algorithms/ocel/NodeComparatorStable.java trunk/components-core/src/main/java/org/dllearner/algorithms/ocel/ROLearner2.java trunk/components-core/src/main/java/org/dllearner/algorithms/ocel/SubsumptionComparator.java trunk/components-core/src/main/java/org/dllearner/core/ComponentManager.java trunk/components-core/src/main/java/org/dllearner/core/configurators/ComponentFactory.java trunk/components-core/src/main/java/org/dllearner/core/configurators/ROLComponent2Configurator.java trunk/components-core/src/main/java/org/dllearner/examples/KRKModular.java trunk/components-core/src/main/java/org/dllearner/utilities/JamonMonitorLogger.java trunk/components-core/src/main/java/org/dllearner/utilities/components/ComponentCombo.java trunk/components-core/src/main/java/org/dllearner/utilities/examples/ExampleDataCollector.java trunk/components-core/src/test/java/org/dllearner/test/ComponentTest.java trunk/components-core/src/test/java/org/dllearner/test/SworeTest.java trunk/components-core/src/test/java/org/dllearner/test/junit/RefinementOperatorTests.java trunk/interfaces/src/main/java/org/dllearner/cli/ConfMapper.java trunk/interfaces/src/main/java/org/dllearner/cli/Start.java trunk/interfaces/src/main/java/org/dllearner/gui/EBNodeTreeModel.java trunk/interfaces/src/main/java/org/dllearner/gui/RunPanel.java trunk/interfaces/src/main/java/org/dllearner/gui/SearchTree.java trunk/interfaces/src/main/java/org/dllearner/gui/StartGUI.java trunk/interfaces/src/main/java/org/dllearner/gui/TreeWindow.java trunk/scripts/src/main/java/org/dllearner/examples/KRKModular.java trunk/scripts/src/main/java/org/dllearner/scripts/DumbLPFinder.java trunk/scripts/src/main/java/org/dllearner/scripts/NewSample.java trunk/scripts/src/main/java/org/dllearner/scripts/Sample.java trunk/scripts/src/main/java/org/dllearner/scripts/SemanticBible.java trunk/scripts/src/main/java/org/dllearner/scripts/SemanticBibleComparison.java trunk/scripts/src/main/java/org/dllearner/scripts/WikipediaCategoryCleaner.java trunk/scripts/src/main/java/org/dllearner/scripts/tiger/TestIterativeLearning.java trunk/scripts/src/main/java/org/dllearner/scripts/tiger/TestQueries.java Added Paths: ----------- trunk/components-core/src/main/java/org/dllearner/algorithms/ocel/ trunk/components-core/src/main/java/org/dllearner/algorithms/ocel/OCEL.java Removed Paths: ------------- trunk/components-core/src/main/java/org/dllearner/algorithms/ocel/ROLComponent2.java trunk/components-core/src/main/java/org/dllearner/algorithms/refinement2/ Property Changed: ---------------- trunk/interfaces/ Modified: trunk/components-core/src/main/java/org/dllearner/algorithms/ocel/ExampleBasedHeuristic.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/algorithms/refinement2/ExampleBasedHeuristic.java 2010-09-21 19:25:30 UTC (rev 2333) +++ trunk/components-core/src/main/java/org/dllearner/algorithms/ocel/ExampleBasedHeuristic.java 2010-09-24 09:26:02 UTC (rev 2334) @@ -17,7 +17,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -package org.dllearner.algorithms.refinement2; +package org.dllearner.algorithms.ocel; import java.util.Comparator; Modified: trunk/components-core/src/main/java/org/dllearner/algorithms/ocel/ExampleBasedNode.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/algorithms/refinement2/ExampleBasedNode.java 2010-09-21 19:25:30 UTC (rev 2333) +++ trunk/components-core/src/main/java/org/dllearner/algorithms/ocel/ExampleBasedNode.java 2010-09-24 09:26:02 UTC (rev 2334) @@ -18,7 +18,7 @@ * */ -package org.dllearner.algorithms.refinement2; +package org.dllearner.algorithms.ocel; import java.text.DecimalFormat; import java.util.Map; Modified: trunk/components-core/src/main/java/org/dllearner/algorithms/ocel/FlexibleHeuristic.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/algorithms/refinement2/FlexibleHeuristic.java 2010-09-21 19:25:30 UTC (rev 2333) +++ trunk/components-core/src/main/java/org/dllearner/algorithms/ocel/FlexibleHeuristic.java 2010-09-24 09:26:02 UTC (rev 2334) @@ -18,7 +18,7 @@ * */ -package org.dllearner.algorithms.refinement2; +package org.dllearner.algorithms.ocel; import org.dllearner.utilities.owl.ConceptComparator; Modified: trunk/components-core/src/main/java/org/dllearner/algorithms/ocel/LexicographicHeuristic.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/algorithms/refinement2/LexicographicHeuristic.java 2010-09-21 19:25:30 UTC (rev 2333) +++ trunk/components-core/src/main/java/org/dllearner/algorithms/ocel/LexicographicHeuristic.java 2010-09-24 09:26:02 UTC (rev 2334) @@ -18,7 +18,7 @@ * */ -package org.dllearner.algorithms.refinement2; +package org.dllearner.algorithms.ocel; import org.dllearner.utilities.owl.ConceptComparator; Modified: trunk/components-core/src/main/java/org/dllearner/algorithms/ocel/MultiHeuristic.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/algorithms/refinement2/MultiHeuristic.java 2010-09-21 19:25:30 UTC (rev 2333) +++ trunk/components-core/src/main/java/org/dllearner/algorithms/ocel/MultiHeuristic.java 2010-09-24 09:26:02 UTC (rev 2334) @@ -17,7 +17,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -package org.dllearner.algorithms.refinement2; +package org.dllearner.algorithms.ocel; import java.util.List; Modified: trunk/components-core/src/main/java/org/dllearner/algorithms/ocel/NodeComparatorStable.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/algorithms/refinement2/NodeComparatorStable.java 2010-09-21 19:25:30 UTC (rev 2333) +++ trunk/components-core/src/main/java/org/dllearner/algorithms/ocel/NodeComparatorStable.java 2010-09-24 09:26:02 UTC (rev 2334) @@ -18,7 +18,7 @@ * */ -package org.dllearner.algorithms.refinement2; +package org.dllearner.algorithms.ocel; import java.util.Comparator; Copied: trunk/components-core/src/main/java/org/dllearner/algorithms/ocel/OCEL.java (from rev 2333, trunk/components-core/src/main/java/org/dllearner/algorithms/refinement2/ROLComponent2.java) =================================================================== --- trunk/components-core/src/main/java/org/dllearner/algorithms/ocel/OCEL.java (rev 0) +++ trunk/components-core/src/main/java/org/dllearner/algorithms/ocel/OCEL.java 2010-09-24 09:26:02 UTC (rev 2334) @@ -0,0 +1,503 @@ +/** + * Copyright (C) 2007-2008, Jens Lehmann + * + * This file is part of DL-Learner. + * + * DL-Learner is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * DL-Learner is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ + +package org.dllearner.algorithms.ocel; + +import java.io.File; +import java.util.Collection; +import java.util.LinkedList; +import java.util.List; +import java.util.Set; +import java.util.TreeSet; + +import org.apache.log4j.Level; +import org.apache.log4j.Logger; +import org.dllearner.core.ComponentInitException; +import org.dllearner.core.LearningAlgorithm; +import org.dllearner.core.LearningProblem; +import org.dllearner.core.ReasonerComponent; +import org.dllearner.core.configurators.ROLComponent2Configurator; +import org.dllearner.core.options.BooleanConfigOption; +import org.dllearner.core.options.CommonConfigMappings; +import org.dllearner.core.options.CommonConfigOptions; +import org.dllearner.core.options.ConfigEntry; +import org.dllearner.core.options.ConfigOption; +import org.dllearner.core.options.DoubleConfigOption; +import org.dllearner.core.options.IntegerConfigOption; +import org.dllearner.core.options.InvalidConfigOptionValueException; +import org.dllearner.core.options.StringConfigOption; +import org.dllearner.core.owl.ClassHierarchy; +import org.dllearner.core.owl.Description; +import org.dllearner.core.owl.NamedClass; +import org.dllearner.core.owl.ObjectProperty; +import org.dllearner.learningproblems.EvaluatedDescriptionPosNeg; +import org.dllearner.learningproblems.PosNegLP; +import org.dllearner.learningproblems.PosOnlyLP; +import org.dllearner.learningproblems.ScorePosNeg; +import org.dllearner.reasoning.ReasonerType; +import org.dllearner.refinementoperators.RhoDRDown; +import org.dllearner.utilities.Files; +import org.dllearner.utilities.Helper; + +/** + * The DL-Learner learning algorithm component for the example + * based refinement operator approach. It handles all + * configuration options, creates the corresponding objects and + * passes them to the actual refinement operator, heuristic, and + * learning algorithm implementations. + * + * Note: The options supported by the ROLearner component and this + * one are not equal. Options that have been dropped for now: + * - horizontal expansion factor: The goal of the algorithm will + * be to (hopefully) be able to learn long and complex concepts + * more efficiently. + * A horizontal expansion factor has its benefits, but limits + * the length of concepts learnable in reasonable time to + * about 15 with its default value of 0.6 and a small sized + * background knowledge base. We hope to get more fine-grained + * control of whether it makes sense to extend a node with + * more sophisticated heuristics. + * Dropping the horizontal expansion factor means that the + * completeness of the algorithm depends on the heuristic. + * + * @author Jens Lehmann + * + */ +public class OCEL extends LearningAlgorithm { + + private ROLComponent2Configurator configurator; + @Override + public ROLComponent2Configurator getConfigurator(){ + return configurator; + } + + // actual algorithm + private ROLearner2 algorithm; + private static Logger logger = Logger + .getLogger(OCEL.class); + private String logLevel = CommonConfigOptions.logLevelDefault; + RhoDRDown operator; + + // configuration options + private boolean writeSearchTree; + private File searchTreeFile; + private boolean replaceSearchTree = false; + private static String defaultSearchTreeFile = "log/searchTree.txt"; + private String heuristic = "multi"; + Set<NamedClass> allowedConcepts; + Set<ObjectProperty> allowedRoles; + Set<NamedClass> ignoredConcepts; + Set<ObjectProperty> ignoredRoles; + // these are computed as the result of the previous four settings + Set<NamedClass> usedConcepts; + Set<ObjectProperty> usedRoles; + private boolean applyAllFilter = true; + private boolean applyExistsFilter = true; + private boolean useTooWeakList = true; + private boolean useOverlyGeneralList = true; + private boolean useShortConceptConstruction = true; + private boolean improveSubsumptionHierarchy = true; + private boolean useAllConstructor = CommonConfigOptions.useAllConstructorDefault; + private boolean useExistsConstructor = CommonConfigOptions.useExistsConstructorDefault; + private boolean useHasValueConstructor = CommonConfigOptions.useHasValueConstructorDefault; + private int valueFrequencyThreshold = CommonConfigOptions.valueFrequencyThresholdDefault; + private boolean useCardinalityRestrictions = CommonConfigOptions.useCardinalityRestrictionsDefault; + private boolean useNegation = CommonConfigOptions.useNegationDefault; + private boolean useBooleanDatatypes = CommonConfigOptions.useBooleanDatatypesDefault; + private boolean useDoubleDatatypes = CommonConfigOptions.useDoubleDatatypesDefault; + private static double noisePercentageDefault = 0.0; + private double noisePercentage = noisePercentageDefault; + private NamedClass startClass = null; + //refactor this + private static boolean usePropernessChecksDefault = false; + private boolean usePropernessChecks = usePropernessChecksDefault; + // refactor this + private static int maxPosOnlyExpansionDefault = 4; + private int maxPosOnlyExpansion = maxPosOnlyExpansionDefault; + private boolean forceRefinementLengthIncrease = true; + //extended Options + //in seconds + private int maxExecutionTimeInSeconds = CommonConfigOptions.maxExecutionTimeInSecondsDefault; + private int minExecutionTimeInSeconds = CommonConfigOptions.minExecutionTimeInSecondsDefault; + private int guaranteeXgoodDescriptions = CommonConfigOptions.guaranteeXgoodDescriptionsDefault; + private int maxClassDescriptionTests = CommonConfigOptions.maxClassDescriptionTestsDefault; + + // Variablen zur Einstellung der Protokollierung + // boolean quiet = false; + boolean showBenchmarkInformation = false; + // boolean createTreeString = false; + // String searchTree = new String(); + + // Konfiguration des Algorithmus + // Faktor für horizontale Erweiterung (notwendig für completeness) + // double horizontalExpansionFactor = 0.6; + + // soll später einen Operator und eine Heuristik entgegennehmen + // public ROLearner(LearningProblem learningProblem, LearningProblem learningProblem2) { + public OCEL(PosNegLP learningProblem, ReasonerComponent reasoningService) { + super(learningProblem, reasoningService); + this.configurator = new ROLComponent2Configurator(this); + } + + public OCEL(PosOnlyLP learningProblem, ReasonerComponent reasoningService) { + super(learningProblem, reasoningService); + this.configurator = new ROLComponent2Configurator(this); + } + + public static Collection<Class<? extends LearningProblem>> supportedLearningProblems() { + Collection<Class<? extends LearningProblem>> problems = new LinkedList<Class<? extends LearningProblem>>(); + problems.add(PosNegLP.class); + problems.add(PosOnlyLP.class); + return problems; + } + + public static Collection<ConfigOption<?>> createConfigOptions() { + Collection<ConfigOption<?>> options = new LinkedList<ConfigOption<?>>(); + options.add(new BooleanConfigOption("writeSearchTree", "specifies whether to write a search tree", false)); + options.add(new StringConfigOption("searchTreeFile","file to use for the search tree", defaultSearchTreeFile)); + options.add(new BooleanConfigOption("replaceSearchTree","specifies whether to replace the search tree in the log file after each run or append the new search tree", false)); + StringConfigOption heuristicOption = new StringConfigOption("heuristic", "specifiy the heuristic to use", "lexicographic"); + heuristicOption.setAllowedValues(new String[] {"lexicographic", "flexible"}); + options.add(heuristicOption); + options.add(new BooleanConfigOption("applyAllFilter", "usage of equivalence ALL R.C AND ALL R.D = ALL R.(C AND D)", true)); + options.add(new BooleanConfigOption("applyExistsFilter", "usage of equivalence EXISTS R.C OR EXISTS R.D = EXISTS R.(C OR D)", true)); + options.add(new BooleanConfigOption("useTooWeakList", "try to filter out too weak concepts without sending them to the reasoner", true)); + options.add(new BooleanConfigOption("useOverlyGeneralList", "try to find overly general concept without sending them to the reasoner", true)); + options.add(new BooleanConfigOption("useShortConceptConstruction", "shorten concept to see whether they already exist", true)); + DoubleConfigOption horizExp = new DoubleConfigOption("horizontalExpansionFactor", "horizontal expansion factor (see publication for description)", 0.6); + horizExp.setLowerLimit(0.0); + horizExp.setUpperLimit(1.0); + options.add(horizExp); + options.add(new BooleanConfigOption("improveSubsumptionHierarchy", "simplify subsumption hierarchy to reduce search space (see publication for description)", true)); + options.add(CommonConfigOptions.allowedConcepts()); + options.add(CommonConfigOptions.ignoredConcepts()); + // allowed/ignored roles are an unstable/untested feature + options.add(CommonConfigOptions.allowedRoles()); + options.add(CommonConfigOptions.ignoredRoles()); + options.add(CommonConfigOptions.useAllConstructor()); + options.add(CommonConfigOptions.useExistsConstructor()); + options.add(CommonConfigOptions.useHasValueConstructor()); + options.add(CommonConfigOptions.useDataHasValueConstructor()); + options.add(CommonConfigOptions.valueFreqencyThreshold()); + options.add(CommonConfigOptions.useCardinalityRestrictions()); + options.add(CommonConfigOptions.cardinalityLimit()); + options.add(CommonConfigOptions.useNegation()); + options.add(CommonConfigOptions.useBooleanDatatypes()); + options.add(CommonConfigOptions.useDoubleDatatypes()); + options.add(CommonConfigOptions.useStringDatatypes()); + options.add(CommonConfigOptions.maxExecutionTimeInSeconds()); + options.add(CommonConfigOptions.minExecutionTimeInSeconds()); + options.add(CommonConfigOptions.guaranteeXgoodDescriptions()); + options.add(CommonConfigOptions.maxClassDescriptionTests()); + options.add(CommonConfigOptions.getLogLevel()); + options.add(new BooleanConfigOption("usePropernessChecks", "specifies whether to check for equivalence (i.e. discard equivalent refinements)",usePropernessChecksDefault)); + options.add(CommonConfigOptions.getNoisePercentage()); + options.add(CommonConfigOptions.getTerminateOnNoiseReached()); + options.add(new StringConfigOption("startClass", "the named class which should be used to start the algorithm (GUI: needs a widget for selecting a class)")); + options.add(new BooleanConfigOption("forceRefinementLengthIncrease", "specifies whether nodes should be expanded until only longer refinements are reached")); + options.add(new DoubleConfigOption("negativeWeight", "Used to penalise errors on negative examples different from those of positive examples (lower = less importance for negatives).",1.0)); + options.add(new DoubleConfigOption("startNodeBonus", "You can use this to give a heuristic bonus on the start node (= initially broader exploration of search space).",0.0)); + options.add(new IntegerConfigOption("negationPenalty", "Penalty on negations (TODO: better explanation).", 0)); + options.add(CommonConfigOptions.getExpansionPenaltyFactor(0.02)); + options.add(CommonConfigOptions.getInstanceBasedDisjoints()); + return options; + } + + /* (non-Javadoc) + * @see org.dllearner.core.Component#applyConfigEntry(org.dllearner.core.ConfigEntry) + */ + @Override + @SuppressWarnings({"unchecked"}) + public <T> void applyConfigEntry(ConfigEntry<T> entry) throws InvalidConfigOptionValueException { + String name = entry.getOptionName(); + if(name.equals("writeSearchTree")) + writeSearchTree = (Boolean) entry.getValue(); + else if(name.equals("searchTreeFile")) + searchTreeFile = new File((String)entry.getValue()); + else if(name.equals("replaceSearchTree")) + replaceSearchTree = (Boolean) entry.getValue(); + else if(name.equals("heuristic")) { + String value = (String) entry.getValue(); + if(value.equals("lexicographic")) + heuristic = "lexicographic"; + else + heuristic = "flexible"; + } else if(name.equals("allowedConcepts")) { + allowedConcepts = CommonConfigMappings.getAtomicConceptSet((Set<String>)entry.getValue()); + } else if(name.equals("allowedRoles")) { + allowedRoles = CommonConfigMappings.getAtomicRoleSet((Set<String>)entry.getValue()); + } else if(name.equals("ignoredConcepts")) { + ignoredConcepts = CommonConfigMappings.getAtomicConceptSet((Set<String>)entry.getValue()); + } else if(name.equals("ignoredRoles")) { + ignoredRoles = CommonConfigMappings.getAtomicRoleSet((Set<String>)entry.getValue()); + } else if(name.equals("applyAllFilter")) { + applyAllFilter = (Boolean) entry.getValue(); + } else if(name.equals("applyExistsFilter")) { + applyExistsFilter = (Boolean) entry.getValue(); + } else if(name.equals("useTooWeakList")) { + useTooWeakList = (Boolean) entry.getValue(); + } else if(name.equals("useOverlyGeneralList")) { + useOverlyGeneralList = (Boolean) entry.getValue(); + } else if(name.equals("useShortConceptConstruction")) { + useShortConceptConstruction = (Boolean) entry.getValue(); + } else if(name.equals("improveSubsumptionHierarchy")) { + improveSubsumptionHierarchy = (Boolean) entry.getValue(); + } else if(name.equals("useAllConstructor")) { + useAllConstructor = (Boolean) entry.getValue(); + } else if(name.equals("useExistsConstructor")) { + useExistsConstructor = (Boolean) entry.getValue(); + } else if(name.equals("useHasValueConstructor")) { + useHasValueConstructor = (Boolean) entry.getValue(); + } else if(name.equals("valueFrequencyThreshold")) { + valueFrequencyThreshold = (Integer) entry.getValue(); + } else if(name.equals("useCardinalityRestrictions")) { + useCardinalityRestrictions = (Boolean) entry.getValue(); + } else if(name.equals("useNegation")) { + useNegation = (Boolean) entry.getValue(); + } else if(name.equals("noisePercentage")) { + noisePercentage = (Double) entry.getValue(); + } else if(name.equals("useBooleanDatatypes")) { + useBooleanDatatypes = (Boolean) entry.getValue(); + } else if(name.equals("useDoubleDatatypes")) { + useDoubleDatatypes = (Boolean) entry.getValue(); + } else if(name.equals("usePropernessChecks")) { + usePropernessChecks = (Boolean) entry.getValue(); + } else if(name.equals("maxPosOnlyExpansion")) { + maxPosOnlyExpansion = (Integer) entry.getValue(); + } else if(name.equals("startClass")) { + startClass = new NamedClass((String)entry.getValue()); + }else if(name.equals("maxExecutionTimeInSeconds")) { + maxExecutionTimeInSeconds = (Integer) entry.getValue(); + }else if(name.equals("minExecutionTimeInSeconds")) { + minExecutionTimeInSeconds = (Integer) entry.getValue(); + }else if(name.equals("guaranteeXgoodDescriptions")) { + guaranteeXgoodDescriptions = (Integer) entry.getValue(); + } else if(name.equals("maxClassDescriptionTests")) { + maxClassDescriptionTests = (Integer) entry.getValue(); + } else if(name.equals("logLevel")) { + logLevel = ((String)entry.getValue()).toUpperCase(); + } else if(name.equals("forceRefinementLengthIncrease")) { + forceRefinementLengthIncrease = (Boolean) entry.getValue(); + } + } + + /* (non-Javadoc) + * @see org.dllearner.core.Component#init() + */ + @Override + public void init() throws ComponentInitException { + + // exit with a ComponentInitException if the reasoner is unsupported for this learning algorithm + if(reasoner.getReasonerType() == ReasonerType.DIG) { + throw new ComponentInitException("DIG does not support the inferences needed in the selected learning algorithm component: " + getName()); + } + + // set log level if the option has been set + if(!logLevel.equals(CommonConfigOptions.logLevelDefault)) + logger.setLevel(Level.toLevel(logLevel,Level.toLevel(CommonConfigOptions.logLevelDefault))); + + if(searchTreeFile == null) + searchTreeFile = new File(defaultSearchTreeFile); + + if(writeSearchTree) + Files.clearFile(searchTreeFile); + + // adjust heuristic + ExampleBasedHeuristic algHeuristic; + + if(heuristic == "lexicographic") + algHeuristic = new LexicographicHeuristic(); + else if(heuristic == "flexible") { + if(learningProblem instanceof PosOnlyLP) { + throw new RuntimeException("does not work with positive examples only yet"); + } + algHeuristic = new FlexibleHeuristic(((PosNegLP)learningProblem).getNegativeExamples().size(), ((PosNegLP)learningProblem).getPercentPerLengthUnit()); + } else { + if(learningProblem instanceof PosOnlyLP) { +// throw new RuntimeException("does not work with positive examples only yet"); + algHeuristic = new MultiHeuristic(((PosOnlyLP)learningProblem).getPositiveExamples().size(),0, configurator); + } else { + algHeuristic = new MultiHeuristic(((PosNegLP)learningProblem).getPositiveExamples().size(),((PosNegLP)learningProblem).getNegativeExamples().size(), configurator); + } + } + + // compute used concepts/roles from allowed/ignored + // concepts/roles + if(allowedConcepts != null) { + // sanity check to control if no non-existing concepts are in the list + Helper.checkConcepts(reasoner, allowedConcepts); + usedConcepts = allowedConcepts; + } else if(ignoredConcepts != null) { + usedConcepts = Helper.computeConceptsUsingIgnoreList(reasoner, ignoredConcepts); + } else { + usedConcepts = Helper.computeConcepts(reasoner); + } + + if(allowedRoles != null) { + Helper.checkRoles(reasoner, allowedRoles); + usedRoles = allowedRoles; + } else if(ignoredRoles != null) { + Helper.checkRoles(reasoner, ignoredRoles); + usedRoles = Helper.difference(reasoner.getObjectProperties(), ignoredRoles); + } else { + usedRoles = reasoner.getObjectProperties(); + } + + // prepare subsumption and role hierarchies, because they are needed + // during the run of the algorithm; + // in contrast to before, the learning algorithms have to maintain their + // own view on the class hierarchy + ClassHierarchy classHierarchy = reasoner.getClassHierarchy().cloneAndRestrict(usedConcepts); + if(improveSubsumptionHierarchy) + classHierarchy.thinOutSubsumptionHierarchy(); + +// System.out.println(classHierarchy); +// System.exit(0); + +// reasoner.prepareRoleHierarchy(usedRoles); + // prepare datatype hierarchy only if necessary +// if(reasoner.hasDatatypeSupport()) +// reasoner.prepareDatatypePropertyHierarchy(); + + // create a refinement operator and pass all configuration + // variables to it +// RhoDRDown + operator = new RhoDRDown( + reasoner, + classHierarchy, + configurator, + applyAllFilter, + applyExistsFilter, + useAllConstructor, + useExistsConstructor, + useHasValueConstructor, + valueFrequencyThreshold, + useCardinalityRestrictions, + useNegation, + useBooleanDatatypes, + useDoubleDatatypes, + startClass + ); + + // create an algorithm object and pass all configuration + // options to it + algorithm = new ROLearner2( + configurator, + learningProblem, + reasoner, + operator, + algHeuristic, + startClass, + // usedConcepts, + // usedRoles, + noisePercentage/(double)100, + writeSearchTree, + replaceSearchTree, + searchTreeFile, + useTooWeakList, + useOverlyGeneralList, + useShortConceptConstruction, + usePropernessChecks, + maxPosOnlyExpansion, + maxExecutionTimeInSeconds, + minExecutionTimeInSeconds, + guaranteeXgoodDescriptions, + maxClassDescriptionTests, + forceRefinementLengthIncrease + ); + // note: used concepts and roles do not need to be passed + // as argument, because it is sufficient to prepare the + // concept and role hierarchy accordingly + } + + public static String getName() { +// return "refinement operator based learning algorithm II"; + return "OCEL"; + } + + public static String getUsage() { + return "algorithm = refexamples;"; + } + + @Override + public void start() { + algorithm.start(); + } + +// @Override + public ScorePosNeg getSolutionScore() { + return algorithm.getSolutionScore(); + } + + @Override + public Description getCurrentlyBestDescription() { + return algorithm.getBestSolution(); + } + + @Override + public synchronized List<Description> getCurrentlyBestDescriptions() { + return algorithm.getCurrentlyBestDescriptions(); + } + + @Override + public EvaluatedDescriptionPosNeg getCurrentlyBestEvaluatedDescription() { + return new EvaluatedDescriptionPosNeg(algorithm.getBestSolution(),algorithm.getSolutionScore()); + } + + @Override + public synchronized TreeSet<EvaluatedDescriptionPosNeg> getCurrentlyBestEvaluatedDescriptions() { + return algorithm.getCurrentlyBestEvaluatedDescriptions(); + } + + /** {@inheritDoc} */ + @Override + public void stop() { + algorithm.stop(); + } + + public ExampleBasedNode getStartNode() { + return algorithm.getStartNode(); + } + + /** {@inheritDoc} */ + @Override + public void pause() { + // TODO: not implemented + } + + /** {@inheritDoc} */ + @Override + public void resume() { + // TODO: not implemented + } + + /* (non-Javadoc) + * @see org.dllearner.core.LearningAlgorithm#isRunning() + */ + /** {@inheritDoc} */ + @Override + public boolean isRunning() { + return algorithm.isRunning(); + } + + public RhoDRDown getRefinementOperator() { + return operator; + } +} Deleted: trunk/components-core/src/main/java/org/dllearner/algorithms/ocel/ROLComponent2.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/algorithms/refinement2/ROLComponent2.java 2010-09-21 19:25:30 UTC (rev 2333) +++ trunk/components-core/src/main/java/org/dllearner/algorithms/ocel/ROLComponent2.java 2010-09-24 09:26:02 UTC (rev 2334) @@ -1,503 +0,0 @@ -/** - * Copyright (C) 2007-2008, Jens Lehmann - * - * This file is part of DL-Learner. - * - * DL-Learner is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * DL-Learner is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - */ - -package org.dllearner.algorithms.refinement2; - -import java.io.File; -import java.util.Collection; -import java.util.LinkedList; -import java.util.List; -import java.util.Set; -import java.util.TreeSet; - -import org.apache.log4j.Level; -import org.apache.log4j.Logger; -import org.dllearner.core.ComponentInitException; -import org.dllearner.core.LearningAlgorithm; -import org.dllearner.core.LearningProblem; -import org.dllearner.core.ReasonerComponent; -import org.dllearner.core.configurators.ROLComponent2Configurator; -import org.dllearner.core.options.BooleanConfigOption; -import org.dllearner.core.options.CommonConfigMappings; -import org.dllearner.core.options.CommonConfigOptions; -import org.dllearner.core.options.ConfigEntry; -import org.dllearner.core.options.ConfigOption; -import org.dllearner.core.options.DoubleConfigOption; -import org.dllearner.core.options.IntegerConfigOption; -import org.dllearner.core.options.InvalidConfigOptionValueException; -import org.dllearner.core.options.StringConfigOption; -import org.dllearner.core.owl.ClassHierarchy; -import org.dllearner.core.owl.Description; -import org.dllearner.core.owl.NamedClass; -import org.dllearner.core.owl.ObjectProperty; -import org.dllearner.learningproblems.EvaluatedDescriptionPosNeg; -import org.dllearner.learningproblems.PosNegLP; -import org.dllearner.learningproblems.PosOnlyLP; -import org.dllearner.learningproblems.ScorePosNeg; -import org.dllearner.reasoning.ReasonerType; -import org.dllearner.refinementoperators.RhoDRDown; -import org.dllearner.utilities.Files; -import org.dllearner.utilities.Helper; - -/** - * The DL-Learner learning algorithm component for the example - * based refinement operator approach. It handles all - * configuration options, creates the corresponding objects and - * passes them to the actual refinement operator, heuristic, and - * learning algorithm implementations. - * - * Note: The options supported by the ROLearner component and this - * one are not equal. Options that have been dropped for now: - * - horizontal expansion factor: The goal of the algorithm will - * be to (hopefully) be able to learn long and complex concepts - * more efficiently. - * A horizontal expansion factor has its benefits, but limits - * the length of concepts learnable in reasonable time to - * about 15 with its default value of 0.6 and a small sized - * background knowledge base. We hope to get more fine-grained - * control of whether it makes sense to extend a node with - * more sophisticated heuristics. - * Dropping the horizontal expansion factor means that the - * completeness of the algorithm depends on the heuristic. - * - * @author Jens Lehmann - * - */ -public class ROLComponent2 extends LearningAlgorithm { - - private ROLComponent2Configurator configurator; - @Override - public ROLComponent2Configurator getConfigurator(){ - return configurator; - } - - // actual algorithm - private ROLearner2 algorithm; - private static Logger logger = Logger - .getLogger(ROLComponent2.class); - private String logLevel = CommonConfigOptions.logLevelDefault; - RhoDRDown operator; - - // configuration options - private boolean writeSearchTree; - private File searchTreeFile; - private boolean replaceSearchTree = false; - private static String defaultSearchTreeFile = "log/searchTree.txt"; - private String heuristic = "multi"; - Set<NamedClass> allowedConcepts; - Set<ObjectProperty> allowedRoles; - Set<NamedClass> ignoredConcepts; - Set<ObjectProperty> ignoredRoles; - // these are computed as the result of the previous four settings - Set<NamedClass> usedConcepts; - Set<ObjectProperty> usedRoles; - private boolean applyAllFilter = true; - private boolean applyExistsFilter = true; - private boolean useTooWeakList = true; - private boolean useOverlyGeneralList = true; - private boolean useShortConceptConstruction = true; - private boolean improveSubsumptionHierarchy = true; - private boolean useAllConstructor = CommonConfigOptions.useAllConstructorDefault; - private boolean useExistsConstructor = CommonConfigOptions.useExistsConstructorDefault; - private boolean useHasValueConstructor = CommonConfigOptions.useHasValueConstructorDefault; - private int valueFrequencyThreshold = CommonConfigOptions.valueFrequencyThresholdDefault; - private boolean useCardinalityRestrictions = CommonConfigOptions.useCardinalityRestrictionsDefault; - private boolean useNegation = CommonConfigOptions.useNegationDefault; - private boolean useBooleanDatatypes = CommonConfigOptions.useBooleanDatatypesDefault; - private boolean useDoubleDatatypes = CommonConfigOptions.useDoubleDatatypesDefault; - private static double noisePercentageDefault = 0.0; - private double noisePercentage = noisePercentageDefault; - private NamedClass startClass = null; - //refactor this - private static boolean usePropernessChecksDefault = false; - private boolean usePropernessChecks = usePropernessChecksDefault; - // refactor this - private static int maxPosOnlyExpansionDefault = 4; - private int maxPosOnlyExpansion = maxPosOnlyExpansionDefault; - private boolean forceRefinementLengthIncrease = true; - //extended Options - //in seconds - private int maxExecutionTimeInSeconds = CommonConfigOptions.maxExecutionTimeInSecondsDefault; - private int minExecutionTimeInSeconds = CommonConfigOptions.minExecutionTimeInSecondsDefault; - private int guaranteeXgoodDescriptions = CommonConfigOptions.guaranteeXgoodDescriptionsDefault; - private int maxClassDescriptionTests = CommonConfigOptions.maxClassDescriptionTestsDefault; - - // Variablen zur Einstellung der Protokollierung - // boolean quiet = false; - boolean showBenchmarkInformation = false; - // boolean createTreeString = false; - // String searchTree = new String(); - - // Konfiguration des Algorithmus - // Faktor für horizontale Erweiterung (notwendig für completeness) - // double horizontalExpansionFactor = 0.6; - - // soll später einen Operator und eine Heuristik entgegennehmen - // public ROLearner(LearningProblem learningProblem, LearningProblem learningProblem2) { - public ROLComponent2(PosNegLP learningProblem, ReasonerComponent reasoningService) { - super(learningProblem, reasoningService); - this.configurator = new ROLComponent2Configurator(this); - } - - public ROLComponent2(PosOnlyLP learningProblem, ReasonerComponent reasoningService) { - super(learningProblem, reasoningService); - this.configurator = new ROLComponent2Configurator(this); - } - - public static Collection<Class<? extends LearningProblem>> supportedLearningProblems() { - Collection<Class<? extends LearningProblem>> problems = new LinkedList<Class<? extends LearningProblem>>(); - problems.add(PosNegLP.class); - problems.add(PosOnlyLP.class); - return problems; - } - - public static Collection<ConfigOption<?>> createConfigOptions() { - Collection<ConfigOption<?>> options = new LinkedList<ConfigOption<?>>(); - options.add(new BooleanConfigOption("writeSearchTree", "specifies whether to write a search tree", false)); - options.add(new StringConfigOption("searchTreeFile","file to use for the search tree", defaultSearchTreeFile)); - options.add(new BooleanConfigOption("replaceSearchTree","specifies whether to replace the search tree in the log file after each run or append the new search tree", false)); - StringConfigOption heuristicOption = new StringConfigOption("heuristic", "specifiy the heuristic to use", "lexicographic"); - heuristicOption.setAllowedValues(new String[] {"lexicographic", "flexible"}); - options.add(heuristicOption); - options.add(new BooleanConfigOption("applyAllFilter", "usage of equivalence ALL R.C AND ALL R.D = ALL R.(C AND D)", true)); - options.add(new BooleanConfigOption("applyExistsFilter", "usage of equivalence EXISTS R.C OR EXISTS R.D = EXISTS R.(C OR D)", true)); - options.add(new BooleanConfigOption("useTooWeakList", "try to filter out too weak concepts without sending them to the reasoner", true)); - options.add(new BooleanConfigOption("useOverlyGeneralList", "try to find overly general concept without sending them to the reasoner", true)); - options.add(new BooleanConfigOption("useShortConceptConstruction", "shorten concept to see whether they already exist", true)); - DoubleConfigOption horizExp = new DoubleConfigOption("horizontalExpansionFactor", "horizontal expansion factor (see publication for description)", 0.6); - horizExp.setLowerLimit(0.0); - horizExp.setUpperLimit(1.0); - options.add(horizExp); - options.add(new BooleanConfigOption("improveSubsumptionHierarchy", "simplify subsumption hierarchy to reduce search space (see publication for description)", true)); - options.add(CommonConfigOptions.allowedConcepts()); - options.add(CommonConfigOptions.ignoredConcepts()); - // allowed/ignored roles are an unstable/untested feature - options.add(CommonConfigOptions.allowedRoles()); - options.add(CommonConfigOptions.ignoredRoles()); - options.add(CommonConfigOptions.useAllConstructor()); - options.add(CommonConfigOptions.useExistsConstructor()); - options.add(CommonConfigOptions.useHasValueConstructor()); - options.add(CommonConfigOptions.useDataHasValueConstructor()); - options.add(CommonConfigOptions.valueFreqencyThreshold()); - options.add(CommonConfigOptions.useCardinalityRestrictions()); - options.add(CommonConfigOptions.cardinalityLimit()); - options.add(CommonConfigOptions.useNegation()); - options.add(CommonConfigOptions.useBooleanDatatypes()); - options.add(CommonConfigOptions.useDoubleDatatypes()); - options.add(CommonConfigOptions.useStringDatatypes()); - options.add(CommonConfigOptions.maxExecutionTimeInSeconds()); - options.add(CommonConfigOptions.minExecutionTimeInSeconds()); - options.add(CommonConfigOptions.guaranteeXgoodDescriptions()); - options.add(CommonConfigOptions.maxClassDescriptionTests()); - options.add(CommonConfigOptions.getLogLevel()); - options.add(new BooleanConfigOption("usePropernessChecks", "specifies whether to check for equivalence (i.e. discard equivalent refinements)",usePropernessChecksDefault)); - options.add(CommonConfigOptions.getNoisePercentage()); - options.add(CommonConfigOptions.getTerminateOnNoiseReached()); - options.add(new StringConfigOption("startClass", "the named class which should be used to start the algorithm (GUI: needs a widget for selecting a class)")); - options.add(new BooleanConfigOption("forceRefinementLengthIncrease", "specifies whether nodes should be expanded until only longer refinements are reached")); - options.add(new DoubleConfigOption("negativeWeight", "Used to penalise errors on negative examples different from those of positive examples (lower = less importance for negatives).",1.0)); - options.add(new DoubleConfigOption("startNodeBonus", "You can use this to give a heuristic bonus on the start node (= initially broader exploration of search space).",0.0)); - options.add(new IntegerConfigOption("negationPenalty", "Penalty on negations (TODO: better explanation).", 0)); - options.add(CommonConfigOptions.getExpansionPenaltyFactor(0.02)); - options.add(CommonConfigOptions.getInstanceBasedDisjoints()); - return options; - } - - /* (non-Javadoc) - * @see org.dllearner.core.Component#applyConfigEntry(org.dllearner.core.ConfigEntry) - */ - @Override - @SuppressWarnings({"unchecked"}) - public <T> void applyConfigEntry(ConfigEntry<T> entry) throws InvalidConfigOptionValueException { - String name = entry.getOptionName(); - if(name.equals("writeSearchTree")) - writeSearchTree = (Boolean) entry.getValue(); - else if(name.equals("searchTreeFile")) - searchTreeFile = new File((String)entry.getValue()); - else if(name.equals("replaceSearchTree")) - replaceSearchTree = (Boolean) entry.getValue(); - else if(name.equals("heuristic")) { - String value = (String) entry.getValue(); - if(value.equals("lexicographic")) - heuristic = "lexicographic"; - else - heuristic = "flexible"; - } else if(name.equals("allowedConcepts")) { - allowedConcepts = CommonConfigMappings.getAtomicConceptSet((Set<String>)entry.getValue()); - } else if(name.equals("allowedRoles")) { - allowedRoles = CommonConfigMappings.getAtomicRoleSet((Set<String>)entry.getValue()); - } else if(name.equals("ignoredConcepts")) { - ignoredConcepts = CommonConfigMappings.getAtomicConceptSet((Set<String>)entry.getValue()); - } else if(name.equals("ignoredRoles")) { - ignoredRoles = CommonConfigMappings.getAtomicRoleSet((Set<String>)entry.getValue()); - } else if(name.equals("applyAllFilter")) { - applyAllFilter = (Boolean) entry.getValue(); - } else if(name.equals("applyExistsFilter")) { - applyExistsFilter = (Boolean) entry.getValue(); - } else if(name.equals("useTooWeakList")) { - useTooWeakList = (Boolean) entry.getValue(); - } else if(name.equals("useOverlyGeneralList")) { - useOverlyGeneralList = (Boolean) entry.getValue(); - } else if(name.equals("useShortConceptConstruction")) { - useShortConceptConstruction = (Boolean) entry.getValue(); - } else if(name.equals("improveSubsumptionHierarchy")) { - improveSubsumptionHierarchy = (Boolean) entry.getValue(); - } else if(name.equals("useAllConstructor")) { - useAllConstructor = (Boolean) entry.getValue(); - } else if(name.equals("useExistsConstructor")) { - useExistsConstructor = (Boolean) entry.getValue(); - } else if(name.equals("useHasValueConstructor")) { - useHasValueConstructor = (Boolean) entry.getValue(); - } else if(name.equals("valueFrequencyThreshold")) { - valueFrequencyThreshold = (Integer) entry.getValue(); - } else if(name.equals("useCardinalityRestrictions")) { - useCardinalityRestrictions = (Boolean) entry.getValue(); - } else if(name.equals("useNegation")) { - useNegation = (Boolean) entry.getValue(); - } else if(name.equals("noisePercentage")) { - noisePercentage = (Double) entry.getValue(); - } else if(name.equals("useBooleanDatatypes")) { - useBooleanDatatypes = (Boolean) entry.getValue(); - } else if(name.equals("useDoubleDatatypes")) { - useDoubleDatatypes = (Boolean) entry.getValue(); - } else if(name.equals("usePropernessChecks")) { - usePropernessChecks = (Boolean) entry.getValue(); - } else if(name.equals("maxPosOnlyExpansion")) { - maxPosOnlyExpansion = (Integer) entry.getValue(); - } else if(name.equals("startClass")) { - startClass = new NamedClass((String)entry.getValue()); - }else if(name.equals("maxExecutionTimeInSeconds")) { - maxExecutionTimeInSeconds = (Integer) entry.getValue(); - }else if(name.equals("minExecutionTimeInSeconds")) { - minExecutionTimeInSeconds = (Integer) entry.getValue(); - }else if(name.equals("guaranteeXgoodDescriptions")) { - guaranteeXgoodDescriptions = (Integer) entry.getValue(); - } else if(name.equals("maxClassDescriptionTests")) { - maxClassDescriptionTests = (Integer) entry.getValue(); - } else if(name.equals("logLevel")) { - logLevel = ((String)entry.getValue()).toUpperCase(); - } else if(name.equals("forceRefinementLengthIncrease")) { - forceRefinementLengthIncrease = (Boolean) entry.getValue(); - } - } - - /* (non-Javadoc) - * @see org.dllearner.core.Component#init() - */ - @Override - public void init() throws ComponentInitException { - - // exit with a ComponentInitException if the reasoner is unsupported for this learning algorithm - if(reasoner.getReasonerType() == ReasonerType.DIG) { - throw new ComponentInitException("DIG does not support the inferences needed in the selected learning algorithm component: " + getName()); - } - - // set log level if the option has been set - if(!logLevel.equals(CommonConfigOptions.logLevelDefault)) - logger.setLevel(Level.toLevel(logLevel,Level.toLevel(CommonConfigOptions.logLevelDefault))); - - if(searchTreeFile == null) - searchTreeFile = new File(defaultSearchTreeFile); - - if(writeSearchTree) - Files.clearFile(searchTreeFile); - - // adjust heuristic - ExampleBasedHeuristic algHeuristic; - - if(heuristic == "lexicographic") - algHeuristic = new LexicographicHeuristic(); - else if(heuristic == "flexible") { - if(learningProblem instanceof PosOnlyLP) { - throw new RuntimeException("does not work with positive examples only yet"); - } - algHeuristic = new FlexibleHeuristic(((PosNegLP)learningProblem).getNegativeExamples().size(), ((PosNegLP)learningProblem).getPercentPerLengthUnit()); - } else { - if(learningProblem instanceof PosOnlyLP) { -// throw new RuntimeException("does not work with positive examples only yet"); - algHeuristic = new MultiHeuristic(((PosOnlyLP)learningProblem).getPositiveExamples().size(),0, configurator); - } else { - algHeuristic = new MultiHeuristic(((PosNegLP)learningProblem).getPositiveExamples().size(),((PosNegLP)learningProblem).getNegativeExamples().size(), configurator); - } - } - - // compute used concepts/roles from allowed/ignored - // concepts/roles - if(allowedConcepts != null) { - // sanity check to control if no non-existing concepts are in the list - Helper.checkConcepts(reasoner, allowedConcepts); - usedConcepts = allowedConcepts; - } else if(ignoredConcepts != null) { - usedConcepts = Helper.computeConceptsUsingIgnoreList(reasoner, ignoredConcepts); - } else { - usedConcepts = Helper.computeConcepts(reasoner); - } - - if(allowedRoles != null) { - Helper.checkRoles(reasoner, allowedRoles); - usedRoles = allowedRoles; - } else if(ignoredRoles != null) { - Helper.checkRoles(reasoner, ignoredRoles); - usedRoles = Helper.difference(reasoner.getObjectProperties(), ignoredRoles); - } else { - usedRoles = reasoner.getObjectProperties(); - } - - // prepare subsumption and role hierarchies, because they are needed - // during the run of the algorithm; - // in contrast to before, the learning algorithms have to maintain their - // own view on the class hierarchy - ClassHierarchy classHierarchy = reasoner.getClassHierarchy().cloneAndRestrict(usedConcepts); - if(improveSubsumptionHierarchy) - classHierarchy.thinOutSubsumptionHierarchy(); - -// System.out.println(classHierarchy); -// System.exit(0); - -// reasoner.prepareRoleHierarchy(usedRoles); - // prepare datatype hierarchy only if necessary -// if(reasoner.hasDatatypeSupport()) -// reasoner.prepareDatatypePropertyHierarchy(); - - // create a refinement operator and pass all configuration - // variables to it -// RhoDRDown - operator = new RhoDRDown( - reasoner, - classHierarchy, - configurator, - applyAllFilter, - applyExistsFilter, - useAllConstructor, - useExistsConstructor, - useHasValueConstructor, - valueFrequencyThreshold, - useCardinalityRestrictions, - useNegation, - useBooleanDatatypes, - useDoubleDatatypes, - startClass - ); - - // create an algorithm object and pass all configuration - // options to it - algorithm = new ROLearner2( - configurator, - learningProblem, - reasoner, - operator, - algHeuristic, - startClass, - // usedConcepts, - // usedRoles, - noisePercentage/(double)100, - writeSearchTree, - replaceSearchTree, - searchTreeFile, - useTooWeakList, - useOverlyGeneralList, - useShortConceptConstruction, - usePropernessChecks, - maxPosOnlyExpansion, - maxExecutionTimeInSeconds, - minExecutionTimeInSeconds, - guaranteeXgoodDescriptions, - maxClassDescriptionTests, - forceRefinementLengthIncrease - ); - // note: used concepts and roles do not need to be passed - // as argument, because it is sufficient to prepare the - // concept and role hierarchy accordingly - } - - public static String getName() { -// return "refinement operator based learning algorithm II"; - return "OCEL"; - } - - public static String getUsage() { - return "algorithm = refexamples;"; - } - - @Override - public void start() { - algorithm.start(); - } - -// @Override - public ScorePosNeg getSolutionScore() { - return algorithm.getSolutionScore(); - } - - @Override - public Description getCurrentlyBestDescription() { - return algorithm.getBestSolution(); - } - - @Override - public synchronized List<Description> getCurrentlyBestDescriptions() { - return algorithm.getCurrentlyBestDescriptions(); - } - - @Override - public EvaluatedDescriptionPosNeg getCurrentlyBestEvaluatedDescription() { - return new EvaluatedDescriptionPosNeg(algorithm.getBestSolution(),algorithm.getSolutionScore()); - } - - @Override - public synchronized TreeSet<EvaluatedDescriptionPosNeg> getCurrentlyBestEvaluatedDescriptions() { - return algorithm.getCurrentlyBestEvaluatedDescriptions(); - } - - /** {@inheritDoc} */ - @Override - public void stop() { - algorithm.stop(); - } - - public ExampleBasedNode getStartNode() { - return algorithm.getStartNode(); - } - - /** {@inheritDoc} */ - @Override - public void pause() { - // TODO: not implemented - } - - /** {@inheritDoc} */ - @Override - public void resume() { - // TODO: not implemented - } - - /* (non-Javadoc) - * @see org.dllearner.core.LearningAlgorithm#isRunning() - */ - /** {@inheritDoc} */ - @Override - public boolean isRunning() { - return algorithm.isRunning(); - } - - public RhoDRDown getRefinementOperator() { - return operator; - } -} Modified: trunk/components-core/src/main/java/org/dllearner/algorithms/ocel/ROLearner2.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/algorithms/refinement2/ROLearner2.java 2010-09-21 19:25:30 UTC (rev 2333) +++ trunk/components-core/src/main/java/org/dllearner/algorithms/ocel/ROLearner2.java 2010-09-24 09:26:02 UTC (rev 2334) @@ -17,7 +17,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -package org.dllearner.algorithms.refinement2; +package org.dllearner.algorithms.ocel; import java.io.File; import java.text.DecimalFormat; @@ -290,7 +290,7 @@ evaluateSetCreationTimeNs = 0; improperConceptsRemovalTimeNs = 0; - Monitor totalLearningTime = JamonMonitorLogger.getTimeMonitor(ROLComponent2.class, "totalLearningTime") + Monitor totalLearningTime = JamonMonitorLogger.getTimeMonitor(OCEL.class, "totalLearningTime") .start(); // TODO: write a JUnit test for this problem (long-lasting or infinite // loops because Modified: trunk/components-core/src/main/java/org/dllearner/algorithms/ocel/SubsumptionComparator.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/algorithms/refinement2/SubsumptionComparator.java 2010-09-21 19:25:30 UTC (rev 2333) +++ trunk/components-core/src/main/java/org/dllearner/algorithms/ocel/SubsumptionComparator.java 2010-09-24 09:26:02 UTC (rev 2334) @@ -1,4 +1,4 @@ -package org.dllearner.algorithms.refinement2; +package org.dllearner.algorithms.ocel; import java.util.Comparator; Modified: trunk/components-core/src/main/java/org/dllearner/core/ComponentManager.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/core/ComponentManager.java 2010-09-21 19:25:30 UTC (rev 2333) +++ trunk/components-core/src/main/java/org/dllearner/core/ComponentManager.java 2010-09-24 09:26:02 UTC (rev 2334) @@ -97,7 +97,7 @@ "org.dllearner.algorithms.RandomGuesser", "org.dllearner.algorithms.BruteForceLearner", "org.dllearner.algorithms.refinement.ROLearner", - "org.dllearner.algorithms.refinement2.ROLComponent2", + "org.dllearner.algorithms.ocel.OCEL", "org.dllearner.algorithms.gp.GP", "org.dllearner.algorithms.el.ELLearningAlgorithm", "org.dllearner.algorithms.el.ELLearningAlgorithmDisjunctive", Modified: trunk/components-core/src/main/java/org/dllearner/core/configurators/ComponentFactory.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/core/configurators/ComponentFactory.java 2010-09-21 19:25:30 UTC (rev 2333) +++ trunk/components-core/src/main/java/org/dllearner/core/configurators/ComponentFactory.java 2010-09-24 09:26:02 UTC (rev 2334) @@ -29,8 +29,8 @@ import org.dllearner.algorithms.el.ELLearningAlgorithmDisjunctive; import org.dllearner.algorithms.gp.GP; import org.dllearner.algorithms.isle.ISLE; +import org.dllearner.algorithms.ocel.OCEL; import org.dllearner.algorithms.refinement.ROLearner; -import org.dllearner.algorithms.refinement2.ROLComponent2; import org.dllearner.core.KnowledgeSource; import org.dllearner.core.LearningProblem; import org.dllearner.core.LearningProblemUnsupportedException; @@ -261,7 +261,7 @@ * @throws LearningProblemUnsupportedException see * @return a component ready for initialization ROLComponent2 **/ -public static ROLComponent2 getROLComponent2(LearningProblem learningProblem, ReasonerComponent reasoningService) throws LearningProblemUnsupportedException { +public static OCEL getROLComponent2(LearningProblem learningProblem, ReasonerComponent reasoningService) throws LearningProblemUnsupportedException { return ROLComponent2Configurator.getROLComponent2(learningProblem, reasoningService); } Modified: trunk/components-core/src/main/java/org/dllearner/core/configurators/ROLComponent2Configurator.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/core/configurators/ROLComponent2Configurator.java 2010-09-21 19:25:30 UTC (rev 2333) +++ trunk/components-core/src/main/java/org/dllearner/core/configurators/ROLComponent2Configurator.java 2010-09-24 09:26:02 UTC (rev 2334) @@ -21,7 +21,8 @@ package org.dllearner.core.configurators; import java.util.Set; -import org.dllearner.algorithms.refinement2.ROLComponent2; + +import org.dllearner.algorithms.ocel.OCEL; import org.dllearner.core.ComponentManager; import org.dllearner.core.LearningProblem; import org.dllearner.core.LearningProblemUnsupportedException; @@ -36,12 +37,12 @@ public class ROLComponent2Configurator extends RefinementOperatorConfigurator implements Configurator { private boolean reinitNecessary = false; -private ROLComponent2 rOLComponent2; +private OCEL rOLComponent2; /** * @param rOLComponent2 see ROLComponent2 **/ -public ROLComponent2Configurator(ROLComponent2 rOLComponent2){ +public ROLComponent2Configurator(OCEL rOLComponent2){ this.rOLComponent2 = rOLComponent2; } @@ -51,8 +52,8 @@ * @throws LearningProblemUnsupportedException see * @return ROLComponent2 **/ -public static ROLComponent2 getROLComponent2(LearningProblem learningProblem, ReasonerComponent reasoningService) throws LearningProblemUnsupportedException{ -ROLComponent2 component = ComponentManager.getInstance().learningAlgorithm(ROLComponent2.class, learningProblem, reasoningService); +public static OCEL getROLComponent2(LearningProblem learningProblem, ReasonerComponent reasoningService) throws LearningProblemUnsupportedException{ +OCEL component = ComponentManager.getInstance().learningAlgorithm(OCEL.class, learningProblem, reasoningService); return component; } Modified: trunk/components-core/src/main/java/org/dllearner/examples/KRKModular.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/examples/KRKModular.java 2010-09-21 19:25:30 UTC (rev 2333) +++ trunk/components-core/src/main/java/org/dllearner/examples/KRKModular.java 2010-09-24 09:26:02 UTC (rev 2334) @@ -15,7 +15,7 @@ import java.util.StringTokenizer; import java.util.TreeSet; -import org.dllearner.algorithms.refinement2.ROLComponent2; +import org.dllearner.algorithms.ocel.OCEL; import org.dllearner.core.ComponentManager; import org.dllearner.core.KnowledgeSource; import org.dllearner.core.LearningAlgorithm; @@ -265,7 +265,7 @@ lp.init(); - la = cm.learningAlgorithm(ROLComponent2.class, lp, r); + la = cm.learningAlgorithm(OCEL.class, lp, r); SortedSet<String> ignoredConcepts = getIgnoredConcepts(pos, neg); cm.applyConfigEntry(la,"useAllConstructor",false); Modified: trunk/components-core/src/main/java/org/dllearner/utilities/JamonMonitorLogger.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/utilities/JamonMonitorLogger.java 2010-09-21 19:25:30 UTC (rev 2333) +++ trunk/components-core/src/main/java/org/dllearner/utilities/JamonMonitorLogger.java 2010-09-24 09:26:02 UTC (rev 2334) @@ -26,7 +26,7 @@ import java.util.SortedSet; import java.util.TreeSet; -import org.dllearner.algorithms.refinement2.ROLComponent2; +import org.dllearner.algorithms.ocel.OCEL; import org.dllearner.kb.extraction.ExtractionAlgorithm; import org.dllearner.kb.manipulator.Manipulator; import org.dllearner.kb.manipulator.TypeFilterRule; @@ -127,7 +127,7 @@ retval= "sparql:"; } else if (clazz == SparqlQuery.class) { retval= "sparql:"; - } else if (clazz == ROLComponent2.class) { + } else if (clazz == OCEL.class) { retval= "Learning:"; } else if (clazz == SparqlQuery.class) { retval= "sparql:"; Modified: trunk/components-core/src/main/java/org/dllearner/utilities/components/ComponentCombo.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/utilities/components/ComponentCombo.java 2010-09-21 19:25:30 UTC (rev 2333) +++ trunk/components-core/src/main/java/org/dllearner/utilities/components/ComponentCombo.java 2010-09-24 09:26:02 UTC (rev 2334) @@ -23,7 +23,7 @@ import java.util.HashSet; import java.util.Set; -import org.dllearner.algorithms.refinement2.ROLComponent2; +import org.dllearner.algorith... [truncated message content] |
From: <jen...@us...> - 2010-09-24 12:08:10
|
Revision: 2335 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=2335&view=rev Author: jenslehmann Date: 2010-09-24 12:08:03 +0000 (Fri, 24 Sep 2010) Log Message: ----------- implemented method for approximating predictive accuracy (experimental) Modified Paths: -------------- trunk/components-core/src/main/java/org/dllearner/algorithms/celoe/CELOE.java trunk/components-core/src/main/java/org/dllearner/algorithms/ocel/OCEL.java trunk/components-core/src/main/java/org/dllearner/learningproblems/ClassLearningProblem.java trunk/components-core/src/main/java/org/dllearner/learningproblems/Heuristics.java trunk/components-core/src/main/java/org/dllearner/learningproblems/PosNegLPStandard.java trunk/interfaces/src/main/java/org/dllearner/cli/ConfMapper.java 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 2010-09-24 09:26:02 UTC (rev 2334) +++ trunk/components-core/src/main/java/org/dllearner/algorithms/celoe/CELOE.java 2010-09-24 12:08:03 UTC (rev 2335) @@ -215,6 +215,7 @@ // we put important parameters in class variables noise = configurator.getNoisePercentage()/100d; +// System.out.println("noise " + noise); maxDepth = configurator.getMaxDepth(); // (filterFollowsFromKB is automatically set to false if the problem // is not a class learning problem @@ -343,6 +344,7 @@ int loop = 0; while (!terminationCriteriaSatisfied()) { +// System.out.println("loop " + loop); if(!singleSuggestionMode && bestEvaluatedDescriptions.getBestAccuracy() > highestAccuracy) { highestAccuracy = bestEvaluatedDescriptions.getBestAccuracy(); Modified: trunk/components-core/src/main/java/org/dllearner/algorithms/ocel/OCEL.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/algorithms/ocel/OCEL.java 2010-09-24 09:26:02 UTC (rev 2334) +++ trunk/components-core/src/main/java/org/dllearner/algorithms/ocel/OCEL.java 2010-09-24 12:08:03 UTC (rev 2335) @@ -49,6 +49,7 @@ import org.dllearner.core.owl.ObjectProperty; import org.dllearner.learningproblems.EvaluatedDescriptionPosNeg; import org.dllearner.learningproblems.PosNegLP; +import org.dllearner.learningproblems.PosNegLPStandard; import org.dllearner.learningproblems.PosOnlyLP; import org.dllearner.learningproblems.ScorePosNeg; import org.dllearner.reasoning.ReasonerType; @@ -338,6 +339,16 @@ } } + // warn the user if he/she sets any non-standard heuristic, because it will just be ignored + if(learningProblem instanceof PosNegLPStandard) { + if(((PosNegLPStandard)learningProblem).getConfigurator().getUseApproximations()) { + System.err.println("You actived approximations for the considered learning problem, but OCEL does not support it. Option will be ignored. (Recommendation: Use CELOE instead.)"); + } + if(!((PosNegLPStandard)learningProblem).getConfigurator().getAccuracyMethod().equals("predacc")) { + System.err.println("You have chosen a non-standard (predictive accuracy) heuristic in your learning problem, but OCEL does not support it. Option will be ignored. (Recommendation: Use CELOE instead.)"); + } + } + // compute used concepts/roles from allowed/ignored // concepts/roles if(allowedConcepts != null) { Modified: trunk/components-core/src/main/java/org/dllearner/learningproblems/ClassLearningProblem.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/learningproblems/ClassLearningProblem.java 2010-09-24 09:26:02 UTC (rev 2334) +++ trunk/components-core/src/main/java/org/dllearner/learningproblems/ClassLearningProblem.java 2010-09-24 12:08:03 UTC (rev 2335) @@ -141,7 +141,11 @@ heuristic = HeuristicType.PRED_ACC; } - if(useApproximations && !(heuristic.equals(HeuristicType.AMEASURE) || heuristic.equals(HeuristicType.FMEASURE))) { + if(useApproximations && heuristic.equals(HeuristicType.PRED_ACC)) { + System.err.println("Approximating predictive accuracy is an experimental feature. USE IT AT YOUR OWN RISK. If you consider to use it for anything serious, please extend the unit tests at org.dllearner.test.junit.HeuristicTests first to verify that it works."); + } + + if(useApproximations && !(heuristic.equals(HeuristicType.PRED_ACC) || heuristic.equals(HeuristicType.AMEASURE) || heuristic.equals(HeuristicType.FMEASURE))) { throw new ComponentInitException("Approximations only supported for F-Measure or Standard-Measure. It is unsupported for \"" + accM + ".\""); } Modified: trunk/components-core/src/main/java/org/dllearner/learningproblems/Heuristics.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/learningproblems/Heuristics.java 2010-09-24 09:26:02 UTC (rev 2334) +++ trunk/components-core/src/main/java/org/dllearner/learningproblems/Heuristics.java 2010-09-24 12:08:03 UTC (rev 2335) @@ -93,23 +93,21 @@ return elementsIntersection / (double) elementsUnion; } - public double getPredictiveAccuracy(int nrOfExamples, int nrOfPosClassifiedPositives, int nrOfNegClassifiedNegatives) { + public static double getPredictiveAccuracy(int nrOfExamples, int nrOfPosClassifiedPositives, int nrOfNegClassifiedNegatives) { return (nrOfPosClassifiedPositives + nrOfNegClassifiedNegatives) / (double) nrOfExamples; } - public double getPredictiveAccuracy(int nrOfExamples, int nrOfPosClassifiedPositives, int nrOfNegClassifiedNegatives, double beta) { -// return (nrOfPosClassifiedPositives + nrOfNegClassifiedNegatives) / (double) nrOfExamples; - return 0; + public static double getPredictiveAccuracy(int nrOfPosExamples, int nrOfNegExamples, int nrOfPosClassifiedPositives, int nrOfNegClassifiedNegatives, double beta) { + return (nrOfPosClassifiedPositives + beta * nrOfNegClassifiedNegatives) / (double) (nrOfPosExamples + beta * nrOfNegExamples); } - public double getPredictiveAccuracy2(int nrOfExamples, int nrOfPosClassifiedPositives, int nrOfPosClassifiedNegatives) { + public static double getPredictiveAccuracy2(int nrOfExamples, int nrOfPosClassifiedPositives, int nrOfPosClassifiedNegatives) { return (nrOfPosClassifiedPositives + nrOfExamples - nrOfPosClassifiedNegatives) / (double) nrOfExamples; } - public double getPredictiveAccuracy2(int nrOfExamples, int nrOfPosClassifiedPositives, int nrOfNegClassifiedNegatives, double beta) { -// return (nrOfPosClassifiedPositives + nrOfNegClassifiedNegatives) / (double) nrOfExamples; - return 0; - } + public static double getPredictiveAccuracy2(int nrOfPosExamples, int nrOfNegExamples, int nrOfPosClassifiedPositives, int nrOfNegClassifiedNegatives, double beta) { + return (nrOfPosClassifiedPositives + beta * nrOfNegClassifiedNegatives) / (double) (nrOfPosExamples + beta * nrOfNegExamples); + } /** * Computes the 95% confidence interval of an experiment with boolean outcomes, @@ -176,7 +174,7 @@ * @param beta Weights precision and recall. If beta is >1, then recall is more important * than precision. * @param nrOfRelevantInstances Number of relevant instances, i.e. number of instances, which - * would have been tested without approximations. + * would have been tested without approximations. TODO: relevant = pos + neg examples? * @param nrOfInstanceChecks Performed instance checks for the approximation. * @param nrOfSuccessfulInstanceChecks Number of successful performed instance checks. * @return A two element array, where the first element is the computed F-beta score and the @@ -262,4 +260,25 @@ return ret; } + // WARNING: unstable/untested + // uses the following formula: (|R(C) \cap E^+| + beta * |E^- \ R(C)|) / (|E^+|+|E^-|) + // approximates |R(C) \cap E^+| and beta * |E^- \ R(C)| separately; and adds their lower and upper borders (pessimistic estimate) + // TODO: only works well if there are many negatives at the moment, so speedup is not great + public static double[] getPredAccApproximation(int nrOfPositiveExamples, int nrOfNegativeExamples, double beta, int nrOfPosExampleInstanceChecks, int nrOfSuccessfulPosExampleChecks, int nrOfNegExampleInstanceChecks, int nrOfNegativeNegExampleChecks) { + // compute both 95% confidence intervals + double[] intervalPos = Heuristics.getConfidenceInterval95Wald(nrOfPosExampleInstanceChecks, nrOfSuccessfulPosExampleChecks); + double[] intervalNeg = Heuristics.getConfidenceInterval95Wald(nrOfNegExampleInstanceChecks, nrOfNegativeNegExampleChecks); + // multiply by number of instances from which the random samples are drawn + double lowerBorder = intervalPos[0] * nrOfPositiveExamples + beta * intervalNeg[0] * nrOfNegativeExamples; + double upperBorder = intervalNeg[1] * nrOfPositiveExamples + beta * intervalNeg[1] * nrOfNegativeExamples; + double predAccLow = lowerBorder / (double) (nrOfPositiveExamples + beta * nrOfNegativeExamples); + double predAccHigh = upperBorder / (double) (nrOfPositiveExamples + beta * nrOfNegativeExamples); + double diff = predAccHigh - predAccLow; + // return interval length and center + double[] ret = new double[2]; + ret[0] = predAccLow + 0.5 * diff; + ret[1] = diff; + return ret; + } + } Modified: trunk/components-core/src/main/java/org/dllearner/learningproblems/PosNegLPStandard.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/learningproblems/PosNegLPStandard.java 2010-09-24 09:26:02 UTC (rev 2334) +++ trunk/components-core/src/main/java/org/dllearner/learningproblems/PosNegLPStandard.java 2010-09-24 12:08:03 UTC (rev 2335) @@ -20,6 +20,7 @@ package org.dllearner.learningproblems; import java.util.Collection; +import java.util.Iterator; import java.util.LinkedList; import java.util.Set; import java.util.SortedSet; @@ -34,6 +35,7 @@ import org.dllearner.core.options.StringConfigOption; import org.dllearner.core.owl.Description; import org.dllearner.core.owl.Individual; +import org.dllearner.learningproblems.Heuristics.HeuristicType; import org.dllearner.utilities.Helper; /** @@ -56,10 +58,12 @@ // approximation and F-measure // (taken from class learning => super class instances corresponds to negative examples // and class instances to positive examples) - private double approx = 0.05; + private double approxDelta = 0.05; private boolean useApproximations; - private boolean useFMeasure; +// private boolean useFMeasure; + private HeuristicType heuristic = HeuristicType.PRED_ACC; + @Override public PosNegLPStandardConfigurator getConfigurator() { return configurator; @@ -81,14 +85,32 @@ public void init() { super.init(); useApproximations = configurator.getUseApproximations(); - useFMeasure = configurator.getAccuracyMethod().equals("fmeasure"); + approxDelta = configurator.getApproxAccuracy(); - if((!useApproximations && useFMeasure) || (useApproximations && !useFMeasure)) { - System.err.println("Currently F measure can only be used in combination with approximated reasoning."); - System.exit(0); + String accM = configurator.getAccuracyMethod(); + if(accM.equals("standard")) { + heuristic = HeuristicType.AMEASURE; + } else if(accM.equals("fmeasure")) { + heuristic = HeuristicType.FMEASURE; + } else if(accM.equals("generalised_fmeasure")) { + heuristic = HeuristicType.GEN_FMEASURE; + } else if(accM.equals("jaccard")) { + heuristic = HeuristicType.JACCARD; + } else if(accM.equals("pred_acc")) { + heuristic = HeuristicType.PRED_ACC; } - approx = configurator.getApproxAccuracy(); +// useFMeasure = configurator.getAccuracyMethod().equals("fmeasure"); + +// if((!useApproximations && useFMeasure) || (useApproximations && !useFMeasure)) { +// System.err.println("Currently F measure can only be used in combination with approximated reasoning."); +// System.exit(0); +// } + + if(useApproximations && heuristic.equals(HeuristicType.PRED_ACC)) { + System.err.println("Approximating predictive accuracy is an experimental feature. USE IT AT YOUR OWN RISK. If you consider to use it for anything serious, please extend the unit tests at org.dllearner.test.junit.HeuristicTests first and verify that it works."); + } + } /* @@ -127,7 +149,7 @@ */ @Override public int coveredNegativeExamplesOrTooWeak(Description concept) { - + if (useRetrievalForClassification) { SortedSet<Individual> posClassified = reasoner.getIndividuals(concept); SortedSet<Individual> negAsPos = Helper.intersection(negativeExamples, posClassified); @@ -267,7 +289,9 @@ */ @Override public double getAccuracy(Description description) { - + // a noise value of 1.0 means that we never return too weak (-1.0) + return getAccuracyOrTooWeak(description, 1.0); + /* int coveredPos = 0; int coveredNeg = 0; @@ -283,10 +307,14 @@ } return coveredPos + negativeExamples.size() - coveredNeg / (double) allExamples.size(); + */ } @Override - public double getAccuracyOrTooWeak(Description description, double noise) { + public double getAccuracyOrTooWeak(Description description, double noise) { + // delegates to the appropriate methods + return useApproximations ? getAccuracyOrTooWeakApprox(description, noise) : getAccuracyOrTooWeakExact(description, noise); + /* if(useApproximations) { if(useFMeasure) { return getFMeasureOrTooWeakApprox(description, noise); @@ -295,9 +323,145 @@ } } else { return getPredAccuracyOrTooWeakExact(description, noise); - } + } + */ } + public double getAccuracyOrTooWeakApprox(Description description, double noise) { + if(heuristic.equals(HeuristicType.PRED_ACC)) { + int maxNotCovered = (int) Math.ceil(noise*positiveExamples.size()); + + int notCoveredPos = 0; +// int notCoveredNeg = 0; + + int posClassifiedAsPos = 0; + int negClassifiedAsNeg = 0; + + int nrOfPosChecks = 0; + int nrOfNegChecks = 0; + + // special case: we test positive and negative examples in turn + Iterator<Individual> itPos = positiveExamples.iterator(); + Iterator<Individual> itNeg = negativeExamples.iterator(); + + do { + // in each loop we pick 0 or 1 positives and 0 or 1 negative + // and classify it + + if(itPos.hasNext()) { + Individual posExample = itPos.next(); +// System.out.println(posExample); + + if(reasoner.hasType(description, posExample)) { + posClassifiedAsPos++; + } else { + notCoveredPos++; + } + nrOfPosChecks++; + + // take noise into account + if(notCoveredPos > maxNotCovered) { + return -1; + } + } + + if(itNeg.hasNext()) { + Individual negExample = itNeg.next(); + if(!reasoner.hasType(description, negExample)) { + negClassifiedAsNeg++; + } + nrOfNegChecks++; + } + + // compute how accurate our current approximation is and return if it is sufficiently accurate + double approx[] = Heuristics.getPredAccApproximation(positiveExamples.size(), negativeExamples.size(), 1, nrOfPosChecks, posClassifiedAsPos, nrOfNegChecks, negClassifiedAsNeg); + if(approx[1]<approxDelta) { +// System.out.println(approx[0]); + return approx[0]; + } + + } while(itPos.hasNext() || itNeg.hasNext()); + + double ret = Heuristics.getPredictiveAccuracy(positiveExamples.size(), negativeExamples.size(), posClassifiedAsPos, negClassifiedAsNeg, 1); + return ret; + + } else if(heuristic.equals(HeuristicType.FMEASURE)) { + // we abort when there are too many uncovered positives + int maxNotCovered = (int) Math.ceil(noise*positiveExamples.size()); + int instancesCovered = 0; + int instancesNotCovered = 0; + + for(Individual ind : positiveExamples) { + if(reasoner.hasType(description, ind)) { + instancesCovered++; + } else { + instancesNotCovered ++; + if(instancesNotCovered > maxNotCovered) { + return -1; + } + } + } + + double recall = instancesCovered/(double)positiveExamples.size(); + + int testsPerformed = 0; + int instancesDescription = 0; + + for(Individual ind : negativeExamples) { + + if(reasoner.hasType(description, ind)) { + instancesDescription++; + } + testsPerformed++; + + // check whether approximation is sufficiently accurate + double[] approx = Heuristics.getFScoreApproximation(instancesCovered, recall, 1, negativeExamples.size(), testsPerformed, instancesDescription); + if(approx[1]<approxDelta) { + return approx[0]; + } + + } + + // standard computation (no approximation) + double precision = instancesCovered/(double)(instancesDescription+instancesCovered); +// if(instancesCovered + instancesDescription == 0) { +// precision = 0; +// } + return Heuristics.getFScore(recall, precision, 1); + } else { + throw new Error("Approximation for " + heuristic + " not implemented."); + } + } + + public double getAccuracyOrTooWeakExact(Description description, double noise) { + if(heuristic.equals(HeuristicType.PRED_ACC)) { + return getPredAccuracyOrTooWeakExact(description, noise); + } else if(heuristic.equals(HeuristicType.FMEASURE)) { + // computing R(C) restricted to relevant instances + int additionalInstances = 0; + for(Individual ind : negativeExamples) { + if(reasoner.hasType(description, ind)) { + additionalInstances++; + } + } + + // computing R(A) + int coveredInstances = 0; + for(Individual ind : positiveExamples) { + if(reasoner.hasType(description, ind)) { + coveredInstances++; + } + } + + double recall = coveredInstances/(double)positiveExamples.size(); + double precision = (additionalInstances + coveredInstances == 0) ? 0 : coveredInstances / (double) (coveredInstances + additionalInstances); + + return Heuristics.getFScore(recall, precision); + } else { + throw new Error("Heuristic " + heuristic + " not implemented."); + } + } + /* (non-Javadoc) * @see org.dllearner.core.LearningProblem#getAccuracyOrTooWeak(org.dllearner.core.owl.Description, double) */ @@ -358,7 +522,9 @@ } // instead of using the standard operation, we use optimisation - // and approximation here + // and approximation here; + // now deprecated because the Heuristics helper class is used + @Deprecated public double getFMeasureOrTooWeakApprox(Description description, double noise) { // we abort when there are too many uncovered positives int maxNotCovered = (int) Math.ceil(noise*positiveExamples.size()); @@ -392,7 +558,7 @@ upperBorderA = Math.min(1, p1 + p2); double size = upperBorderA - lowerBorderA; // if the interval has a size smaller than 10%, we can be confident - if(size < 2 * approx) { + if(size < 2 * approxDelta) { // we have to distinguish the cases that the accuracy limit is // below, within, or above the limit and that the mean is below // or above the limit Modified: trunk/interfaces/src/main/java/org/dllearner/cli/ConfMapper.java =================================================================== --- trunk/interfaces/src/main/java/org/dllearner/cli/ConfMapper.java 2010-09-24 09:26:02 UTC (rev 2334) +++ trunk/interfaces/src/main/java/org/dllearner/cli/ConfMapper.java 2010-09-24 12:08:03 UTC (rev 2335) @@ -101,6 +101,7 @@ learningAlgorithmMapping.put("gp", GP.class); learningAlgorithmMapping.put("refinement", ROLearner.class); learningAlgorithmMapping.put("refexamples", OCEL.class); + learningAlgorithmMapping.put("ocel", OCEL.class); learningAlgorithmMapping.put("el", ELLearningAlgorithm.class); learningAlgorithmMapping.put("disjunctiveEL", ELLearningAlgorithmDisjunctive.class); learningAlgorithmMapping.put("celoe", CELOE.class); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jen...@us...> - 2010-09-24 12:49:03
|
Revision: 2336 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=2336&view=rev Author: jenslehmann Date: 2010-09-24 12:48:56 +0000 (Fri, 24 Sep 2010) Log Message: ----------- cross validation slightly extended; pred. acc. approximation for class learning Modified Paths: -------------- trunk/components-core/src/main/java/org/dllearner/learningproblems/ClassLearningProblem.java trunk/scripts/src/main/java/org/dllearner/scripts/CrossValidation.java Modified: trunk/components-core/src/main/java/org/dllearner/learningproblems/ClassLearningProblem.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/learningproblems/ClassLearningProblem.java 2010-09-24 12:08:03 UTC (rev 2335) +++ trunk/components-core/src/main/java/org/dllearner/learningproblems/ClassLearningProblem.java 2010-09-24 12:48:56 UTC (rev 2336) @@ -21,6 +21,7 @@ import java.util.Collection; import java.util.Collections; +import java.util.Iterator; import java.util.LinkedList; import java.util.List; import java.util.Random; @@ -463,6 +464,62 @@ return heuristic.equals(HeuristicType.FMEASURE) ? getFMeasure(recall, precision) : Heuristics.getAScore(recall, precision, coverageFactor); + } else if(heuristic.equals(HeuristicType.FMEASURE)) { + int maxNotCovered = (int) Math.ceil(noise*classInstances.size()); + + int notCoveredPos = 0; +// int notCoveredNeg = 0; + + int posClassifiedAsPos = 0; + int negClassifiedAsNeg = 0; + + int nrOfPosChecks = 0; + int nrOfNegChecks = 0; + + // special case: we test positive and negative examples in turn + Iterator<Individual> itPos = classInstances.iterator(); + Iterator<Individual> itNeg = superClassInstances.iterator(); + + do { + // in each loop we pick 0 or 1 positives and 0 or 1 negative + // and classify it + + if(itPos.hasNext()) { + Individual posExample = itPos.next(); +// System.out.println(posExample); + + if(reasoner.hasType(description, posExample)) { + posClassifiedAsPos++; + } else { + notCoveredPos++; + } + nrOfPosChecks++; + + // take noise into account + if(notCoveredPos > maxNotCovered) { + return -1; + } + } + + if(itNeg.hasNext()) { + Individual negExample = itNeg.next(); + if(!reasoner.hasType(description, negExample)) { + negClassifiedAsNeg++; + } + nrOfNegChecks++; + } + + // compute how accurate our current approximation is and return if it is sufficiently accurate + double approx[] = Heuristics.getPredAccApproximation(classInstances.size(), superClassInstances.size(), 1, nrOfPosChecks, posClassifiedAsPos, nrOfNegChecks, negClassifiedAsNeg); + if(approx[1]<approxDelta) { +// System.out.println(approx[0]); + return approx[0]; + } + + } while(itPos.hasNext() || itNeg.hasNext()); + + double ret = Heuristics.getPredictiveAccuracy(classInstances.size(), superClassInstances.size(), posClassifiedAsPos, negClassifiedAsNeg, 1); + return ret; } else { throw new Error("Approximation for " + heuristic + " not implemented."); } Modified: trunk/scripts/src/main/java/org/dllearner/scripts/CrossValidation.java =================================================================== --- trunk/scripts/src/main/java/org/dllearner/scripts/CrossValidation.java 2010-09-24 12:08:03 UTC (rev 2335) +++ trunk/scripts/src/main/java/org/dllearner/scripts/CrossValidation.java 2010-09-24 12:48:56 UTC (rev 2336) @@ -41,9 +41,9 @@ import org.dllearner.core.ReasonerComponent; import org.dllearner.core.owl.Description; import org.dllearner.core.owl.Individual; +import org.dllearner.learningproblems.Heuristics; import org.dllearner.learningproblems.PosNegLP; import org.dllearner.learningproblems.PosOnlyLP; -import org.dllearner.parser.ParseException; import org.dllearner.utilities.Helper; import org.dllearner.utilities.datastructures.Datastructures; import org.dllearner.utilities.statistics.Stat; @@ -64,6 +64,8 @@ private Stat accuracy = new Stat(); private Stat length = new Stat(); private Stat accuracyTraining = new Stat(); + private Stat fMeasure = new Stat(); + private Stat fMeasureTraining = new Stat(); public static void main(String[] args) { File file = new File(args[0]); @@ -261,6 +263,17 @@ double currAccuracy = 100*((double)correctExamples/(testSetsPos.get(currFold).size()+ testSetsNeg.get(currFold).size())); accuracy.addNumber(currAccuracy); + // calculate training F-Score + int negAsPosTraining = rs.hasType(concept, trainingSetsNeg.get(currFold)).size(); + double precisionTraining = trainingCorrectPosClassified + negAsPosTraining == 0 ? 0 : trainingCorrectPosClassified / (double) (trainingCorrectPosClassified + negAsPosTraining); + double recallTraining = trainingCorrectPosClassified / (double) trainingSetsPos.get(currFold).size(); + fMeasureTraining.addNumber(100*Heuristics.getFScore(recallTraining, precisionTraining)); + // calculate test F-Score + int negAsPos = rs.hasType(concept, testSetsNeg.get(currFold)).size(); + double precision = correctPosClassified + negAsPos == 0 ? 0 : correctPosClassified / (double) (correctPosClassified + negAsPos); + double recall = correctPosClassified / (double) testSetsPos.get(currFold).size(); +// System.out.println(precision);System.out.println(recall); + fMeasure.addNumber(100*Heuristics.getFScore(recall, precision)); length.addNumber(concept.getLength()); @@ -282,8 +295,11 @@ System.out.println("Finished " + folds + "-folds cross-validation on " + file + "."); System.out.println("runtime: " + statOutput(df, runtime, "s")); System.out.println("length: " + statOutput(df, length, "")); - System.out.println("accuracy: " + statOutput(df, accuracy, "%")); - System.out.println("accuracy on training set: " + statOutput(df, accuracyTraining, "%")); + System.out.println("F-Measure on training set: " + statOutput(df, fMeasureTraining, "%")); + System.out.println("F-Measure: " + statOutput(df, fMeasure, "%")); + System.out.println("predictive accuracy on training set: " + statOutput(df, accuracyTraining, "%")); + System.out.println("predictive accuracy: " + statOutput(df, accuracy, "%")); + } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lor...@us...> - 2010-10-07 09:26:24
|
Revision: 2349 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=2349&view=rev Author: lorenz_b Date: 2010-10-07 09:26:06 +0000 (Thu, 07 Oct 2010) Log Message: ----------- Started web interface for sparql-query-generator. Modified Paths: -------------- trunk/pom.xml Added Paths: ----------- trunk/autosparql/ trunk/autosparql/pom.xml trunk/autosparql/src/ trunk/autosparql/src/main/ trunk/autosparql/src/main/java/ trunk/autosparql/src/main/java/org/ trunk/autosparql/src/main/java/org/dllearner/ trunk/autosparql/src/main/java/org/dllearner/autosparql/ trunk/autosparql/src/main/java/org/dllearner/autosparql/Application.gwt.xml trunk/autosparql/src/main/java/org/dllearner/autosparql/client/ trunk/autosparql/src/main/java/org/dllearner/autosparql/client/AppEvents.java trunk/autosparql/src/main/java/org/dllearner/autosparql/client/Application.java trunk/autosparql/src/main/java/org/dllearner/autosparql/client/SPARQLService.java trunk/autosparql/src/main/java/org/dllearner/autosparql/client/controller/ trunk/autosparql/src/main/java/org/dllearner/autosparql/client/controller/ApplicationController.java trunk/autosparql/src/main/java/org/dllearner/autosparql/client/controller/SearchController.java trunk/autosparql/src/main/java/org/dllearner/autosparql/client/model/ trunk/autosparql/src/main/java/org/dllearner/autosparql/client/model/Example.java trunk/autosparql/src/main/java/org/dllearner/autosparql/client/view/ trunk/autosparql/src/main/java/org/dllearner/autosparql/client/view/ApplicationView.java trunk/autosparql/src/main/java/org/dllearner/autosparql/client/view/SearchView.java trunk/autosparql/src/main/java/org/dllearner/autosparql/client/widget/ trunk/autosparql/src/main/java/org/dllearner/autosparql/client/widget/ExamplesPanel.java trunk/autosparql/src/main/java/org/dllearner/autosparql/client/widget/SearchPanel.java trunk/autosparql/src/main/java/org/dllearner/autosparql/server/ trunk/autosparql/src/main/java/org/dllearner/autosparql/server/SPARQLSearch.java trunk/autosparql/src/main/java/org/dllearner/autosparql/server/SPARQLServiceImpl.java trunk/autosparql/src/main/resources/ trunk/autosparql/src/main/resources/org/ trunk/autosparql/src/main/resources/org/dllearner/ trunk/autosparql/src/main/resources/org/dllearner/autosparql/ trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/ trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/Application.css trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/Application.html trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/ trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/css/ trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/css/gxt-all.css trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/css/gxt-gray.css trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/ trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/ trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/box/ trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/box/corners-blue.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/box/corners.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/box/l-blue.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/box/l.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/box/r-blue.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/box/r.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/box/tb-blue.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/box/tb.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/button/ trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/button/arrow.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/button/btn-arrow.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/button/btn-sprite.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/button/btn.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/button/group-cs.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/button/group-lr.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/button/group-tb.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/button/s-arrow-b-noline.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/button/s-arrow-b.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/button/s-arrow-bo.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/button/s-arrow-noline.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/button/s-arrow-o.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/button/s-arrow.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/dd/ trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/dd/drop-add.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/dd/drop-no.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/dd/drop-yes.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/editor/ trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/editor/tb-bold.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/editor/tb-font-color.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/editor/tb-font-decrease.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/editor/tb-font-highlight.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/editor/tb-font-increase.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/editor/tb-italic.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/editor/tb-justify-center.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/editor/tb-justify-left.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/editor/tb-justify-right.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/editor/tb-link.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/editor/tb-ol.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/editor/tb-source.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/editor/tb-sprite.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/editor/tb-ul.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/editor/tb-underline.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/form/ trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/form/checkbox.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/form/clear-trigger.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/form/date-trigger.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/form/error-tip-corners.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/form/exclamation.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/form/radio.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/form/search-trigger.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/form/spinner.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/form/text-bg.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/form/trigger-tpl.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/form/trigger.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/gradient-bg.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/grid/ trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/grid/arrow-left-white.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/grid/arrow-right-white.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/grid/col-move-bottom.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/grid/col-move-top.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/grid/columns.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/grid/dirty.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/grid/done.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/grid/drop-no.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/grid/drop-yes.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/grid/footer-bg.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/grid/grid-blue-hd.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/grid/grid-blue-split.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/grid/grid-hrow.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/grid/grid-loading.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/grid/grid-split.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/grid/grid-vista-hd.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/grid/grid3-hd-btn.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/grid/grid3-hrow-group.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/grid/grid3-hrow-over.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/grid/grid3-hrow.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/grid/grid3-special-col-bg.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/grid/grid3-special-col-sel-bg.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/grid/group-by.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/grid/group-expand-sprite.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/grid/hd-pop.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/grid/hmenu-asc.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/grid/hmenu-desc.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/grid/hmenu-lock.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/grid/hmenu-lock.png trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/grid/hmenu-unlock.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/grid/hmenu-unlock.png trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/grid/invalid_line.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/grid/loading.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/grid/mso-hd.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/grid/nowait.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/grid/page-first-disabled.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/grid/page-first.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/grid/page-last-disabled.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/grid/page-last.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/grid/page-next-disabled.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/grid/page-next.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/grid/page-prev-disabled.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/grid/page-prev.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/grid/pick-button.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/grid/refresh.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/grid/refresh.png trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/grid/row-check-sprite.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/grid/row-expand-sprite.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/grid/row-over.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/grid/row-sel.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/grid/sort-hd.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/grid/sort_asc.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/grid/sort_desc.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/grid/wait.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/layout/ trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/layout/collapse.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/layout/expand.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/layout/gradient-bg.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/layout/mini-bottom.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/layout/mini-left.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/layout/mini-right.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/layout/mini-top.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/layout/ns-collapse.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/layout/ns-expand.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/layout/panel-close.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/layout/panel-title-bg.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/layout/panel-title-light-bg.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/layout/stick.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/layout/stuck.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/layout/tab-close-on.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/layout/tab-close.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/menu/ trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/menu/checked.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/menu/group-checked.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/menu/item-over.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/menu/menu-parent.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/menu/menu.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/menu/unchecked.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/panel/ trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/panel/corners-sprite.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/panel/left-right.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/panel/light-hd.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/panel/tool-sprite-tpl.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/panel/tool-sprites.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/panel/tools-sprites-trans.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/panel/top-bottom.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/panel/top-bottom.png trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/panel/white-corners-sprite.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/panel/white-left-right.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/panel/white-top-bottom.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/progress/ trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/progress/progress-bg.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/qtip/ trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/qtip/bg.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/qtip/close.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/qtip/tip-anchor-sprite.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/qtip/tip-sprite.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/s.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/shadow-c.png trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/shadow-lr.png trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/shadow.png trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/shared/ trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/shared/blue-loading.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/shared/calendar.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/shared/clear.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/shared/glass-bg.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/shared/hd-sprite.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/shared/large-loading.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/shared/left-btn.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/shared/loading-balls.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/shared/right-btn.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/shared/warning.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/sizer/ trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/sizer/e-handle-dark.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/sizer/e-handle.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/sizer/ne-handle-dark.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/sizer/ne-handle.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/sizer/nw-handle-dark.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/sizer/nw-handle.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/sizer/s-handle-dark.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/sizer/s-handle.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/sizer/se-handle-dark.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/sizer/se-handle.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/sizer/square.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/sizer/sw-handle-dark.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/sizer/sw-handle.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/slider/ trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/slider/slider-bg.png trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/slider/slider-thumb.png trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/slider/slider-v-bg.png trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/slider/slider-v-thumb.png trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/tabs/ trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/tabs/scroll-left.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/tabs/scroll-right.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/tabs/scroller-bg.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/tabs/tab-btm-inactive-left-bg.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/tabs/tab-btm-inactive-right-bg.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/tabs/tab-btm-left-bg.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/tabs/tab-btm-right-bg.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/tabs/tab-close.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/tabs/tab-strip-bg.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/tabs/tab-strip-bg.png trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/tabs/tab-strip-btm-bg.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/tabs/tabs-sprite.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/toolbar/ trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/toolbar/bg.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/toolbar/btn-arrow-light.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/toolbar/btn-arrow.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/toolbar/btn-over-bg.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/toolbar/gray-bg.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/toolbar/more.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/toolbar/tb-bg.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/toolbar/tb-btn-sprite.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/toolbar/tb-xl-btn-sprite.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/toolbar/tb-xl-sep.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/tree/ trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/tree/arrows.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/tree/drop-add.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/tree/drop-between.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/tree/drop-no.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/tree/drop-over.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/tree/drop-under.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/tree/drop-yes.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/tree/elbow-end-minus-nl.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/tree/elbow-end-minus.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/tree/elbow-end-plus-nl.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/tree/elbow-end-plus.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/tree/elbow-end.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/tree/elbow-line.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/tree/elbow-minus-nl.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/tree/elbow-minus.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/tree/elbow-plus-nl.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/tree/elbow-plus.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/tree/elbow.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/tree/folder-open.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/tree/folder.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/tree/leaf.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/tree/loading.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/tree/s.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/window/ trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/window/icon-error.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/window/icon-info.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/window/icon-question.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/window/icon-warning.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/window/left-corners.png trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/window/left-right.png trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/window/right-corners.png trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/default/window/top-bottom.png trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gray/ trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gray/button/ trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gray/button/btn-arrow.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gray/button/btn-sprite.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gray/button/btn.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gray/button/group-cs.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gray/button/group-lr.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gray/button/group-tb.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gray/form/ trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gray/form/spinner.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gray/gradient-bg.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gray/grid/ trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gray/grid/col-move-bottom.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gray/grid/col-move-top.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gray/grid/grid-split.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gray/grid/grid3-hd-btn.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gray/grid/grid3-hrow-over.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gray/grid/grid3-hrow-over2.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gray/grid/grid3-hrow.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gray/grid/grid3-hrow2.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gray/grid/grid3-special-col-bg.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gray/grid/grid3-special-col-bg2.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gray/grid/grid3-special-col-sel-bg.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gray/grid/group-collapse.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gray/grid/group-expand-sprite.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gray/grid/group-expand.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gray/grid/page-first.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gray/grid/page-last.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gray/grid/page-next.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gray/grid/page-prev.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gray/grid/refresh.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gray/grid/row-expand-sprite.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gray/grid/sort_asc.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gray/grid/sort_desc.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gray/panel/ trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gray/panel/corners-sprite.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gray/panel/left-right.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gray/panel/light-hd.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gray/panel/tool-sprite-tpl.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gray/panel/tool-sprites.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gray/panel/tools-sprites-trans.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gray/panel/top-bottom.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gray/panel/top-bottom.png trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gray/panel/white-corners-sprite.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gray/panel/white-left-right.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gray/panel/white-top-bottom.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gray/qtip/ trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gray/qtip/bg.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gray/qtip/close.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gray/qtip/tip-sprite.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gray/s.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gray/tabs/ trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gray/tabs/scroll-left.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gray/tabs/scroll-right.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gray/tabs/scroller-bg.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gray/tabs/tab-btm-inactive-left-bg.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gray/tabs/tab-btm-inactive-right-bg.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gray/tabs/tab-btm-left-bg.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gray/tabs/tab-btm-right-bg.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gray/tabs/tab-close.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gray/tabs/tab-strip-bg.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gray/tabs/tab-strip-bg.png trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gray/tabs/tab-strip-btm-bg.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gray/tabs/tabs-sprite.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gray/toolbar/ trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gray/toolbar/bg.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gray/toolbar/btn-arrow-light.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gray/toolbar/btn-arrow.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gray/toolbar/btn-over-bg.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gray/toolbar/gray-bg.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gray/toolbar/tb-bg.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gray/toolbar/tb-btn-sprite.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gray/window/ trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gray/window/icon-error.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gray/window/icon-info.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gray/window/icon-question.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gray/window/icon-warning.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gray/window/left-corners.png trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gray/window/left-corners.pspimage trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gray/window/left-right.png trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gray/window/right-corners.png trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gray/window/top-bottom.png trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gxt/ trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gxt/dd/ trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gxt/dd/insert-bg.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gxt/grid/ trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gxt/grid/row-editor-bg.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gxt/grid/row-editor-btns.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gxt/icons/ trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gxt/icons/bottom2.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gxt/icons/columns.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gxt/icons/done.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gxt/icons/doubleleft2.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gxt/icons/doubleright2.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gxt/icons/down2.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gxt/icons/folder-closed.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gxt/icons/folder-closed.png trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gxt/icons/folder.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gxt/icons/folder.png trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gxt/icons/grid-loading.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gxt/icons/hmenu-asc.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gxt/icons/hmenu-desc.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gxt/icons/left2.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gxt/icons/loading.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gxt/icons/nowait.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gxt/icons/page-first-disabled.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gxt/icons/page-first.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gxt/icons/page-last-disabled.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gxt/icons/page-last.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gxt/icons/page-next-disabled.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gxt/icons/page-next.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gxt/icons/page-prev-disabled.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gxt/icons/page-prev.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gxt/icons/paging.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gxt/icons/right2.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gxt/icons/tabs.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gxt/icons/top2.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gxt/icons/up2.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gxt/icons/wait.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gxt/info/ trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gxt/info/corners-sprite.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gxt/info/top-bottom.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gxt/menu/ trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gxt/menu/disabledcheck.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gxt/shared/ trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gxt/shared/clear.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gxt/shared/large-loading.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gxt/shared/select-18-bg.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gxt/shared/select-19-bg-gray.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gxt/shared/select-19-bg.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gxt/shared/select-bg.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gxt/shared/select-light.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gxt/table/ trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gxt/table/row-over.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gxt/table/vs-column-bg.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gxt/table/vsort-asc.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gxt/table/vsort-desc.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gxt/tree/ trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gxt/tree/checked.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gxt/tree/joint-close.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gxt/tree/joint-open.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gxt/tree/notchecked.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gxt/tree/tree-table-special-col-sel.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gxt/tree/tree-table-special-col.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gxt/tree/vnode.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/images/gxt/tree/vnode_transparent.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/ trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/ trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/css/ trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/css/xtheme-access.css trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/ trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/box/ trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/box/corners-blue.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/box/corners.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/box/l-blue.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/box/l.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/box/r-blue.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/box/r.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/box/tb-blue.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/box/tb.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/button/ trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/button/arrow.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/button/btn.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/button/group-cs.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/button/group-lr.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/button/group-tb.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/button/s-arrow-b-noline.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/button/s-arrow-b.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/button/s-arrow-bo.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/button/s-arrow-noline.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/button/s-arrow-o.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/button/s-arrow.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/editor/ trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/editor/tb-source.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/editor/tb-sprite.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/form/ trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/form/checkbox.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/form/clear-trigger.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/form/date-trigger.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/form/error-tip-corners.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/form/exclamation.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/form/radio.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/form/search-trigger.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/form/spinner.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/form/text-bg.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/form/trigger-single.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/form/trigger-tpl.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/form/trigger.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/grid/ trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/grid/arrow-left-white.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/grid/arrow-right-white.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/grid/col-move-bottom.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/grid/col-move-top.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/grid/columns.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/grid/dirty.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/grid/done.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/grid/drop-no.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/grid/drop-yes.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/grid/footer-bg.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/grid/grid-blue-hd.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/grid/grid-blue-split.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/grid/grid-hrow.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/grid/grid-loading.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/grid/grid-split.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/grid/grid-vista-hd.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/grid/grid3-hd-btn-contrast.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/grid/grid3-hd-btn.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/grid/grid3-hrow-over.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/grid/grid3-hrow.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/grid/grid3-special-col-bg.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/grid/grid3-special-col-sel-bg.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/grid/group-by.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/grid/group-collapse.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/grid/group-expand-sprite.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/grid/group-expand.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/grid/hd-pop.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/grid/hmenu-asc.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/grid/hmenu-desc.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/grid/hmenu-lock.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/grid/hmenu-lock.png trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/grid/hmenu-unlock.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/grid/hmenu-unlock.png trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/grid/invalid_line.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/grid/loading.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/grid/mso-hd.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/grid/nowait.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/grid/page-first-disabled.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/grid/page-first.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/grid/page-last-disabled.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/grid/page-last.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/grid/page-next-disabled.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/grid/page-next.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/grid/page-prev-disabled.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/grid/page-prev.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/grid/pick-button.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/grid/refresh.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/grid/row-check-sel.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/grid/row-check-sprite.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/grid/row-check.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/grid/row-expand-sprite.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/grid/row-over.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/grid/row-sel.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/grid/sort-hd.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/grid/sort_asc.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/grid/sort_desc.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/grid/wait.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/icons/ trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/icons/bottom2.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/icons/doubleleft2.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/icons/doubleright2.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/icons/down2.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/icons/left2.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/icons/right2.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/icons/top2.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/icons/up2.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/layout/ trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/layout/mini-bottom.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/layout/mini-top.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/menu/ trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/menu/checked.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/menu/group-checked.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/menu/item-over.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/menu/menu-parent.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/menu/menu.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/menu/unchecked.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/panel/ trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/panel/corners-sprite.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/panel/left-right.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/panel/light-hd.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/panel/tool-close.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/panel/tool-collapse.gif trunk/autosparql/src/main/resources/org/dllearner/autosparql/public/gxt/themes/access/images/panel/tool-expand.gif trunk/autosparql/src/main/resources/org/dllearner... [truncated message content] |
From: <jen...@us...> - 2010-10-08 13:04:23
|
Revision: 2357 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=2357&view=rev Author: jenslehmann Date: 2010-10-08 13:04:14 +0000 (Fri, 08 Oct 2010) Log Message: ----------- - org.dllearner.examples package now only exists in scripts module - merged modifications on this package (always used highest revision) Added Paths: ----------- trunk/scripts/src/main/java/org/dllearner/examples/FlagScript.java trunk/scripts/src/main/java/org/dllearner/examples/MonogenicDiseases.java trunk/scripts/src/main/java/org/dllearner/examples/Script.java Removed Paths: ------------- trunk/components-core/src/main/java/org/dllearner/examples/ trunk/scripts/src/main/java/org/dllearner/examples/MonogenicDiseases.java Copied: trunk/scripts/src/main/java/org/dllearner/examples/FlagScript.java (from rev 2356, trunk/components-core/src/main/java/org/dllearner/examples/flags/FlagScript.java) =================================================================== --- trunk/scripts/src/main/java/org/dllearner/examples/FlagScript.java (rev 0) +++ trunk/scripts/src/main/java/org/dllearner/examples/FlagScript.java 2010-10-08 13:04:14 UTC (rev 2357) @@ -0,0 +1,22 @@ +/** + * + */ +package org.dllearner.examples.flags; + +import org.dllearner.examples.flags.Script; + +/** + * @author flo + * + */ +public class FlagScript { + + /** + * @param args + */ + public static void main(String[] args) { + // TODO Auto-generated method stub + Script.createKB(); + } + +} Deleted: trunk/scripts/src/main/java/org/dllearner/examples/MonogenicDiseases.java =================================================================== --- trunk/scripts/src/main/java/org/dllearner/examples/MonogenicDiseases.java 2010-10-08 11:26:35 UTC (rev 2356) +++ trunk/scripts/src/main/java/org/dllearner/examples/MonogenicDiseases.java 2010-10-08 13:04:14 UTC (rev 2357) @@ -1,464 +0,0 @@ -/** - * Copyright (C) 2007-2009, Jens Lehmann - * - * This file is part of DL-Learner. - * - * DL-Learner is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * DL-Learner is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - */ -package org.dllearner.examples; - -import java.io.File; -import java.sql.Connection; -import java.sql.DriverManager; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.sql.Statement; -import java.util.LinkedList; -import java.util.List; -import java.util.prefs.BackingStoreException; -import java.util.prefs.Preferences; - -import org.dllearner.core.owl.ClassAssertionAxiom; -import org.dllearner.core.owl.Datatype; -import org.dllearner.core.owl.DatatypeProperty; -import org.dllearner.core.owl.DatatypePropertyDomainAxiom; -import org.dllearner.core.owl.DatatypePropertyRangeAxiom; -import org.dllearner.core.owl.DoubleDatatypePropertyAssertion; -import org.dllearner.core.owl.Individual; -import org.dllearner.core.owl.KB; -import org.dllearner.core.owl.NamedClass; -import org.dllearner.core.owl.SubClassAxiom; -import org.dllearner.reasoning.OWLAPIReasoner; -import org.dllearner.utilities.Files; -import org.dllearner.utilities.Helper; -import org.ini4j.IniFile; -import org.semanticweb.owlapi.model.IRI; - -/** - * Converts SM2PH database to an OWL ontology. To run the script, please - * copy mutant.ini.dist to mutant.ini first and adapt the database connection. - * - * @author Jens Lehmann - * - */ -public class MonogenicDiseases { - - private static IRI ontologyURI = IRI.create("http://dl-learner.org/mutation"); - private static File owlFile = new File("examples/mutation/mutation.owl"); - private static File confFile = new File("examples/mutation/mutation.conf"); - - // whether to generate a class containing the positive examples - private static boolean generatePosExampleClass = true; - // set to true if accessing PostreSQL and false for MySQL - private static boolean pgSQL = true; - // generate fragment => limits the number of individuals in the ontology - // to speed up learning -// private static boolean onlyFragment = true; - - public static void main(String[] args) throws ClassNotFoundException, BackingStoreException, SQLException { - - // reading values for db connection from ini file - String iniFile = "src/dl-learner/org/dllearner/examples/mutation.ini"; - Preferences prefs = new IniFile(new File(iniFile)); - String dbServer = prefs.node("database").get("server", null); - String dbName = prefs.node("database").get("db", null); - String dbPort = prefs.node("database").get("port", null); - String dbUser = prefs.node("database").get("user", null); - String dbPass = prefs.node("database").get("pass", null); - String table = prefs.node("database").get("table", null); - - // connect to database - String url = "jdbc:"; - if(pgSQL) { - Class.forName("org.postgresql.Driver"); - // adapt the port if necessary - url += "postgresql://"+dbServer+":"+dbPort+"/"+dbName; - } else { - Class.forName("com.mysql.jdbc.Driver"); - url += "mysql://"+dbServer+":"+dbPort+"/"+dbName; - } - Connection conn = DriverManager.getConnection(url, dbUser, dbPass); - System.out.println("Successfully connected to database."); - - // prepare ontology - long startTime = System.nanoTime(); - KB kb = new KB(); - NamedClass mutationClass = new NamedClass(getURI("Mutation")); - - NamedClass deleteriousMutationClass = new NamedClass(getURI("DeletoriousMutation")); - - // size change - NamedClass protSizeIncClass = new NamedClass(getURI("ProteinSizeIncreasingMutation")); - NamedClass protSizeUnchangedClass = new NamedClass(getURI("ProteinSizeUnchangedMutation")); - NamedClass protSizeDecClass = new NamedClass(getURI("ProteinSizeDecreasingMutation")); - kb.addAxiom(new SubClassAxiom(protSizeIncClass, mutationClass)); - kb.addAxiom(new SubClassAxiom(protSizeUnchangedClass, mutationClass)); - kb.addAxiom(new SubClassAxiom(protSizeDecClass, mutationClass)); - - // charge - NamedClass protChargeIncClass = new NamedClass(getURI("ProteinChargeIncreasingMutation")); - NamedClass protChargeUnchangedClass = new NamedClass(getURI("ProteinChargeUnchangedMutation")); - NamedClass protChargeDecClass = new NamedClass(getURI("ProteinChargeDecreasingMutation")); - NamedClass protChargeChangedClass = new NamedClass(getURI("ProteinChargeChangedMutation")); - kb.addAxiom(new SubClassAxiom(protChargeIncClass, mutationClass)); - kb.addAxiom(new SubClassAxiom(protChargeUnchangedClass, mutationClass)); - kb.addAxiom(new SubClassAxiom(protChargeDecClass, mutationClass)); - kb.addAxiom(new SubClassAxiom(protChargeChangedClass, mutationClass)); - // TODO: maybe inc and plus are subclasses of changed - - // hydrophobicity - NamedClass protHydroIncClass = new NamedClass(getURI("ProteinHydroIncreasingMutation")); - NamedClass protHydroUnchangedClass = new NamedClass(getURI("ProteinHydroUnchangedMutation")); - NamedClass protHydroDecClass = new NamedClass(getURI("ProteinHydroDecreasingMutation")); - kb.addAxiom(new SubClassAxiom(protHydroIncClass, mutationClass)); - kb.addAxiom(new SubClassAxiom(protHydroUnchangedClass, mutationClass)); - kb.addAxiom(new SubClassAxiom(protHydroDecClass, mutationClass)); - - // polarity - NamedClass protPolIncClass = new NamedClass(getURI("ProteinPolarityIncreasingMutation")); - NamedClass protPolUnchangedClass = new NamedClass(getURI("ProteinPolarityUnchangedMutation")); - NamedClass protPolDecClass = new NamedClass(getURI("ProteinPolarityDecreasingMutation")); - kb.addAxiom(new SubClassAxiom(protPolIncClass, mutationClass)); - kb.addAxiom(new SubClassAxiom(protPolUnchangedClass, mutationClass)); - kb.addAxiom(new SubClassAxiom(protPolDecClass, mutationClass)); - - // score - DatatypeProperty scoreProp = new DatatypeProperty(getURI("modifScore")); - kb.addAxiom(new DatatypePropertyDomainAxiom(scoreProp, mutationClass)); - kb.addAxiom(new DatatypePropertyRangeAxiom(scoreProp, Datatype.DOUBLE)); - - // g_p - NamedClass gpIncClass = new NamedClass(getURI("GPIncreasingMutation")); - NamedClass gpUnchangedClass = new NamedClass(getURI("GPUnchangedMutation")); - NamedClass gpDecClass = new NamedClass(getURI("GPDecreasingMutation")); - kb.addAxiom(new SubClassAxiom(gpIncClass, mutationClass)); - kb.addAxiom(new SubClassAxiom(gpUnchangedClass, mutationClass)); - kb.addAxiom(new SubClassAxiom(gpDecClass, mutationClass)); - - // conservation_wt - DatatypeProperty conservationWTProp = new DatatypeProperty(getURI("convservationWT")); - kb.addAxiom(new DatatypePropertyDomainAxiom(conservationWTProp, mutationClass)); - kb.addAxiom(new DatatypePropertyRangeAxiom(conservationWTProp, Datatype.DOUBLE)); - - // conservation_mut - DatatypeProperty conservationMutProp = new DatatypeProperty(getURI("convservationMut")); - kb.addAxiom(new DatatypePropertyDomainAxiom(conservationMutProp, mutationClass)); - kb.addAxiom(new DatatypePropertyRangeAxiom(conservationMutProp, Datatype.DOUBLE)); - - // freq_at_pos - DatatypeProperty freqAtPosProp = new DatatypeProperty(getURI("freqAtPos")); - kb.addAxiom(new DatatypePropertyDomainAxiom(freqAtPosProp, mutationClass)); - kb.addAxiom(new DatatypePropertyRangeAxiom(freqAtPosProp, Datatype.DOUBLE)); - - // cluster_5res_size - DatatypeProperty cluster5ResSizeProp = new DatatypeProperty(getURI("cluster5resSize")); - kb.addAxiom(new DatatypePropertyDomainAxiom(cluster5ResSizeProp, mutationClass)); - kb.addAxiom(new DatatypePropertyRangeAxiom(cluster5ResSizeProp, Datatype.DOUBLE)); - - // secondary_struc - NamedClass scHelixClass = new NamedClass(getURI("SCHelixMutation")); - NamedClass scSheetClass = new NamedClass(getURI("SCSheetMutation")); - NamedClass scUndeterminedClass = new NamedClass(getURI("SCUndeterminedMutation")); - kb.addAxiom(new SubClassAxiom(scHelixClass, mutationClass)); - kb.addAxiom(new SubClassAxiom(scSheetClass, mutationClass)); - kb.addAxiom(new SubClassAxiom(scUndeterminedClass, mutationClass)); - - // gain_contact - DatatypeProperty gainContactProp = new DatatypeProperty(getURI("gainContact")); - kb.addAxiom(new DatatypePropertyDomainAxiom(gainContactProp, mutationClass)); - kb.addAxiom(new DatatypePropertyRangeAxiom(gainContactProp, Datatype.DOUBLE)); - - // lost_contact - DatatypeProperty lostContactProp = new DatatypeProperty(getURI("lostContact")); - kb.addAxiom(new DatatypePropertyDomainAxiom(lostContactProp, mutationClass)); - kb.addAxiom(new DatatypePropertyRangeAxiom(lostContactProp, Datatype.DOUBLE)); - - // identical_contact - DatatypeProperty identicalContactProp = new DatatypeProperty(getURI("identicalContact")); - kb.addAxiom(new DatatypePropertyDomainAxiom(identicalContactProp, mutationClass)); - kb.addAxiom(new DatatypePropertyRangeAxiom(identicalContactProp, Datatype.DOUBLE)); - - // gain_n1_contact - DatatypeProperty gainN1ContactProp = new DatatypeProperty(getURI("gainN1Contact")); - kb.addAxiom(new DatatypePropertyDomainAxiom(gainN1ContactProp, mutationClass)); - kb.addAxiom(new DatatypePropertyRangeAxiom(gainN1ContactProp, Datatype.DOUBLE)); - - // lost_n1_contact - DatatypeProperty lostN1ContactProp = new DatatypeProperty(getURI("lostN1Contact")); - kb.addAxiom(new DatatypePropertyDomainAxiom(lostN1ContactProp, mutationClass)); - kb.addAxiom(new DatatypePropertyRangeAxiom(lostN1ContactProp, Datatype.DOUBLE)); - - // identical_n1_contact - DatatypeProperty identicalN1ContactProp = new DatatypeProperty(getURI("identicalN1Contact")); - kb.addAxiom(new DatatypePropertyDomainAxiom(identicalN1ContactProp, mutationClass)); - kb.addAxiom(new DatatypePropertyRangeAxiom(identicalN1ContactProp, Datatype.DOUBLE)); - - // wt_accessibility - DatatypeProperty wtAccessibilityProp = new DatatypeProperty(getURI("wtAccessibility")); - kb.addAxiom(new DatatypePropertyDomainAxiom(wtAccessibilityProp, mutationClass)); - kb.addAxiom(new DatatypePropertyRangeAxiom(wtAccessibilityProp, Datatype.DOUBLE)); - - // mut_accessibility - DatatypeProperty mutAccessibilityProp = new DatatypeProperty(getURI("mutAccessibility")); - kb.addAxiom(new DatatypePropertyDomainAxiom(mutAccessibilityProp, mutationClass)); - kb.addAxiom(new DatatypePropertyRangeAxiom(mutAccessibilityProp, Datatype.DOUBLE)); - - // cluster3d_10 - DatatypeProperty cluster3D10Prop = new DatatypeProperty(getURI("cluster3d10")); - kb.addAxiom(new DatatypePropertyDomainAxiom(cluster3D10Prop, mutationClass)); - kb.addAxiom(new DatatypePropertyRangeAxiom(cluster3D10Prop, Datatype.DOUBLE)); - - // cluster3d_20 - DatatypeProperty cluster3D20Prop = new DatatypeProperty(getURI("cluster3d20")); - kb.addAxiom(new DatatypePropertyDomainAxiom(cluster3D20Prop, mutationClass)); - kb.addAxiom(new DatatypePropertyRangeAxiom(cluster3D20Prop, Datatype.DOUBLE)); - - // cluster3d_30 - DatatypeProperty cluster3D30Prop = new DatatypeProperty(getURI("cluster3d30")); - kb.addAxiom(new DatatypePropertyDomainAxiom(cluster3D30Prop, mutationClass)); - kb.addAxiom(new DatatypePropertyRangeAxiom(cluster3D30Prop, Datatype.DOUBLE)); - - // TODO: stability missing - - // reliability_deltag - DatatypeProperty reliabilityDeltagProp = new DatatypeProperty(getURI("reliabilityDeltag")); - kb.addAxiom(new DatatypePropertyDomainAxiom(reliabilityDeltagProp, mutationClass)); - kb.addAxiom(new DatatypePropertyRangeAxiom(reliabilityDeltagProp, Datatype.DOUBLE)); - - if(generatePosExampleClass) { - kb.addAxiom(new SubClassAxiom(deleteriousMutationClass, mutationClass)); - } - - // select data (restricted to pos/neg examples for efficiency) - Statement stmt = conn.createStatement(); - ResultSet rs = null; - if(pgSQL) { - // join tables - rs = stmt.executeQuery("SELECT * FROM fiche_mutant, mutants WHERE fiche_mutant.id = mutants.id AND(gain_contact is not null)"); - } else { - rs = stmt.executeQuery("SELECT * FROM " + table + " WHERE (gain_contact is not null) AND (gain_contact != 0)"); - } - - int count = 0; - while(rs.next()) { - // generate an individual for each entry in the table - int mutationID = rs.getInt("id"); - Individual mutationInd = new Individual(getURI("mutation" + mutationID)); - - // size change is represented via 3 classes - String modifSize = rs.getString("modif_size"); - convertThreeValuedColumn(kb, mutationInd, modifSize, protSizeIncClass, protSizeUnchangedClass, protSizeDecClass); - - // charge is done via 4 classes - String modifCharge = rs.getString("modif_charge"); - if(modifCharge.equals("+")) { - kb.addAxiom(new ClassAssertionAxiom(protChargeIncClass, mutationInd)); - } else if(modifCharge.equals("=")) { - kb.addAxiom(new ClassAssertionAxiom(protChargeUnchangedClass, mutationInd)); - } else if(modifCharge.equals("-")) { - kb.addAxiom(new ClassAssertionAxiom(protChargeDecClass, mutationInd)); - } else if(modifCharge.equals("!=")) { - kb.addAxiom(new ClassAssertionAxiom(protChargeChangedClass, mutationInd)); - } - - // hydro... - String modifHydro = rs.getString("modif_hydrophobicity"); - convertThreeValuedColumn(kb, mutationInd, modifHydro, protHydroIncClass, protHydroUnchangedClass, protHydroDecClass); - - // polarity - String modifPolarity = rs.getString("modif_polarity"); - convertThreeValuedColumn(kb, mutationInd, modifPolarity, protPolIncClass, protPolUnchangedClass, protPolDecClass); - - // modif_score - double modifScore = rs.getDouble("modif_score"); - kb.addAxiom(new DoubleDatatypePropertyAssertion(scoreProp, mutationInd, modifScore)); - - // g_p - String gp = rs.getString("g_p"); - convertThreeValuedColumn(kb, mutationInd, gp, gpIncClass, gpUnchangedClass, gpDecClass); - - // modif_score - double conservationWT = rs.getDouble("conservation_wt"); - kb.addAxiom(new DoubleDatatypePropertyAssertion(conservationWTProp, mutationInd, conservationWT)); - - // modif_score - double conservationMut = rs.getDouble("conservation_mut"); - kb.addAxiom(new DoubleDatatypePropertyAssertion(conservationMutProp, mutationInd, conservationMut)); - - // freq_at_pos - double freqAtPos = rs.getDouble("freq_at_pos"); - kb.addAxiom(new DoubleDatatypePropertyAssertion(freqAtPosProp, mutationInd, freqAtPos)); - - // freq_at_pos - double cluster5ResSize = rs.getDouble("cluster_5res_size"); - kb.addAxiom(new DoubleDatatypePropertyAssertion(cluster5ResSizeProp, mutationInd, cluster5ResSize)); - - // secondary struc - String secStruc = rs.getString("secondary_struc"); - if(secStruc.equals("HELIX")) { - kb.addAxiom(new ClassAssertionAxiom(scHelixClass, mutationInd)); - } else if(secStruc.equals("SHEET")) { - kb.addAxiom(new ClassAssertionAxiom(scSheetClass, mutationInd)); - } else if(secStruc.equals("0")) { - kb.addAxiom(new ClassAssertionAxiom(scUndeterminedClass, mutationInd)); - } - - // TODO: Wert null soll hier auch vorkommen, aber existiert in der DB nicht. - // gain_contact - double gainContact = rs.getDouble("gain_contact"); - kb.addAxiom(new DoubleDatatypePropertyAssertion(gainContactProp, mutationInd, gainContact)); - - // lost_contact - double lostContact = rs.getDouble("lost_contact"); - kb.addAxiom(new DoubleDatatypePropertyAssertion(lostContactProp, mutationInd, lostContact)); - - // identical_contact - double identicalContact = rs.getDouble("identical_contact"); - kb.addAxiom(new DoubleDatatypePropertyAssertion(identicalContactProp, mutationInd, identicalContact)); - - // gain_n1_contact - double gainN1Contact = rs.getDouble("gain_n1_contact"); - kb.addAxiom(new DoubleDatatypePropertyAssertion(gainN1ContactProp, mutationInd, gainN1Contact)); - - // lost_n1_contact - double lostN1Contact = rs.getDouble("lost_n1_contact"); - kb.addAxiom(new DoubleDatatypePropertyAssertion(lostN1ContactProp, mutationInd, lostN1Contact)); - - // identical_n1_contact - double identicalN1Contact = rs.getDouble("identical_n1_contact"); - kb.addAxiom(new DoubleDatatypePropertyAssertion(identicalN1ContactProp, mutationInd, identicalN1Contact)); - - // TODO Vorsicht bei 0-Werten in den weitern Feldern (klären, ob in dem - // Fall gar nichts geschrieben werden soll) - - // wt_accessibility - double wtAccessibility = rs.getDouble("wt_accessibility"); - kb.addAxiom(new DoubleDatatypePropertyAssertion(wtAccessibilityProp, mutationInd, wtAccessibility)); - - // mut_accessibility - double mutAccessibility = rs.getDouble("mut_accessibility"); - kb.addAxiom(new DoubleDatatypePropertyAssertion(mutAccessibilityProp, mutationInd, mutAccessibility)); - - // cluster3d_10 - double cluster3D10 = rs.getDouble("cluster3d_10"); - kb.addAxiom(new DoubleDatatypePropertyAssertion(cluster3D10Prop, mutationInd, cluster3D10)); - - // cluster3d_20 - double cluster3D20 = rs.getDouble("cluster3d_20"); - kb.addAxiom(new DoubleDatatypePropertyAssertion(cluster3D20Prop, mutationInd, cluster3D20)); - - // cluster3d_30 - double cluster3D30 = rs.getDouble("cluster3d_30"); - kb.addAxiom(new DoubleDatatypePropertyAssertion(cluster3D30Prop, mutationInd, cluster3D30)); - - // TODO: stability missing - - // reliability_deltag - double reliabilityDeltag = rs.getDouble("reliability_deltag"); - kb.addAxiom(new DoubleDatatypePropertyAssertion(reliabilityDeltagProp, mutationInd, reliabilityDeltag)); - - // generate a class with all positive examples (optional) - if(generatePosExampleClass) { - String phenotype = rs.getString("phenotype"); - if(!phenotype.toLowerCase().contains("polymorphism")) { - kb.addAxiom(new ClassAssertionAxiom(deleteriousMutationClass, mutationInd)); - } - } - - - count++; - } - - // writing generated knowledge base - System.out.print("Writing OWL file ... "); - long startWriteTime = System.nanoTime(); - OWLAPIReasoner.exportKBToOWL(owlFile, kb, ontologyURI); - long writeDuration = System.nanoTime() - startWriteTime; - System.out.println("OK (entities: " + count + "; time: " + Helper.prettyPrintNanoSeconds(writeDuration) + "; file size: " + owlFile.length()/1024 + " KB)."); - - // selecting examples - // -> only a fraction of examples are selected as positive/negative - if(pgSQL) { - rs = stmt.executeQuery("SELECT * FROM fiche_mutant, mutants WHERE fiche_mutant.id=mutants.id AND " //lower(phenotype) not like 'polymorphism' AND " - + " (gain_contact is not null)"); // AND (gain_contact != 0)"); - } else { - rs = stmt.executeQuery("SELECT * FROM " + table + " WHERE " //lower(phenotype) not like 'polymorphism' AND " - + " (gain_contact is not null) AND (gain_contact != 0)"); - } - List<Individual> posExamples = new LinkedList<Individual>(); - List<Individual> negExamples = new LinkedList<Individual>(); - while(rs.next()) { - int mutationID = rs.getInt("id"); - String phenotype = rs.getString("phenotype"); - if(phenotype.toLowerCase().contains("polymorphism")) { - negExamples.add(new Individual(getURI("mutation" + mutationID))); - } else { - posExamples.add(new Individual(getURI("mutation" + mutationID))); - } - } - - // writing conf file - Files.clearFile(confFile); - String confHeader = "import(\"" + owlFile.getName() + "\");\n\n"; - confHeader += "reasoner = fastInstanceChecker;\n"; - - confHeader += "problem = classLearning;\n"; - confHeader += "classLearning.classToDescribe = \"" + deleteriousMutationClass + "\";\n"; - confHeader += "classLearning.accuracyMethod = \"fmeasure\";\n"; - confHeader += "classLearning.approxAccuracy = 0.03;\n"; - -// confHeader += "problem = posNegLPStandard;\n"; -// confHeader += "posNegLPStandard.useApproximations = true;\n"; -// confHeader += "posNegLPStandard.accuracyMethod = \"fmeasure\";\n"; -// confHeader += "posNegLPStandard.approxAccuracy = 0.03;\n"; - - confHeader += "algorithm = celoe;\n"; - confHeader += "celoe.maxExecutionTimeInSeconds = 10;\n"; - confHeader += "celoe.noisePercentage = 10;\n"; - confHeader += "celoe.singleSuggestionMode = true;\n"; - confHeader += "celoe.useNegation = true;\n"; - -// confHeader += "refexamples.noisePercentage = 15;\n"; -// confHeader += "refexamples.startClass = \"" + getURI("Mutation") + "\";\n"; -// confHeader += "refexamples.writeSearchTree = false;\n"; -// confHeader += "refexamples.searchTreeFile = \"log/mutation/searchTree.log\";\n"; - confHeader += "\n"; - Files.appendFile(confFile, confHeader); - if(!generatePosExampleClass) { - Carcinogenesis.appendPosExamples(confFile, posExamples); - Carcinogenesis.appendNegExamples(confFile, negExamples); - } - - long runTime = System.nanoTime() - startTime; - System.out.println("Conf file written with " + posExamples.size() + " positive and " + negExamples.size() + " negative examples."); - System.out.println("Database successfully converted in " + Helper.prettyPrintNanoSeconds(runTime) + "."); - - } - - // a table column with values "+", "=", "-" is converted to subclasses - private static void convertThreeValuedColumn(KB kb, Individual mutationInd, String value, NamedClass plusClass, NamedClass equalClass, NamedClass minusClass) { - if(value.equals("+")) { - kb.addAxiom(new ClassAssertionAxiom(plusClass, mutationInd)); - } else if(value.equals("=")) { - kb.addAxiom(new ClassAssertionAxiom(equalClass, mutationInd)); - } else if(value.equals("-")) { - kb.addAxiom(new ClassAssertionAxiom(minusClass, mutationInd)); - } - } - - private static String getURI(String name) { - return ontologyURI + "#" + name; - } -} Copied: trunk/scripts/src/main/java/org/dllearner/examples/MonogenicDiseases.java (from rev 2356, trunk/components-core/src/main/java/org/dllearner/examples/MonogenicDiseases.java) =================================================================== --- trunk/scripts/src/main/java/org/dllearner/examples/MonogenicDiseases.java (rev 0) +++ trunk/scripts/src/main/java/org/dllearner/examples/MonogenicDiseases.java 2010-10-08 13:04:14 UTC (rev 2357) @@ -0,0 +1,762 @@ +/** + * Copyright (C) 2007-2009, Jens Lehmann + * + * This file is part of DL-Learner. + * + * DL-Learner is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * DL-Learner is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ +package org.dllearner.examples; + +import java.io.File; +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.LinkedList; +import java.util.List; +import java.util.prefs.BackingStoreException; +import java.util.prefs.Preferences; + +import org.dllearner.core.owl.ClassAssertionAxiom; +import org.dllearner.core.owl.Datatype; +import org.dllearner.core.owl.DatatypeProperty; +import org.dllearner.core.owl.DatatypePropertyDomainAxiom; +import org.dllearner.core.owl.DatatypePropertyRangeAxiom; +import org.dllearner.core.owl.DoubleDatatypePropertyAssertion; +import org.dllearner.core.owl.Individual; +import org.dllearner.core.owl.KB; +import org.dllearner.core.owl.NamedClass; +import org.dllearner.core.owl.SubClassAxiom; +import org.dllearner.reasoning.OWLAPIReasoner; +import org.dllearner.utilities.Files; +import org.dllearner.utilities.Helper; +import org.ini4j.IniFile; +import org.semanticweb.owlapi.model.IRI; + +/** + * Converts SM2PH database to an OWL ontology. To run the script, please + * copy mutant.ini.dist to mutant.ini first and adapt the database connection. + * + * @author Jens Lehmann + * + */ +public class MonogenicDiseases { + +//---> OPTIONS: + private static int algorithmus = 1; // 1 = pos/neg Algorithmus 2 = Celoe + private static boolean writeAlephFiles = true; // Add AlephFiles + private static boolean writeYYFiles = true; // Add YinYangFiles + private static int posEx = 25; // Number of pos-Ex. + private static int negEx = 25; // Number of neg-Ex. + private static boolean cvAleph = true; // add Files for Aleph 10-Fold Cross Validation + +//<--- OPTIONS end + + private static IRI ontologyURI = IRI.create("http://dl-learner.org/mutation"); + private static File owlFile = new File("examples/mutation/mutation.owl"); + private static File confFile = new File("examples/mutation/mutation.conf"); + private static File badFile = new File("examples/mutation/mutation1.n"); // AlephFile + private static File posFile = new File("examples/mutation/mutation1.f"); // AlephFile + private static File yybadFile = new File("examples/mutation/mutationNegatives.txt"); //YYFile + private static File yyposFile = new File("examples/mutation/mutationPositives.txt"); //YYFile + + private static File split1n = new File("examples/mutation/split1.n"); + private static File split1f = new File("examples/mutation/split1.f"); + private static File split2n = new File("examples/mutation/split2.n"); + private static File split2f = new File("examples/mutation/split2.f"); + private static File split3n = new File("examples/mutation/split3.n"); + private static File split3f = new File("examples/mutation/split3.f"); + private static File split4n = new File("examples/mutation/split4.n"); + private static File split4f = new File("examples/mutation/split4.f"); + private static File split5n = new File("examples/mutation/split5.n"); + private static File split5f = new File("examples/mutation/split5.f"); + private static File split6n = new File("examples/mutation/split6.n"); + private static File split6f = new File("examples/mutation/split6.f"); + private static File split7n = new File("examples/mutation/split7.n"); + private static File split7f = new File("examples/mutation/split7.f"); + private static File split8n = new File("examples/mutation/split8.n"); + private static File split8f = new File("examples/mutation/split8.f"); + private static File split9n = new File("examples/mutation/split9.n"); + private static File split9f = new File("examples/mutation/split9.f"); + private static File split10n = new File("examples/mutation/split10.n"); + private static File split10f = new File("examples/mutation/split10.f"); + + + + // whether to generate a class containing the positive examples + private static boolean generatePosExampleClass = false; + // set to true if accessing PostreSQL and false for MySQL + private static boolean pgSQL = true; + // generate fragment => limits the number of individuals in the ontology + // to speed up learning + private static boolean learnMutation = true; + // private static boolean onlyFragment = true; + + public static void main(String[] args) throws ClassNotFoundException, BackingStoreException, SQLException { + + if (algorithmus == 1) { // LearnAlgo-Check + generatePosExampleClass = false; + } + + if (algorithmus == 2) { // LearnAlgo-Check + generatePosExampleClass = true; + } + + + // reading values for db connection from ini file + String iniFile = "src/dl-learner/org/dllearner/examples/mutation.ini"; + Preferences prefs = new IniFile(new File(iniFile)); + String dbServer = prefs.node("database").get("server", null); + String dbName = prefs.node("database").get("db", null); + String dbPort = prefs.node("database").get("port", null); + String dbUser = prefs.node("database").get("user", null); + String dbPass = prefs.node("database").get("pass", null); + String table = prefs.node("database").get("table", null); + + // connect to database + String url = "jdbc:"; + if(pgSQL) { + Class.forName("org.postgresql.Driver"); + // adapt the port if necessary + url += "postgresql://"+dbServer+":"+dbPort+"/"+dbName; + } else { + Class.forName("com.mysql.jdbc.Driver"); + url += "mysql://"+dbServer+":"+dbPort+"/"+dbName; + } + Connection conn = DriverManager.getConnection(url, dbUser, dbPass); + System.out.println("Successfully connected to database."); + + // prepare ontology + long startTime = System.nanoTime(); + KB kb = new KB(); + NamedClass mutationClass = new NamedClass(getURI("Mutation")); + + NamedClass deleteriousMutationClass = new NamedClass(getURI("DeletoriousMutation")); + + // size change + NamedClass protSizeIncClass = new NamedClass(getURI("ProteinSizeIncreasingMutation")); + NamedClass protSizeUnchangedClass = new NamedClass(getURI("ProteinSizeUnchangedMutation")); + NamedClass protSizeDecClass = new NamedClass(getURI("ProteinSizeDecreasingMutation")); + kb.addAxiom(new SubClassAxiom(protSizeIncClass, mutationClass)); + kb.addAxiom(new SubClassAxiom(protSizeUnchangedClass, mutationClass)); + kb.addAxiom(new SubClassAxiom(protSizeDecClass, mutationClass)); + + // charge + NamedClass protChargeIncClass = new NamedClass(getURI("ProteinChargeIncreasingMutation")); + NamedClass protChargeUnchangedClass = new NamedClass(getURI("ProteinChargeUnchangedMutation")); + NamedClass protChargeDecClass = new NamedClass(getURI("ProteinChargeDecreasingMutation")); + NamedClass protChargeChangedClass = new NamedClass(getURI("ProteinChargeChangedMutation")); + kb.addAxiom(new SubClassAxiom(protChargeIncClass, mutationClass)); + kb.addAxiom(new SubClassAxiom(protChargeUnchangedClass, mutationClass)); + kb.addAxiom(new SubClassAxiom(protChargeDecClass, mutationClass)); + kb.addAxiom(new SubClassAxiom(protChargeChangedClass, mutationClass)); + // TODO: maybe inc and plus are subclasses of changed + + // hydrophobicity + NamedClass protHydroIncClass = new NamedClass(getURI("ProteinHydroIncreasingMutation")); + NamedClass protHydroUnchangedClass = new NamedClass(getURI("ProteinHydroUnchangedMutation")); + NamedClass protHydroDecClass = new NamedClass(getURI("ProteinHydroDecreasingMutation")); + kb.addAxiom(new SubClassAxiom(protHydroIncClass, mutationClass)); + kb.addAxiom(new SubClassAxiom(protHydroUnchangedClass, mutationClass)); + kb.addAxiom(new SubClassAxiom(protHydroDecClass, mutationClass)); + + // polarity + NamedClass protPolIncClass = new NamedClass(getURI("ProteinPolarityIncreasingMutation")); + NamedClass protPolUnchangedClass = new NamedClass(getURI("ProteinPolarityUnchangedMutation")); + NamedClass protPolDecClass = new NamedClass(getURI("ProteinPolarityDecreasingMutation")); + kb.addAxiom(new SubClassAxiom(protPolIncClass, mutationClass)); + kb.addAxiom(new SubClassAxiom(protPolUnchangedClass, mutationClass)); + kb.addAxiom(new SubClassAxiom(protPolDecClass, mutationClass)); + + // score + DatatypeProperty scoreProp = new DatatypeProperty(getURI("modifScore")); + kb.addAxiom(new DatatypePropertyDomainAxiom(scoreProp, mutationClass)); + kb.addAxiom(new DatatypePropertyRangeAxiom(scoreProp, Datatype.DOUBLE)); + + // g_p + NamedClass gpIncClass = new NamedClass(getURI("GPIncreasingMutation")); + NamedClass gpUnchangedClass = new NamedClass(getURI("GPUnchangedMutation")); + NamedClass gpDecClass = new NamedClass(getURI("GPDecreasingMutation")); + kb.addAxiom(new SubClassAxiom(gpIncClass, mutationClass)); + kb.addAxiom(new SubClassAxiom(gpUnchangedClass, mutationClass)); + kb.addAxiom(new SubClassAxiom(gpDecClass, mutationClass)); + + // conservation_wt + DatatypeProperty conservationWTProp = new DatatypeProperty(getURI("convservationWT")); + kb.addAxiom(new DatatypePropertyDomainAxiom(conservationWTProp, mutationClass)); + kb.addAxiom(new DatatypePropertyRangeAxiom(conservationWTProp, Datatype.DOUBLE)); + + // conservation_mut + DatatypeProperty conservationMutProp = new DatatypeProperty(getURI("convservationMut")); + kb.addAxiom(new DatatypePropertyDomainAxiom(conservationMutProp, mutationClass)); + kb.addAxiom(new DatatypePropertyRangeAxiom(conservationMutProp, Datatype.DOUBLE)); + + // freq_at_pos + DatatypeProperty freqAtPosProp = new DatatypeProperty(getURI("freqAtPos")); + kb.addAxiom(new DatatypePropertyDomainAxiom(freqAtPosProp, mutationClass)); + kb.addAxiom(new DatatypePropertyRangeAxiom(freqAtPosProp, Datatype.DOUBLE)); + + // cluster_5res_size + DatatypeProperty cluster5ResSizeProp = new DatatypeProperty(getURI("cluster5resSize")); + kb.addAxiom(new DatatypePropertyDomainAxiom(cluster5ResSizeProp, mutationClass)); + kb.addAxiom(new DatatypePropertyRangeAxiom(cluster5ResSizeProp, Datatype.DOUBLE)); + + // secondary_struc + NamedClass scHelixClass = new NamedClass(getURI("SCHelixMutation")); + NamedClass scSheetClass = new NamedClass(getURI("SCSheetMutation")); + NamedClass scUndeterminedClass = new NamedClass(getURI("SCUndeterminedMutation")); + kb.addAxiom(new SubClassAxiom(scHelixClass, mutationClass)); + kb.addAxiom(new SubClassAxiom(scSheetClass, mutationClass)); + kb.addAxiom(new SubClassAxiom(scUndeterminedClass, mutationClass)); + + // gain_contact + DatatypeProperty gainContactProp = new DatatypeProperty(getURI("gainContact")); + kb.addAxiom(new DatatypePropertyDomainAxiom(gainContactProp, mutationClass)); + kb.addAxiom(new DatatypePropertyRangeAxiom(gainContactProp, Datatype.DOUBLE)); + + // lost_contact + DatatypeProperty lostContactProp = new DatatypeProperty(getURI("lostContact")); + kb.addAxiom(new DatatypePropertyDomainAxiom(lostContactProp, mutationClass)); + kb.addAxiom(new DatatypePropertyRangeAxiom(lostContactProp, Datatype.DOUBLE)); + + // identical_contact + DatatypeProperty identicalContactProp = new DatatypeProperty(getURI("identicalContact")); + kb.addAxiom(new DatatypePropertyDomainAxiom(identicalContactProp, mutationClass)); + kb.addAxiom(new DatatypePropertyRangeAxiom(identicalContactProp, Datatype.DOUBLE)); + + // gain_n1_contact + DatatypeProperty gainN1ContactProp = new DatatypeProperty(getURI("gainN1Contact")); + kb.addAxiom(new DatatypePropertyDomainAxiom(gainN1ContactProp, mutationClass)); + kb.addAxiom(new DatatypePropertyRangeAxiom(gainN1ContactProp, Datatype.DOUBLE)); + + // lost_n1_contact + DatatypeProperty lostN1ContactProp = new DatatypeProperty(getURI("lostN1Contact")); + kb.addAxiom(new DatatypePropertyDomainAxiom(lostN1ContactProp, mutationClass)); + kb.addAxiom(new DatatypePropertyRangeAxiom(lostN1ContactProp, Datatype.DOUBLE)); + + // identical_n1_contact + DatatypeProperty identicalN1ContactProp = new DatatypeProperty(getURI("identicalN1Contact")); + kb.addAxiom(new DatatypePropertyDomainAxiom(identicalN1ContactProp, mutationClass)); + kb.addAxiom(new DatatypePropertyRangeAxiom(identicalN1ContactProp, Datatype.DOUBLE)); + + // wt_accessibility + DatatypeProperty wtAccessibilityProp = new DatatypeProperty(getURI("wtAccessibility")); + kb.addAxiom(new DatatypePropertyDomainAxiom(wtAccessibilityProp, mutationClass)); + kb.addAxiom(new DatatypePropertyRangeAxiom(wtAccessibilityProp, Datatype.DOUBLE)); + + // mut_accessibility + DatatypeProperty mutAccessibilityProp = new DatatypeProperty(getURI("mutAccessibility")); + kb.addAxiom(new DatatypePropertyDomainAxiom(mutAccessibilityProp, mutationClass)); + kb.addAxiom(new DatatypePropertyRangeAxiom(mutAccessibilityProp, Datatype.DOUBLE)); + + // cluster3d_10 + DatatypeProperty cluster3D10Prop = new DatatypeProperty(getURI("cluster3d10")); + kb.addAxiom(new DatatypePropertyDomainAxiom(cluster3D10Prop, mutationClass)); + kb.addAxiom(new DatatypePropertyRangeAxiom(cluster3D10Prop, Datatype.DOUBLE)); + + // cluster3d_20 + DatatypeProperty cluster3D20Prop = new DatatypeProperty(getURI("cluster3d20")); + kb.addAxiom(new DatatypePropertyDomainAxiom(cluster3D20Prop, mutationClass)); + kb.addAxiom(new DatatypePropertyRangeAxiom(cluster3D20Prop, Datatype.DOUBLE)); + + // cluster3d_30 + DatatypeProperty cluster3D30Prop = new DatatypeProperty(getURI("cluster3d30")); + kb.addAxiom(new DatatypePropertyDomainAxiom(cluster3D30Prop, mutationClass)); + kb.addAxiom(new DatatypePropertyRangeAxiom(cluster3D30Prop, Datatype.DOUBLE)); + + // TODO: stability missing + + // reliability_deltag + DatatypeProperty reliabilityDeltagProp = new DatatypeProperty(getURI("reliabilityDeltag")); + kb.addAxiom(new DatatypePropertyDomainAxiom(reliabilityDeltagProp, mutationClass)); + kb.addAxiom(new DatatypePropertyRangeAxiom(reliabilityDeltagProp, Datatype.DOUBLE)); + + if(generatePosExampleClass) { + kb.addAxiom(new SubClassAxiom(deleteriousMutationClass, mutationClass)); + } + + // select data (restricted to pos/neg examples for efficiency) + Statement stmt = conn.createStatement(); + ResultSet rs = null; + if(pgSQL) { + // join tables + rs = stmt.executeQuery("SELECT * FROM fiche_mutant, mutants WHERE fiche_mutant.id = mutants.id AND(gain_contact is not null)"); + } else { + rs = stmt.executeQuery("SELECT * FROM " + table + " WHERE (gain_contact is not null) AND (gain_contact != 0)"); + } + +int count = 1; +int pos_count = 0; +int neg_count = 1; + + + if (writeAlephFiles){ // Clear AlephFiles + Files.clearFile(badFile); + Files.clearFile(posFile); + } + + if (writeYYFiles) { // Clear YinYangFiles + Files.clearFile(yybadFile); + Files.clearFile(yyposFile); + } + + if (cvAleph) { // Clear Aleph CV-Files + Files.clearFile(split1n); + Files.clearFile(split1f); + Files.clearFile(split2n); + Files.clearFile(split2f); + Files.clearFile(split3n); + Files.clearFile(split3f); + Files.clearFile(split4n); + Files.clearFile(split4f); + Files.clearFile(split5n); + Files.clearFile(split5f); + Files.clearFile(split6n); + Files.clearFile(split6f); + Files.clearFile(split7n); + Files.clearFile(split7f); + Files.clearFile(split8n); + Files.clearFile(split8f); + Files.clearFile(split9n); + Files.clearFile(split9f); + Files.clearFile(split10n); + Files.clearFile(split10f); + } + + int kp = 1; // k for CV positiv + int kn = 1; // k for CV negativ + int peps = posEx/10; // positiv Examples per Splitfile + int neps = negEx/10; // negative Examples per Splitfile + int aneg = 0; // aktuell negativ + int apos = 0; // aktuell positiv + + + while((rs.next()) && ((pos_count < posEx) || (neg_count < negEx))) { + + + + // generate an individual for each entry in the table + int mutationID = rs.getInt("id"); + Individual mutationInd = new Individual(getURI("mutation" + mutationID)); + + + String pt = rs.getString("phenotype"); + if ((pt.toLowerCase().contains("polymorphism"))&&( neg_count<=negEx )) { + if (writeAlephFiles) { + Files.appendFile(badFile, "deleterious(id"+mutationID+").\n"); + } + if (writeYYFiles) { + Files.appendFile(yybadFile, "http://example.com/mutation/mutation#mutation"+mutationID+"\n"); + } + if (cvAleph){ + switch (kn) { + case 1: + aneg++; + Files.appendFile(split1n, "deleterious(id"+mutationID+").\n"); + if (aneg == neps) {aneg = 0; kn++;} + break; + case 2: + aneg++; + Files.appendFile(split2n, "deleterious(id"+mutationID+").\n"); + if (aneg == neps) {aneg = 0; kn++;} + break; + case 3: + aneg++; + Files.appendFile(split3n, "deleterious(id"+mutationID+").\n"); + if (aneg == neps) {aneg = 0; kn++;} + break; + case 4: + aneg++; + Files.appendFile(split4n, "deleterious(id"+mutationID+").\n"); + if (aneg == neps) {aneg = 0; kn++;} + break; + case 5: + aneg++; + Files.appendFile(split5n, "deleterious(id"+mutationID+").\n"); + if (aneg == neps) {aneg = 0; kn++;} + break; + case 6: + aneg++; + Files.appendFile(split6n, "deleterious(id"+mutationID+").\n"); + if (aneg == neps) {aneg = 0; kn++;} + break; + case 7: + aneg++; + Files.appendFile(split7n, "deleterious(id"+mutationID+").\n"); + if (aneg == neps) {aneg = 0; kn++;} + break; + case 8: + aneg++; + Files.appendFile(split8n, "deleterious(id"+mutationID+").\n"); + if (aneg == neps) {aneg = 0; kn++;} + break; + case 9: + aneg++; + Files.appendFile(split9n, "deleterious(id"+mutationID+").\n"); + if (aneg == neps) {aneg = 0; kn++;} + break; + case 10: + aneg++; + Files.appendFile(split10n, "deleterious(id"+mutationID+").\n"); +// if (aneg == neps) {aneg = 0; kn++;} + break; +// case 11: // without comment its round negExamples / 10 +// break; + } + } + + neg_count++; + } + if ((!pt.toLowerCase().contains("polymorphism"))&& ( pos_count<=posEx)) { + if (writeAlephFiles) { + Files.appendFile(posFile, "deleterious(id"+mutationID+").\n"); + } + if (writeYYFiles) { + Files.appendFile(yyposFile, "http://example.com/mutation/mutation#mutation"+mutationID+"\n"); + } + if (cvAleph){ + switch (kp) { + case 1: + apos++; + Files.appendFile(split1f, "deleterious(id"+mutationID+").\n"); + if (apos == peps) {apos = 0; kp++;} + break; + case 2: + apos++; + Files.appendFile(split2f, "deleterious(id"+mutationID+").\n"); + if (apos == peps) {apos = 0; kp++;} + break; + case 3: + apos++; + Files.appendFile(split3f, "deleterious(id"+mutationID+").\n"); + if (apos == peps) {apos = 0; kp++;} + break; + case 4: + apos++; + Files.appendFile(split4f, "deleterious(id"+mutationID+").\n"); + if (apos == peps) {apos = 0; kp++;} + break; + case 5: + apos++; + Files.appendFile(split5f, "deleterious(id"+mutationID+").\n"); + if (apos == peps) {apos = 0; kp++;} + break; + case 6: + apos++; + Files.appendFile(split6f, "deleterious(id"+mutationID+").\n"); + if (apos == peps) {apos = 0; kp++;} + break; + case 7: + apos++; + Files.appendFile(split7f, "deleterious(id"+mutationID+").\n"); + if (apos == peps) {apos = 0; kp++;} + break; + case 8: + apos++; + Files.appendFile(split8f, "deleterious(id"+mutationID+").\n"); + if (apos == peps) {apos = 0; kp++;} + break; + case 9: + apos++; + Files.appendFile(split9f, "deleterious(id"+mutationID+").\n"); + if (apos == peps) {apos = 0; kp++;} + break; + case 10: + apos++; + Files.appendFile(split10f, "deleterious(id"+mutationID+").\n"); +// if (apos == peps) {apos = 0; kp++;} + break; +// case 11: // without comments its round to posExamples / 10 +// break; + } + } + + + pos_count++; + } + + if ((pt.toLowerCase().contains("polymorphism"))&&( neg_count > negEx )) { + continue; + } + if ((!pt.toLowerCase().contains("polymorphism"))&& ( pos_count > posEx)) { + continue; + } + + + // size change is represented via 3 classes + String modifSize = rs.getString("modif_size"); + convertThreeValuedColumn(kb, mutationInd, modifSize, protSizeIncClass, protSizeUnchangedClass, protSizeDecClass); + + // charge is done via 4 classes + String modifCharge = rs.getString("modif_charge"); + if(modifCharge.equals("+")) { + kb.addAxiom(new ClassAssertionAxiom(protChargeIncClass, mutationInd)); + } else if(modifCharge.equals("=")) { + kb.addAxiom(new ClassAssertionAxiom(protChargeUnchangedClass, mutationInd)); + } else if(modifCharge.equals("-")) { + kb.addAxiom(new ClassAssertionAxiom(protChargeDecClass, mutationInd)); + } else if(modifCharge.equals("!=")) { + kb.addAxiom(new ClassAssertionAxiom(protChargeChangedClass, mutationInd)); + } + + // hydro... + String modifHydro = rs.getString("modif_hydrophobicity"); + convertThreeValuedColumn(kb, mutationInd, modifHydro, protHydroIncClass, protHydroUnchangedClass, protHydroDecClass); + + // polarity + String modifPolarity = rs.getString("modif_polarity"); + convertThreeValuedColumn(kb, mutationInd, modifPolarity, protPolIncClass, protPolUnchangedClass, protPolDecClass); + + // modif_score + double modifScore = rs.getDouble("modif_score"); + kb.addAxiom(new DoubleDatatypePropertyAssertion(scoreProp, mutationInd, modifScore)); + + // g_p + String gp = rs.getString("g_p"); + convertThreeValuedColumn(kb, mutationInd, gp, gpIncClass, gpUnchangedClass, gpDecClass); + + // modif_score + double conservationWT = rs.getDouble("conservation_wt"); + kb.addAxiom(new DoubleDatatypePropertyAssertion(conservationWTProp, mutationInd, conservationWT)); + + // modif_score + double conservationMut = rs.getDouble("conservation_mut"); + kb.addAxiom(new DoubleDatatypePropertyAssertion(conservationMutProp, mutationInd, conservationMut)); + + // freq_at_pos + double freqAtPos = rs.getDouble("freq_at_pos"); + kb.addAxiom(new DoubleDatatypePropertyAssertion(freqAtPosProp, mutationInd, freqAtPos)); + + // freq_at_pos + double cluster5ResSize = rs.getDouble("cluster_5res_size"); + kb.addAxiom(new DoubleDatatypePropertyAssertion(cluster5ResSizeProp, mutationInd, cluster5ResSize)); + + // secondary struc + String secStruc = rs.getString("secondary_struc"); + if(secStruc.equals("HELIX")) { + kb.addAxiom(new ClassAssertionAxiom(scHelixClass, mutationInd)); + } else if(secStruc.equals("SHEET")) { + kb.addAxiom(new ClassAssertionAxiom(scSheetClass, mutationInd)); + } else if(secStruc.equals("0")) { + kb.addAxiom(new ClassAssertionAxiom(scUndeterminedClass, mutationInd)); + } + + // TODO: Wert null soll hier auch vorkommen, aber existiert in der DB nicht. + // gain_contact + double gainContact = rs.getDouble("gain_contact"); + kb.addAxiom(new DoubleDatatypePropertyAssertion(gainContactProp, mutationInd, gainContact)); + + // lost_contact + double lostContact = rs.getDouble("lost_contact"); + kb.addAxiom(new DoubleDatatypePropertyAssertion(lostContactProp, mutationInd, lostContact)); + + // identical_contact + double identicalContact = rs.getDouble("identical_contact"); + kb.addAxiom(new DoubleDatatypePropertyAssertion(identicalContactProp, mutationInd, identicalContact)); + + // gain_n1_contact + double gainN1Contact = rs.getDouble("gain_n1_contact"); + kb.addAxiom(new DoubleDatatypePropertyAssertion(gainN1ContactProp, mutationInd, gainN1Contact)); + + // lost_n1_contact + double lostN1Contact = rs.getDouble("lost_n1_contact"); + kb.addAxiom(new DoubleDatatypePropertyAssertion(lostN1ContactProp, mutationInd, lostN1Contact)); + + // identical_n1_contact + double identicalN1Contact = rs.getDouble("identical_n1_contact"); + kb.addAxiom(new DoubleDatatypePropertyAssertion(identicalN1ContactProp, mutationInd, identicalN1Contact)); + + // TODO Vorsicht bei 0-Werten in den weitern Feldern (klaeren, ob in dem + // Fall gar nichts geschrieben werden soll) + + // wt_accessibility + double wtAccessibility = rs.getDouble("wt_accessibility"); + kb.addAxiom(new DoubleDatatypePropertyAssertion(wtAccessibilityProp, mutationInd, wtAccessibility)); + + // mut_accessibility + double mutAccessibility = rs.getDouble("mut_accessibility"); + kb.addAxiom(new DoubleDatatypePropertyAssertion(mutAccessibilityProp, mutationInd, mutAccessibility)); + + // cluster3d_10 + double cluster3D10 = rs.getDouble("cluster3d_10"); + kb.addAxiom(new DoubleDatatypePropertyAssertion(cluster3D10Prop, mutationInd, cluster3D10)); + + // cluster3d_20 + double cluster3D20 = rs.getDouble("cluster3d_20"); + kb.addAxiom(new DoubleDatatypePropertyAssertion(cluster3D20Prop, mutationInd, cluster3D20)); + + // cluster3d_30 + double cluster3D30 = rs.getDouble("cluster3d_30"); + kb.addAxiom(new DoubleDatatypePropertyAssertion(cluster3D30Prop, mutationInd, cluster3D30)); + + // TODO: stability missing + + // reliability_deltag + double reliabilityDeltag = rs.getDouble("reliability_deltag"); + kb.addAxiom(new DoubleDatatypePropertyAssertion(reliabilityDeltagProp, mutationInd, reliabilityDeltag)); + + // generate a class with all positive examples (optional) + if(generatePosExampleClass) { + String phenotype = rs.getString("phenotype"); + + + if(!phenotype.toLowerCase().contains("polymorphism")) { + kb.addAxiom(new ClassAssertionAxiom(deleteriousMutationClass, mutationInd)); + } + + } + +// String pt = rs.getString("phenotype"); +// if (pt.toLowerCase().contains("polymorphism")) { neg_count++; } +// if (!pt.toLowerCase().contains("polymorphism")) { pos_count++; } + + + count++; + } + + // writing generated knowledge base + System.out.print("Writing OWL file ... "); + long startWriteTime = System.nanoTime(); + OWLAPIReasoner.exportKBToOWL(owlFile, kb, ontologyURI); + long writeDuration = System.nanoTime() - startWriteTime; + System.out.println("OK (entities: " + count + "; time: " + Helper.prettyPrintNanoSeconds(writeDuration) + "; file size: " + owlFile.length()/1024 + " KB)."); + + + + // selecting examples + // -> only a fraction of examples are selected as positive/negative + if(pgSQL) { + rs = stmt.executeQuery("SELECT * FROM fiche_mutant, mutants WHERE fiche_mutant.id=mutants.id AND " //lower(phenotype) not like 'polymorphism' AND " + + " (gain_contact is not null)"); // AND (gain_contact != 0)"); + } else { + rs = stmt.executeQuery("SELECT * FROM " + table + " WHERE " //lower(phenotype) not like 'polymorphism' AND " + + " (gain_contact is not null) AND (gain_contact != 0)"); + } + List<Individual> posExamples = new LinkedList<Individual>(); + List<Individual> negExamples = new LinkedList<Individual>(); + +count = 1; +pos_count = 0; +neg_count = 0; + + + + while((rs.next()) && (pos_count < posEx) || (neg_count < negEx)) { + int mutationID = rs.getInt("id"); + String phenotype = rs.getString("phenotype"); +// if(phenotype.toLowerCase().contains("polymorphism")) { +// negExamples.add(new Individual(getURI("mutation" + mutationID))); neg_count++; +// } else { +// posExamples.add(new Individual(getURI("mutation" + mutationID))); pos_count++; +// } + + if((phenotype.toLowerCase().contains("polymorphism")) && (neg_count < negEx)) { + negExamples.add(new Individual(getURI("mutation" + mutationID))); neg_count++; + } + if((!phenotype.toLowerCase().contains("polymorphism")) && (pos_count < posEx)) { + posExamples.add(new Individual(getURI("mutation" + mutationID))); pos_count++; + } + + +count++; + } + + // writing conf file + Files.clearFile(confFile); + String confHeader = "import(\"" + owlFile.getName() + "\");\n\n"; + confHeader += "reasoner = fastInstanceChecker;\n"; + + if (algorithmus == 1) { + confHeader += "problem = posNegLPStandard;\n"; + confHeader += "posNegLPStandard.useApproximations = true;\n"; + confHeader += "posNegLPStandard.accuracyMethod = \"fmeasure\";\n"; + confHeader += "posNegLPStandard.approxAccuracy = 0.03;\n"; + confHeader += "refexamples.noisePercentage = 15;\n"; + confHeader += "refexamples.startClass = \"" + getURI("Mutation") + "\";\n"; + confHeader += "refexamples.writeSearchTree = false;\n"; + confHeader += "refexamples.searchTreeFile = \"log/mutation/searchTree.log\";\n"; + + confHeader += "\n"; + } + + if (algorithmus == 2) + { + confHeader += "problem = classLearning;\n"; + confHeader += "classLearning.classToDescribe = \"" + deleteriousMutationClass + "\";\n"; + confHeader += "classLearning.accuracyMethod = \"fmeasure\";\n"; + confHeader += "classLearning.approxAccuracy = 0.03;\n"; + confHeader += "algorithm = celoe;\n"; + confHeader += "celoe.maxExecutionTimeInSeconds = 10;\n"; + confHeader += "celoe.noisePercentage = 10;\n"; + confHeader += "celoe.singleSuggestionMode = true;\n"; + confHeader += "celoe.useNegation = true;\n"; + + confHeader += "\n"; + } + + Files.appendFile(confFile, confHeader); + if(!generatePosExampleClass) { + MonogenicDiseases.appendPosExamples(confFile, posExamples); + MonogenicDiseases.appendNegExamples(confFile, negExamples); + } + + long runTime = System.nanoTime() - startTime; + System.out.println("Conf file written with " + posExamples.size() + " positive and " + negExamples.size() + " negative examples."); + System.out.println("Database successfully converted in " + Helper.prettyPrintNanoSeconds(runTime) + "."); + + if (writeAlephFiles) System.out.println("Added Aleph Files."); + if (writeYYFiles) System.out.println("Added YinYang Files."); + if (cvAleph) System.out.println("Added Aleph Split Filles for 10-Fold CrossValidation."); + + } + + // a table column with values "+", "=", "-" is converted to subclasses + private static void convertThreeValuedColumn(KB kb, Individual mutationInd, String value, NamedClass plusClass, NamedClass equalClass, NamedClass minusClass) { + if(value.equals("+")) { + kb.addAxiom(new ClassAssertionAxiom(plusClass, mutationInd)); + } else if(value.equals("=")) { + kb.addAxiom(new ClassAssertionAxiom(equalClass, mutationInd)); + } else if(value.equals("-")) { + kb.addAxiom(new ClassAssertionAxiom(minusClass, mutationInd)); + } + } + + private static String getURI(String name) { + return ontologyURI + "#" + name; + } + + public static void appendPosExamples(File file, List<Individual> examples) { + StringBuffer content = new StringBuffer(); + for(Individual example : examples) { + if(learnMutation) + content.append("+\""+example.toString()+"\"\n"); + else + content.append("-\""+example.toString()+"\"\n"); + } + Files.appendFile(file, content.toString()); + } + + public static void appendNegExamples(File file, List<Individual> examples) { + StringBuffer content = new StringBuffer(); + for(Individual example : examples) { + if(learnMutation) + content.append("-\""+example.toString()+"\"\n"); + else + content.append("+\""+example.toString()+"\"\n"); + } + Files.appendFile(file, content.toString()); + } +} Copied: trunk/scripts/src/main/java/org/dllearner/examples/Script.java (from rev 2356, trunk/components-core/src/main/java/org/dllearner/examples/flags/Script.java) =================================================================== --- trunk/scripts/src/main/java/org/dllearner/examples/Script.java (rev 0) +++ trunk/scripts/src/main/java/org/dllearner/examples/Script.java 2010-10-08 13:04:14 UTC (rev 2357) @@ -0,0 +1,739 @@ +/** + * + */ +package org.dllearner.examples.flags; + +import org.dllearner.core.OntologyFormat; +import org.dllearner.core.owl.BooleanDatatypePropertyAssertion; +import org.dllearner.core.owl.ClassAssertionAxiom; +import org.dllearner.core.owl.Datatype; +import org.dllearner.core.owl.DatatypeProperty; +import org.dllearner.core.owl.DatatypePropertyDomainAxiom; +import org.dllearner.core.owl.DatatypePropertyRangeAxiom; +import org.dllearner.core.owl.DoubleDatatypePropertyAssertion; +import org.dllearner.core.owl.Individual; +import org.dllearner.core.owl.KB; +import org.dllearner.core.owl.NamedClass; +import org.dllearner.core.owl.ObjectProperty; +import org.dllearner.core.owl.ObjectPropertyAssertion; +import org.dllearner.core.owl.ObjectPropertyDomainAxiom; +import org.dllearner.core.owl.ObjectPropertyRangeAxiom; +import org.dllearner.core.owl.StringDatatypePropertyAssertion; +import org.semanticweb.owlapi.model.*; + + +import java.io.BufferedReader; +import java.io.File; +import java.io.FileNotFoundException; +import java.io.FileReader; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; + +/** + * @author flo + * + */ +public class Script { + + private static final String flagDataPath = "C:/temp/Uni/Semantic Web Praktikum 10/flag.data"; + //private static final String flagNamesPath = "D:/Dokumente/Uni/Semantic Web Praktikum 10/flag.names"; + private static final String kbOutputPath = "D:/Dokumente/develop/java/eclipseWorkspace/DL-Learner/examples/flags/flag.owl"; + private static final String dataSeparator = ","; + //private static String ontoIri = "http://www.semanticweb.org/owlapi/ontologies/uniLpz/semWeb"; + + /*private static final String ontoFlagClassName = "Flag"; + private static final String ontoCountryClassName = "Country"; + private static String ontoLandmassClassName = "Landmass"; + private static String ontoHemisphereClassName = "Hemisphere"; + private static String ontoLanguageClassName = "Language"; + private static String ontoLanguageGroupClassName = "LanguageGroup"; + private static String ontoReligionClassName = "Religion"; + private static String ontoReligionGroupClassName = "ReligionGroup"; + private static String ontoColorClassName = "Color";*/ + private static final String ontoFlagClassName = "Flag"; + private static final String ontoCountryClassName = ""; + private static String ontoLandmassClassName = ""; + private static String ontoHemisphereClassName = ""; + private static String ontoLanguageClassName = ""; + private static String ontoLanguageGroupClassName = ""; + private static String ontoReligionClassName = ""; + private static String ontoReligionGroupClassName = ""; + private static String ontoColorClassName = ""; + + private static final String iriSeperator = "#"; + + //private static OWLOntologyManager manager = OWLManager.createOWLOntologyManager(); + //private static OWLDataFactory factory = manager.getOWLDataFactory(); + + //OWLClass flagClass = factory.getOWLClass(IRI.create(ontoIri + iriSeperator + ontoFlagClassName)); + + private static final KB kb = new KB(); + private static ArrayList<Individual> flags = new ArrayList<Individual>(); + private static ArrayList<Individual> countries = new ArrayList<Individual>(); + + + /*private static NamedClass Flag = new NamedClass(getIRI(onto... [truncated message content] |