You can subscribe to this list here.
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(120) |
Sep
(36) |
Oct
(116) |
Nov
(17) |
Dec
(44) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
(143) |
Feb
(192) |
Mar
(74) |
Apr
(84) |
May
(105) |
Jun
(64) |
Jul
(49) |
Aug
(120) |
Sep
(159) |
Oct
(156) |
Nov
(51) |
Dec
(28) |
2009 |
Jan
(17) |
Feb
(55) |
Mar
(33) |
Apr
(57) |
May
(54) |
Jun
(28) |
Jul
(6) |
Aug
(16) |
Sep
(38) |
Oct
(30) |
Nov
(26) |
Dec
(52) |
2010 |
Jan
(7) |
Feb
(91) |
Mar
(65) |
Apr
(2) |
May
(14) |
Jun
(25) |
Jul
(38) |
Aug
(48) |
Sep
(80) |
Oct
(70) |
Nov
(75) |
Dec
(77) |
2011 |
Jan
(68) |
Feb
(53) |
Mar
(51) |
Apr
(35) |
May
(65) |
Jun
(101) |
Jul
(29) |
Aug
(230) |
Sep
(95) |
Oct
(49) |
Nov
(110) |
Dec
(63) |
2012 |
Jan
(41) |
Feb
(42) |
Mar
(25) |
Apr
(46) |
May
(51) |
Jun
(44) |
Jul
(45) |
Aug
(29) |
Sep
(12) |
Oct
(9) |
Nov
(17) |
Dec
(2) |
2013 |
Jan
(12) |
Feb
(14) |
Mar
(7) |
Apr
(16) |
May
(54) |
Jun
(27) |
Jul
(11) |
Aug
(5) |
Sep
(85) |
Oct
(27) |
Nov
(37) |
Dec
(32) |
2014 |
Jan
(8) |
Feb
(29) |
Mar
(5) |
Apr
(3) |
May
(22) |
Jun
(3) |
Jul
(4) |
Aug
(3) |
Sep
|
Oct
|
Nov
|
Dec
|
From: <lor...@us...> - 2012-01-26 13:43:24
|
Revision: 3557 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=3557&view=rev Author: lorenz_b Date: 2012-01-26 13:43:13 +0000 (Thu, 26 Jan 2012) Log Message: ----------- Added constructor to give some basic datastructures as arguments. Modified Paths: -------------- trunk/components-core/src/main/java/org/dllearner/reasoning/FastInstanceChecker.java Modified: trunk/components-core/src/main/java/org/dllearner/reasoning/FastInstanceChecker.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/reasoning/FastInstanceChecker.java 2012-01-25 13:31:24 UTC (rev 3556) +++ trunk/components-core/src/main/java/org/dllearner/reasoning/FastInstanceChecker.java 2012-01-26 13:43:13 UTC (rev 3557) @@ -20,6 +20,7 @@ package org.dllearner.reasoning; import java.io.File; +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; @@ -143,7 +144,65 @@ public FastInstanceChecker() { } - public FastInstanceChecker(Set<AbstractKnowledgeSource> sources) { + public FastInstanceChecker(TreeSet<Individual> individuals, + Map<NamedClass, TreeSet<Individual>> classInstancesPos, + Map<ObjectProperty, Map<Individual, SortedSet<Individual>>> opPos, + Map<DatatypeProperty, Map<Individual, SortedSet<Integer>>> id, + Map<DatatypeProperty, TreeSet<Individual>> bdPos, + Map<DatatypeProperty, TreeSet<Individual>> bdNeg, + AbstractKnowledgeSource... sources) { + super(new HashSet<AbstractKnowledgeSource>(Arrays.asList(sources))); + this.individuals = individuals; + this.classInstancesPos = classInstancesPos; + this.opPos = opPos; + this.id = id; + this.bdPos = bdPos; + this.bdNeg = bdNeg; + + if(rc == null){ + rc = new OWLAPIReasoner(new HashSet<AbstractKnowledgeSource>(Arrays.asList(sources))); + try { + rc.init(); + } catch (ComponentInitException e) { + e.printStackTrace(); + } + } + + atomicConcepts = rc.getNamedClasses(); + datatypeProperties = rc.getDatatypeProperties(); + booleanDatatypeProperties = rc.getBooleanDatatypeProperties(); + doubleDatatypeProperties = rc.getDoubleDatatypeProperties(); + intDatatypeProperties = rc.getIntDatatypeProperties(); + stringDatatypeProperties = rc.getStringDatatypeProperties(); + atomicRoles = rc.getObjectProperties(); + + for (NamedClass atomicConcept : rc.getNamedClasses()) { + TreeSet<Individual> pos = classInstancesPos.get(atomicConcept); + if(pos != null){ + classInstancesNeg.put(atomicConcept, (TreeSet<Individual>) Helper.difference(individuals, pos)); + } else { + classInstancesPos.put(atomicConcept, new TreeSet<Individual>()); + classInstancesNeg.put(atomicConcept, individuals); + } + } + for(ObjectProperty p : atomicRoles){ + if(opPos.get(p) == null){ + opPos.put(p, new HashMap<Individual, SortedSet<Individual>>()); + } + } + + for (DatatypeProperty dp : booleanDatatypeProperties) { + if(bdPos.get(dp) == null){ + bdPos.put(dp, new TreeSet<Individual>()); + } + if(bdNeg.get(dp) == null){ + bdNeg.put(dp, new TreeSet<Individual>()); + } + + } + } + + public FastInstanceChecker(Set<AbstractKnowledgeSource> sources) { super(sources); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lor...@us...> - 2012-01-25 13:31:31
|
Revision: 3556 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=3556&view=rev Author: lorenz_b Date: 2012-01-25 13:31:24 +0000 (Wed, 25 Jan 2012) Log Message: ----------- Small improvements. Modified Paths: -------------- trunk/components-core/src/main/java/org/dllearner/algorithms/properties/DisjointDataPropertyAxiomLearner.java trunk/components-core/src/main/java/org/dllearner/algorithms/properties/DisjointObjectPropertyAxiomLearner.java trunk/components-core/src/main/java/org/dllearner/algorithms/properties/EquivalentDataPropertyAxiomLearner.java trunk/components-core/src/main/java/org/dllearner/algorithms/properties/EquivalentObjectPropertyAxiomLearner.java trunk/components-core/src/main/java/org/dllearner/utilities/CoherentOntologyExtractor.java trunk/components-core/src/main/java/org/dllearner/utilities/JustificationBasedCoherentOntologyExtractor.java Modified: trunk/components-core/src/main/java/org/dllearner/algorithms/properties/DisjointDataPropertyAxiomLearner.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/algorithms/properties/DisjointDataPropertyAxiomLearner.java 2012-01-20 02:53:33 UTC (rev 3555) +++ trunk/components-core/src/main/java/org/dllearner/algorithms/properties/DisjointDataPropertyAxiomLearner.java 2012-01-25 13:31:24 UTC (rev 3556) @@ -154,6 +154,8 @@ oldCnt = result.get(prop); if(oldCnt == null){ oldCnt = Integer.valueOf(newCnt); + } else { + oldCnt += newCnt; } result.put(prop, oldCnt); repeat = true; Modified: trunk/components-core/src/main/java/org/dllearner/algorithms/properties/DisjointObjectPropertyAxiomLearner.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/algorithms/properties/DisjointObjectPropertyAxiomLearner.java 2012-01-20 02:53:33 UTC (rev 3555) +++ trunk/components-core/src/main/java/org/dllearner/algorithms/properties/DisjointObjectPropertyAxiomLearner.java 2012-01-25 13:31:24 UTC (rev 3556) @@ -161,14 +161,15 @@ oldCnt = result.get(prop); if(oldCnt == null){ oldCnt = Integer.valueOf(newCnt); + } else { + oldCnt += newCnt; } result.put(prop, oldCnt); - qs.getLiteral("count").getInt(); repeat = true; } if(!result.isEmpty()){ currentlyBestAxioms = buildAxioms(result, allObjectProperties); - offset += 1000; + offset += limit; } } @@ -185,7 +186,7 @@ EvaluatedAxiom evalAxiom; //first create disjoint axioms with properties which not occur and give score of 1 - for(ObjectProperty p : completeDisjointProperties){ + for(ObjectProperty p : completeDisjointProperties){System.out.println(p); if(usePropertyPopularity){ int popularity = reasoner.getPropertyCount(p); //skip if property is not used in kb @@ -217,10 +218,10 @@ public static void main(String[] args) throws Exception{ DisjointObjectPropertyAxiomLearner l = new DisjointObjectPropertyAxiomLearner(new SparqlEndpointKS(new SparqlEndpoint( new URL("http://dbpedia.aksw.org:8902/sparql"), Collections.singletonList("http://dbpedia.org"), Collections.<String>emptyList())));//.getEndpointDBpediaLiveAKSW())); - l.setPropertyToDescribe(new ObjectProperty("http://dbpedia.org/ontology/engineType")); + l.setPropertyToDescribe(new ObjectProperty("http://dbpedia.org/ontology/state")); l.setMaxExecutionTimeInSeconds(10); l.init(); l.start(); - System.out.println(l.getCurrentlyBestEvaluatedAxioms(5)); + System.out.println(l.getCurrentlyBestEvaluatedAxioms(Integer.MAX_VALUE)); } } Modified: trunk/components-core/src/main/java/org/dllearner/algorithms/properties/EquivalentDataPropertyAxiomLearner.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/algorithms/properties/EquivalentDataPropertyAxiomLearner.java 2012-01-20 02:53:33 UTC (rev 3555) +++ trunk/components-core/src/main/java/org/dllearner/algorithms/properties/EquivalentDataPropertyAxiomLearner.java 2012-01-25 13:31:24 UTC (rev 3556) @@ -145,8 +145,10 @@ prop = new DatatypeProperty(qs.getResource("p").getURI()); int newCnt = qs.getLiteral("count").getInt(); oldCnt = result.get(prop); - if (oldCnt == null) { + if(oldCnt == null){ oldCnt = Integer.valueOf(newCnt); + } else { + oldCnt += newCnt; } result.put(prop, oldCnt); qs.getLiteral("count").getInt(); Modified: trunk/components-core/src/main/java/org/dllearner/algorithms/properties/EquivalentObjectPropertyAxiomLearner.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/algorithms/properties/EquivalentObjectPropertyAxiomLearner.java 2012-01-20 02:53:33 UTC (rev 3555) +++ trunk/components-core/src/main/java/org/dllearner/algorithms/properties/EquivalentObjectPropertyAxiomLearner.java 2012-01-25 13:31:24 UTC (rev 3556) @@ -151,9 +151,10 @@ oldCnt = result.get(prop); if(oldCnt == null){ oldCnt = Integer.valueOf(newCnt); + } else { + oldCnt += newCnt; } result.put(prop, oldCnt); - qs.getLiteral("count").getInt(); repeat = true; } if(!result.isEmpty()){ Modified: trunk/components-core/src/main/java/org/dllearner/utilities/CoherentOntologyExtractor.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/utilities/CoherentOntologyExtractor.java 2012-01-20 02:53:33 UTC (rev 3555) +++ trunk/components-core/src/main/java/org/dllearner/utilities/CoherentOntologyExtractor.java 2012-01-25 13:31:24 UTC (rev 3556) @@ -5,5 +5,7 @@ public interface CoherentOntologyExtractor { OWLOntology getCoherentOntology(OWLOntology incoherentOntology); + + OWLOntology getCoherentOntology(OWLOntology ontology, boolean preferRoots); } Modified: trunk/components-core/src/main/java/org/dllearner/utilities/JustificationBasedCoherentOntologyExtractor.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/utilities/JustificationBasedCoherentOntologyExtractor.java 2012-01-20 02:53:33 UTC (rev 3555) +++ trunk/components-core/src/main/java/org/dllearner/utilities/JustificationBasedCoherentOntologyExtractor.java 2012-01-25 13:31:24 UTC (rev 3556) @@ -4,6 +4,8 @@ import java.io.File; import java.io.FileNotFoundException; import java.io.FileOutputStream; +import java.security.MessageDigest; +import java.security.NoSuchAlgorithmException; import java.util.Collections; import java.util.HashMap; import java.util.Iterator; @@ -14,12 +16,17 @@ import java.util.logging.Level; import java.util.logging.Logger; +import openlink.util.MD5; + import org.mindswap.pellet.RBox; +import org.semanticweb.HermiT.Configuration; +import org.semanticweb.HermiT.Reasoner; import org.semanticweb.owlapi.apibinding.OWLManager; import org.semanticweb.owlapi.io.RDFXMLOntologyFormat; import org.semanticweb.owlapi.model.AxiomType; import org.semanticweb.owlapi.model.OWLAxiom; import org.semanticweb.owlapi.model.OWLClass; +import org.semanticweb.owlapi.model.OWLDataFactory; import org.semanticweb.owlapi.model.OWLEntity; import org.semanticweb.owlapi.model.OWLLogicalAxiom; import org.semanticweb.owlapi.model.OWLOntology; @@ -27,11 +34,17 @@ import org.semanticweb.owlapi.model.OWLOntologyManager; import org.semanticweb.owlapi.model.OWLOntologyStorageException; import org.semanticweb.owlapi.model.RemoveAxiom; +import org.semanticweb.owlapi.reasoner.IllegalConfigurationException; +import org.semanticweb.owlapi.reasoner.OWLReasoner; +import org.semanticweb.owlapi.reasoner.OWLReasonerConfiguration; +import org.semanticweb.owlapi.reasoner.OWLReasonerFactory; import uk.ac.manchester.cs.owlapi.modularity.ModuleType; import com.clarkparsia.modularity.IncrementalClassifier; import com.clarkparsia.modularity.ModularityUtils; +import com.clarkparsia.owlapi.explanation.BlackBoxExplanation; +import com.clarkparsia.owlapi.explanation.HSTExplanationGenerator; import com.clarkparsia.owlapi.explanation.PelletExplanation; import com.clarkparsia.owlapiv3.OntologyUtils; @@ -39,35 +52,72 @@ private static final org.apache.log4j.Logger logger = org.apache.log4j.Logger.getLogger(JustificationBasedCoherentOntologyExtractor.class); - private static final int NUMBER_OF_JUSTIFICATIONS = 5; + private int numberOfJustifications = 10; // private PelletReasoner reasoner; private IncrementalClassifier reasoner; + private Reasoner hermitReasoner; private OWLOntology incoherentOntology; private OWLOntology ontology; + private OWLDataFactory factory; private Map<OWLClass, OWLOntology> cls2ModuleMap = new HashMap<OWLClass, OWLOntology>(); + private OWLOntologyManager manager = OWLManager.createOWLOntologyManager(); + MessageDigest md5; + + public JustificationBasedCoherentOntologyExtractor() { + try { + md5 = MessageDigest.getInstance("MD5"); + } catch (NoSuchAlgorithmException e) { + e.printStackTrace(); + } + } + static {PelletExplanation.setup();} @Override - public OWLOntology getCoherentOntology(OWLOntology ontology) { - this.ontology = ontology;ontology.getOWLOntologyManager().removeAxioms(ontology, ontology.getAxioms(AxiomType.TRANSITIVE_OBJECT_PROPERTY)); + public OWLOntology getCoherentOntology(OWLOntology ontology){ + return getCoherentOntology(ontology, false); + } + + @Override + public OWLOntology getCoherentOntology(OWLOntology ontology, boolean preferRoots){ + if(preferRoots){ + return computeCoherentOntologyRootBased(ontology); + } else { + return computeCoherentOntology(ontology); + } + } + + private OWLOntology computeCoherentOntologyRootBased(OWLOntology ontology) { + this.ontology = ontology; this.incoherentOntology = getOntologyWithoutAnnotations(ontology); -// reasoner = PelletReasonerFactory.getInstance().createNonBufferingReasoner(incoherentOntology); -// reasoner.precomputeInferences(InferenceType.CLASS_HIERARCHY); + //only for debugging + ontology.getOWLOntologyManager().removeAxioms(ontology, ontology.getAxioms(AxiomType.TRANSITIVE_OBJECT_PROPERTY)); + + long startTime = System.currentTimeMillis(); reasoner = new IncrementalClassifier(incoherentOntology); reasoner.classify(); + logger.info("...done in " + (System.currentTimeMillis()-startTime) + "ms."); +// startTime = System.currentTimeMillis(); +// hermitReasoner = new Reasoner(incoherentOntology); +// hermitReasoner.classifyClasses(); +// logger.info("...done in " + (System.currentTimeMillis()-startTime) + "ms."); + OWLOntologyManager man = incoherentOntology.getOWLOntologyManager(); + factory = man.getOWLDataFactory(); // man.addOntologyChangeListener(reasoner); //compute the unsatisfiable classes + logger.info("Computing root/derived unsatisfiable classes..."); + startTime = System.currentTimeMillis(); StructureBasedRootClassFinder rootFinder = new StructureBasedRootClassFinder(reasoner); - rootFinder.computeRootDerivedClasses(); Set<OWLClass> unsatClasses = rootFinder.getRootUnsatisfiableClasses(); Set<OWLClass> derivedUnsatClasses = rootFinder.getDerivedUnsatisfiableClasses(); + logger.info("...done in " + (System.currentTimeMillis()-startTime) + "ms."); int rootCnt = unsatClasses.size(); int derivedCnt = derivedUnsatClasses.size(); // Set<OWLClass> unsatClasses = reasoner.getUnsatisfiableClasses().getEntitiesMinusBottom(); @@ -80,13 +130,15 @@ } //compute the logical modules for each unsatisfiable class logger.info("Computing module for each unsatisfiable class..."); + startTime = System.currentTimeMillis(); cls2ModuleMap = extractModules(unsatClasses); - logger.info("...done."); + logger.info("...done in " + (System.currentTimeMillis()-startTime) + "ms."); //compute initial explanations for each unsatisfiable class logger.info("Computing initial explanations..."); + startTime = System.currentTimeMillis(); Map<OWLClass, Set<Set<OWLAxiom>>> cls2Explanations = getInitialExplanationsForUnsatClasses(unsatClasses); - logger.info("...done."); + logger.info("...done in " + (System.currentTimeMillis()-startTime) + "ms."); while(!unsatClasses.isEmpty()){ //get frequency for each axiom @@ -95,7 +147,7 @@ //get a sorted list of entries with the highest axiom count first List<Entry<OWLAxiom, Integer>> sortedEntries = MapUtils.sortByValues(axiom2CountMap); for(Entry<OWLAxiom, Integer> entry : sortedEntries){ - System.out.println(entry.getKey() + ":" + entry.getValue()); +// System.out.println(entry.getKey() + ":" + entry.getValue()); } //we remove the most frequent axiom from the ontology OWLAxiom toRemove = sortedEntries.get(0).getKey(); @@ -106,15 +158,22 @@ removeFromModules(toRemove); //recompute the unsatisfiable classes + logger.info("Reclassifying..."); + startTime = System.currentTimeMillis(); reasoner.classify(); +// hermitReasoner.classifyClasses(); // unsatClasses = reasoner.getUnsatisfiableClasses().getEntitiesMinusBottom(); + logger.info("...done in " + (System.currentTimeMillis()-startTime) + "ms."); + logger.info("Computing root/derived unsatisfiable classes..."); + startTime = System.currentTimeMillis(); rootFinder = new StructureBasedRootClassFinder(reasoner); - rootFinder.computeRootDerivedClasses(); unsatClasses = rootFinder.getRootUnsatisfiableClasses(); + derivedUnsatClasses = rootFinder.getDerivedUnsatisfiableClasses(); rootCnt = unsatClasses.size(); - derivedUnsatClasses = rootFinder.getDerivedUnsatisfiableClasses(); derivedCnt = derivedUnsatClasses.size(); + logger.info("...done in " + (System.currentTimeMillis()-startTime) + "ms."); + logger.info("Remaining unsatisfiable classes: " + (rootCnt + derivedCnt) + "(" + rootCnt + " roots)."); //save @@ -133,13 +192,14 @@ //recompute explanations if necessary logger.info("Recomputing explanations..."); + startTime = System.currentTimeMillis(); refillExplanations(unsatClasses, cls2Explanations); - logger.info("...done."); + logger.info("...done in " + (System.currentTimeMillis()-startTime) + "ms."); System.gc(); } try { - incoherentOntology.getOWLOntologyManager().saveOntology(incoherentOntology, new RDFXMLOntologyFormat(), new BufferedOutputStream(new FileOutputStream("log/dbpedia_coherent.owl"))); + incoherentOntology.getOWLOntologyManager().saveOntology(getOntologyWithAnnotations(incoherentOntology), new RDFXMLOntologyFormat(), new BufferedOutputStream(new FileOutputStream("log/dbpedia_coherent.owl"))); } catch (OWLOntologyStorageException e) { e.printStackTrace(); } catch (FileNotFoundException e) { @@ -150,6 +210,103 @@ return getOntologyWithAnnotations(incoherentOntology); } + private OWLOntology computeCoherentOntology(OWLOntology ontology) { + this.ontology = ontology; + this.incoherentOntology = getOntologyWithoutAnnotations(ontology); + + //only for debugging + ontology.getOWLOntologyManager().removeAxioms(ontology, ontology.getAxioms(AxiomType.TRANSITIVE_OBJECT_PROPERTY)); + + long startTime = System.currentTimeMillis(); + reasoner = new IncrementalClassifier(incoherentOntology); + reasoner.classify(); + logger.info("...done in " + (System.currentTimeMillis()-startTime) + "ms."); + + OWLOntologyManager man = incoherentOntology.getOWLOntologyManager(); + factory = man.getOWLDataFactory(); + + //compute the unsatisfiable classes + logger.info("Computing unsatisfiable classes..."); + startTime = System.currentTimeMillis(); + logger.info("...done in " + (System.currentTimeMillis()-startTime) + "ms."); + Set<OWLClass> unsatClasses = reasoner.getUnsatisfiableClasses().getEntitiesMinusBottom(); + int cnt = unsatClasses.size(); + logger.info("Detected " + cnt + " unsatisfiable classes."); + + //if the ontology is not incoherent we return it here + if(unsatClasses.isEmpty()){ + return incoherentOntology; + } + //compute the logical modules for each unsatisfiable class + logger.info("Computing module for each unsatisfiable class..."); + startTime = System.currentTimeMillis(); + cls2ModuleMap = extractModules(unsatClasses); + logger.info("...done in " + (System.currentTimeMillis()-startTime) + "ms."); + + //compute initial explanations for each unsatisfiable class + logger.info("Computing initial explanations..."); + startTime = System.currentTimeMillis(); + Map<OWLClass, Set<Set<OWLAxiom>>> cls2Explanations = getInitialExplanationsForUnsatClasses(unsatClasses); + logger.info("...done in " + (System.currentTimeMillis()-startTime) + "ms."); + + while(!unsatClasses.isEmpty()){ + //get frequency for each axiom + Map<OWLAxiom, Integer> axiom2CountMap = getAxiomFrequency(cls2Explanations); + + //get a sorted list of entries with the highest axiom count first + List<Entry<OWLAxiom, Integer>> sortedEntries = MapUtils.sortByValues(axiom2CountMap); + for(Entry<OWLAxiom, Integer> entry : sortedEntries){ +// System.out.println(entry.getKey() + ":" + entry.getValue()); + } + //we remove the most frequent axiom from the ontology + OWLAxiom toRemove = sortedEntries.get(0).getKey(); + logger.info("Removing axiom " + toRemove + "."); + man.removeAxiom(incoherentOntology, toRemove); + man.applyChange(new RemoveAxiom(incoherentOntology, toRemove)); + removeFromExplanations(cls2Explanations, toRemove); + removeFromModules(toRemove); + + //recompute the unsatisfiable classes + logger.info("Reclassifying..."); + startTime = System.currentTimeMillis(); + reasoner.classify(); + unsatClasses = reasoner.getUnsatisfiableClasses().getEntitiesMinusBottom(); + logger.info("...done in " + (System.currentTimeMillis()-startTime) + "ms."); + logger.info("Remaining unsatisfiable classes: " + unsatClasses.size()); + + //save + if(cnt - unsatClasses.size() >= 10){ + cnt = unsatClasses.size(); + OWLOntology toSave = getOntologyWithAnnotations(incoherentOntology); + try { + toSave.getOWLOntologyManager().saveOntology(incoherentOntology, new RDFXMLOntologyFormat(), new BufferedOutputStream(new FileOutputStream("log/dbpedia_" + cnt + ".owl"))); + } catch (OWLOntologyStorageException e) { + e.printStackTrace(); + } catch (FileNotFoundException e) { + e.printStackTrace(); + } + } + + //recompute explanations if necessary + logger.info("Recomputing explanations..."); + startTime = System.currentTimeMillis(); + refillExplanations(unsatClasses, cls2Explanations); + logger.info("...done in " + (System.currentTimeMillis()-startTime) + "ms."); + + System.gc(); + } + try { + incoherentOntology.getOWLOntologyManager().saveOntology(getOntologyWithAnnotations(incoherentOntology), new RDFXMLOntologyFormat(), new BufferedOutputStream(new FileOutputStream("log/dbpedia_coherent.owl"))); + } catch (OWLOntologyStorageException e) { + e.printStackTrace(); + } catch (FileNotFoundException e) { + e.printStackTrace(); + } + System.out.println(incoherentOntology.getLogicalAxiomCount()); + + return getOntologyWithAnnotations(incoherentOntology); + } + private void removeFromModules(OWLAxiom axiom){ OWLOntology module; for(Entry<OWLClass, OWLOntology> entry : cls2ModuleMap.entrySet()){ @@ -172,8 +329,8 @@ private void refillExplanations(Set<OWLClass> unsatClasses, Map<OWLClass, Set<Set<OWLAxiom>>> cls2Explanations){ for(OWLClass unsatClass : unsatClasses){ Set<Set<OWLAxiom>> precomputedExplanations = cls2Explanations.get(unsatClass); - if(precomputedExplanations == null || precomputedExplanations.size() < NUMBER_OF_JUSTIFICATIONS){ - Set<Set<OWLAxiom>> newExplanations = computeExplanations(unsatClass, NUMBER_OF_JUSTIFICATIONS); + if(precomputedExplanations == null || precomputedExplanations.size() < numberOfJustifications){ + Set<Set<OWLAxiom>> newExplanations = computeExplanations(unsatClass, numberOfJustifications); cls2Explanations.put(unsatClass, newExplanations); } } @@ -237,24 +394,65 @@ private Set<Set<OWLAxiom>> computeExplanations(OWLClass unsatClass){ PelletExplanation expGen = new PelletExplanation(getModule(unsatClass)); - return expGen.getUnsatisfiableExplanations(unsatClass, NUMBER_OF_JUSTIFICATIONS); + return expGen.getUnsatisfiableExplanations(unsatClass, numberOfJustifications); } private Set<Set<OWLAxiom>> computeExplanations(OWLClass unsatClass, int limit){ PelletExplanation expGen = new PelletExplanation(getModule(unsatClass)); - return expGen.getUnsatisfiableExplanations(unsatClass, NUMBER_OF_JUSTIFICATIONS); + return expGen.getUnsatisfiableExplanations(unsatClass, numberOfJustifications); } - private OWLOntology getModule(OWLClass cls){ + private Set<Set<OWLAxiom>> computeExplanationsBlackBox(OWLClass unsatClass, int limit){ + BlackBoxExplanation singleExpGen = new BlackBoxExplanation(incoherentOntology, new HermiTReasonerFactory(), hermitReasoner); + HSTExplanationGenerator expGen = new HSTExplanationGenerator(singleExpGen); + return expGen.getExplanations(unsatClass, limit); + } + +// private Set<Set<OWLAxiom>> computeExplanationsBlackbox(OWLClass unsatClass, int limit){ +// BlackBoxExplanation b = new BlackBoxExplanation(incoherentOntology, reasonerFactory, hermitReasoner) +// MultipleExplanationGenerator expGen = new HSTExplanationGenerator(b); +// PelletExplanation expGen = new PelletExplanation(getModule(unsatClass)); +// return expGen.getUnsatisfiableExplanations(unsatClass, NUMBER_OF_JUSTIFICATIONS); +// } + + private OWLOntology getModule(OWLClass cls){System.out.println(cls); OWLOntology module = cls2ModuleMap.get(cls); + new File("log").mkdir(); if(module == null){ - module = OntologyUtils.getOntologyFromAxioms( - ModularityUtils.extractModule(incoherentOntology, Collections.singleton((OWLEntity)cls), ModuleType.TOP_OF_BOT)); + md5.reset(); + md5.update((ontology.getOWLOntologyManager().getOntologyDocumentIRI(ontology).toString() + cls.toStringID()).getBytes()); + String hash = MD5.asHex(md5.digest()); + String filename = "log/" + hash + ".owl"; + File file = new File(filename); + if(file.exists()){ + module = loadModule(file); + } else { + module = OntologyUtils.getOntologyFromAxioms( + ModularityUtils.extractModule(incoherentOntology, Collections.singleton((OWLEntity)cls), ModuleType.TOP_OF_BOT)); + try { + manager.saveOntology(module, new RDFXMLOntologyFormat(), new BufferedOutputStream(new FileOutputStream(filename))); + } catch (OWLOntologyStorageException e) { + e.printStackTrace(); + } catch (FileNotFoundException e) { + e.printStackTrace(); + } + } + cls2ModuleMap.put(cls, module); } return module; } + private OWLOntology loadModule(File file){ + OWLOntology module = null; + try { + module = manager.loadOntologyFromOntologyDocument(file); + } catch (OWLOntologyCreationException e) { + e.printStackTrace(); + } + return module; + } + private Map<OWLClass, OWLOntology> extractModules(Set<OWLClass> classes){ Map<OWLClass, OWLOntology> cls2ModuleMap = new HashMap<OWLClass, OWLOntology>(); for(OWLClass cls : classes){ @@ -264,17 +462,81 @@ return cls2ModuleMap; } + public void setNumberOfJustifications(int numberOfJustifications) { + this.numberOfJustifications = numberOfJustifications; + } + public static void main(String[] args) throws Exception{ Logger.getLogger(RBox.class.getName()).setLevel(Level.OFF); OWLOntologyManager man = OWLManager.createOWLOntologyManager(); -// OWLOntology schema = man.loadOntologyFromOntologyDocument(new File("/home/lorenz/dbpedia_0.75_no_datapropaxioms.owl")); - OWLOntology schema = man.loadOntologyFromOntologyDocument(new File("log/dbpedia_95.owl")); + + if(args.length != 3){ + System.out.println("USAGE: JustificationBasedCoherentOntologyExtractor <incoherent.owl> <numberOfJustifcations> <preferRootClasses(true|false)>"); + System.exit(0); + } + String filename = args[0]; + int numberOfJustifications = Integer.parseInt(args[1]); + boolean preferRoots = Boolean.valueOf(args[2]); + + System.out.println("Loading ontology..."); + File file = new File(filename); + OWLOntology schema = man.loadOntologyFromOntologyDocument(file); + man.removeAxioms(schema, schema.getAxioms(AxiomType.TRANSITIVE_OBJECT_PROPERTY)); + +// OWLOntology cleaned = man.createOntology(IRI.create("http://dbpedia_cleaned.owl")); +// man.addAxioms(cleaned, schema.getLogicalAxioms()); +// man.removeAxioms(cleaned, cleaned.getAxioms(AxiomType.TRANSITIVE_OBJECT_PROPERTY)); +// man.removeAxioms(cleaned, cleaned.getAxioms(AxiomType.REFLEXIVE_OBJECT_PROPERTY)); +// man.removeAxioms(cleaned, cleaned.getAxioms(AxiomType.IRREFLEXIVE_OBJECT_PROPERTY)); +// man.removeAxioms(cleaned, cleaned.getAxioms(AxiomType.SYMMETRIC_OBJECT_PROPERTY)); +// man.removeAxioms(cleaned, cleaned.getAxioms(AxiomType.ASYMMETRIC_OBJECT_PROPERTY)); +// man.removeAxioms(cleaned, cleaned.getAxioms(AxiomType.FUNCTIONAL_OBJECT_PROPERTY)); +// man.removeAxioms(cleaned, cleaned.getAxioms(AxiomType.INVERSE_FUNCTIONAL_OBJECT_PROPERTY)); +// man.saveOntology(cleaned, new RDFXMLOntologyFormat(), new BufferedOutputStream(new FileOutputStream(file.getParent() + "/cleaned.owl"))); +// OWLOntology schema = man.loadOntologyFromOntologyDocument(new File("log/dbpedia_95.owl")); +// OWLOntology schema = man.loadOntologyFromOntologyDocument(new File("/home/lorenz/arbeit/dbpedia_0.75_no_datapropaxioms.owl")); // System.out.println(schema.getLogicalAxiomCount()); // OWLOntology schema = man.loadOntologyFromOntologyDocument(new File("log/dbpedia_coherent.owl")); - System.out.println(schema.getLogicalAxiomCount()); +// System.out.println(schema.getLogicalAxiomCount()); + System.out.println("...done."); JustificationBasedCoherentOntologyExtractor extractor = new JustificationBasedCoherentOntologyExtractor(); - OWLOntology coherentOntology = extractor.getCoherentOntology(schema);System.out.println(coherentOntology.getLogicalAxiomCount()); + extractor.setNumberOfJustifications(numberOfJustifications); + OWLOntology coherentOntology = extractor.getCoherentOntology(schema, preferRoots); + System.out.println("Coherent ontology contains " + coherentOntology.getLogicalAxiomCount() + " logical axioms."); } + + class HermiTReasonerFactory implements OWLReasonerFactory{ + @Override + public OWLReasoner createNonBufferingReasoner(OWLOntology ontology) { + return new Reasoner(ontology); + } + + @Override + public OWLReasoner createNonBufferingReasoner(OWLOntology ontology, + OWLReasonerConfiguration config) + throws IllegalConfigurationException { + return new Reasoner((Configuration) config, ontology); + } + + @Override + public OWLReasoner createReasoner(OWLOntology ontology) { + return new Reasoner(ontology); + } + + @Override + public OWLReasoner createReasoner(OWLOntology ontology, + OWLReasonerConfiguration config) + throws IllegalConfigurationException { + return new Reasoner((Configuration) config, ontology); + } + + @Override + public String getReasonerName() { + return "HermiT Reasoner"; + } + + } + } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lor...@us...> - 2012-01-20 02:53:39
|
Revision: 3555 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=3555&view=rev Author: lorenz_b Date: 2012-01-20 02:53:33 +0000 (Fri, 20 Jan 2012) Log Message: ----------- Fixed bug. Modified Paths: -------------- trunk/components-core/src/main/java/org/dllearner/kb/sparql/SPARQLTasks.java Modified: trunk/components-core/src/main/java/org/dllearner/kb/sparql/SPARQLTasks.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/kb/sparql/SPARQLTasks.java 2012-01-16 10:35:18 UTC (rev 3554) +++ trunk/components-core/src/main/java/org/dllearner/kb/sparql/SPARQLTasks.java 2012-01-20 02:53:33 UTC (rev 3555) @@ -712,8 +712,8 @@ } //remove trivial classes - classes.remove(OWL.Nothing.toStringID()); - classes.remove(OWL.Thing.toStringID()); + classes.remove(new NamedClass(OWL.Nothing.toStringID())); + classes.remove(new NamedClass(OWL.Thing.toStringID())); return classes; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lor...@us...> - 2012-01-16 10:35:29
|
Revision: 3554 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=3554&view=rev Author: lorenz_b Date: 2012-01-16 10:35:18 +0000 (Mon, 16 Jan 2012) Log Message: ----------- Fixed small bugs. Modified Paths: -------------- trunk/components-core/src/main/java/org/dllearner/algorithms/DisjointClassesLearner.java trunk/components-core/src/main/java/org/dllearner/algorithms/properties/DisjointObjectPropertyAxiomLearner.java Modified: trunk/components-core/src/main/java/org/dllearner/algorithms/DisjointClassesLearner.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/algorithms/DisjointClassesLearner.java 2012-01-13 14:41:55 UTC (rev 3553) +++ trunk/components-core/src/main/java/org/dllearner/algorithms/DisjointClassesLearner.java 2012-01-16 10:35:18 UTC (rev 3554) @@ -165,7 +165,7 @@ int limit = 1000; int offset = 0; String baseQuery = "CONSTRUCT {?s a <%s>. ?s a ?type.} WHERE {?s a <%s>. ?s a ?type.} LIMIT %d OFFSET %d"; - String query = String.format(baseQuery, classToDescribe.getName(), classToDescribe.getName(), limit, offset);System.out.println(query); + String query = String.format(baseQuery, classToDescribe.getName(), classToDescribe.getName(), limit, offset); Model newModel = executeConstructQuery(query); Map<NamedClass, Integer> result = new HashMap<NamedClass, Integer>(); NamedClass cls; Modified: trunk/components-core/src/main/java/org/dllearner/algorithms/properties/DisjointObjectPropertyAxiomLearner.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/algorithms/properties/DisjointObjectPropertyAxiomLearner.java 2012-01-13 14:41:55 UTC (rev 3553) +++ trunk/components-core/src/main/java/org/dllearner/algorithms/properties/DisjointObjectPropertyAxiomLearner.java 2012-01-16 10:35:18 UTC (rev 3554) @@ -130,7 +130,7 @@ offset += limit; - query = String.format(baseQuery, propertyToDescribe.getName(), propertyToDescribe.getName(), limit, offset); + query = String.format(baseQuery, propertyToDescribe.getName(), limit, offset); newModel = executeConstructQuery(query); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ku...@us...> - 2012-01-13 14:42:06
|
Revision: 3553 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=3553&view=rev Author: kurzum Date: 2012-01-13 14:41:55 +0000 (Fri, 13 Jan 2012) Log Message: ----------- added new parameter limit to rest interface Modified Paths: -------------- trunk/interfaces/src/main/java/org/dllearner/server/Rest.java Modified: trunk/interfaces/src/main/java/org/dllearner/server/Rest.java =================================================================== --- trunk/interfaces/src/main/java/org/dllearner/server/Rest.java 2012-01-11 15:32:31 UTC (rev 3552) +++ trunk/interfaces/src/main/java/org/dllearner/server/Rest.java 2012-01-13 14:41:55 UTC (rev 3553) @@ -61,14 +61,16 @@ JSONObject learningResult = new JSONObject(); try { String conf = null; + int limit = 5; if (!isSet("conf", httpServletRequest)) { throw new IllegalArgumentException("Missing parameter: conf is required. "); } else { conf = httpServletRequest.getParameter("conf"); + if(isSet("limit" , httpServletRequest)){ + limit = Integer.parseInt(httpServletRequest.getParameter("limit")) ; + } } - /*todo learn*/ - if (isSet("debug", httpServletRequest) && httpServletRequest.getParameter("debug").equalsIgnoreCase("true")) { @@ -91,6 +93,8 @@ EvaluatedDescriptionPosNeg ed = learn(conf); SparqlQueryDescriptionConvertVisitor sqd = new SparqlQueryDescriptionConvertVisitor(); + sqd.setLimit(limit); + learningResult.put("success", "1"); learningResult.put("manchester", ed.getDescription().toManchesterSyntaxString(null, null)); learningResult.put("kbsyntax", ed.getDescription().toKBSyntaxString()); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lor...@us...> - 2012-01-11 15:32:37
|
Revision: 3552 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=3552&view=rev Author: lorenz_b Date: 2012-01-11 15:32:31 +0000 (Wed, 11 Jan 2012) Log Message: ----------- Started script to extract some relevant metrics from SPARQL endpoints. Added Paths: ----------- trunk/scripts/src/main/java/org/dllearner/scripts/SPARQLEndpointMetrics.java Added: trunk/scripts/src/main/java/org/dllearner/scripts/SPARQLEndpointMetrics.java =================================================================== --- trunk/scripts/src/main/java/org/dllearner/scripts/SPARQLEndpointMetrics.java (rev 0) +++ trunk/scripts/src/main/java/org/dllearner/scripts/SPARQLEndpointMetrics.java 2012-01-11 15:32:31 UTC (rev 3552) @@ -0,0 +1,133 @@ +package org.dllearner.scripts; + +import java.net.URL; +import java.util.Map; +import java.util.TreeMap; +import java.util.Map.Entry; +import java.util.concurrent.ArrayBlockingQueue; +import java.util.concurrent.ThreadPoolExecutor; +import java.util.concurrent.TimeUnit; + +import org.apache.log4j.ConsoleAppender; +import org.apache.log4j.Level; +import org.apache.log4j.Logger; +import org.apache.log4j.SimpleLayout; +import org.dllearner.kb.sparql.SparqlEndpoint; +import org.dllearner.kb.sparql.SparqlQuery; + +import com.hp.hpl.jena.query.QuerySolution; +import com.hp.hpl.jena.query.ResultSet; +import com.hp.hpl.jena.rdf.model.Resource; + +public class SPARQLEndpointMetrics { + + //parameters for thread pool + //Parallel running Threads(Executor) on System + private static int corePoolSize = 1; + //Maximum Threads allowed in Pool + private static int maximumPoolSize = 20; + //Keep alive time for waiting threads for jobs(Runnable) + private static long keepAliveTime = 10; + + /** + * @param args + */ + public static void main(String[] args) throws Exception{ + SimpleLayout layout = new SimpleLayout(); + ConsoleAppender consoleAppender = new ConsoleAppender(layout); + Logger.getRootLogger().setLevel(Level.WARN); + Logger.getLogger("org.dllearner").setLevel(Level.WARN); // seems to be needed for some reason (?) + Logger.getRootLogger().removeAllAppenders(); + Logger.getRootLogger().addAppender(consoleAppender); + + // get all SPARQL endpoints and their graphs - the key is a name-identifier + Map<String,SparqlEndpoint> endpoints = new TreeMap<String,SparqlEndpoint>(); + Map<SparqlEndpoint, String> namespaces = new TreeMap<SparqlEndpoint, String>(); + + String query = ""; + query += "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> \n"; + query += "PREFIX void: <http://rdfs.org/ns/void#> \n"; + query += "PREFIX dcterms: <http://purl.org/dc/terms/> \n"; + query += "PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> \n"; + query += "PREFIX ov: <http://open.vocab.org/terms/> \n"; + query += "SELECT * \n"; + query += "WHERE { \n"; + query += " ?item rdf:type void:Dataset . \n"; + query += " ?item dcterms:isPartOf <http://ckan.net/group/lodcloud> . \n"; + query += " ?item void:sparqlEndpoint ?endpoint . \n"; +// query += " ?item dcterms:subject ?subject . \n"; +// query += " ?item rdfs:label ?label . \n"; + query += " ?item ov:shortName ?shortName . \n"; + query += " OPTIONAL{?item <http://www.w3.org/ns/sparql-service-description#namedGraph> ?defaultGraph} \n"; + query += "}"; +// query += "LIMIT 20"; + System.out.println("Getting list of SPARQL endpoints from LATC DSI:"); + System.out.println(query); + + // contact LATC DSI/MDS + SparqlEndpoint dsi = new SparqlEndpoint(new URL("http://api.talis.com/stores/latc-mds/services/sparql")); + SparqlQuery sq = new SparqlQuery(query, dsi); + ResultSet rs = sq.send(); + while(rs.hasNext()) { + QuerySolution qs = rs.next(); + String endpoint = qs.get("endpoint").toString(); + String shortName = qs.get("shortName").toString(); + Resource r = qs.getResource("defaultGraph"); + if(r != null){ + String defaultGraph = qs.get("defaultGraph").toString();System.out.println(defaultGraph); + } + + endpoints.put(shortName, new SparqlEndpoint(new URL(endpoint))); + } + System.out.println(endpoints.size() + " endpoints detected."); + + ArrayBlockingQueue<Runnable> workQueue = new ArrayBlockingQueue<Runnable>(endpoints.size()); + ThreadPoolExecutor threadPool = new ThreadPoolExecutor(corePoolSize, maximumPoolSize, keepAliveTime, TimeUnit.SECONDS, workQueue); + + final StringBuffer sb = new StringBuffer(); + sb.append("<table border=\"1\">"); + sb.append("<tr><th>#classes</th><th>#op</th><th>#dp</th><th>#individuals</th></tr>"); + + // perform enrichment on endpoints + for(final Entry<String,SparqlEndpoint> endpoint : endpoints.entrySet()) { + + threadPool.execute(new Runnable() { + + @Override + public void run() { + SparqlEndpoint se = endpoint.getValue(); +// System.out.println(se); + + String filter = "FILTER()"; + + try { + //count classes + String query = "SELECT (COUNT(DISTINCT ?type) AS ?cnt) WHERE {?s a ?type.}"; + int classCnt = new SparqlQuery(query, se).send().next().getLiteral("cnt").getInt(); + + //count object properties + query = "SELECT (COUNT(DISTINCT ?p) AS ?cnt) WHERE {?s ?p ?o.}"; + int opCnt = new SparqlQuery(query, se).send().next().getLiteral("cnt").getInt(); + + //count data properties + query = "SELECT (COUNT(DISTINCT ?p) AS ?cnt) WHERE {?s ?p ?o.}"; + int dpCnt = new SparqlQuery(query, se).send().next().getLiteral("cnt").getInt(); + + //count individuals + query = "SELECT (COUNT(DISTINCT ?s) AS ?cnt) WHERE {?s a ?type.}"; + int indCnt = new SparqlQuery(query, se).send().next().getLiteral("cnt").getInt(); + + sb.append("<tr><td>" + classCnt + "</td><td>" + opCnt + "</td>" + "</td><td>" + dpCnt + "</td><td>" + indCnt + "</td></tr>\n"); + } catch (Exception e) { + sb.append(""); + } + + } + }); + } + threadPool.shutdown(); + System.out.println(sb); + + } + +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <km...@us...> - 2012-01-11 14:58:35
|
Revision: 3551 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=3551&view=rev Author: kmpf Date: 2012-01-11 14:58:24 +0000 (Wed, 11 Jan 2012) Log Message: ----------- Modified Paths: -------------- trunk/test/pdb/Original data sets/plp273.list trunk/test/pdb/Original data sets/plp364.list trunk/test/pdb/Original data sets/plp399.list Added Paths: ----------- trunk/test/pdb/Original data sets/bt426.list Added: trunk/test/pdb/Original data sets/bt426.list =================================================================== --- trunk/test/pdb/Original data sets/bt426.list (rev 0) +++ trunk/test/pdb/Original data sets/bt426.list 2012-01-11 14:58:24 UTC (rev 3551) @@ -0,0 +1,426 @@ +1LMB.3. +8ABP.. +1MRP.. +1G3P.. +1GVP.. +1AT0.. +1AOP.. +1AMP.. +1AK0.. +1BGP.. +2CYP.. +1LAT.B. +1LUC.B. +1MTY.B. +1NBA.B. +1NCI.B. +1KVE.B. +1KWA.B. +1EDM.B. +1FMT.B. +1GOT.B. +1ATZ.B. +1APY.B. +1AQZ.B. +1A28.B. +1BDM.B. +1BEN.B. +1BTK.B. +1CPC.B. +1VWL.B. +1WPO.B. +1PNK.B. +1RYP.2. +5P21.. +1HA1.. +1ECA.. +1FUA.. +1FNA.. +1GSA.. +1A6Q.. +1AK1.. +1ABA.. +1BV1.. +1BA1.. +1TCA.. +1WBA.. +1POA.. +1QBA.. +2BAA.. +3CLA.. +2KIN.B. +5HPG.A. +1LKK.A. +1LTS.A. +1MLD.A. +1MOL.A. +1MKA.A. +1MUG.A. +1MUC.A. +1MPG.A. +1NBC.A. +1NP1.A. +1ONR.A. +1HGX.A. +1HAV.A. +1HCR.A. +1HSB.A. +1IIB.A. +1IDA.A. +1IAK.A. +1ISU.A. +1JET.A. +1JFR.A. +1KVE.A. +1KPT.A. +1DOR.A. +1DOS.A. +1DOK.A. +1DKZ.A. +1DUP.A. +1ECP.A. +1FUR.A. +1FVK.A. +1FWC.A. +1GIF.A. +1XFF.A. +1GAR.A. +1GUQ.A. +1ALV.A. +1ALI.A. +1AMU.A. +1AOZ.A. +1AOQ.A. +1AOH.A. +1AOC.A. +1AJS.A. +1ADO.A. +1AFW.A. +1AGJ.A. +1AT1.A. +1AVM.A. +1AWS.A. +1AQ6.A. +1AQ0.A. +1A7T.A. +1A2Z.A. +1A2Y.A. +1A2P.A. +1A34.A. +1BKR.A. +1BEB.A. +1BFT.A. +1BBP.A. +1CHM.A. +1CKA.A. +1CYD.A. +1XIK.A. +1XGS.A. +1YTB.A. +1TVX.A. +1VCA.A. +1PHN.A. +1RGE.A. +1SLT.A. +1SLU.A. +1SPU.A. +1IG5.. +1NAR.. +1JER.. +1KNB.. +1FDR.. +1A62.. +1ARB.. +1AQB.. +1AJ2.. +1AD2.. +1BYB.. +1C52.. +1CFB.. +1YER.. +1WAB.. +2POR.. +3CYR.. +3SEB.. +3SDH.A. +2HMZ.A. +2ARC.A. +2PSP.A. +8RXN.A. +1HTR.P. +1LIS.. +1MSC.. +1NLS.. +1ORC.. +1HFC.. +1IFC.. +1JPC.. +1FUS.. +1FDS.. +1A9S.. +1AL3.. +1AAC.. +1BGC.. +1C1C.. +1YCC.. +1TYS.. +1VCC.. +1POC.. +1PGS.. +1RHS.. +2CTC.. +2PLC.. +2SNS.. +2SN3.. +3TSS.. +1MTY.G. +1GOT.G. +1LIT.. +1MBD.. +1OPD.. +1IGD.. +1KID.. +1DAD.. +1EDT.. +1FIT.. +1GND.. +1AWD.. +1BRT.. +1BFD.. +1CHD.. +1VSD.. +1VID.. +1PUD.. +1POT.. +1SMD.. +2LBD.. +2HFT.. +2END.. +1RYP.F. +1LBU.. +1MWE.. +1NEU.. +1HOE.. +1KVU.. +1EDE.. +1A8E.. +1ALU.. +1TFE.. +1UAE.. +1PHE.. +1RIE.. +1CSE.E. +1NIF.. +1KPF.. +1ERV.. +1ARV.. +1ANF.. +1BKF.. +1CNV.. +1THV.. +1QNF.. +1LT5.D. +1MTY.D. +1AGQ.D. +1JDW.. +1EDG.. +1AH7.. +1AF7.. +1BFG.. +1RMG.. +2HBG.. +1NOX.. +1IXH.. +1KUH.. +1A68.. +1A1X.. +1AMX.. +1CSH.. +1CEX.. +1THX.. +1VHH.. +2AYH.. +3COX.. +1RYP.J. +1LKI.. +1MSI.. +1MAI.. +1OPY.. +1DXY.. +1GKY.. +1GAI.. +1A8I.. +1ALY.. +1UBI.. +1R69.. +2DRI.. +1FLE.I. +1CEW.I. +1CSE.I. +1YVE.I. +1RYP.I. +1MRJ.. +1AJJ.. +1AKZ.. +1CTJ.. +8RUC.I. +1MSK.. +1NPK.. +1IDK.. +2BBK.H. +1GD1.O. +1LML.. +1LCL.. +1MML.. +1ECL.. +1AYL.. +1AOL.. +153L.. +119L.. +2SIL.. +1LAM.. +1MZM.. +1EZM.. +1AMM.. +1CEM.. +2MCM.. +2GDM.. +1NFN.. +1HXN.. +1DUN.. +1AXN.. +1BTN.. +1CSN.. +1CBN.. +1ISO.. +1IDO.. +1AZO.. +1VLB.. +1AKO.. +1AHO.. +1BDO.. +1CPO.. +1CEO.. +1XJO.. +1PDO.. +1YAI.C. +1TAD.C. +1TSP.. +1WHT.B. +7RSA.. +1PTQ.. +1PDA.. +2FHA.. +2CBA.. +2WEA.. +2PIA.. +5CSM.A. +4PGA.A. +7AHL.A. +6GSV.A. +1XYZ.A. +1YAS.A. +1TRK.A. +1URN.A. +1VPS.A. +1PCF.A. +1RYP.1. +1RVA.A. +1SVP.A. +2I1B.. +2A0B.. +2KIN.A. +2FIV.A. +2CHS.A. +2CCY.A. +2SCP.A. +4XIS.. +1ONC.. +1OIS.. +1VLS.. +1VJS.. +1CYO.. +1PNE.. +3PTE.. +1REQ.D. +1UXY.. +1V39.. +1WHI.. +1PTY.. +1PMI.. +2ACY.. +2PHY.. +2PII.. +3CHY.. +1REG.Y. +1SGP.I. +1SKZ.. +2SIC.I. +2ILK.. +2ABK.. +2SAK.. +1TML.. +3NUL.. +2FDN.. +3PCG.M. +1WHO.. +5PTP.. +1PHP.. +1SFP.. +1SBP.. +1NUL.B. +1PRX.B. +1SFT.B. +1SRA.. +2MSB.B. +2VHB.B. +2RSP.B. +1NWP.A. +1OVA.A. +1XSO.A. +1UNK.A. +1WDC.A. +1STM.A. +4MT2.. +1NXB.. +1XNB.. +1TIB.. +1WER.. +1SVB.. +2RN2.. +3VUB.. +3DAA.A. +2NAC.A. +2HPD.A. +2BOP.A. +2TYS.A. +256B.A. +1OYC.. +1PLC.. +1RSS.. +1REC.. +2HTS.. +3GRS.. +1PPT.. +2PGD.. +3LZT.. +1TIF.. +1VIF.. +1RCF.. +2ENG.. +1UCH.. +2PTH.. +5PTI.. +1PII.. +1RSY.. +1RA9.. +2TGI.. +1OSP.O. +4BCL.. +6CEL.. +2ERL.. +1ZIN.. +1VIN.. +1PPN.. +1RRO.. +2BBK.L. Modified: trunk/test/pdb/Original data sets/plp273.list =================================================================== --- trunk/test/pdb/Original data sets/plp273.list 2012-01-11 13:03:48 UTC (rev 3550) +++ trunk/test/pdb/Original data sets/plp273.list 2012-01-11 14:58:24 UTC (rev 3551) @@ -1,273 +1,273 @@ -2W8X.A -2W9Y.A -2WCJ.A -2WCR.A -2WFB.A -2WFO.A -2WJ5.A -2WJ9.A -2WJR.A -2WL1.A -2WNF.A -2WPV.B -2WQF.A -2WTP.A -2WUJ.A -2WUU.A -2WUX.A -2WVX.A -2WY3.B -2WZO.A -2ZXY.A -3A0Z.A -3A4R.A -3A57.A -3A5P.A -3AAP.A -3FOT.A -3FOV.A -3FQG.A -3FRR.A -3FSO.A -3FSS.A -3FWK.A -3FWZ.A -3FX7.A -3FYB.A -3FYM.A -3G02.A -3G0M.A -3G1J.A -3G21.A -3G2B.A -3G2S.A -3G36.A -3G3T.A -3G5B.A -3G7G.A -3GA3.A -3GA4.A -3GAE.A -3GBW.A -3GBY.A -3GDW.A -3GE3.E -3GFP.A -3GI7.A -3GIX.A -3GKJ.A -3GMG.A -3GN6.A -3GNE.A -3GNZ.P -3GOE.A -3GP4.A -3GP6.A -3GQQ.A -3GWH.A -3GWN.A -3GXW.A -3GY9.A -3GZB.A -3H05.A -3H0W.A -3H20.A -3H3L.A -3H51.A -3H5J.A -3H6P.C -3H6R.A -3H7H.B -3H8T.A -3H96.A -3H9W.A -3HA2.A -3HE5.B -3HFO.A -3HH1.A -3HL1.A -3HN0.A -3HN5.A -3HO6.A -3HOI.A -3HPC.X -3HR0.A -3HRL.A -3HRR.A -3HSH.A -3HTV.A -3HVS.A -3HWP.A -3HWU.A -3HX8.A -3HXL.A -3HYN.A -3HZP.A -3I0W.A -3I1A.A -3I2V.A -3I4O.A -3I7M.A -3I84.A -3IBM.A -3IC3.A -3ID1.A -3IDF.A -3IDU.A -3IE4.A -3IEE.A -3IG9.A -3IHT.A -3IJM.A -3IKB.A -3IKW.A -3ILW.A -3IM3.A -3IMK.A -3IP4.C -3IPF.A -3IPJ.A -3IR4.A -3IT5.A -3IU6.A -3IUF.A -3IUO.A -3IUW.A -3IVV.A -3IWF.A -3IX3.A -3JQY.A -3JRN.A -3JSZ.A -3JTW.A -3JU0.A -3JUD.A -3JXO.A -3JYG.A -3JYZ.A -3JZ9.A -3K0X.A -3K0Z.A -3K2O.A -3K5J.A -3K69.A -3K6O.A -3K7X.A -3KD3.A -3KDE.C -3KDF.A -3KDF.B -3KDG.A -3KE7.A -3KG9.A -3KGK.A -3KK4.A -3KKF.A -3KKG.A -3KLQ.A -3KMI.A -3KOG.A -3KOS.A -3KPE.A -3KUC.B -3KWS.A -3KXT.A -3KYZ.A -3KZ5.A -3KZD.A -3KZP.A -3L0Q.B -3L15.A -3L23.A -3L29.A -3L3E.A -3L4H.A -3L51.B -3L6T.A -3L7H.A -2X2S.A -2X2U.A -2X32.A -2X3G.A -2X4J.A -2X4K.A -2X4W.A -2X55.A -2X5N.A -2XCJ.A -2XDG.A -2XDH.A -2XF7.A -2XFV.A -2XG5.B -2XLG.A -2XMJ.A -3AG3.D -3L9A.X -3LAX.A -3LDC.A -3LDU.A -3LE4.A -3LFR.A -3LGB.A -3LHE.A -3LHO.A -3LHR.A -3LLO.A -3LM3.A -3LQ9.A -3LR2.A -3LR4.A -3LS0.A -3LUC.A -3LUM.A -3LUR.A -3LUU.A -3LWC.A -3LWG.A -3LXR.F -3LYD.A -3LYG.A -3LYH.A -3LYY.A -3M1T.A -3M66.A -3M6J.A -3M7K.A -3M7O.A -3M8J.A -3M9Q.A -3MAB.A -3MAL.A -3MCB.A -3MCB.B -3MCQ.A -3MDP.A -3MG1.A -3MHS.B -3MR0.A -3MSW.A -3MT0.A -3MW8.A -3MWZ.A -3MZO.A -3N0R.A -3N1E.A -3N6Y.A -3N9B.A -3NE8.A -3NFT.A -3NKE.A -3NKG.A -3NKL.A -3NO2.A -3NOH.A -3NPD.A -3NQI.A -3NRF.A -3NRW.A -3NS2.A -3NY3.A -3NZN.A -3O6C.A -3OAJ.A +2W8X.A. +2W9Y.A. +2WCJ.A. +2WCR.A. +2WFB.A. +2WFO.A. +2WJ5.A. +2WJ9.A. +2WJR.A. +2WL1.A. +2WNF.A. +2WPV.B. +2WQF.A. +2WTP.A. +2WUJ.A. +2WUU.A. +2WUX.A. +2WVX.A. +2WY3.B. +2WZO.A. +2ZXY.A. +3A0Z.A. +3A4R.A. +3A57.A. +3A5P.A. +3AAP.A. +3FOT.A. +3FOV.A. +3FQG.A. +3FRR.A. +3FSO.A. +3FSS.A. +3FWK.A. +3FWZ.A. +3FX7.A. +3FYB.A. +3FYM.A. +3G02.A. +3G0M.A. +3G1J.A. +3G21.A. +3G2B.A. +3G2S.A. +3G36.A. +3G3T.A. +3G5B.A. +3G7G.A. +3GA3.A. +3GA4.A. +3GAE.A. +3GBW.A. +3GBY.A. +3GDW.A. +3GE3.E. +3GFP.A. +3GI7.A. +3GIX.A. +3GKJ.A. +3GMG.A. +3GN6.A. +3GNE.A. +3GNZ.P. +3GOE.A. +3GP4.A. +3GP6.A. +3GQQ.A. +3GWH.A. +3GWN.A. +3GXW.A. +3GY9.A. +3GZB.A. +3H05.A. +3H0W.A. +3H20.A. +3H3L.A. +3H51.A. +3H5J.A. +3H6P.C. +3H6R.A. +3H7H.B. +3H8T.A. +3H96.A. +3H9W.A. +3HA2.A. +3HE5.B. +3HFO.A. +3HH1.A. +3HL1.A. +3HN0.A. +3HN5.A. +3HO6.A. +3HOI.A. +3HPC.X. +3HR0.A. +3HRL.A. +3HRR.A. +3HSH.A. +3HTV.A. +3HVS.A. +3HWP.A. +3HWU.A. +3HX8.A. +3HXL.A. +3HYN.A. +3HZP.A. +3I0W.A. +3I1A.A. +3I2V.A. +3I4O.A. +3I7M.A. +3I84.A. +3IBM.A. +3IC3.A. +3ID1.A. +3IDF.A. +3IDU.A. +3IE4.A. +3IEE.A. +3IG9.A. +3IHT.A. +3IJM.A. +3IKB.A. +3IKW.A. +3ILW.A. +3IM3.A. +3IMK.A. +3IP4.C. +3IPF.A. +3IPJ.A. +3IR4.A. +3IT5.A. +3IU6.A. +3IUF.A. +3IUO.A. +3IUW.A. +3IVV.A. +3IWF.A. +3IX3.A. +3JQY.A. +3JRN.A. +3JSZ.A. +3JTW.A. +3JU0.A. +3JUD.A. +3JXO.A. +3JYG.A. +3JYZ.A. +3JZ9.A. +3K0X.A. +3K0Z.A. +3K2O.A. +3K5J.A. +3K69.A. +3K6O.A. +3K7X.A. +3KD3.A. +3KDE.C. +3KDF.A. +3KDF.B. +3KDG.A. +3KE7.A. +3KG9.A. +3KGK.A. +3KK4.A. +3KKF.A. +3KKG.A. +3KLQ.A. +3KMI.A. +3KOG.A. +3KOS.A. +3KPE.A. +3KUC.B. +3KWS.A. +3KXT.A. +3KYZ.A. +3KZ5.A. +3KZD.A. +3KZP.A. +3L0Q.B. +3L15.A. +3L23.A. +3L29.A. +3L3E.A. +3L4H.A. +3L51.B. +3L6T.A. +3L7H.A. +2X2S.A. +2X2U.A. +2X32.A. +2X3G.A. +2X4J.A. +2X4K.A. +2X4W.A. +2X55.A. +2X5N.A. +2XCJ.A. +2XDG.A. +2XDH.A. +2XF7.A. +2XFV.A. +2XG5.B. +2XLG.A. +2XMJ.A. +3AG3.D. +3L9A.X. +3LAX.A. +3LDC.A. +3LDU.A. +3LE4.A. +3LFR.A. +3LGB.A. +3LHE.A. +3LHO.A. +3LHR.A. +3LLO.A. +3LM3.A. +3LQ9.A. +3LR2.A. +3LR4.A. +3LS0.A. +3LUC.A. +3LUM.A. +3LUR.A. +3LUU.A. +3LWC.A. +3LWG.A. +3LXR.F. +3LYD.A. +3LYG.A. +3LYH.A. +3LYY.A. +3M1T.A. +3M66.A. +3M6J.A. +3M7K.A. +3M7O.A. +3M8J.A. +3M9Q.A. +3MAB.A. +3MAL.A. +3MCB.A. +3MCB.B. +3MCQ.A. +3MDP.A. +3MG1.A. +3MHS.B. +3MR0.A. +3MSW.A. +3MT0.A. +3MW8.A. +3MWZ.A. +3MZO.A. +3N0R.A. +3N1E.A. +3N6Y.A. +3N9B.A. +3NE8.A. +3NFT.A. +3NKE.A. +3NKG.A. +3NKL.A. +3NO2.A. +3NOH.A. +3NPD.A. +3NQI.A. +3NRF.A. +3NRW.A. +3NS2.A. +3NY3.A. +3NZN.A. +3O6C.A. +3OAJ.A. Modified: trunk/test/pdb/Original data sets/plp364.list =================================================================== --- trunk/test/pdb/Original data sets/plp364.list 2012-01-11 13:03:48 UTC (rev 3550) +++ trunk/test/pdb/Original data sets/plp364.list 2012-01-11 14:58:24 UTC (rev 3551) @@ -1,364 +1,364 @@ -2JK9.A -2V4X.A -2VQ4.A -2VTC.A -2VV6.A -2VXT.I -2VXZ.A -2VZC.A -2W2R.A -2W61.A -2W6A.A -2W7A.A -2W7N.A -2ZK9.X -2ZNR.A -2ZQ5.A -2ZQE.A -2ZSI.B -2ZX0.A -3BYP.A -3BYQ.A -3C1Q.A -3C7T.A -3C8L.A -3C8W.A -3CHM.A -3CKK.A -3CNY.A -3CP7.A -3CT6.A -3CZ6.A -3D1R.A -3D2Q.A -3D34.A -3D3B.J -3D59.A -3D85.C -3DAN.A -3DD7.A -3DS2.A -3DSB.A -3E7H.A -3E7U.X -3E8O.A -3E8T.A -3EBT.A -3ECF.A -3ECH.A -3EDO.A -3EEH.A -3EER.A -3EF8.A -3EHG.A -3EHM.A -3EKI.A -3EMF.A -3EMI.A -3ENU.A -3EO6.A -3ER7.A -3ES4.A -3EYT.A -3EZI.A -3F0P.A -3F2E.A -3F40.A -3F4M.A -3F62.A -3F7E.A -3F7Q.A -3F8X.A -3F95.A -3F9S.A -3FAU.A -3FB9.A -3FBL.A -3FCN.A -3FF2.A -3FF5.A -3FFV.A -3FG9.A -3FGR.B -3FGV.A -3FH1.A -3FIA.A -3FID.A -3FJU.B -3FK8.A -3FKA.A -3FM2.A -3FMY.A -2W8X.A -2W9Y.A -2WCJ.A -2WCR.A -2WFB.A -2WFO.A -2WJ5.A -2WJ9.A -2WJR.A -2WL1.A -2WNF.A -2WPV.B -2WQF.A -2WTP.A -2WUJ.A -2WUU.A -2WUX.A -2WVX.A -2WY3.B -2WZO.A -2ZXY.A -3A0Z.A -3A4R.A -3A57.A -3A5P.A -3AAP.A -3FOT.A -3FOV.A -3FQG.A -3FRR.A -3FSO.A -3FSS.A -3FWK.A -3FWZ.A -3FX7.A -3FYB.A -3FYM.A -3G02.A -3G0M.A -3G1J.A -3G21.A -3G2B.A -3G2S.A -3G36.A -3G3T.A -3G5B.A -3G7G.A -3GA3.A -3GA4.A -3GAE.A -3GBW.A -3GBY.A -3GDW.A -3GE3.E -3GFP.A -3GI7.A -3GIX.A -3GKJ.A -3GMG.A -3GN6.A -3GNE.A -3GNZ.P -3GOE.A -3GP4.A -3GP6.A -3GQQ.A -3GWH.A -3GWN.A -3GXW.A -3GY9.A -3GZB.A -3H05.A -3H0W.A -3H20.A -3H3L.A -3H51.A -3H5J.A -3H6P.C -3H6R.A -3H7H.B -3H8T.A -3H96.A -3H9W.A -3HA2.A -3HE5.B -3HFO.A -3HH1.A -3HL1.A -3HN0.A -3HN5.A -3HO6.A -3HOI.A -3HPC.X -3HR0.A -3HRL.A -3HRR.A -3HSH.A -3HTV.A -3HVS.A -3HWP.A -3HWU.A -3HX8.A -3HXL.A -3HYN.A -3HZP.A -3I0W.A -3I1A.A -3I2V.A -3I4O.A -3I7M.A -3I84.A -3IBM.A -3IC3.A -3ID1.A -3IDF.A -3IDU.A -3IE4.A -3IEE.A -3IG9.A -3IHT.A -3IJM.A -3IKB.A -3IKW.A -3ILW.A -3IM3.A -3IMK.A -3IP4.C -3IPF.A -3IPJ.A -3IR4.A -3IT5.A -3IU6.A -3IUF.A -3IUO.A -3IUW.A -3IVV.A -3IWF.A -3IX3.A -3JQY.A -3JRN.A -3JSZ.A -3JTW.A -3JU0.A -3JUD.A -3JXO.A -3JYG.A -3JYZ.A -3JZ9.A -3K0X.A -3K0Z.A -3K2O.A -3K5J.A -3K69.A -3K6O.A -3K7X.A -3KD3.A -3KDE.C -3KDF.A -3KDF.B -3KDG.A -3KE7.A -3KG9.A -3KGK.A -3KK4.A -3KKF.A -3KKG.A -3KLQ.A -3KMI.A -3KOG.A -3KOS.A -3KPE.A -3KUC.B -3KWS.A -3KXT.A -3KYZ.A -3KZ5.A -3KZD.A -3KZP.A -3L0Q.B -3L15.A -3L23.A -3L29.A -3L3E.A -3L4H.A -3L51.B -3L6T.A -3L7H.A -2X2S.A -2X2U.A -2X32.A -2X3G.A -2X4J.A -2X4K.A -2X4W.A -2X55.A -2X5N.A -2XCJ.A -2XDG.A -2XDH.A -2XF7.A -2XFV.A -2XG5.B -2XLG.A -2XMJ.A -3AG3.D -3L9A.X -3LAX.A -3LDC.A -3LDU.A -3LE4.A -3LFR.A -3LGB.A -3LHE.A -3LHO.A -3LHR.A -3LLO.A -3LM3.A -3LQ9.A -3LR2.A -3LR4.A -3LS0.A -3LUC.A -3LUM.A -3LUR.A -3LUU.A -3LWC.A -3LWG.A -3LXR.F -3LYD.A -3LYG.A -3LYH.A -3LYY.A -3M1T.A -3M66.A -3M6J.A -3M7K.A -3M7O.A -3M8J.A -3M9Q.A -3MAB.A -3MAL.A -3MCB.A -3MCB.B -3MCQ.A -3MDP.A -3MG1.A -3MHS.B -3MR0.A -3MSW.A -3MT0.A -3MW8.A -3MWZ.A -3MZO.A -3N0R.A -3N1E.A -3N6Y.A -3N9B.A -3NE8.A -3NFT.A -3NKE.A -3NKG.A -3NKL.A -3NO2.A -3NOH.A -3NPD.A -3NQI.A -3NRF.A -3NRW.A -3NS2.A -3NY3.A -3NZN.A -3O6C.A -3OAJ.A +2JK9.A. +2V4X.A. +2VQ4.A. +2VTC.A. +2VV6.A. +2VXT.I. +2VXZ.A. +2VZC.A. +2W2R.A. +2W61.A. +2W6A.A. +2W7A.A. +2W7N.A. +2ZK9.X. +2ZNR.A. +2ZQ5.A. +2ZQE.A. +2ZSI.B. +2ZX0.A. +3BYP.A. +3BYQ.A. +3C1Q.A. +3C7T.A. +3C8L.A. +3C8W.A. +3CHM.A. +3CKK.A. +3CNY.A. +3CP7.A. +3CT6.A. +3CZ6.A. +3D1R.A. +3D2Q.A. +3D34.A. +3D3B.J. +3D59.A. +3D85.C. +3DAN.A. +3DD7.A. +3DS2.A. +3DSB.A. +3E7H.A. +3E7U.X. +3E8O.A. +3E8T.A. +3EBT.A. +3ECF.A. +3ECH.A. +3EDO.A. +3EEH.A. +3EER.A. +3EF8.A. +3EHG.A. +3EHM.A. +3EKI.A. +3EMF.A. +3EMI.A. +3ENU.A. +3EO6.A. +3ER7.A. +3ES4.A. +3EYT.A. +3EZI.A. +3F0P.A. +3F2E.A. +3F40.A. +3F4M.A. +3F62.A. +3F7E.A. +3F7Q.A. +3F8X.A. +3F95.A. +3F9S.A. +3FAU.A. +3FB9.A. +3FBL.A. +3FCN.A. +3FF2.A. +3FF5.A. +3FFV.A. +3FG9.A. +3FGR.B. +3FGV.A. +3FH1.A. +3FIA.A. +3FID.A. +3FJU.B. +3FK8.A. +3FKA.A. +3FM2.A. +3FMY.A. +2W8X.A. +2W9Y.A. +2WCJ.A. +2WCR.A. +2WFB.A. +2WFO.A. +2WJ5.A. +2WJ9.A. +2WJR.A. +2WL1.A. +2WNF.A. +2WPV.B. +2WQF.A. +2WTP.A. +2WUJ.A. +2WUU.A. +2WUX.A. +2WVX.A. +2WY3.B. +2WZO.A. +2ZXY.A. +3A0Z.A. +3A4R.A. +3A57.A. +3A5P.A. +3AAP.A. +3FOT.A. +3FOV.A. +3FQG.A. +3FRR.A. +3FSO.A. +3FSS.A. +3FWK.A. +3FWZ.A. +3FX7.A. +3FYB.A. +3FYM.A. +3G02.A. +3G0M.A. +3G1J.A. +3G21.A. +3G2B.A. +3G2S.A. +3G36.A. +3G3T.A. +3G5B.A. +3G7G.A. +3GA3.A. +3GA4.A. +3GAE.A. +3GBW.A. +3GBY.A. +3GDW.A. +3GE3.E. +3GFP.A. +3GI7.A. +3GIX.A. +3GKJ.A. +3GMG.A. +3GN6.A. +3GNE.A. +3GNZ.P. +3GOE.A. +3GP4.A. +3GP6.A. +3GQQ.A. +3GWH.A. +3GWN.A. +3GXW.A. +3GY9.A. +3GZB.A. +3H05.A. +3H0W.A. +3H20.A. +3H3L.A. +3H51.A. +3H5J.A. +3H6P.C. +3H6R.A. +3H7H.B. +3H8T.A. +3H96.A. +3H9W.A. +3HA2.A. +3HE5.B. +3HFO.A. +3HH1.A. +3HL1.A. +3HN0.A. +3HN5.A. +3HO6.A. +3HOI.A. +3HPC.X. +3HR0.A. +3HRL.A. +3HRR.A. +3HSH.A. +3HTV.A. +3HVS.A. +3HWP.A. +3HWU.A. +3HX8.A. +3HXL.A. +3HYN.A. +3HZP.A. +3I0W.A. +3I1A.A. +3I2V.A. +3I4O.A. +3I7M.A. +3I84.A. +3IBM.A. +3IC3.A. +3ID1.A. +3IDF.A. +3IDU.A. +3IE4.A. +3IEE.A. +3IG9.A. +3IHT.A. +3IJM.A. +3IKB.A. +3IKW.A. +3ILW.A. +3IM3.A. +3IMK.A. +3IP4.C. +3IPF.A. +3IPJ.A. +3IR4.A. +3IT5.A. +3IU6.A. +3IUF.A. +3IUO.A. +3IUW.A. +3IVV.A. +3IWF.A. +3IX3.A. +3JQY.A. +3JRN.A. +3JSZ.A. +3JTW.A. +3JU0.A. +3JUD.A. +3JXO.A. +3JYG.A. +3JYZ.A. +3JZ9.A. +3K0X.A. +3K0Z.A. +3K2O.A. +3K5J.A. +3K69.A. +3K6O.A. +3K7X.A. +3KD3.A. +3KDE.C. +3KDF.A. +3KDF.B. +3KDG.A. +3KE7.A. +3KG9.A. +3KGK.A. +3KK4.A. +3KKF.A. +3KKG.A. +3KLQ.A. +3KMI.A. +3KOG.A. +3KOS.A. +3KPE.A. +3KUC.B. +3KWS.A. +3KXT.A. +3KYZ.A. +3KZ5.A. +3KZD.A. +3KZP.A. +3L0Q.B. +3L15.A. +3L23.A. +3L29.A. +3L3E.A. +3L4H.A. +3L51.B. +3L6T.A. +3L7H.A. +2X2S.A. +2X2U.A. +2X32.A. +2X3G.A. +2X4J.A. +2X4K.A. +2X4W.A. +2X55.A. +2X5N.A. +2XCJ.A. +2XDG.A. +2XDH.A. +2XF7.A. +2XFV.A. +2XG5.B. +2XLG.A. +2XMJ.A. +3AG3.D. +3L9A.X. +3LAX.A. +3LDC.A. +3LDU.A. +3LE4.A. +3LFR.A. +3LGB.A. +3LHE.A. +3LHO.A. +3LHR.A. +3LLO.A. +3LM3.A. +3LQ9.A. +3LR2.A. +3LR4.A. +3LS0.A. +3LUC.A. +3LUM.A. +3LUR.A. +3LUU.A. +3LWC.A. +3LWG.A. +3LXR.F. +3LYD.A. +3LYG.A. +3LYH.A. +3LYY.A. +3M1T.A. +3M66.A. +3M6J.A. +3M7K.A. +3M7O.A. +3M8J.A. +3M9Q.A. +3MAB.A. +3MAL.A. +3MCB.A. +3MCB.B. +3MCQ.A. +3MDP.A. +3MG1.A. +3MHS.B. +3MR0.A. +3MSW.A. +3MT0.A. +3MW8.A. +3MWZ.A. +3MZO.A. +3N0R.A. +3N1E.A. +3N6Y.A. +3N9B.A. +3NE8.A. +3NFT.A. +3NKE.A. +3NKG.A. +3NKL.A. +3NO2.A. +3NOH.A. +3NPD.A. +3NQI.A. +3NRF.A. +3NRW.A. +3NS2.A. +3NY3.A. +3NZN.A. +3O6C.A. +3OAJ.A. Modified: trunk/test/pdb/Original data sets/plp399.list =================================================================== --- trunk/test/pdb/Original data sets/plp399.list 2012-01-11 13:03:48 UTC (rev 3550) +++ trunk/test/pdb/Original data sets/plp399.list 2012-01-11 14:58:24 UTC (rev 3551) @@ -1,399 +1,399 @@ -3JU0.A -3JUD.A -2WQF.A -3F8X.A -2X4W.A -2X4J.A -2X4K.A -3LM3.A -3FQG.A -3A57.A -3A5P.A -3FJU.B -2ZQ5.A -2ZQE.A -2ZNR.A -2G1P.A -3G1J.A -3K7X.A -3LLO.A -3IVV.A -3ES4.A -3K0X.A -3K0Z.A -3IWF.A -3MW8.A -3MWZ.A -3FKA.A -3FK8.A -3GMG.A -3I1A.A -3FBL.A -3FB9.A -2WY3.B -3MG1.A -3HA2.A -3H20.A -3LFR.A -2RIV.B -3H5J.A -3H51.A -2VXZ.A -2VXT.I -1US5.A -2WCJ.A -2WCR.A -1EG3.A -3G02.A -3G0M.A -3HOI.A -3HO6.A -3KMI.A -3HRR.A -3HR0.A -3HRL.A -3G21.A -3G2B.A -3G2S.A -3KOS.A -3KOG.A -3C7T.A -2RH3.A -3F62.A -3H0W.A -3H05.A -1DC1.A -3NE8.A -3GDW.A -3L4H.A -3GY9.A -2XMJ.A -2XCJ.A -3IM3.A -3IMK.A -3I2V.A -2WJ5.A -2WJR.A -2WJ9.A -3JSZ.A -3JTW.A -3D59.A -3H9W.A -3H96.A -3FH1.A -3CP7.A -3LYD.A -3LYY.A -3LYG.A -3LYH.A -3I7M.A -3F2E.A -3HZP.A -2XF7.A -2XFV.A -3KZP.A -3KZ5.A -3KZD.A -2WL1.A -3MT0.A -3GFP.A -3KYZ.A -3N0R.A -3EO6.A -3HWU.A -3HWP.A -2WNF.A -3GWH.A -3GWN.A -3K2O.A -2R16.A -3DAN.A -3GNE.A -3GN6.A -3GNZ.P -3OAJ.A -3I0W.A -3C1Q.A -2QL8.A -3CHM.A -3CZ6.A -3EYT.A -2WZO.A -2VZC.A -3FF2.A -3FFV.A -3FF5.A -3NQI.A -2XG5.B -3HH1.A -2VE8.A -3D2Q.A -3NS2.A -3E7U.X -3E7H.A -2P4F.A -3IKB.A -3IKW.A -3NZN.A -3GI7.A -3GIX.A -3KWS.A -3IP4.C -3IPJ.A -3IPF.A -3KUC.B -3ENU.A -2AQ6.A -3KLQ.A -3L15.A -3N9B.A -3NO2.A -3NOH.A -3KDF.A -3KDF.B -3KDE.C -3KDG.A -3KD3.A -3CT6.A -3IG9.A -3L9A.X -3LDC.A -3LDU.A -3FWK.A -3FWZ.A -3A4R.A -3BFQ.G -3GE3.E -3LUM.A -3LUU.A -3LUC.A -3LUR.A -3IU6.A -3IUO.A -3IUW.A -3IUF.A -2OX7.A -3LHR.A -3LHE.A -3LHO.A -3ER7.A -2QZQ.A -3N1E.A -3LQ9.A -2WTP.A -3IC3.A -3M8J.A -2ZCA.A -3F7Q.A -3F7E.A -3MHS.C -3HSH.A -3KKG.A -3KK4.A -3KKF.A -3NRF.A -3NRW.A -3HYN.A -3EMF.A -3EMI.A -3C8L.A -3C8W.A -3IR4.A -3L23.A -3L29.A -3BO6.A -2P1M.A -2ZF9.A -2X32.A -2X3G.A -2QPX.A -3G5B.A -2ZK9.X -3M66.A -3M6J.A -3E8O.A -3E8T.A -3ILW.A -2ILR.A -3BCY.A -3LWG.A -3LWC.A -3H7H.B -2W9Y.A -2JK9.A -3NPD.A -3H8T.A -3M7K.A -3M7O.A -3L6T.A -3JXO.A -2WUU.A -2WUJ.A -2WUX.A -3L51.B -3FAU.A -3L0Q.B -3D85.C -3MCQ.A -3MCB.A -3MCB.B -2R2A.A -3DD7.A -3L3E.A -3N6Y.A -3GZB.A -3FM2.A -3FMY.A -3I84.A -2F1N.A -3LAX.A -3IX3.A -3KE7.A -2XLG.A -3IDU.A -3IDF.A -3ID1.A -3FOV.A -3FOT.A -3FCN.A -3D1R.A -3IBM.A -3EZI.A -3AG3.D -3H6P.C -3H6R.A -3NFT.A -2VQ4.A -3L7H.A -3GXW.A -2VTC.A -3IJM.A -3GOE.A -3EDO.A -3FGR.B -3FG9.A -3FGV.A -3JQY.A -3K69.A -3K6O.A -3BMZ.A -3BM3.A -2WVX.A -3ECH.A -3ECF.A -3O6C.A -3GQQ.A -3LGB.A -3MSW.A -3KXT.A -3BIY.A -3BP6.A -3GBY.A -3GBW.A -3FIA.A -3FID.A -3FX7.A -2ZSI.B -3EHM.A -3EHG.A -3EEH.A -3EER.A -3NKG.A -3NKL.A -3NKE.A -3F4M.A -3F40.A -1T07.A -3JYZ.A -3JYG.A -2W8X.A -3F9S.A -3F95.A -3IT5.A -1PBY.A -2W2R.A -2WPV.B -3F0P.A -3HL1.A -2HLQ.A -3A0Z.A -3NY3.A -3GAE.A -3GA4.A -3GA3.A -2V89.A -3IE4.A -3IEE.A -2TPS.A -3K5J.A -3G7G.A -3JZ9.A -3CNY.A -3KGK.A -3KG9.A -3DSB.A -3DS2.A -3HPC.X -3LS0.A -3GP4.A -3GP6.A -2XDH.A -2XDG.A -2ZX0.A -2ZXY.A -3I4O.A -3IHT.A -2VV6.A -3D3B.J -3D34.A -3LR4.A -3LR2.A -2QEE.A -2QEU.A -3HXL.A -3HX8.A -3M9Q.A -2X2U.A -2X2S.A -2V4X.A -3HFO.A -3G3T.A -3G36.A -3LE4.A -2QJV.A -3MAB.A -3MAL.A -3HVS.A -3HN0.A -3HN5.A -3HTV.A -3EBT.A -3AAP.A -3JRN.A -3MR0.A -2W61.A -2W6A.A -3FRR.A -3EKI.A -2WFO.A -2WFB.A -3MZO.A -3FSS.A -3FSO.A -3GKJ.A -3LXR.F -3M1T.A -3EF8.A -3FYM.A -3FYB.A -2W7N.A -2W7A.A -2X5N.A -2X55.A -3BYQ.A -3BYP.A -3MDP.A -3H3L.A -2RBG.A -3HE5.B -3CKK.A +3JU0.A. +3JUD.A. +2WQF.A. +3F8X.A. +2X4W.A. +2X4J.A. +2X4K.A. +3LM3.A. +3FQG.A. +3A57.A. +3A5P.A. +3FJU.B. +2ZQ5.A. +2ZQE.A. +2ZNR.A. +2G1P.A. +3G1J.A. +3K7X.A. +3LLO.A. +3IVV.A. +3ES4.A. +3K0X.A. +3K0Z.A. +3IWF.A. +3MW8.A. +3MWZ.A. +3FKA.A. +3FK8.A. +3GMG.A. +3I1A.A. +3FBL.A. +3FB9.A. +2WY3.B. +3MG1.A. +3HA2.A. +3H20.A. +3LFR.A. +2RIV.B. +3H5J.A. +3H51.A. +2VXZ.A. +2VXT.I. +1US5.A. +2WCJ.A. +2WCR.A. +1EG3.A. +3G02.A. +3G0M.A. +3HOI.A. +3HO6.A. +3KMI.A. +3HRR.A. +3HR0.A. +3HRL.A. +3G21.A. +3G2B.A. +3G2S.A. +3KOS.A. +3KOG.A. +3C7T.A. +2RH3.A. +3F62.A. +3H0W.A. +3H05.A. +1DC1.A. +3NE8.A. +3GDW.A. +3L4H.A. +3GY9.A. +2XMJ.A. +2XCJ.A. +3IM3.A. +3IMK.A. +3I2V.A. +2WJ5.A. +2WJR.A. +2WJ9.A. +3JSZ.A. +3JTW.A. +3D59.A. +3H9W.A. +3H96.A. +3FH1.A. +3CP7.A. +3LYD.A. +3LYY.A. +3LYG.A. +3LYH.A. +3I7M.A. +3F2E.A. +3HZP.A. +2XF7.A. +2XFV.A. +3KZP.A. +3KZ5.A. +3KZD.A. +2WL1.A. +3MT0.A. +3GFP.A. +3KYZ.A. +3N0R.A. +3EO6.A. +3HWU.A. +3HWP.A. +2WNF.A. +3GWH.A. +3GWN.A. +3K2O.A. +2R16.A. +3DAN.A. +3GNE.A. +3GN6.A. +3GNZ.P. +3OAJ.A. +3I0W.A. +3C1Q.A. +2QL8.A. +3CHM.A. +3CZ6.A. +3EYT.A. +2WZO.A. +2VZC.A. +3FF2.A. +3FFV.A. +3FF5.A. +3NQI.A. +2XG5.B. +3HH1.A. +2VE8.A. +3D2Q.A. +3NS2.A. +3E7U.X. +3E7H.A. +2P4F.A. +3IKB.A. +3IKW.A. +3NZN.A. +3GI7.A. +3GIX.A. +3KWS.A. +3IP4.C. +3IPJ.A. +3IPF.A. +3KUC.B. +3ENU.A. +2AQ6.A. +3KLQ.A. +3L15.A. +3N9B.A. +3NO2.A. +3NOH.A. +3KDF.A. +3KDF.B. +3KDE.C. +3KDG.A. +3KD3.A. +3CT6.A. +3IG9.A. +3L9A.X. +3LDC.A. +3LDU.A. +3FWK.A. +3FWZ.A. +3A4R.A. +3BFQ.G. +3GE3.E. +3LUM.A. +3LUU.A. +3LUC.A. +3LUR.A. +3IU6.A. +3IUO.A. +3IUW.A. +3IUF.A. +2OX7.A. +3LHR.A. +3LHE.A. +3LHO.A. +3ER7.A. +2QZQ.A. +3N1E.A. +3LQ9.A. +2WTP.A. +3IC3.A. +3M8J.A. +2ZCA.A. +3F7Q.A. +3F7E.A. +3MHS.C. +3HSH.A. +3KKG.A. +3KK4.A. +3KKF.A. +3NRF.A. +3NRW.A. +3HYN.A. +3EMF.A. +3EMI.A. +3C8L.A. +3C8W.A. +3IR4.A. +3L23.A. +3L29.A. +3BO6.A. +2P1M.A. +2ZF9.A. +2X32.A. +2X3G.A. +2QPX.A. +3G5B.A. +2ZK9.X. +3M66.A. +3M6J.A. +3E8O.A. +3E8T.A. +3ILW.A. +2ILR.A. +3BCY.A. +3LWG.A. +3LWC.A. +3H7H.B. +2W9Y.A. +2JK9.A. +3NPD.A. +3H8T.A. +3M7K.A. +3M7O.A. +3L6T.A. +3JXO.A. +2WUU.A. +2WUJ.A. +2WUX.A. +3L51.B. +3FAU.A. +3L0Q.B. +3D85.C. +3MCQ.A. +3MCB.A. +3MCB.B. +2R2A.A. +3DD7.A. +3L3E.A. +3N6Y.A. +3GZB.A. +3FM2.A. +3FMY.A. +3I84.A. +2F1N.A. +3LAX.A. +3IX3.A. +3KE7.A. +2XLG.A. +3IDU.A. +3IDF.A. +3ID1.A. +3FOV.A. +3FOT.A. +3FCN.A. +3D1R.A. +3IBM.A. +3EZI.A. +3AG3.D. +3H6P.C. +3H6R.A. +3NFT.A. +2VQ4.A. +3L7H.A. +3GXW.A. +2VTC.A. +3IJM.A. +3GOE.A. +3EDO.A. +3FGR.B. +3FG9.A. +3FGV.A. +3JQY.A. +3K69.A. +3K6O.A. +3BMZ.A. +3BM3.A. +2WVX.A. +3ECH.A. +3ECF.A. +3O6C.A. +3GQQ.A. +3LGB.A. +3MSW.A. +3KXT.A. +3BIY.A. +3BP6.A. +3GBY.A. +3GBW.A. +3FIA.A. +3FID.A. +3FX7.A. +2ZSI.B. +3EHM.A. +3EHG.A. +3EEH.A. +3EER.A. +3NKG.A. +3NKL.A. +3NKE.A. +3F4M.A. +3F40.A. +1T07.A. +3JYZ.A. +3JYG.A. +2W8X.A. +3F9S.A. +3F95.A. +3IT5.A. +1PBY.A. +2W2R.A. +2WPV.B. +3F0P.A. +3HL1.A. +2HLQ.A. +3A0Z.A. +3NY3.A. +3GAE.A. +3GA4.A. +3GA3.A. +2V89.A. +3IE4.A. +3IEE.A. +2TPS.A. +3K5J.A. +3G7G.A. +3JZ9.A. +3CNY.A. +3KGK.A. +3KG9.A. +3DSB.A. +3DS2.A. +3HPC.X. +3LS0.A. +3GP4.A. +3GP6.A. +2XDH.A. +2XDG.A. +2ZX0.A. +2ZXY.A. +3I4O.A. +3IHT.A. +2VV6.A. +3D3B.J. +3D34.A. +3LR4.A. +3LR2.A. +2QEE.A. +2QEU.A. +3HXL.A. +3HX8.A. +3M9Q.A. +2X2U.A. +2X2S.A. +2V4X.A. +3HFO.A. +3G3T.A. +3G36.A. +3LE4.A. +2QJV.A. +3MAB.A. +3MAL.A. +3HVS.A. +3HN0.A. +3HN5.A. +3HTV.A. +3EBT.A. +3AAP.A. +3JRN.A. +3MR0.A. +2W61.A. +2W6A.A. +3FRR.A. +3EKI.A. +2WFO.A. +2WFB.A. +3MZO.A. +3FSS.A. +3FSO.A. +3GKJ.A. +3LXR.F. +3M1T.A. +3EF8.A. +3FYM.A. +3FYB.A. +2W7N.A. +2W7A.A. +2X5N.A. +2X55.A. +3BYQ.A. +3BYP.A. +3MDP.A. +3H3L.A. +2RBG.A. +3HE5.B. +3CKK.A. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <km...@us...> - 2012-01-11 13:03:59
|
Revision: 3550 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=3550&view=rev Author: kmpf Date: 2012-01-11 13:03:48 +0000 (Wed, 11 Jan 2012) Log Message: ----------- Corrected format for .list files Modified Paths: -------------- trunk/test/pdb/bt426.list trunk/test/pdb/plp273.list trunk/test/pdb/plp364.list trunk/test/pdb/plp399.list Modified: trunk/test/pdb/bt426.list =================================================================== --- trunk/test/pdb/bt426.list 2012-01-11 13:00:18 UTC (rev 3549) +++ trunk/test/pdb/bt426.list 2012-01-11 13:03:48 UTC (rev 3550) @@ -1,345 +1,4 @@ -1LMB.3. -8ABP.. -1MRP.. -1G3P.. -1GVP.. -1AT0.. -1AOP.. -1AMP.. -1AK0.. -1BGP.. -2CYP.. -1LAT.B. -1LUC.B. -1MTY.B. -1NBA.B. -1NCI.B. -1KVE.B. -1KWA.B. -1EDM.B. -1FMT.B. -1GOT.B. -1ATZ.B. -1APY.B. -1AQZ.B. -1A28.B. -1BDM.B. -1BEN.B. -1BTK.B. -1CPC.B. -1VWL.B. -1WPO.B. -1PNK.B. -1RYP.2. -5P21.. -1HA1.. -1ECA.. -1FUA.. -1FNA.. -1GSA.. -1A6Q.. -1AK1.. -1ABA.. -1BV1.. -1BA1.. -1TCA.. -1WBA.. -1POA.. -1QBA.. -2BAA.. -3CLA.. -2KIN.B. -5HPG.A. -1LKK.A. -1LTS.A. -1MLD.A. -1MOL.A. -1MKA.A. -1MUG.A. -1MUC.A. -1MPG.A. -1NBC.A. -1NP1.A. -1ONR.A. -1HGX.A. -1HAV.A. -1HCR.A. -1HSB.A. -1IIB.A. -1IDA.A. -1IAK.A. -1ISU.A. -1JET.A. -1JFR.A. -1KVE.A. -1KPT.A. -1DOR.A. -1DOS.A. -1DOK.A. -1DKZ.A. -1DUP.A. -1ECP.A. -1FUR.A. -1FVK.A. -1FWC.A. -1GIF.A. -1GDO.A. -1GAR.A. -1GUQ.A. -1ALV.A. -1ALI.A. -1AMU.A. -1AOZ.A. -1AOQ.A. -1AOH.A. -1AOC.A. -1AJS.A. -1ADO.A. -1AFW.A. -1AGJ.A. -1AT1.A. -1AVM.A. -1AWS.A. -1AQ6.A. -1AQ0.A. -1A7T.A. -1A2Z.A. -1A2Y.A. -1A2P.A. -1A34.A. -1BKR.A. -1BEB.A. -1BFT.A. -1BBP.A. -1CHM.A. -1CKA.A. -1CYD.A. -1XIK.A. -1XGS.A. -1YTB.A. -1TVX.A. -1VCA.A. -1PHN.A. -1RGE.A. -1SLT.A. -1SLU.A. -1SPU.A. -5ICB.. -1NAR.. -1JER.. -1KNB.. -1FDR.. -1A62.. -1ARB.. -1AQB.. -1AJ2.. -1AD2.. -1BYB.. -1C52.. -1CFB.. -1YER.. -1WAB.. -2POR.. -3CYR.. -3SEB.. -3SDH.A. -2HMZ.A. -2ARC.A. -2PSP.A. -8RXN.A. -1HTR.P. -1LIS.. -1MSC.. -1NLS.. -1ORC.. -1HFC.. -1IFC.. -1JPC.. -1FUS.. -1FDS.. -1A9S.. -1AL3.. -1AAC.. -1BGC.. -1C1C.. -1YCC.. -1TYS.. -1VCC.. -1POC.. -1PGS.. -1RHS.. -2CTC.. -2PLC.. -2SNS.. -2SN3.. -3TSS.. -1MTY.G. -1GOT.G. -1LIT.. -1MBD.. -1OPD.. -1IGD.. -1KID.. -1DAD.. -1EDT.. -1FIT.. -1GND.. -1AWD.. -1BRT.. -1BFD.. -1CHD.. -1VSD.. -1VID.. -1PUD.. -1POT.. -1SMD.. -2LBD.. -2HFT.. -2END.. -1RYP.F. -1LBU.. -1MWE.. -1NEU.. -1HOE.. -1KVU.. -1EDE.. -1A8E.. -1ALU.. -1TFE.. -1UAE.. -1PHE.. -1RIE.. -1CSE.E. -1NIF.. -1KPF.. -1ERV.. -1ARV.. -1ANF.. -1BKF.. -1CNV.. -1THV.. -1QNF.. -1LT5.D. -1MTY.D. -1AGQ.D. -1JDW.. -1EDG.. -1AH7.. -1AF7.. -1BFG.. -1RMG.. -2HBG.. -1NOX.. -1IXH.. -1KUH.. -1A68.. -1A1X.. -1AMX.. -1CSH.. -1CEX.. -1THX.. -1VHH.. -2AYH.. -3COX.. -1RYP.J. -1LKI.. -1MSI.. -1MAI.. -1OPY.. -1DXY.. -1GKY.. -1GAI.. -1A8I.. -1ALY.. -1UBI.. -1R69.. -2DRI.. -1FLE.I. -1CEW.I. -1CSE.I. -1YVE.I. -1RYP.I. -1MRJ.. -1AJJ.. -1AKZ.. -1CTJ.. -8RUC.I. -1MSK.. -1NPK.. -1IDK.. -2BBK.H. -1GD1.O. -1LML.. -1LCL.. -1MML.. -1ECL.. -1AYL.. -1AOL.. -153L.. -119L.. -2SIL.. -1LAM.. -1MZM.. -1EZM.. -1AMM.. -1CEM.. -2MCM.. -2GDM.. -1NFN.. -1HXN.. -1DUN.. -1AXN.. -1BTN.. -1CSN.. -1CBN.. -1ISO.. -1IDO.. -1AZO.. -1ALO.. -1AKO.. -1AHO.. -1BDO.. -1CPO.. -1CEO.. -1XJO.. -1PDO.. -1YAI.C. -1TAD.C. -1TSP.. -1WHT.B. -7RSA.. -1PTQ.. -1PDA.. -2FHA.. -2CBA.. -2WEA.. -2PIA.. -5CSM.A. -4PGA.A. -7AHL.A. -6GSV.A. -1XYZ.A. -1YAS.A. -1TRK.A. -1URN.A. -1VPS.A. -1PCF.A. -1RYP.1. -1RVA.A. -1SVP.A. -2I1B.. -2A0B.. -2KIN.A. -2FIV.A. -2CHS.A. -2CCY.A. -2SCP.A. -4XIS.. -1ONC.. -1OIS.. -1VLS.. -1VJS.. -3B5C.. +1CYO.. 1PNE.. 3PTE.. 1REQ.D. Modified: trunk/test/pdb/plp273.list =================================================================== --- trunk/test/pdb/plp273.list 2012-01-11 13:00:18 UTC (rev 3549) +++ trunk/test/pdb/plp273.list 2012-01-11 13:03:48 UTC (rev 3550) @@ -270,4 +270,4 @@ 3NY3.A. 3NZN.A. 3O6C.A. -3OAJ.A +3OAJ.A. Modified: trunk/test/pdb/plp364.list =================================================================== --- trunk/test/pdb/plp364.list 2012-01-11 13:00:18 UTC (rev 3549) +++ trunk/test/pdb/plp364.list 2012-01-11 13:03:48 UTC (rev 3550) @@ -361,4 +361,4 @@ 3NY3.A. 3NZN.A. 3O6C.A. -3OAJ.A +3OAJ.A. Modified: trunk/test/pdb/plp399.list =================================================================== --- trunk/test/pdb/plp399.list 2012-01-11 13:00:18 UTC (rev 3549) +++ trunk/test/pdb/plp399.list 2012-01-11 13:03:48 UTC (rev 3550) @@ -396,4 +396,4 @@ 3H3L.A. 2RBG.A. 3HE5.B. -3CKK.A +3CKK.A. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <km...@us...> - 2012-01-11 13:00:31
|
Revision: 3549 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=3549&view=rev Author: kmpf Date: 2012-01-11 13:00:18 +0000 (Wed, 11 Jan 2012) Log Message: ----------- Added individuals to represent amino acid properties. Modified Paths: -------------- trunk/test/pdb/AA_properties.owl Modified: trunk/test/pdb/AA_properties.owl =================================================================== --- trunk/test/pdb/AA_properties.owl 2012-01-09 16:05:33 UTC (rev 3548) +++ trunk/test/pdb/AA_properties.owl 2012-01-11 13:00:18 UTC (rev 3549) @@ -2,31 +2,31 @@ <!DOCTYPE rdf:RDF [ + <!ENTITY pdb "http://bio2rdf.org/pdb:" > <!ENTITY owl "http://www.w3.org/2002/07/owl#" > <!ENTITY xsd "http://www.w3.org/2001/XMLSchema#" > <!ENTITY owl2xml "http://www.w3.org/2006/12/owl2-xml#" > <!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#" > <!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#" > - <!ENTITY AA_properties "http://dl-learner.org/Projects/DLLearner/Protein_Secondary_Structure_Prediction/AA_properties.owl#" > ]> -<rdf:RDF xmlns="http://dl-learner.org/Projects/DLLearner/Protein_Secondary_Structure_Prediction/AA_properties.owl#" - xml:base="http://dl-learner.org/Projects/DLLearner/Protein_Secondary_Structure_Prediction/AA_properties.owl" +<rdf:RDF xmlns="http://dl-learner.org/pdb:" + xml:base="http://dl-learner.org/pdb:" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:owl2xml="http://www.w3.org/2006/12/owl2-xml#" 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:AA_properties="http://dl-learner.org/Projects/DLLearner/Protein_Secondary_Structure_Prediction/AA_properties.owl#"> - <owl:Ontology rdf:about=""/> + xmlns:pdb="http://bio2rdf.org/pdb:"> + <owl:Ontology rdf:about="http://dl-learner.org/Projects/DLLearner/Protein_Secondary_Structure_Prediction/AA_properties.owl"/> <!-- /////////////////////////////////////////////////////////////////////////////////////// // - // Object Properties + // Annotation properties // /////////////////////////////////////////////////////////////////////////////////////// --> @@ -34,80 +34,72 @@ - <!-- http://dl-learner.org/Projects/DLLearner/Protein_Secondary_Structure_Prediction/AA_properties.owl#relational_property --> + <!-- + /////////////////////////////////////////////////////////////////////////////////////// + // + // Datatypes + // + /////////////////////////////////////////////////////////////////////////////////////// + --> - <owl:ObjectProperty rdf:about="#relational_property"> - <rdfs:label - >relational_property</rdfs:label> - </owl:ObjectProperty> - <!-- http://dl-learner.org/Projects/DLLearner/Protein_Secondary_Structure_Prediction/AA_properties.owl#modifier_property --> + <!-- + /////////////////////////////////////////////////////////////////////////////////////// + // + // Object Properties + // + /////////////////////////////////////////////////////////////////////////////////////// + --> - <owl:ObjectProperty rdf:about="#modifier_property"> - <rdfs:label - >modifier_property</rdfs:label> - </owl:ObjectProperty> - <!-- http://dl-learner.org/Projects/DLLearner/Protein_Secondary_Structure_Prediction/AA_properties.owl#has_hydrophobicity --> + <!-- http://dl-learner.org/pdb:has_hydrophobicity --> - <owl:ObjectProperty rdf:about="#has_hydrophobicity"> - <rdfs:label - >has_hydrophobicity</rdfs:label> - <rdfs:subPropertyOf rdf:resource="#modifier_property"/> + <owl:ObjectProperty rdf:about="http://dl-learner.org/pdb:has_hydrophobicity"> + <rdfs:label>has_hydrophobicity</rdfs:label> + <rdfs:domain rdf:resource="http://dl-learner.org/pdb:Hydrophobicity"/> + <rdfs:subPropertyOf rdf:resource="http://dl-learner.org/pdb:modifier_property"/> </owl:ObjectProperty> - <!-- http://dl-learner.org/Projects/DLLearner/Protein_Secondary_Structure_Prediction/AA_properties.owl#has_size --> + <!-- http://dl-learner.org/pdb:has_polarity --> - <owl:ObjectProperty rdf:about="#has_size"> - <rdfs:label>has_size</rdfs:label> - <rdfs:subPropertyOf rdf:resource="#modifier_property"/> + <owl:ObjectProperty rdf:about="http://dl-learner.org/pdb:has_polarity"> + <rdfs:label>has_polarity</rdfs:label> + <rdfs:subPropertyOf rdf:resource="http://dl-learner.org/pdb:modifier_property"/> </owl:ObjectProperty> - <!-- http://dl-learner.org/Projects/DLLearner/Protein_Secondary_Structure_Prediction/AA_properties.owl#has_polarity --> + <!-- http://dl-learner.org/pdb:has_size --> - <owl:ObjectProperty rdf:about="#has_polarity"> - <rdfs:label>c</rdfs:label> - <rdfs:subPropertyOf rdf:resource="#modifier_property"/> + <owl:ObjectProperty rdf:about="http://dl-learner.org/pdb:has_size"> + <rdfs:label>has_size</rdfs:label> + <rdfs:subPropertyOf rdf:resource="http://dl-learner.org/pdb:modifier_property"/> </owl:ObjectProperty> - <!-- http://dl-learner.org/Projects/DLLearner/Protein_Secondary_Structure_Prediction/AA_properties.owl#has_aromaticity --> + <!-- http://dl-learner.org/pdb:modifier_property --> - <owl:ObjectProperty rdf:about="#has_aromaticity"> - <rdfs:label>has_aromaticity</rdfs:label> - <rdfs:subPropertyOf rdf:resource="#modifier_property"/> + <owl:ObjectProperty rdf:about="http://dl-learner.org/pdb:modifier_property"> + <rdfs:label>modifier_property</rdfs:label> </owl:ObjectProperty> - <!-- http://dl-learner.org/Projects/DLLearner/Protein_Secondary_Structure_Prediction/AA_properties.owl#has_charge --> + <!-- http://dl-learner.org/pdb:relational_property --> - <owl:ObjectProperty rdf:about="#has_charge"> - <rdfs:label>has_charge</rdfs:label> - <rdfs:subPropertyOf rdf:resource="#modifier_property"/> + <owl:ObjectProperty rdf:about="http://dl-learner.org/pdb:relational_property"> + <rdfs:label>relational_property</rdfs:label> </owl:ObjectProperty> - <!-- http://dl-learner.org/Projects/DLLearner/Protein_Secondary_Structure_Prediction/AA_properties.owl#is_in_hydrogen_bond --> - - <owl:ObjectProperty rdf:about="#is_in_hydrogen_bond"> - <rdfs:label - >is_in_hydrogen_bond</rdfs:label> - <rdfs:subPropertyOf rdf:resource="#modifier_property"/> - </owl:ObjectProperty> - - - <!-- /////////////////////////////////////////////////////////////////////////////////////// // @@ -119,1310 +111,735 @@ - <!-- http://dl-learner.org/Projects/DLLearner/Protein_Secondary_Structure_Prediction/AA_properties.owl#Domain_entity --> + <!-- http://bio2rdf.org/pdb:Alanine --> - <owl:Class rdf:about="#Domain_entity"> - <rdfs:label>Domain_entity</rdfs:label> - <rdfs:subClassOf rdf:resource="&owl;Thing"/> - </owl:Class> - - - - <!-- http://dl-learner.org/Projects/DLLearner/Protein_Secondary_Structure_Prediction/AA_properties.owl#Independent_entity --> - - <owl:Class rdf:about="#Independent_entity"> - <rdfs:label - >Independent_entity</rdfs:label> - <rdfs:subClassOf rdf:resource="#Domain_entity"/> - <owl:disjointWith rdf:resource="#Value"/> - </owl:Class> - - - - <!-- http://dl-learner.org/Projects/DLLearner/Protein_Secondary_Structure_Prediction/AA_properties.owl#Value --> - - <owl:Class rdf:about="#Value"> - <rdfs:label>Value</rdfs:label> - <rdfs:subClassOf rdf:resource="#Domain_entity"/> - </owl:Class> - - - - <!-- http://dl-learner.org/Projects/DLLearner/Protein_Secondary_Structure_Prediction/AA_properties.owl#Amino_acid --> - - <owl:Class rdf:about="#Amino_acid"> - <rdfs:label>Amino_acid</rdfs:label> - <rdfs:subClassOf rdf:resource="#Independent_entity"/> - </owl:Class> - - - - <!-- http://dl-learner.org/Projects/DLLearner/Protein_Secondary_Structure_Prediction/AA_properties.owl#Alanine --> - - <owl:Class rdf:about="http://bio2rdf.org/pdb:Alanine"> + <owl:Class rdf:about="&pdb;Alanine"> <rdfs:label>Alanine</rdfs:label> - <rdfs:subClassOf rdf:resource="#Amino_acid"/> + <rdfs:subClassOf rdf:resource="http://dl-learner.org/pdb:Amino_acid"/> <rdfs:subClassOf> <owl:Restriction> - <owl:onProperty rdf:resource="#has_aromaticity"/> - <owl:someValuesFrom rdf:resource="#not_aromatic"/> + <owl:onProperty rdf:resource="http://dl-learner.org/pdb:has_polarity"/> + <owl:hasValue rdf:resource="http://dl-learner.org/pdb:unpolar"/> </owl:Restriction> </rdfs:subClassOf> <rdfs:subClassOf> <owl:Restriction> - <owl:onProperty rdf:resource="#has_charge"/> - <owl:someValuesFrom rdf:resource="#neutral_charge"/> + <owl:onProperty rdf:resource="http://dl-learner.org/pdb:has_hydrophobicity"/> + <owl:hasValue rdf:resource="http://dl-learner.org/pdb:hydrophobic"/> </owl:Restriction> </rdfs:subClassOf> <rdfs:subClassOf> <owl:Restriction> - <owl:onProperty rdf:resource="#has_size"/> - <owl:allValuesFrom> - <owl:Class> - <owl:unionOf rdf:parseType="Collection"> - <rdf:Description rdf:about="#small"/> - <rdf:Description rdf:about="#tiny"/> - </owl:unionOf> - </owl:Class> - </owl:allValuesFrom> + <owl:onProperty rdf:resource="http://dl-learner.org/pdb:has_size"/> + <owl:hasValue rdf:resource="http://dl-learner.org/pdb:tiny"/> </owl:Restriction> </rdfs:subClassOf> - <rdfs:subClassOf> - <owl:Restriction> - <owl:onProperty rdf:resource="#has_polarity"/> - <owl:someValuesFrom rdf:resource="#unpolar"/> - </owl:Restriction> - </rdfs:subClassOf> - <rdfs:subClassOf> - <owl:Restriction> - <owl:onProperty rdf:resource="#has_size"/> - <owl:someValuesFrom rdf:resource="#tiny"/> - </owl:Restriction> - </rdfs:subClassOf> - <rdfs:subClassOf> - <owl:Restriction> - <owl:onProperty rdf:resource="#has_aromaticity"/> - <owl:someValuesFrom rdf:resource="#not_aliphatic"/> - </owl:Restriction> - </rdfs:subClassOf> - <rdfs:subClassOf> - <owl:Restriction> - <owl:onProperty rdf:resource="#has_hydrophobicity"/> - <owl:someValuesFrom rdf:resource="#very_hydrophobic"/> - </owl:Restriction> - </rdfs:subClassOf> - <rdfs:subClassOf> - <owl:Restriction> - <owl:onProperty rdf:resource="#has_size"/> - <owl:someValuesFrom rdf:resource="#small"/> - </owl:Restriction> - </rdfs:subClassOf> </owl:Class> - <!-- http://dl-learner.org/Projects/DLLearner/Protein_Secondary_Structure_Prediction/AA_properties.owl#Arginine --> + <!-- http://bio2rdf.org/pdb:Arginine --> - <owl:Class rdf:about="http://bio2rdf.org/pdb:Arginine"> + <owl:Class rdf:about="&pdb;Arginine"> <rdfs:label>Arginine</rdfs:label> - <rdfs:subClassOf rdf:resource="#Amino_acid"/> + <rdfs:subClassOf rdf:resource="http://dl-learner.org/pdb:Amino_acid"/> <rdfs:subClassOf> <owl:Restriction> - <owl:onProperty rdf:resource="#has_aromaticity"/> - <owl:someValuesFrom rdf:resource="#not_aromatic"/> + <owl:onProperty rdf:resource="http://dl-learner.org/pdb:has_size"/> + <owl:hasValue rdf:resource="http://dl-learner.org/pdb:large"/> </owl:Restriction> </rdfs:subClassOf> <rdfs:subClassOf> <owl:Restriction> - <owl:onProperty rdf:resource="#has_size"/> - <owl:someValuesFrom rdf:resource="#large"/> + <owl:onProperty rdf:resource="http://dl-learner.org/pdb:has_polarity"/> + <owl:hasValue rdf:resource="http://dl-learner.org/pdb:positive"/> </owl:Restriction> </rdfs:subClassOf> <rdfs:subClassOf> <owl:Restriction> - <owl:onProperty rdf:resource="#has_charge"/> - <owl:someValuesFrom rdf:resource="#positive_charge"/> + <owl:onProperty rdf:resource="http://dl-learner.org/pdb:has_hydrophobicity"/> + <owl:hasValue rdf:resource="http://dl-learner.org/pdb:hydrophilic"/> </owl:Restriction> </rdfs:subClassOf> - <rdfs:subClassOf> - <owl:Restriction> - <owl:onProperty rdf:resource="#has_hydrophobicity"/> - <owl:someValuesFrom rdf:resource="#hydrophilic"/> - </owl:Restriction> - </rdfs:subClassOf> - <rdfs:subClassOf> - <owl:Restriction> - <owl:onProperty rdf:resource="#has_aromaticity"/> - <owl:someValuesFrom rdf:resource="#not_aliphatic"/> - </owl:Restriction> - </rdfs:subClassOf> - <rdfs:subClassOf> - <owl:Restriction> - <owl:onProperty rdf:resource="#is_in_hydrogen_bond"/> - <owl:someValuesFrom rdf:resource="#hydrogen_bond_donor"/> - </owl:Restriction> - </rdfs:subClassOf> - <rdfs:subClassOf> - <owl:Restriction> - <owl:onProperty rdf:resource="#has_polarity"/> - <owl:someValuesFrom rdf:resource="#polar"/> - </owl:Restriction> - </rdfs:subClassOf> </owl:Class> - <!-- http://dl-learner.org/Projects/DLLearner/Protein_Secondary_Structure_Prediction/AA_properties.owl#Asparagine --> + <!-- http://bio2rdf.org/pdb:Asparagine --> - <owl:Class rdf:about="http://bio2rdf.org/pdb:Asparagine"> + <owl:Class rdf:about="&pdb;Asparagine"> <rdfs:label>Asparagine</rdfs:label> - <rdfs:subClassOf rdf:resource="#Amino_acid"/> + <rdfs:subClassOf rdf:resource="http://dl-learner.org/pdb:Amino_acid"/> <rdfs:subClassOf> <owl:Restriction> - <owl:onProperty rdf:resource="#has_polarity"/> - <owl:someValuesFrom rdf:resource="#polar"/> + <owl:onProperty rdf:resource="http://dl-learner.org/pdb:has_hydrophobicity"/> + <owl:hasValue rdf:resource="http://dl-learner.org/pdb:hydrophilic"/> </owl:Restriction> </rdfs:subClassOf> <rdfs:subClassOf> <owl:Restriction> - <owl:onProperty rdf:resource="#is_in_hydrogen_bond"/> - <owl:someValuesFrom rdf:resource="#hydrogen_bond_donor"/> + <owl:onProperty rdf:resource="http://dl-learner.org/pdb:has_size"/> + <owl:hasValue rdf:resource="http://dl-learner.org/pdb:small"/> </owl:Restriction> </rdfs:subClassOf> <rdfs:subClassOf> <owl:Restriction> - <owl:onProperty rdf:resource="#has_aromaticity"/> - <owl:someValuesFrom rdf:resource="#not_aliphatic"/> + <owl:onProperty rdf:resource="http://dl-learner.org/pdb:has_polarity"/> + <owl:hasValue rdf:resource="http://dl-learner.org/pdb:polar"/> </owl:Restriction> </rdfs:subClassOf> - <rdfs:subClassOf> - <owl:Restriction> - <owl:onProperty rdf:resource="#has_size"/> - <owl:someValuesFrom rdf:resource="#small"/> - </owl:Restriction> - </rdfs:subClassOf> - <rdfs:subClassOf> - <owl:Restriction> - <owl:onProperty rdf:resource="#has_aromaticity"/> - <owl:someValuesFrom rdf:resource="#not_aromatic"/> - </owl:Restriction> - </rdfs:subClassOf> - <rdfs:subClassOf> - <owl:Restriction> - <owl:onProperty rdf:resource="#has_charge"/> - <owl:someValuesFrom rdf:resource="#neutral_charge"/> - </owl:Restriction> - </rdfs:subClassOf> - <rdfs:subClassOf> - <owl:Restriction> - <owl:onProperty rdf:resource="#is_in_hydrogen_bond"/> - <owl:someValuesFrom rdf:resource="#hydrogen_bond_acceptor"/> - </owl:Restriction> - </rdfs:subClassOf> - <rdfs:subClassOf> - <owl:Restriction> - <owl:onProperty rdf:resource="#has_hydrophobicity"/> - <owl:someValuesFrom rdf:resource="#hydrophilic"/> - </owl:Restriction> - </rdfs:subClassOf> </owl:Class> - <!-- http://dl-learner.org/Projects/DLLearner/Protein_Secondary_Structure_Prediction/AA_properties.owl#Aspartic_acid --> + <!-- http://bio2rdf.org/pdb:Aspartic_acid --> - <owl:Class rdf:about="http://bio2rdf.org/pdb:Aspartic_acid"> + <owl:Class rdf:about="&pdb;Aspartic_acid"> <rdfs:label>Aspartic_acid</rdfs:label> - <rdfs:subClassOf rdf:resource="#Amino_acid"/> + <rdfs:subClassOf rdf:resource="http://dl-learner.org/pdb:Amino_acid"/> <rdfs:subClassOf> <owl:Restriction> - <owl:onProperty rdf:resource="#has_hydrophobicity"/> - <owl:someValuesFrom rdf:resource="#hydrophilic"/> + <owl:onProperty rdf:resource="http://dl-learner.org/pdb:has_polarity"/> + <owl:hasValue rdf:resource="http://dl-learner.org/pdb:negative"/> </owl:Restriction> </rdfs:subClassOf> <rdfs:subClassOf> <owl:Restriction> - <owl:onProperty rdf:resource="#has_aromaticity"/> - <owl:someValuesFrom rdf:resource="#not_aliphatic"/> + <owl:onProperty rdf:resource="http://dl-learner.org/pdb:has_size"/> + <owl:hasValue rdf:resource="http://dl-learner.org/pdb:small"/> </owl:Restriction> </rdfs:subClassOf> <rdfs:subClassOf> <owl:Restriction> - <owl:onProperty rdf:resource="#has_polarity"/> - <owl:someValuesFrom rdf:resource="#polar"/> + <owl:onProperty rdf:resource="http://dl-learner.org/pdb:has_hydrophobicity"/> + <owl:hasValue rdf:resource="http://dl-learner.org/pdb:hydrophilic"/> </owl:Restriction> </rdfs:subClassOf> - <rdfs:subClassOf> - <owl:Restriction> - <owl:onProperty rdf:resource="#has_aromaticity"/> - <owl:someValuesFrom rdf:resource="#not_aromatic"/> - </owl:Restriction> - </rdfs:subClassOf> - <rdfs:subClassOf> - <owl:Restriction> - <owl:onProperty rdf:resource="#has_size"/> - <owl:someValuesFrom rdf:resource="#small"/> - </owl:Restriction> - </rdfs:subClassOf> - <rdfs:subClassOf> - <owl:Restriction> - <owl:onProperty rdf:resource="#has_charge"/> - <owl:someValuesFrom rdf:resource="#negative_charge"/> - </owl:Restriction> - </rdfs:subClassOf> - <rdfs:subClassOf> - <owl:Restriction> - <owl:onProperty rdf:resource="#is_in_hydrogen_bond"/> - <owl:someValuesFrom rdf:resource="#hydrogen_bond_acceptor"/> - </owl:Restriction> - </rdfs:subClassOf> </owl:Class> - <!-- http://dl-learner.org/Projects/DLLearner/Protein_Secondary_Structure_Prediction/AA_properties.owl#Cysteine --> + <!-- http://bio2rdf.org/pdb:Cysteine --> - <owl:Class rdf:about="http://bio2rdf.org/pdb:Cysteine"> + <owl:Class rdf:about="&pdb;Cysteine"> <rdfs:label>Cysteine</rdfs:label> - <rdfs:subClassOf rdf:resource="#Amino_acid"/> + <rdfs:subClassOf rdf:resource="http://dl-learner.org/pdb:Amino_acid"/> <rdfs:subClassOf> <owl:Restriction> - <owl:onProperty rdf:resource="#has_size"/> - <owl:someValuesFrom rdf:resource="#small"/> + <owl:onProperty rdf:resource="http://dl-learner.org/pdb:has_size"/> + <owl:hasValue rdf:resource="http://dl-learner.org/pdb:tiny"/> </owl:Restriction> </rdfs:subClassOf> <rdfs:subClassOf> <owl:Restriction> - <owl:onProperty rdf:resource="#is_in_hydrogen_bond"/> - <owl:someValuesFrom rdf:resource="#hydrogen_bond_donor"/> + <owl:onProperty rdf:resource="http://dl-learner.org/pdb:has_hydrophobicity"/> + <owl:hasValue rdf:resource="http://dl-learner.org/pdb:hydrophobic"/> </owl:Restriction> </rdfs:subClassOf> <rdfs:subClassOf> <owl:Restriction> - <owl:onProperty rdf:resource="#has_aromaticity"/> - <owl:someValuesFrom rdf:resource="#not_aromatic"/> + <owl:onProperty rdf:resource="http://dl-learner.org/pdb:has_polarity"/> + <owl:hasValue rdf:resource="http://dl-learner.org/pdb:polar"/> </owl:Restriction> </rdfs:subClassOf> - <rdfs:subClassOf> - <owl:Restriction> - <owl:onProperty rdf:resource="#is_in_hydrogen_bond"/> - <owl:someValuesFrom rdf:resource="#hydrogen_bond_acceptor"/> - </owl:Restriction> - </rdfs:subClassOf> - <rdfs:subClassOf> - <owl:Restriction> - <owl:onProperty rdf:resource="#has_aromaticity"/> - <owl:someValuesFrom rdf:resource="#not_aliphatic"/> - </owl:Restriction> - </rdfs:subClassOf> - <rdfs:subClassOf> - <owl:Restriction> - <owl:onProperty rdf:resource="#has_polarity"/> - <owl:someValuesFrom rdf:resource="#unpolar"/> - </owl:Restriction> - </rdfs:subClassOf> - <rdfs:subClassOf> - <owl:Restriction> - <owl:onProperty rdf:resource="#has_hydrophobicity"/> - <owl:someValuesFrom rdf:resource="#hydrophobic"/> - </owl:Restriction> - </rdfs:subClassOf> - <rdfs:subClassOf> - <owl:Restriction> - <owl:onProperty rdf:resource="#has_charge"/> - <owl:someValuesFrom rdf:resource="#neutral_charge"/> - </owl:Restriction> - </rdfs:subClassOf> </owl:Class> - <!-- http://dl-learner.org/Projects/DLLearner/Protein_Secondary_Structure_Prediction/AA_properties.owl#Glutamic_acid --> + <!-- http://bio2rdf.org/pdb:Glutamic_acid --> - <owl:Class rdf:about="http://bio2rdf.org/pdb:Glutamic_acid"> + <owl:Class rdf:about="&pdb;Glutamic_acid"> <rdfs:label>Glutamic_acid</rdfs:label> - <rdfs:subClassOf rdf:resource="#Amino_acid"/> + <rdfs:subClassOf rdf:resource="http://dl-learner.org/pdb:Amino_acid"/> <rdfs:subClassOf> <owl:Restriction> - <owl:onProperty rdf:resource="#has_hydrophobicity"/> - <owl:someValuesFrom rdf:resource="#hydrophilic"/> + <owl:onProperty rdf:resource="http://dl-learner.org/pdb:has_polarity"/> + <owl:hasValue rdf:resource="http://dl-learner.org/pdb:negative"/> </owl:Restriction> </rdfs:subClassOf> <rdfs:subClassOf> <owl:Restriction> - <owl:onProperty rdf:resource="#has_aromaticity"/> - <owl:someValuesFrom rdf:resource="#not_aromatic"/> + <owl:onProperty rdf:resource="http://dl-learner.org/pdb:has_size"/> + <owl:hasValue rdf:resource="http://dl-learner.org/pdb:large"/> </owl:Restriction> </rdfs:subClassOf> <rdfs:subClassOf> <owl:Restriction> - <owl:onProperty rdf:resource="#has_polarity"/> - <owl:someValuesFrom rdf:resource="#polar"/> + <owl:onProperty rdf:resource="http://dl-learner.org/pdb:has_hydrophobicity"/> + <owl:hasValue rdf:resource="http://dl-learner.org/pdb:hydrophilic"/> </owl:Restriction> </rdfs:subClassOf> - <rdfs:subClassOf> - <owl:Restriction> - <owl:onProperty rdf:resource="#has_charge"/> - <owl:someValuesFrom rdf:resource="#negative_charge"/> - </owl:Restriction> - </rdfs:subClassOf> - <rdfs:subClassOf> - <owl:Restriction> - <owl:onProperty rdf:resource="#is_in_hydrogen_bond"/> - <owl:someValuesFrom rdf:resource="#hydrogen_bond_acceptor"/> - </owl:Restriction> - </rdfs:subClassOf> - <rdfs:subClassOf> - <owl:Restriction> - <owl:onProperty rdf:resource="#has_aromaticity"/> - <owl:someValuesFrom rdf:resource="#not_aliphatic"/> - </owl:Restriction> - </rdfs:subClassOf> - <rdfs:subClassOf> - <owl:Restriction> - <owl:onProperty rdf:resource="#has_size"/> - <owl:someValuesFrom rdf:resource="#large"/> - </owl:Restriction> - </rdfs:subClassOf> </owl:Class> - <!-- http://dl-learner.org/Projects/DLLearner/Protein_Secondary_Structure_Prediction/AA_properties.owl#Glutamine --> + <!-- http://bio2rdf.org/pdb:Glutamine --> - <owl:Class rdf:about="http://bio2rdf.org/pdb:Glutamine"> + <owl:Class rdf:about="&pdb;Glutamine"> <rdfs:label>Glutamine</rdfs:label> - <rdfs:subClassOf rdf:resource="#Amino_acid"/> + <rdfs:subClassOf rdf:resource="http://dl-learner.org/pdb:Amino_acid"/> <rdfs:subClassOf> <owl:Restriction> - <owl:onProperty rdf:resource="#is_in_hydrogen_bond"/> - <owl:someValuesFrom rdf:resource="#hydrogen_bond_donor"/> + <owl:onProperty rdf:resource="http://dl-learner.org/pdb:has_hydrophobicity"/> + <owl:hasValue rdf:resource="http://dl-learner.org/pdb:hydrophilic"/> </owl:Restriction> </rdfs:subClassOf> <rdfs:subClassOf> <owl:Restriction> - <owl:onProperty rdf:resource="#has_aromaticity"/> - <owl:someValuesFrom rdf:resource="#not_aliphatic"/> + <owl:onProperty rdf:resource="http://dl-learner.org/pdb:has_size"/> + <owl:hasValue rdf:resource="http://dl-learner.org/pdb:large"/> </owl:Restriction> </rdfs:subClassOf> <rdfs:subClassOf> <owl:Restriction> - <owl:onProperty rdf:resource="#has_hydrophobicity"/> - <owl:someValuesFrom rdf:resource="#hydrophilic"/> + <owl:onProperty rdf:resource="http://dl-learner.org/pdb:has_polarity"/> + <owl:hasValue rdf:resource="http://dl-learner.org/pdb:polar"/> </owl:Restriction> </rdfs:subClassOf> - <rdfs:subClassOf> - <owl:Restriction> - <owl:onProperty rdf:resource="#has_charge"/> - <owl:someValuesFrom rdf:resource="#neutral_charge"/> - </owl:Restriction> - </rdfs:subClassOf> - <rdfs:subClassOf> - <owl:Restriction> - <owl:onProperty rdf:resource="#has_polarity"/> - <owl:someValuesFrom rdf:resource="#polar"/> - </owl:Restriction> - </rdfs:subClassOf> - <rdfs:subClassOf> - <owl:Restriction> - <owl:onProperty rdf:resource="#has_size"/> - <owl:someValuesFrom rdf:resource="#large"/> - </owl:Restriction> - </rdfs:subClassOf> - <rdfs:subClassOf> - <owl:Restriction> - <owl:onProperty rdf:resource="#has_aromaticity"/> - <owl:someValuesFrom rdf:resource="#not_aromatic"/> - </owl:Restriction> - </rdfs:subClassOf> - <rdfs:subClassOf> - <owl:Restriction> - <owl:onProperty rdf:resource="#is_in_hydrogen_bond"/> - <owl:someValuesFrom rdf:resource="#hydrogen_bond_acceptor"/> - </owl:Restriction> - </rdfs:subClassOf> </owl:Class> - <!-- http://dl-learner.org/Projects/DLLearner/Protein_Secondary_Structure_Prediction/AA_properties.owl#Glycine --> + <!-- http://bio2rdf.org/pdb:Glycine --> - <owl:Class rdf:about="http://bio2rdf.org/pdb:Glycine"> + <owl:Class rdf:about="&pdb;Glycine"> <rdfs:label>Glycine</rdfs:label> - <rdfs:subClassOf rdf:resource="#Amino_acid"/> + <rdfs:subClassOf rdf:resource="http://dl-learner.org/pdb:Amino_acid"/> <rdfs:subClassOf> <owl:Restriction> - <owl:onProperty rdf:resource="#has_aromaticity"/> - <owl:someValuesFrom rdf:resource="#not_aromatic"/> + <owl:onProperty rdf:resource="http://dl-learner.org/pdb:has_polarity"/> + <owl:hasValue rdf:resource="http://dl-learner.org/pdb:unpolar"/> </owl:Restriction> </rdfs:subClassOf> <rdfs:subClassOf> <owl:Restriction> - <owl:onProperty rdf:resource="#has_hydrophobicity"/> - <owl:someValuesFrom rdf:resource="#very_hydrophobic"/> + <owl:onProperty rdf:resource="http://dl-learner.org/pdb:has_size"/> + <owl:hasValue rdf:resource="http://dl-learner.org/pdb:tiny"/> </owl:Restriction> </rdfs:subClassOf> <rdfs:subClassOf> <owl:Restriction> - <owl:onProperty rdf:resource="#has_aromaticity"/> - <owl:someValuesFrom rdf:resource="#not_aliphatic"/> + <owl:onProperty rdf:resource="http://dl-learner.org/pdb:has_hydrophobicity"/> + <owl:hasValue rdf:resource="http://dl-learner.org/pdb:hydrophobic"/> </owl:Restriction> </rdfs:subClassOf> - <rdfs:subClassOf> - <owl:Restriction> - <owl:onProperty rdf:resource="#has_size"/> - <owl:someValuesFrom rdf:resource="#small"/> - </owl:Restriction> - </rdfs:subClassOf> - <rdfs:subClassOf> - <owl:Restriction> - <owl:onProperty rdf:resource="#has_charge"/> - <owl:someValuesFrom rdf:resource="#neutral_charge"/> - </owl:Restriction> - </rdfs:subClassOf> - <rdfs:subClassOf> - <owl:Restriction> - <owl:onProperty rdf:resource="#has_size"/> - <owl:someValuesFrom rdf:resource="#tiny"/> - </owl:Restriction> - </rdfs:subClassOf> - <rdfs:subClassOf> - <owl:Restriction> - <owl:onProperty rdf:resource="#has_polarity"/> - <owl:someValuesFrom rdf:resource="#unpolar"/> - </owl:Restriction> - </rdfs:subClassOf> </owl:Class> - <!-- http://dl-learner.org/Projects/DLLearner/Protein_Secondary_Structure_Prediction/AA_properties.owl#Histidine --> + <!-- http://bio2rdf.org/pdb:Histidine --> - <owl:Class rdf:about="http://bio2rdf.org/pdb:Histidine"> + <owl:Class rdf:about="&pdb;Histidine"> <rdfs:label>Histidine</rdfs:label> - <rdfs:subClassOf rdf:resource="#Amino_acid"/> + <rdfs:subClassOf rdf:resource="http://dl-learner.org/pdb:Amino_acid"/> <rdfs:subClassOf> <owl:Restriction> - <owl:onProperty rdf:resource="#has_charge"/> - <owl:someValuesFrom rdf:resource="#positive_charge"/> + <owl:onProperty rdf:resource="http://dl-learner.org/pdb:has_polarity"/> + <owl:hasValue rdf:resource="http://dl-learner.org/pdb:positive"/> </owl:Restriction> </rdfs:subClassOf> <rdfs:subClassOf> <owl:Restriction> - <owl:onProperty rdf:resource="#has_hydrophobicity"/> - <owl:someValuesFrom rdf:resource="#hydrophobic"/> + <owl:onProperty rdf:resource="http://dl-learner.org/pdb:has_size"/> + <owl:hasValue rdf:resource="http://dl-learner.org/pdb:large"/> </owl:Restriction> </rdfs:subClassOf> <rdfs:subClassOf> <owl:Restriction> - <owl:onProperty rdf:resource="#has_aromaticity"/> - <owl:someValuesFrom rdf:resource="#not_aliphatic"/> + <owl:onProperty rdf:resource="http://dl-learner.org/pdb:has_hydrophobicity"/> + <owl:hasValue rdf:resource="http://dl-learner.org/pdb:aromatic"/> </owl:Restriction> </rdfs:subClassOf> - <rdfs:subClassOf> - <owl:Restriction> - <owl:onProperty rdf:resource="#has_polarity"/> - <owl:someValuesFrom rdf:resource="#polar"/> - </owl:Restriction> - </rdfs:subClassOf> - <rdfs:subClassOf> - <owl:Restriction> - <owl:onProperty rdf:resource="#has_size"/> - <owl:someValuesFrom rdf:resource="#large"/> - </owl:Restriction> - </rdfs:subClassOf> - <rdfs:subClassOf> - <owl:Restriction> - <owl:onProperty rdf:resource="#has_aromaticity"/> - <owl:someValuesFrom rdf:resource="#aromatic"/> - </owl:Restriction> - </rdfs:subClassOf> - <rdfs:subClassOf> - <owl:Restriction> - <owl:onProperty rdf:resource="#is_in_hydrogen_bond"/> - <owl:someValuesFrom rdf:resource="#hydrogen_bond_donor"/> - </owl:Restriction> - </rdfs:subClassOf> </owl:Class> - <!-- http://dl-learner.org/Projects/DLLearner/Protein_Secondary_Structure_Prediction/AA_properties.owl#Isoleucine --> + <!-- http://bio2rdf.org/pdb:Isoleucine --> - <owl:Class rdf:about="http://bio2rdf.org/pdb:Isoleucine"> + <owl:Class rdf:about="&pdb;Isoleucine"> <rdfs:label>Isoleucine</rdfs:label> - <rdfs:subClassOf rdf:resource="#Amino_acid"/> + <rdfs:subClassOf rdf:resource="http://dl-learner.org/pdb:Amino_acid"/> <rdfs:subClassOf> <owl:Restriction> - <owl:onProperty rdf:resource="#has_hydrophobicity"/> - <owl:someValuesFrom rdf:resource="#very_hydrophobic"/> + <owl:onProperty rdf:resource="http://dl-learner.org/pdb:has_size"/> + <owl:hasValue rdf:resource="http://dl-learner.org/pdb:large"/> </owl:Restriction> </rdfs:subClassOf> <rdfs:subClassOf> <owl:Restriction> - <owl:onProperty rdf:resource="#has_aromaticity"/> - <owl:someValuesFrom rdf:resource="#aliphatic"/> + <owl:onProperty rdf:resource="http://dl-learner.org/pdb:has_hydrophobicity"/> + <owl:hasValue rdf:resource="http://dl-learner.org/pdb:aliphatic"/> </owl:Restriction> </rdfs:subClassOf> <rdfs:subClassOf> <owl:Restriction> - <owl:onProperty rdf:resource="#has_charge"/> - <owl:someValuesFrom rdf:resource="#neutral_charge"/> + <owl:onProperty rdf:resource="http://dl-learner.org/pdb:has_polarity"/> + <owl:hasValue rdf:resource="http://dl-learner.org/pdb:unpolar"/> </owl:Restriction> </rdfs:subClassOf> - <rdfs:subClassOf> - <owl:Restriction> - <owl:onProperty rdf:resource="#has_polarity"/> - <owl:someValuesFrom rdf:resource="#unpolar"/> - </owl:Restriction> - </rdfs:subClassOf> - <rdfs:subClassOf> - <owl:Restriction> - <owl:onProperty rdf:resource="#has_size"/> - <owl:someValuesFrom rdf:resource="#large"/> - </owl:Restriction> - </rdfs:subClassOf> - <rdfs:subClassOf> - <owl:Restriction> - <owl:onProperty rdf:resource="#has_aromaticity"/> - <owl:someValuesFrom rdf:resource="#not_aromatic"/> - </owl:Restriction> - </rdfs:subClassOf> </owl:Class> - <!-- http://dl-learner.org/Projects/DLLearner/Protein_Secondary_Structure_Prediction/AA_properties.owl#Leucine --> + <!-- http://bio2rdf.org/pdb:Leucine --> - <owl:Class rdf:about="http://bio2rdf.org/pdb:Leucine"> + <owl:Class rdf:about="&pdb;Leucine"> <rdfs:label>Leucine</rdfs:label> - <rdfs:subClassOf rdf:resource="#Amino_acid"/> + <rdfs:subClassOf rdf:resource="http://dl-learner.org/pdb:Amino_acid"/> <rdfs:subClassOf> <owl:Restriction> - <owl:onProperty rdf:resource="#has_aromaticity"/> - <owl:someValuesFrom rdf:resource="#not_aromatic"/> + <owl:onProperty rdf:resource="http://dl-learner.org/pdb:has_hydrophobicity"/> + <owl:hasValue rdf:resource="http://dl-learner.org/pdb:aliphatic"/> </owl:Restriction> </rdfs:subClassOf> <rdfs:subClassOf> <owl:Restriction> - <owl:onProperty rdf:resource="#has_hydrophobicity"/> - <owl:someValuesFrom rdf:resource="#very_hydrophobic"/> + <owl:onProperty rdf:resource="http://dl-learner.org/pdb:has_polarity"/> + <owl:hasValue rdf:resource="http://dl-learner.org/pdb:unpolar"/> </owl:Restriction> </rdfs:subClassOf> <rdfs:subClassOf> <owl:Restriction> - <owl:onProperty rdf:resource="#has_aromaticity"/> - <owl:someValuesFrom rdf:resource="#not_aliphatic"/> + <owl:onProperty rdf:resource="http://dl-learner.org/pdb:has_size"/> + <owl:hasValue rdf:resource="http://dl-learner.org/pdb:large"/> </owl:Restriction> </rdfs:subClassOf> - <rdfs:subClassOf> - <owl:Restriction> - <owl:onProperty rdf:resource="#has_charge"/> - <owl:someValuesFrom rdf:resource="#neutral_charge"/> - </owl:Restriction> - </rdfs:subClassOf> - <rdfs:subClassOf> - <owl:Restriction> - <owl:onProperty rdf:resource="#has_polarity"/> - <owl:someValuesFrom rdf:resource="#unpolar"/> - </owl:Restriction> - </rdfs:subClassOf> - <rdfs:subClassOf> - <owl:Restriction> - <owl:onProperty rdf:resource="#has_size"/> - <owl:someValuesFrom rdf:resource="#large"/> - </owl:Restriction> - </rdfs:subClassOf> </owl:Class> - <!-- http://dl-learner.org/Projects/DLLearner/Protein_Secondary_Structure_Prediction/AA_properties.owl#Lysine --> + <!-- http://bio2rdf.org/pdb:Lysine --> - <owl:Class rdf:about="http://bio2rdf.org/pdb:Lysine"> + <owl:Class rdf:about="&pdb;Lysine"> <rdfs:label>Lysine</rdfs:label> - <rdfs:subClassOf rdf:resource="#Amino_acid"/> + <rdfs:subClassOf rdf:resource="http://dl-learner.org/pdb:Amino_acid"/> <rdfs:subClassOf> <owl:Restriction> - <owl:onProperty rdf:resource="#has_aromaticity"/> - <owl:someValuesFrom rdf:resource="#not_aromatic"/> + <owl:onProperty rdf:resource="http://dl-learner.org/pdb:has_size"/> + <owl:hasValue rdf:resource="http://dl-learner.org/pdb:large"/> </owl:Restriction> </rdfs:subClassOf> <rdfs:subClassOf> <owl:Restriction> - <owl:onProperty rdf:resource="#has_hydrophobicity"/> - <owl:someValuesFrom rdf:resource="#hydrophobic"/> + <owl:onProperty rdf:resource="http://dl-learner.org/pdb:has_polarity"/> + <owl:hasValue rdf:resource="http://dl-learner.org/pdb:positive"/> </owl:Restriction> </rdfs:subClassOf> <rdfs:subClassOf> <owl:Restriction> - <owl:onProperty rdf:resource="#has_aromaticity"/> - <owl:someValuesFrom rdf:resource="#aliphatic"/> + <owl:onProperty rdf:resource="http://dl-learner.org/pdb:has_hydrophobicity"/> + <owl:hasValue rdf:resource="http://dl-learner.org/pdb:hydrophobic"/> </owl:Restriction> </rdfs:subClassOf> - <rdfs:subClassOf> - <owl:Restriction> - <owl:onProperty rdf:resource="#has_size"/> - <owl:someValuesFrom rdf:resource="#large"/> - </owl:Restriction> - </rdfs:subClassOf> - <rdfs:subClassOf> - <owl:Restriction> - <owl:onProperty rdf:resource="#has_charge"/> - <owl:someValuesFrom rdf:resource="#positive_charge"/> - </owl:Restriction> - </rdfs:subClassOf> - <rdfs:subClassOf> - <owl:Restriction> - <owl:onProperty rdf:resource="#is_in_hydrogen_bond"/> - <owl:someValuesFrom rdf:resource="#hydrogen_bond_donor"/> - </owl:Restriction> - </rdfs:subClassOf> - <rdfs:subClassOf> - <owl:Restriction> - <owl:onProperty rdf:resource="#has_polarity"/> - <owl:someValuesFrom rdf:resource="#polar"/> - </owl:Restriction> - </rdfs:subClassOf> </owl:Class> - <!-- http://dl-learner.org/Projects/DLLearner/Protein_Secondary_Structure_Prediction/AA_properties.owl#Methionine --> + <!-- http://bio2rdf.org/pdb:Methionine --> - <owl:Class rdf:about="http://bio2rdf.org/pdb:Methionine"> + <owl:Class rdf:about="&pdb;Methionine"> <rdfs:label>Methionine</rdfs:label> - <rdfs:subClassOf rdf:resource="#Amino_acid"/> + <rdfs:subClassOf rdf:resource="http://dl-learner.org/pdb:Amino_acid"/> <rdfs:subClassOf> <owl:Restriction> - <owl:onProperty rdf:resource="#has_size"/> - <owl:someValuesFrom rdf:resource="#large"/> + <owl:onProperty rdf:resource="http://dl-learner.org/pdb:has_polarity"/> + <owl:hasValue rdf:resource="http://dl-learner.org/pdb:unpolar"/> </owl:Restriction> </rdfs:subClassOf> <rdfs:subClassOf> <owl:Restriction> - <owl:onProperty rdf:resource="#has_aromaticity"/> - <owl:someValuesFrom rdf:resource="#not_aromatic"/> + <owl:onProperty rdf:resource="http://dl-learner.org/pdb:has_hydrophobicity"/> + <owl:hasValue rdf:resource="http://dl-learner.org/pdb:hydrophobic"/> </owl:Restriction> </rdfs:subClassOf> <rdfs:subClassOf> <owl:Restriction> - <owl:onProperty rdf:resource="#has_aromaticity"/> - <owl:someValuesFrom rdf:resource="#not_aliphatic"/> + <owl:onProperty rdf:resource="http://dl-learner.org/pdb:has_size"/> + <owl:hasValue rdf:resource="http://dl-learner.org/pdb:large"/> </owl:Restriction> </rdfs:subClassOf> - <rdfs:subClassOf> - <owl:Restriction> - <owl:onProperty rdf:resource="#has_hydrophobicity"/> - <owl:someValuesFrom rdf:resource="#very_hydrophobic"/> - </owl:Restriction> - </rdfs:subClassOf> - <rdfs:subClassOf> - <owl:Restriction> - <owl:onProperty rdf:resource="#has_polarity"/> - <owl:someValuesFrom rdf:resource="#unpolar"/> - </owl:Restriction> - </rdfs:subClassOf> - <rdfs:subClassOf> - <owl:Restriction> - <owl:onProperty rdf:resource="#has_charge"/> - <owl:someValuesFrom rdf:resource="#neutral_charge"/> - </owl:Restriction> - </rdfs:subClassOf> </owl:Class> - <!-- http://dl-learner.org/Projects/DLLearner/Protein_Secondary_Structure_Prediction/AA_properties.owl#Phenylalanine --> + <!-- http://bio2rdf.org/pdb:Phenylalanine --> - <owl:Class rdf:about="http://bio2rdf.org/pdb:Phenylalanine"> + <owl:Class rdf:about="&pdb;Phenylalanine"> <rdfs:label>Phenylalanine</rdfs:label> - <rdfs:subClassOf rdf:resource="#Amino_acid"/> + <rdfs:subClassOf rdf:resource="http://dl-learner.org/pdb:Amino_acid"/> <rdfs:subClassOf> <owl:Restriction> - <owl:onProperty rdf:resource="#has_charge"/> - <owl:someValuesFrom rdf:resource="#neutral_charge"/> + <owl:onProperty rdf:resource="http://dl-learner.org/pdb:has_polarity"/> + <owl:hasValue rdf:resource="http://dl-learner.org/pdb:unpolar"/> </owl:Restriction> </rdfs:subClassOf> <rdfs:subClassOf> <owl:Restriction> - <owl:onProperty rdf:resource="#has_aromaticity"/> - <owl:someValuesFrom rdf:resource="#not_aliphatic"/> + <owl:onProperty rdf:resource="http://dl-learner.org/pdb:has_hydrophobicity"/> + <owl:hasValue rdf:resource="http://dl-learner.org/pdb:aromatic"/> </owl:Restriction> </rdfs:subClassOf> <rdfs:subClassOf> <owl:Restriction> - <owl:onProperty rdf:resource="#has_hydrophobicity"/> - <owl:someValuesFrom rdf:resource="#very_hydrophobic"/> + <owl:onProperty rdf:resource="http://dl-learner.org/pdb:has_size"/> + <owl:hasValue rdf:resource="http://dl-learner.org/pdb:large"/> </owl:Restriction> </rdfs:subClassOf> - <rdfs:subClassOf> - <owl:Restriction> - <owl:onProperty rdf:resource="#has_size"/> - <owl:someValuesFrom rdf:resource="#large"/> - </owl:Restriction> - </rdfs:subClassOf> - <rdfs:subClassOf> - <owl:Restriction> - <owl:onProperty rdf:resource="#has_polarity"/> - <owl:someValuesFrom rdf:resource="#unpolar"/> - </owl:Restriction> - </rdfs:subClassOf> - <rdfs:subClassOf> - <owl:Restriction> - <owl:onProperty rdf:resource="#has_aromaticity"/> - <owl:someValuesFrom rdf:resource="#aromatic"/> - </owl:Restriction> - </rdfs:subClassOf> </owl:Class> - <!-- http://dl-learner.org/Projects/DLLearner/Protein_Secondary_Structure_Prediction/AA_properties.owl#Proline --> + <!-- http://bio2rdf.org/pdb:Proline --> - <owl:Class rdf:about="http://bio2rdf.org/pdb:Proline"> + <owl:Class rdf:about="&pdb;Proline"> <rdfs:label>Proline</rdfs:label> - <rdfs:subClassOf rdf:resource="#Amino_acid"/> + <rdfs:subClassOf rdf:resource="http://dl-learner.org/pdb:Amino_acid"/> <rdfs:subClassOf> <owl:Restriction> - <owl:onProperty rdf:resource="#has_charge"/> - <owl:someValuesFrom rdf:resource="#neutral_charge"/> + <owl:onProperty rdf:resource="http://dl-learner.org/pdb:has_hydrophobicity"/> + <owl:hasValue rdf:resource="http://dl-learner.org/pdb:hydrophilic"/> </owl:Restriction> </rdfs:subClassOf> <rdfs:subClassOf> <owl:Restriction> - <owl:onProperty rdf:resource="#has_aromaticity"/> - <owl:someValuesFrom rdf:resource="#not_aromatic"/> + <owl:onProperty rdf:resource="http://dl-learner.org/pdb:has_polarity"/> + <owl:hasValue rdf:resource="http://dl-learner.org/pdb:unpolar"/> </owl:Restriction> </rdfs:subClassOf> <rdfs:subClassOf> <owl:Restriction> - <owl:onProperty rdf:resource="#has_polarity"/> - <owl:someValuesFrom rdf:resource="#unpolar"/> + <owl:onProperty rdf:resource="http://dl-learner.org/pdb:has_size"/> + <owl:hasValue rdf:resource="http://dl-learner.org/pdb:small"/> </owl:Restriction> </rdfs:subClassOf> - <rdfs:subClassOf> - <owl:Restriction> - <owl:onProperty rdf:resource="#has_aromaticity"/> - <owl:someValuesFrom rdf:resource="#not_aliphatic"/> - </owl:Restriction> - </rdfs:subClassOf> - <rdfs:subClassOf> - <owl:Restriction> - <owl:onProperty rdf:resource="#has_size"/> - <owl:someValuesFrom rdf:resource="#small"/> - </owl:Restriction> - </rdfs:subClassOf> </owl:Class> - <!-- http://dl-learner.org/Projects/DLLearner/Protein_Secondary_Structure_Prediction/AA_properties.owl#Serine --> + <!-- http://bio2rdf.org/pdb:Serine --> - <owl:Class rdf:about="http://bio2rdf.org/pdb:Serine"> + <owl:Class rdf:about="&pdb;Serine"> <rdfs:label>Serine</rdfs:label> - <rdfs:subClassOf rdf:resource="#Amino_acid"/> + <rdfs:subClassOf rdf:resource="http://dl-learner.org/pdb:Amino_acid"/> <rdfs:subClassOf> <owl:Restriction> - <owl:onProperty rdf:resource="#has_aromaticity"/> - <owl:someValuesFrom rdf:resource="#not_aliphatic"/> + <owl:onProperty rdf:resource="http://dl-learner.org/pdb:has_hydrophobicity"/> + <owl:hasValue rdf:resource="http://dl-learner.org/pdb:hydrophilic"/> </owl:Restriction> </rdfs:subClassOf> <rdfs:subClassOf> <owl:Restriction> - <owl:onProperty rdf:resource="#is_in_hydrogen_bond"/> - <owl:someValuesFrom rdf:resource="#hydrogen_bond_acceptor"/> + <owl:onProperty rdf:resource="http://dl-learner.org/pdb:has_polarity"/> + <owl:hasValue rdf:resource="http://dl-learner.org/pdb:polar"/> </owl:Restriction> </rdfs:subClassOf> <rdfs:subClassOf> <owl:Restriction> - <owl:onProperty rdf:resource="#has_size"/> - <owl:someValuesFrom rdf:resource="#small"/> + <owl:onProperty rdf:resource="http://dl-learner.org/pdb:has_size"/> + <owl:hasValue rdf:resource="http://dl-learner.org/pdb:tiny"/> </owl:Restriction> </rdfs:subClassOf> - <rdfs:subClassOf> - <owl:Restriction> - <owl:onProperty rdf:resource="#has_polarity"/> - <owl:someValuesFrom rdf:resource="#polar"/> - </owl:Restriction> - </rdfs:subClassOf> - <rdfs:subClassOf> - <owl:Restriction> - <owl:onProperty rdf:resource="#has_size"/> - <owl:someValuesFrom rdf:resource="#tiny"/> - </owl:Restriction> - </rdfs:subClassOf> - <rdfs:subClassOf> - <owl:Restriction> - <owl:onProperty rdf:resource="#has_charge"/> - <owl:someValuesFrom rdf:resource="#neutral_charge"/> - </owl:Restriction> - </rdfs:subClassOf> - <rdfs:subClassOf> - <owl:Restriction> - <owl:onProperty rdf:resource="#has_hydrophobicity"/> - <owl:someValuesFrom rdf:resource="#hydrophilic"/> - </owl:Restriction> - </rdfs:subClassOf> - <rdfs:subClassOf> - <owl:Restriction> - <owl:onProperty rdf:resource="#is_in_hydrogen_bond"/> - <owl:someValuesFrom rdf:resource="#hydrogen_bond_donor"/> - </owl:Restriction> - </rdfs:subClassOf> - <rdfs:subClassOf> - <owl:Restriction> - <owl:onProperty rdf:resource="#has_aromaticity"/> - <owl:someValuesFrom rdf:resource="#not_aromatic"/> - </owl:Restriction> - </rdfs:subClassOf> </owl:Class> - <!-- http://dl-learner.org/Projects/DLLearner/Protein_Secondary_Structure_Prediction/AA_properties.owl#Threonine --> + <!-- http://bio2rdf.org/pdb:Threonine --> - <owl:Class rdf:about="http://bio2rdf.org/pdb:Threonine"> + <owl:Class rdf:about="&pdb;Threonine"> <rdfs:label>Threonine</rdfs:label> - <rdfs:subClassOf rdf:resource="#Amino_acid"/> + <rdfs:subClassOf rdf:resource="http://dl-learner.org/pdb:Amino_acid"/> <rdfs:subClassOf> <owl:Restriction> - <owl:onProperty rdf:resource="#has_charge"/> - <owl:someValuesFrom rdf:resource="#neutral_charge"/> + <owl:onProperty rdf:resource="http://dl-learner.org/pdb:has_polarity"/> + <owl:hasValue rdf:resource="http://dl-learner.org/pdb:polar"/> </owl:Restriction> </rdfs:subClassOf> <rdfs:subClassOf> <owl:Restriction> - <owl:onProperty rdf:resource="#is_in_hydrogen_bond"/> - <owl:someValuesFrom rdf:resource="#hydrogen_bond_acceptor"/> + <owl:onProperty rdf:resource="http://dl-learner.org/pdb:has_size"/> + <owl:hasValue rdf:resource="http://dl-learner.org/pdb:small"/> </owl:Restriction> </rdfs:subClassOf> <rdfs:subClassOf> <owl:Restriction> - <owl:onProperty rdf:resource="#has_size"/> - <owl:someValuesFrom rdf:resource="#small"/> + <owl:onProperty rdf:resource="http://dl-learner.org/pdb:has_hydrophobicity"/> + <owl:hasValue rdf:resource="http://dl-learner.org/pdb:hydrophobic"/> </owl:Restriction> </rdfs:subClassOf> - <rdfs:subClassOf> - <owl:Restriction> - <owl:onProperty rdf:resource="#is_in_hydrogen_bond"/> - <owl:someValuesFrom rdf:resource="#hydrogen_bond_donor"/> - </owl:Restriction> - </rdfs:subClassOf> - <rdfs:subClassOf> - <owl:Restriction> - <owl:onProperty rdf:resource="#has_aromaticity"/> - <owl:someValuesFrom rdf:resource="#not_aromatic"/> - </owl:Restriction> - </rdfs:subClassOf> - <rdfs:subClassOf> - <owl:Restriction> - <owl:onProperty rdf:resource="#has_aromaticity"/> - <owl:someValuesFrom rdf:resource="#aromatic"/> - </owl:Restriction> - </rdfs:subClassOf> - <rdfs:subClassOf> - <owl:Restriction> - <owl:onProperty rdf:resource="#has_aromaticity"/> - <owl:someValuesFrom rdf:resource="#not_aliphatic"/> - </owl:Restriction> - </rdfs:subClassOf> - <rdfs:subClassOf> - <owl:Restriction> - <owl:onProperty rdf:resource="#has_polarity"/> - <owl:someValuesFrom rdf:resource="#polar"/> - </owl:Restriction> - </rdfs:subClassOf> - <rdfs:subClassOf> - <owl:Restriction> - <owl:onProperty rdf:resource="#has_hydrophobicity"/> - <owl:someValuesFrom rdf:resource="#hydrophobic"/> - </owl:Restriction> - </rdfs:subClassOf> </owl:Class> - <!-- http://dl-learner.org/Projects/DLLearner/Protein_Secondary_Structure_Prediction/AA_properties.owl#Tryptophan --> + <!-- http://bio2rdf.org/pdb:Tryptophan --> - <owl:Class rdf:about="http://bio2rdf.org/pdb:Tryptophan"> + <owl:Class rdf:about="&pdb;Tryptophan"> <rdfs:label>Tryptophan</rdfs:label> - <rdfs:subClassOf rdf:resource="#Amino_acid"/> + <rdfs:subClassOf rdf:resource="http://dl-learner.org/pdb:Amino_acid"/> <rdfs:subClassOf> <owl:Restriction> - <owl:onProperty rdf:resource="#has_hydrophobicity"/> - <owl:someValuesFrom rdf:resource="#hydrophobic"/> + <owl:onProperty rdf:resource="http://dl-learner.org/pdb:has_size"/> + <owl:hasValue rdf:resource="http://dl-learner.org/pdb:large"/> </owl:Restriction> </rdfs:subClassOf> <rdfs:subClassOf> <owl:Restriction> - <owl:onProperty rdf:resource="#has_polarity"/> - <owl:someValuesFrom rdf:resource="#polar"/> + <owl:onProperty rdf:resource="http://dl-learner.org/pdb:has_hydrophobicity"/> + <owl:hasValue rdf:resource="http://dl-learner.org/pdb:aromatic"/> </owl:Restriction> </rdfs:subClassOf> <rdfs:subClassOf> <owl:Restriction> - <owl:onProperty rdf:resource="#is_in_hydrogen_bond"/> - <owl:someValuesFrom rdf:resource="#hydrogen_bond_donor"/> + <owl:onProperty rdf:resource="http://dl-learner.org/pdb:has_polarity"/> + <owl:hasValue rdf:resource="http://dl-learner.org/pdb:polar"/> </owl:Restriction> </rdfs:subClassOf> - <rdfs:subClassOf> - <owl:Restriction> - <owl:onProperty rdf:resource="#has_aromaticity"/> - <owl:someValuesFrom rdf:resource="#aromatic"/> - </owl:Restriction> - </rdfs:subClassOf> - <rdfs:subClassOf> - <owl:Restriction> - <owl:onProperty rdf:resource="#has_charge"/> - <owl:someValuesFrom rdf:resource="#neutral_charge"/> - </owl:Restriction> - </rdfs:subClassOf> - <rdfs:subClassOf> - <owl:Restriction> - <owl:onProperty rdf:resource="#has_size"/> - <owl:someValuesFrom rdf:resource="#large"/> - </owl:Restriction> - </rdfs:subClassOf> - <rdfs:subClassOf> - <owl:Restriction> - <owl:onProperty rdf:resource="#has_aromaticity"/> - <owl:someValuesFrom rdf:resource="#not_aliphatic"/> - </owl:Restriction> - </rdfs:subClassOf> </owl:Class> - <!-- http://dl-learner.org/Projects/DLLearner/Protein_Secondary_Structure_Prediction/AA_properties.owl#Tyrosine --> + <!-- http://bio2rdf.org/pdb:Tyrosine --> - <owl:Class rdf:about="http://bio2rdf.org/pdb:Tyrosine"> + <owl:Class rdf:about="&pdb;Tyrosine"> <rdfs:label>Tyrosine</rdfs:label> - <rdfs:subClassOf rdf:resource="#Amino_acid"/> + <rdfs:subClassOf rdf:resource="http://dl-learner.org/pdb:Amino_acid"/> <rdfs:subClassOf> <owl:Restriction> - <owl:onProperty rdf:resource="#has_hydrophobicity"/> - <owl:someValuesFrom rdf:resource="#hydrophobic"/> + <owl:onProperty rdf:resource="http://dl-learner.org/pdb:has_polarity"/> + <owl:hasValue rdf:resource="http://dl-learner.org/pdb:polar"/> </owl:Restriction> </rdfs:subClassOf> <rdfs:subClassOf> <owl:Restriction> - <owl:onProperty rdf:resource="#has_aromaticity"/> - <owl:someValuesFrom rdf:resource="#not_aliphatic"/> + <owl:onProperty rdf:resource="http://dl-learner.org/pdb:has_hydrophobicity"/> + <owl:hasValue rdf:resource="http://dl-learner.org/pdb:aromatic"/> </owl:Restriction> </rdfs:subClassOf> <rdfs:subClassOf> <owl:Restriction> - <owl:onProperty rdf:resource="#has_polarity"/> - <owl:someValuesFrom rdf:resource="#polar"/> + <owl:onProperty rdf:resource="http://dl-learner.org/pdb:has_size"/> + <owl:hasValue rdf:resource="http://dl-learner.org/pdb:large"/> </owl:Restriction> </rdfs:subClassOf> - <rdfs:subClassOf> - <owl:Restriction> - <owl:onProperty rdf:resource="#is_in_hydrogen_bond"/> - <owl:someValuesFrom rdf:resource="#hydrogen_bond_acceptor"/> - </owl:Restriction> - </rdfs:subClassOf> - <rdfs:subClassOf> - <owl:Restriction> - <owl:onProperty rdf:resource="#has_charge"/> - <owl:someValuesFrom rdf:resource="... [truncated message content] |
From: <jen...@us...> - 2012-01-09 16:05:39
|
Revision: 3548 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=3548&view=rev Author: jenslehmann Date: 2012-01-09 16:05:33 +0000 (Mon, 09 Jan 2012) Log Message: ----------- fixed a bug when self configuring a heuristic 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 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 2012-01-09 15:29:14 UTC (rev 3547) +++ trunk/components-core/src/main/java/org/dllearner/algorithms/celoe/CELOE.java 2012-01-09 16:05:33 UTC (rev 3548) @@ -1014,6 +1014,7 @@ return heuristic; } + @Autowired(required=false) public void setHeuristic(OEHeuristicRuntime heuristic) { this.heuristic = heuristic; } 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 2012-01-09 15:29:14 UTC (rev 3547) +++ trunk/components-core/src/main/java/org/dllearner/algorithms/ocel/OCEL.java 2012-01-09 16:05:33 UTC (rev 3548) @@ -145,7 +145,7 @@ private int maxClassDescriptionTests = CommonConfigOptions.maxClassDescriptionTestsDefault; private double negativeWeight = 1.0; - private double startNodeBonus = 1.0; + private double startNodeBonus = 0.1; // 1.0; private double expansionPenaltyFactor = 0.02; private int negationPenalty = 0; private boolean terminateOnNoiseReached = true; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lor...@us...> - 2012-01-09 15:29:23
|
Revision: 3547 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=3547&view=rev Author: lorenz_b Date: 2012-01-09 15:29:14 +0000 (Mon, 09 Jan 2012) Log Message: ----------- Refined output to distinguish between different problems. Modified Paths: -------------- trunk/interfaces/src/main/java/org/dllearner/cli/GlobalEnrichment.java Modified: trunk/interfaces/src/main/java/org/dllearner/cli/GlobalEnrichment.java =================================================================== --- trunk/interfaces/src/main/java/org/dllearner/cli/GlobalEnrichment.java 2012-01-09 14:58:40 UTC (rev 3546) +++ trunk/interfaces/src/main/java/org/dllearner/cli/GlobalEnrichment.java 2012-01-09 15:29:14 UTC (rev 3547) @@ -19,14 +19,18 @@ */ package org.dllearner.cli; +import java.io.BufferedReader; import java.io.File; import java.io.FileNotFoundException; import java.io.FileOutputStream; +import java.io.FileReader; +import java.io.FileWriter; +import java.io.IOException; import java.io.PrintStream; import java.lang.reflect.InvocationTargetException; import java.net.MalformedURLException; import java.net.URL; -import java.util.HashMap; +import java.util.ArrayList; import java.util.LinkedList; import java.util.List; import java.util.Map; @@ -37,6 +41,8 @@ import java.util.concurrent.ThreadPoolExecutor; import java.util.concurrent.TimeUnit; +import javax.servlet.jsp.SkipPageException; + import org.apache.log4j.ConsoleAppender; import org.apache.log4j.Level; import org.apache.log4j.Logger; @@ -53,8 +59,6 @@ import com.hp.hpl.jena.query.QuerySolution; import com.hp.hpl.jena.query.ResultSet; import com.hp.hpl.jena.rdf.model.Model; -import com.hp.hpl.jena.sparql.engine.http.QueryExceptionHTTP; -import com.hp.hpl.jena.sparql.resultset.ResultSetException; /** * Enriches all of the LOD cloud. @@ -63,6 +67,13 @@ * */ public class GlobalEnrichment { + + //whether or not to skip endpoints which caused exceptions in a run before + private static boolean skipFailedEndpoints = true; + //whether or not to skip endpoints which returned no axioms during the learning process + private static boolean skipEmptyEndpoints = true; + //whether or not to skip endpoints on which we could learn something + private static boolean skipSuccessfulEndpoints = true; // parameters private static double threshold = 0.8; @@ -75,7 +86,7 @@ //parameters for thread pool //Parallel running Threads(Executor) on System - private static int corePoolSize = 1; + private static int corePoolSize = 5; //Maximum Threads allowed in Pool private static int maximumPoolSize = 20; //Keep alive time for waiting threads for jobs(Runnable) @@ -131,7 +142,7 @@ ResultSet rs = sq.send(); while(rs.hasNext()) { QuerySolution qs = rs.next(); - String endpoint = qs.get("endpoint").toString();System.out.println(endpoint); + String endpoint = qs.get("endpoint").toString(); String shortName = qs.get("shortName").toString(); endpoints.put(shortName, new SparqlEndpoint(new URL(endpoint))); } @@ -140,6 +151,23 @@ TreeSet<String> blacklist = new TreeSet<String>(); blacklist.add("rkb-explorer-crime"); // computation never completes + //remove endpoints which failed in a run before + if(skipFailedEndpoints){ + for(String name : getErrorList()){ + endpoints.remove(name); + } + } + if(skipEmptyEndpoints){ + for(String name : getEmptyList()){ + endpoints.remove(name); + } + } + if(skipSuccessfulEndpoints){ + for(String name : getSuccessList()){ + endpoints.remove(name); + } + } + ArrayBlockingQueue<Runnable> workQueue = new ArrayBlockingQueue<Runnable>(endpoints.size()); ThreadPoolExecutor threadPool = new ThreadPoolExecutor(corePoolSize, maximumPoolSize, keepAliveTime, TimeUnit.SECONDS, workQueue); @@ -155,8 +183,8 @@ SparqlEndpoint se = endpoint.getValue(); String name = endpoint.getKey(); - File f = new File(baseDir + name + ".ttl"); - File log = new File(baseDir + name + ".log"); + File f = new File(baseDir + File.separator + "success" + File.separator + name + ".ttl"); + File log = new File(baseDir + File.separator + "failed" + File.separator + name + ".log"); System.out.println("Enriching " + name + " using " + se.getURL()); Enrichment e = new Enrichment(se, null, threshold, nrOfAxiomsToLearn, useInference, false); @@ -175,6 +203,8 @@ e.start(); success = true; } catch (Exception ex){ + write2File(ex, se); + ex.printStackTrace(); ex.printStackTrace(new PrintStream(log)); } catch(StackOverflowError error) { error.printStackTrace(new PrintStream(log)); @@ -212,11 +242,16 @@ SparqlEndpointKS ks = new SparqlEndpointKS(se); List<AlgorithmRun> runs = e.getAlgorithmRuns(); List<OWLAxiom> axioms = new LinkedList<OWLAxiom>(); + int axiomCnt = 0; for(AlgorithmRun run : runs) { + axiomCnt += e.getGeneratedOntology().getLogicalAxiomCount(); axioms.addAll(e.toRDF(run.getAxioms(), run.getAlgorithm(), run.getParameters(), ks)); } Model model = e.getModel(axioms); try { + if(axiomCnt == 0){ + f = f = new File(baseDir + File.separator + "success/empty" + File.separator + name + ".ttl"); + } model.write(new FileOutputStream(f), "TURTLE"); } catch (FileNotFoundException e1) { // TODO Auto-generated catch block @@ -228,6 +263,49 @@ }); } + threadPool.shutdown(); } + + public static void write2File(Exception e, SparqlEndpoint endpoint) { + try { + File file = new File(baseDir + File.separator + "errors" + File.separator + e.getClass().getName()); + if(!file.exists()){ + file.createNewFile(); + } + FileWriter fw = new FileWriter(file, true); + fw.append(endpoint.getURL().toString() + "\n"); + fw.flush(); + fw.close(); + } catch (Exception ex) { + ex.printStackTrace(); + } + } + + public static List<String> getErrorList(){ + List<String> errorNames = new ArrayList<String>(); + File dir = new File(baseDir + "/failed/"); + for(File file : dir.listFiles()){ + errorNames.add(file.getName().replace(".log", "")); + } + return errorNames; + } + + public static List<String> getEmptyList(){ + List<String> errorNames = new ArrayList<String>(); + File dir = new File(baseDir + "/success/empty/"); + for(File file : dir.listFiles()){ + errorNames.add(file.getName().replace(".ttl", "")); + } + return errorNames; + } + + public static List<String> getSuccessList(){ + List<String> errorNames = new ArrayList<String>(); + File dir = new File(baseDir + "/success/"); + for(File file : dir.listFiles()){ + errorNames.add(file.getName().replace(".ttl", "")); + } + return errorNames; + } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lor...@us...> - 2012-01-09 14:58:51
|
Revision: 3546 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=3546&view=rev Author: lorenz_b Date: 2012-01-09 14:58:40 +0000 (Mon, 09 Jan 2012) Log Message: ----------- Made option configurable in *.conf files. Modified Paths: -------------- trunk/components-core/src/main/java/org/dllearner/algorithms/celoe/PCELOE.java Modified: trunk/components-core/src/main/java/org/dllearner/algorithms/celoe/PCELOE.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/algorithms/celoe/PCELOE.java 2012-01-09 08:34:46 UTC (rev 3545) +++ trunk/components-core/src/main/java/org/dllearner/algorithms/celoe/PCELOE.java 2012-01-09 14:58:40 UTC (rev 3546) @@ -205,12 +205,15 @@ @ConfigOption(name = "maxDepth", defaultValue="7", description="maximum depth of description") private double maxDepth = 7; + + @ConfigOption(name = "nrOfThreads", defaultValue="2", description="number of threads running in parallel") + private int nrOfThreads = 2; private int expressionTestCountLastImprovement; private long timeLastImprovement = 0; private Set<OENode> currentlyProcessedNodes = Collections.synchronizedSet(new HashSet<OENode>()); - private double highestAccuracy = 0.0; + private volatile double highestAccuracy = 0.0; // public CELOEConfigurator getConfigurator() { // return configurator; @@ -451,13 +454,15 @@ addNode(startClass, null); - int nrOfThreads = Runtime.getRuntime().availableProcessors(); - nrOfThreads = 4;//only for tests TODO make number of threads configurable - ExecutorService service = Executors.newFixedThreadPool(nrOfThreads); + int nrOfWorkers = nrOfThreads; + if(nrOfWorkers == 0){ + nrOfWorkers = Runtime.getRuntime().availableProcessors(); + } + ExecutorService service = Executors.newFixedThreadPool(nrOfWorkers); List<Runnable> tasks = new ArrayList<Runnable>(); - for(int i = 0; i < nrOfThreads; i++){ + for(int i = 0; i < nrOfWorkers; i++){ tasks.add(new Worker()); } @@ -633,7 +638,9 @@ if(!shorterDescriptionExists) { if(!filterFollowsFromKB || !((ClassLearningProblem)learningProblem).followsFromKB(niceDescription)) { // System.out.println("Test2"); - bestEvaluatedDescriptions.add(niceDescription, accuracy, learningProblem); + synchronized (bestEvaluatedDescriptions) { + bestEvaluatedDescriptions.add(niceDescription, accuracy, learningProblem); + } // System.out.println("acc: " + accuracy); // System.out.println(bestEvaluatedDescriptions); } @@ -1011,19 +1018,33 @@ this.maxExecutionTimeInSecondsAfterImprovement = maxExecutionTimeInSecondsAfterImprovement; } + + + public int getNrOfThreads() { + return nrOfThreads; + } + + public void setNrOfThreads(int nrOfThreads) { + this.nrOfThreads = nrOfThreads; + } + + private synchronized double getHighestAccuracy(){ + return highestAccuracy; + } + + class Worker implements Runnable{ @Override public void run() { int loop = 0; - // highest accuracy so far // double highestAccuracy = 0.0; OENode nextNode; while (!terminationCriteriaSatisfied()) { // System.out.println("loop " + loop); - if(!singleSuggestionMode && bestEvaluatedDescriptions.getBestAccuracy() > highestAccuracy) { + if(!singleSuggestionMode && bestEvaluatedDescriptions.getBestAccuracy() > getHighestAccuracy()) { highestAccuracy = bestEvaluatedDescriptions.getBestAccuracy(); expressionTestCountLastImprovement = expressionTests; timeLastImprovement = System.nanoTime(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lor...@us...> - 2012-01-09 08:34:53
|
Revision: 3545 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=3545&view=rev Author: lorenz_b Date: 2012-01-09 08:34:46 +0000 (Mon, 09 Jan 2012) Log Message: ----------- Updated logging. Modified Paths: -------------- trunk/components-core/src/main/java/org/dllearner/algorithms/celoe/PCELOE.java Modified: trunk/components-core/src/main/java/org/dllearner/algorithms/celoe/PCELOE.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/algorithms/celoe/PCELOE.java 2012-01-08 18:42:27 UTC (rev 3544) +++ trunk/components-core/src/main/java/org/dllearner/algorithms/celoe/PCELOE.java 2012-01-09 08:34:46 UTC (rev 3545) @@ -1106,8 +1106,8 @@ public static void main(String[] args) throws Exception{ Logger.getRootLogger().setLevel(Level.INFO); - Logger.getLogger(PCELOE2.class).setLevel(Level.DEBUG); - Logger.getLogger(PCELOE2.class).addAppender(new FileAppender(new PatternLayout( "[%t] %c: %m%n" ), "log/parallel_run.txt", false)); + Logger.getLogger(PCELOE.class).setLevel(Level.DEBUG); + Logger.getLogger(PCELOE.class).addAppender(new FileAppender(new PatternLayout( "[%t] %c: %m%n" ), "log/parallel_run.txt", false)); AbstractKnowledgeSource ks = new OWLFile("../examples/family/father_oe.owl"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lor...@us...> - 2012-01-08 18:42:33
|
Revision: 3544 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=3544&view=rev Author: lorenz_b Date: 2012-01-08 18:42:27 +0000 (Sun, 08 Jan 2012) Log Message: ----------- Registered component. Modified Paths: -------------- trunk/components-core/src/main/java/org/dllearner/core/AnnComponentManager.java Modified: trunk/components-core/src/main/java/org/dllearner/core/AnnComponentManager.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/core/AnnComponentManager.java 2012-01-08 18:40:18 UTC (rev 3543) +++ trunk/components-core/src/main/java/org/dllearner/core/AnnComponentManager.java 2012-01-08 18:42:27 UTC (rev 3544) @@ -51,6 +51,7 @@ // (CLI, GUI, Web Service) and scripts (HTML documentation generator) private static List<String> componentClassNames = new ArrayList<String> ( Arrays.asList(new String[]{ "org.dllearner.algorithms.celoe.CELOE", + "org.dllearner.algorithms.celoe.PCELOE", "org.dllearner.algorithms.el.ELLearningAlgorithm", "org.dllearner.algorithms.el.ELLearningAlgorithmDisjunctive", "org.dllearner.algorithms.fuzzydll.FuzzyCELOE", This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lor...@us...> - 2012-01-08 18:40:25
|
Revision: 3543 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=3543&view=rev Author: lorenz_b Date: 2012-01-08 18:40:18 +0000 (Sun, 08 Jan 2012) Log Message: ----------- Optimized tests. Modified Paths: -------------- trunk/components-core/src/main/java/org/dllearner/algorithms/celoe/PCELOE.java Modified: trunk/components-core/src/main/java/org/dllearner/algorithms/celoe/PCELOE.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/algorithms/celoe/PCELOE.java 2012-01-08 13:42:22 UTC (rev 3542) +++ trunk/components-core/src/main/java/org/dllearner/algorithms/celoe/PCELOE.java 2012-01-08 18:40:18 UTC (rev 3543) @@ -24,7 +24,6 @@ import java.util.ArrayList; import java.util.Collection; import java.util.Collections; -import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.util.LinkedList; @@ -33,18 +32,16 @@ import java.util.Set; import java.util.SortedSet; import java.util.TreeSet; -import java.util.concurrent.ArrayBlockingQueue; +import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; -import java.util.concurrent.ThreadPoolExecutor; -import java.util.concurrent.TimeUnit; +import java.util.concurrent.Future; -import org.apache.log4j.ConsoleAppender; import org.apache.log4j.FileAppender; import org.apache.log4j.Level; import org.apache.log4j.Logger; import org.apache.log4j.PatternLayout; -import org.apache.log4j.SimpleLayout; +import org.dllearner.algorithms.celoe.PCELOE.Worker; import org.dllearner.core.AbstractCELA; import org.dllearner.core.AbstractKnowledgeSource; import org.dllearner.core.AbstractLearningProblem; @@ -91,15 +88,6 @@ */ @ComponentAnn(name="PCELOE", shortName="pceloe", version=1.0, description="CELOE is an adapted and extended version of the OCEL algorithm applied for the ontology engineering use case. See http://jens-lehmann.org/files/2011/celoe.pdf for reference.") public class PCELOE extends AbstractCELA { - - //parameters for thread pool - //Parallel running Threads(Executor) on System - private static int corePoolSize = 5; - //Maximum Threads allowed in Pool - private static int maximumPoolSize = 20; - //Keep alive time for waiting threads for jobs(Runnable) - private static long keepAliveTime = 10; - private static Logger logger = Logger.getLogger(PCELOE.class); // private CELOEConfigurator configurator; @@ -117,6 +105,7 @@ // all nodes in the search tree (used for selecting most promising node) private SortedSet<OENode> nodes; +// private TreeSet<OENode> nodes; private OEHeuristicRuntime heuristic; // = new OEHeuristicRuntime(); // root of search tree private OENode startNode; @@ -125,7 +114,8 @@ private Description startClass; // all descriptions in the search tree plus those which were too weak (for fast redundancy check) - private TreeSet<Description> descriptions; +// private TreeSet<Description> descriptions; + private SortedSet<Description> descriptions; private EvaluatedDescriptionSet bestEvaluatedDescriptions; @@ -198,19 +188,29 @@ @ConfigOption(name = "reuseExistingDescription", defaultValue="false", description="If true, the algorithm tries to find a good starting point close to an existing definition/super class of the given class in the knowledge base.") private boolean reuseExistingDescription = false; - @ConfigOption(name = "maxClassDescriptionTests", defaultValue="0", description="The maximum number of candidate hypothesis the algorithm is allowed to test (0 = no limit). The algorithm will stop afterwards. (The real number of tests can be slightly higher, because this criterion usually won't be checked after each single test.)") - private int maxClassDescriptionTests = 0; + @ConfigOption(name = "maxClassExpressionTests", defaultValue="0", description="The maximum number of candidate hypothesis the algorithm is allowed to test (0 = no limit). The algorithm will stop afterwards. (The real number of tests can be slightly higher, because this criterion usually won't be checked after each single test.)") + private int maxClassExpressionTests = 0; + @ConfigOption(name = "maxClassExpressionTestsAfterImprovement", defaultValue="0", description = "The maximum number of candidate hypothesis the algorithm is allowed after an improvement in accuracy (0 = no limit). The algorithm will stop afterwards. (The real number of tests can be slightly higher, because this criterion usually won't be checked after each single test.)") + private int maxClassExpressionTestsAfterImprovement = 0; + @ConfigOption(defaultValue = "10", name = "maxExecutionTimeInSeconds", description = "maximum execution of the algorithm in seconds") private int maxExecutionTimeInSeconds = 10; + @ConfigOption(defaultValue = "0", name = "maxExecutionTimeInSecondsAfterImprovement", description = "maximum execution of the algorithm in seconds") + private int maxExecutionTimeInSecondsAfterImprovement = 0; + @ConfigOption(name = "terminateOnNoiseReached", defaultValue="false", description="specifies whether to terminate when noise criterion is met") private boolean terminateOnNoiseReached = false; @ConfigOption(name = "maxDepth", defaultValue="7", description="maximum depth of description") private double maxDepth = 7; + + private int expressionTestCountLastImprovement; + private long timeLastImprovement = 0; private Set<OENode> currentlyProcessedNodes = Collections.synchronizedSet(new HashSet<OENode>()); + private double highestAccuracy = 0.0; // public CELOEConfigurator getConfigurator() { // return configurator; @@ -232,12 +232,16 @@ // } public static String getName() { - return "CELOE"; + return "PCELOE"; } @Override public void init() throws ComponentInitException { + if(maxExecutionTimeInSeconds != 0 && maxExecutionTimeInSecondsAfterImprovement != 0) { + maxExecutionTimeInSeconds = Math.min(maxExecutionTimeInSeconds, maxExecutionTimeInSecondsAfterImprovement); + } + // compute used concepts/roles from allowed/ignored // concepts/roles Set<NamedClass> usedConcepts; @@ -443,109 +447,89 @@ reset(); nanoStartTime = System.nanoTime(); + + addNode(startClass, null); int nrOfThreads = Runtime.getRuntime().availableProcessors(); - nrOfThreads = 8;//only for tests TODO make number of threads configurable + nrOfThreads = 4;//only for tests TODO make number of threads configurable ExecutorService service = Executors.newFixedThreadPool(nrOfThreads); List<Runnable> tasks = new ArrayList<Runnable>(); for(int i = 0; i < nrOfThreads; i++){ - RhoDRDown operator = new RhoDRDown(); - operator.setStartClass(startClass); - operator.setReasoner(reasoner); - try { - operator.init(); - } catch (ComponentInitException e) { - e.printStackTrace(); - } - operator.setSubHierarchy(reasoner.getClassHierarchy().clone()); - operator.setObjectPropertyHierarchy(reasoner.getObjectPropertyHierarchy()); - operator.setDataPropertyHierarchy(reasoner.getDatatypePropertyHierarchy()); - - tasks.add(new Worker(operator)); + tasks.add(new Worker()); } + //needed to block until all threads have been finished, because otherwise the main thread outputs the result to early + List<Future> futures = new ArrayList<Future>(); for(Runnable task : tasks){ - service.submit(task); + futures.add(service.submit(task)); } - - try { - service.awaitTermination(maxExecutionTimeInSeconds, TimeUnit.SECONDS); - } catch (InterruptedException e) { - e.printStackTrace(); + for(Future future : futures){ + try { + future.get(); + } catch (InterruptedException e) { + e.printStackTrace(); + } catch (ExecutionException e) { + e.printStackTrace(); + } } - if(singleSuggestionMode) { - bestEvaluatedDescriptions.add(bestDescription, bestAccuracy, learningProblem); - } - if (stop) { logger.info("Algorithm stopped ("+expressionTests+" descriptions tested). " + nodes.size() + " nodes in the search tree.\n"); } else { - logger.info("Algorithm terminated successfully ("+expressionTests+" descriptions tested). " + nodes.size() + " nodes in the search tree.\n"); + logger.info("Algorithm terminated successfully (time: " + Helper.prettyPrintNanoSeconds(System.nanoTime()-nanoStartTime) + ", "+expressionTests+" descriptions tested, " + nodes.size() + " nodes in the search tree).\n"); logger.info(reasoner.toString()); } + + if(singleSuggestionMode) { + bestEvaluatedDescriptions.add(bestDescription, bestAccuracy, learningProblem); + } // print solution(s) - -// System.out.println("isRunning: " + isRunning); - logger.info("solutions:\n" + getSolutionString()); // System.out.println(startNode.toTreeString(baseURI)); isRunning = false; service.shutdown(); - +// System.out.println("isRunning: " + isRunning); } - synchronized private OENode getNextNodeToExpand() { + private OENode getNextNodeToExpand() { // we expand the best node of those, which have not achieved 100% accuracy // already and have a horizontal expansion equal to their length // (rationale: further extension is likely to add irrelevant syntactical constructs) - synchronized (nodes) { - logger.debug("in 1.lock of getNextNodeToExpand method"); - Iterator<OENode> it = nodes.iterator();//logger.info(nodes.size()); - logger.debug("search tree size: " + nodes.size()); - while(it.hasNext()) { - OENode node = it.next(); - logger.debug("Checking node " + node + "..."); - if(!currentlyProcessedNodes.contains(node) && (node.getAccuracy() < 1.0 || node.getHorizontalExpansion() < node.getDescription().getLength())) { - currentlyProcessedNodes.add(node); - logger.debug("...checked and return node."); - return node; - } - logger.debug("...checked."); +// Iterator<OENode> it = nodes.descendingIterator(); + synchronized(nodes){ + Iterator<OENode> it = nodes.iterator(); + while(it.hasNext()) { + OENode node = it.next(); + if(!currentlyProcessedNodes.contains(node) && (node.getAccuracy() < 1.0 || node.getHorizontalExpansion() < node.getDescription().getLength())) { + currentlyProcessedNodes.add(node); + return node; } + } } - // this should practically never be called, since for any reasonable learning // task, we will always have at least one node with less than 100% accuracy return null; } // expand node horizontically - private TreeSet<Description> refineNode(OENode node, RhoDRDown operator) { + private TreeSet<Description> refineNode(OENode node) { // we have to remove and add the node since its heuristic evaluation changes through the expansion // (you *must not* include any criteria in the heuristic which are modified outside of this method, // otherwise you may see rarely occurring but critical false ordering in the nodes set) - synchronized (nodes) { - nodes.remove(node); - } - + nodes.remove(node); // System.out.println("refining: " + node); int horizExp = node.getHorizontalExpansion(); -// TreeSet<Description> refinements = (TreeSet<Description>) operator.refine(node.getDescription(), horizExp+1); TreeSet<Description> refinements = (TreeSet<Description>) operator.refine(node.getDescription(), horizExp+1); node.incHorizontalExpansion(); node.setRefinementCount(refinements.size()); - synchronized (nodes) { - nodes.add(node); - } - + nodes.add(node); return refinements; } @@ -560,17 +544,15 @@ if(!nonRedundant) { return false; } - logger.debug("Check if description is allowed..."); + // check whether the description is allowed if(!isDescriptionAllowed(description, parentNode)) { return false; } - logger.debug("...done"); // System.out.println("Test " + new Date()); // quality of description (return if too weak) double accuracy = learningProblem.getAccuracyOrTooWeak(description, noise); - logger.debug("Accuracy: " + accuracy); // issue a warning if accuracy is not between 0 and 1 or -1 (too weak) if(accuracy > 1.0 || (accuracy < 0.0 && accuracy != -1)) { logger.warn("Invalid accuracy value " + accuracy + " for description " + description + ". This could be caused by a bug in the heuristic measure and should be reported to the DL-Learner bug tracker."); @@ -614,7 +596,6 @@ // we need to make sure that this does not get called more often than // necessary since rewriting is expensive boolean isCandidate = !bestEvaluatedDescriptions.isFull(); - logger.debug("Is candidate:" + isCandidate); if(!isCandidate) { EvaluatedDescription worst = bestEvaluatedDescriptions.getWorst(); double accThreshold = worst.getAccuracy(); @@ -638,33 +619,25 @@ // A is not a candidate; on the other hand this suppresses many meaningless extensions of A boolean shorterDescriptionExists = false; if(forceMutualDifference) { - synchronized (bestEvaluatedDescriptions) { - for(EvaluatedDescription ed : bestEvaluatedDescriptions.getSet()) { - if(Math.abs(ed.getAccuracy()-accuracy) <= 0.00001 && ConceptTransformation.isSubdescription(niceDescription, ed.getDescription())) { -// System.out.println("shorter: " + ed.getDescription()); - shorterDescriptionExists = true; - break; - } - } - } - + for(EvaluatedDescription ed : bestEvaluatedDescriptions.getSet()) { + if(Math.abs(ed.getAccuracy()-accuracy) <= 0.00001 && ConceptTransformation.isSubdescription(niceDescription, ed.getDescription())) { +// System.out.println("shorter: " + ed.getDescription()); + shorterDescriptionExists = true; + break; + } + } } - logger.debug("Point 2"); // System.out.println("shorter description? " + shorterDescriptionExists + " nice: " + niceDescription); - filterFollowsFromKB = false; + if(!shorterDescriptionExists) { if(!filterFollowsFromKB || !((ClassLearningProblem)learningProblem).followsFromKB(niceDescription)) { // System.out.println("Test2"); - synchronized (bestEvaluatedDescriptions) { - bestEvaluatedDescriptions.add(niceDescription, accuracy, learningProblem); - } - + bestEvaluatedDescriptions.add(niceDescription, accuracy, learningProblem); // System.out.println("acc: " + accuracy); // System.out.println(bestEvaluatedDescriptions); } } - logger.debug("Point 3"); // System.out.println(bestEvaluatedDescriptions.getSet().size()); } @@ -763,9 +736,11 @@ private Description rewriteNode(OENode node) { Description description = node.getDescription(); // minimize description (expensive!) - also performes some human friendly rewrites - Description niceDescription; + Description niceDescription = description; if(useMinimizer) { - niceDescription = minimizer.minimizeClone(description); + synchronized (minimizer) { + niceDescription = minimizer.minimizeClone(description); + } } else { niceDescription = description; } @@ -775,22 +750,24 @@ } private boolean terminationCriteriaSatisfied() { - boolean ret = stop || - (maxClassDescriptionTests != 0 && (expressionTests >= maxClassDescriptionTests)) || - (maxExecutionTimeInSeconds != 0 && ((System.nanoTime() - nanoStartTime) >= (maxExecutionTimeInSeconds*1000000000l))) || - (terminateOnNoiseReached && (100*getCurrentlyBestAccuracy()>=100-noisePercentage)); - logger.debug("terminate: " + ret); - return ret; - + return + stop || + (maxClassExpressionTestsAfterImprovement != 0 && (expressionTests - expressionTestCountLastImprovement >= maxClassExpressionTestsAfterImprovement)) || + (maxClassExpressionTests != 0 && (expressionTests >= maxClassExpressionTests)) || + (maxExecutionTimeInSecondsAfterImprovement != 0 && ((System.nanoTime() - nanoStartTime) >= (maxExecutionTimeInSecondsAfterImprovement*1000000000l))) || + (maxExecutionTimeInSeconds != 0 && ((System.nanoTime() - nanoStartTime) >= (maxExecutionTimeInSeconds*1000000000l))) || + (terminateOnNoiseReached && (100*getCurrentlyBestAccuracy()>=100-noisePercentage)); } private void reset() { // set all values back to their default values (used for running // the algorithm more than once) - nodes = Collections.synchronizedSortedSet(new TreeSet<OENode>(heuristic)); - descriptions = new TreeSet<Description>(new ConceptComparator()); +// nodes = new TreeSet<OENode>(heuristic); + nodes = Collections.synchronizedSortedSet(new TreeSet<OENode>(Collections.reverseOrder(heuristic))); + descriptions = Collections.synchronizedSortedSet(new TreeSet<Description>(new ConceptComparator())); bestEvaluatedDescriptions.getSet().clear(); expressionTests = 0; + highestAccuracy = 0.0; } @Override @@ -852,6 +829,7 @@ double scoreThreshold = heuristic.getNodeScore(node) + 1 - node.getAccuracy(); for(OENode n : nodes) { +// for(OENode n : nodes.descendingSet()) { if(n != node) { if(n.getHorizontalExpansion() == minHorizExp) { // we can stop instantly when another node with min. @@ -968,11 +946,11 @@ } public int getMaxClassDescriptionTests() { - return maxClassDescriptionTests; + return maxClassExpressionTests; } public void setMaxClassDescriptionTests(int maxClassDescriptionTests) { - this.maxClassDescriptionTests = maxClassDescriptionTests; + this.maxClassExpressionTests = maxClassDescriptionTests; } public int getMaxExecutionTimeInSeconds() { @@ -1013,78 +991,63 @@ public void setHeuristic(OEHeuristicRuntime heuristic) { this.heuristic = heuristic; + } + + public int getMaxClassExpressionTestsWithoutImprovement() { + return maxClassExpressionTestsAfterImprovement; + } + + public void setMaxClassExpressionTestsWithoutImprovement( + int maxClassExpressionTestsWithoutImprovement) { + this.maxClassExpressionTestsAfterImprovement = maxClassExpressionTestsWithoutImprovement; + } + + public int getMaxExecutionTimeInSecondsAfterImprovement() { + return maxExecutionTimeInSecondsAfterImprovement; + } + + public void setMaxExecutionTimeInSecondsAfterImprovement( + int maxExecutionTimeInSecondsAfterImprovement) { + this.maxExecutionTimeInSecondsAfterImprovement = maxExecutionTimeInSecondsAfterImprovement; } - - public static void main(String[] args) throws Exception{ - Logger.getRootLogger().setLevel(Level.INFO); - Logger.getLogger(PCELOE.class).setLevel(Level.DEBUG); - Logger.getLogger(PCELOE.class).addAppender(new FileAppender(new PatternLayout( "[%t] %c: %m%n" ), "log/parallel_run.txt", false)); - - - AbstractKnowledgeSource ks = new OWLFile("../examples/family/father_oe.owl"); - ks.init(); - - AbstractReasonerComponent rc = new FastInstanceChecker(ks); - rc.init(); - - ClassLearningProblem lp = new ClassLearningProblem(rc); - lp.setClassToDescribe(new NamedClass("http://example.com/father#father")); - lp.setCheckConsistency(false); - lp.init(); - - PCELOE alg = new PCELOE(lp, rc); - alg.setMaxExecutionTimeInSeconds(10); -// alg.setMaxClassDescriptionTests(200); - alg.init(); - - alg.start(); - - } - class Worker implements Runnable{ - - private RhoDRDown operator; - - public Worker(RhoDRDown operator) { - this.operator = operator; - } @Override public void run() { - logger.debug("Started thread..."); + int loop = 0; + // highest accuracy so far +// double highestAccuracy = 0.0; OENode nextNode; - double highestAccuracy = 0.0; - int loop = 0; while (!terminationCriteriaSatisfied()) { +// System.out.println("loop " + loop); - if(!singleSuggestionMode && bestEvaluatedDescriptions.getBestAccuracy() > highestAccuracy) { highestAccuracy = bestEvaluatedDescriptions.getBestAccuracy(); - logger.info("more accurate (" + dfPercent.format(highestAccuracy) + ") class expression found: " + descriptionToString(bestEvaluatedDescriptions.getBest().getDescription())); + expressionTestCountLastImprovement = expressionTests; + timeLastImprovement = System.nanoTime(); + logger.info("more accurate (" + dfPercent.format(highestAccuracy) + ") class expression found: " + descriptionToString(bestEvaluatedDescriptions.getBest().getDescription())); } // chose best node according to heuristics - logger.debug("Get next node to expand..."); nextNode = getNextNodeToExpand(); - logger.debug("...done"); - try { - Thread.sleep(10); - } catch (InterruptedException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - logger.debug("next Node: " + nextNode); if(nextNode != null){ int horizExp = nextNode.getHorizontalExpansion(); // apply operator Monitor mon = MonitorFactory.start("refineNode"); - logger.debug("Refine node..."); - TreeSet<Description> refinements = refineNode(nextNode, operator); + TreeSet<Description> refinements = refineNode(nextNode); mon.stop(); - logger.debug("...done"); + +// System.out.println("next node: " + nextNode); +// for(Description refinement : refinements) { +// System.out.println("refinement: " + refinement); +// } +// if((loop+1) % 500 == 0) { +// System.out.println(getMinimumHorizontalExpansion() + " - " + getMaximumHorizontalExpansion()); +// System.exit(0); +// } while(refinements.size() != 0) { // pick element from set @@ -1097,10 +1060,8 @@ // System.out.println("potentially adding " + refinement + " to search tree as child of " + nextNode + " " + new Date()); Monitor mon2 = MonitorFactory.start("addNode"); - logger.debug("Add node..."); addNode(refinement, nextNode); mon2.stop(); - logger.debug("...done"); // adding nodes is potentially computationally expensive, so we have // to check whether max time is exceeded if(terminationCriteriaSatisfied()) { @@ -1113,7 +1074,26 @@ } // updateMinMaxHorizExp(nextNode); - + + // writing the search tree (if configured) + if (writeSearchTree) { + String treeString = "best node: " + bestEvaluatedDescriptions.getBest() + "\n"; + if (refinements.size() > 1) { + treeString += "all expanded nodes:\n"; + for (Description n : refinements) { + treeString += " " + n + "\n"; + } + } + treeString += startNode.toTreeString(baseURI); + treeString += "\n"; + + if (replaceSearchTree) + Files.createFile(new File(searchTreeFile), treeString); + else + Files.appendToFile(new File(searchTreeFile), treeString); + } + +// System.out.println(loop); loop++; currentlyProcessedNodes.remove(nextNode); } @@ -1124,4 +1104,29 @@ } + public static void main(String[] args) throws Exception{ + Logger.getRootLogger().setLevel(Level.INFO); + Logger.getLogger(PCELOE2.class).setLevel(Level.DEBUG); + Logger.getLogger(PCELOE2.class).addAppender(new FileAppender(new PatternLayout( "[%t] %c: %m%n" ), "log/parallel_run.txt", false)); + + + AbstractKnowledgeSource ks = new OWLFile("../examples/family/father_oe.owl"); + ks.init(); + + AbstractReasonerComponent rc = new FastInstanceChecker(ks); + rc.init(); + + ClassLearningProblem lp = new ClassLearningProblem(rc); + lp.setClassToDescribe(new NamedClass("http://example.com/father#father")); + lp.setCheckConsistency(false); + lp.init(); + + PCELOE alg = new PCELOE(lp, rc); + alg.setMaxExecutionTimeInSeconds(10); +// alg.setMaxClassDescriptionTests(200); + alg.init(); + + alg.start(); + } + } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <seb...@us...> - 2012-01-08 13:42:31
|
Revision: 3542 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=3542&view=rev Author: sebastianwtr Date: 2012-01-08 13:42:22 +0000 (Sun, 08 Jan 2012) Log Message: ----------- [tbsl exploration] changed function for server connection and some other minor functions Modified Paths: -------------- trunk/components-ext/src/main/java/org/dllearner/algorithm/tbsl/exploration/Sparql/GetRessourcePropertys.java trunk/components-ext/src/main/java/org/dllearner/algorithm/tbsl/exploration/Sparql/SparqlObject.java trunk/components-ext/src/main/java/org/dllearner/algorithm/tbsl/exploration/Sparql/mySQLDictionary.java trunk/components-ext/src/main/java/org/dllearner/algorithm/tbsl/exploration/Sparql/queryInformation.java trunk/components-ext/src/main/java/org/dllearner/algorithm/tbsl/exploration/exploration_main/exploration_main.java Modified: trunk/components-ext/src/main/java/org/dllearner/algorithm/tbsl/exploration/Sparql/GetRessourcePropertys.java =================================================================== --- trunk/components-ext/src/main/java/org/dllearner/algorithm/tbsl/exploration/Sparql/GetRessourcePropertys.java 2012-01-06 14:24:45 UTC (rev 3541) +++ trunk/components-ext/src/main/java/org/dllearner/algorithm/tbsl/exploration/Sparql/GetRessourcePropertys.java 2012-01-08 13:42:22 UTC (rev 3542) @@ -6,6 +6,8 @@ import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; +import java.io.OutputStreamWriter; +import java.net.HttpURLConnection; import java.net.MalformedURLException; import java.net.URL; import java.util.ArrayList; @@ -17,12 +19,12 @@ public class GetRessourcePropertys { //String Prefix="http://greententacle.techfak.uni-bielefeld.de:5171/sparql"; - //String Prefix="http://dbpedia.org/sparql"; - String Prefix="http://purpurtentacle.techfak.uni-bielefeld.de:8892/sparql"; + String Prefix="http://dbpedia.org/sparql"; + //String Prefix="http://purpurtentacle.techfak.uni-bielefeld.de:8892/sparql"; - public HashMap<String,String> getPropertys(String element, String side) throws IOException{ + public HashMap<String,String> getPropertys(String element, String side, int timeToTimeoutOnServer) throws IOException{ - return sendServerPropertyRequest(element,side); + return sendServerPropertyRequest(element,side, timeToTimeoutOnServer); @@ -34,7 +36,7 @@ * @return * @throws IOException */ - private HashMap<String,String> sendServerPropertyRequest(String vergleich, String side) throws IOException{ + private HashMap<String,String> sendServerPropertyRequest(String vergleich, String side, int timeToTimeoutOnServer) throws IOException{ //System.out.println("Resource die gesucht wird: "+ vergleich); //System.out.println("Seite die gesucht wird: "+side); @@ -64,43 +66,65 @@ //System.out.println("property right!!! : " +tmp_right); String tmp_right=Prefix+"?default-graph-uri=&query="+createServerRequest("PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> SELECT DISTINCT ?s ?p WHERE {<"+vergleichorig+"> ?p ?y. ?p rdfs:label ?s.}")+"%0D%0A&format=text%2Fhtml&debug=on&timeout="; + String tmp_both=Prefix+"?default-graph-uri=&query="+createServerRequest("PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> SELECT DISTINCT ?s ?p WHERE {{?y ?p <"+vergleichorig+">. ?p rdfs:label ?s.} UNION {<"+vergleichorig+"> ?p ?y. ?p rdfs:label ?s.}}")+"%0D%0A&format=text%2Fhtml&debug=on&timeout="; String verarbeitungsurl=null; - if(side.contains("RIGHT")) verarbeitungsurl=tmp_right; + /*Original*/ + if(side.contains("RIGHT")) verarbeitungsurl=tmp_right; if(side.contains("LEFT")) verarbeitungsurl=tmp_left; + + /*if(side.contains("LEFT")) verarbeitungsurl=tmp_both; + if(side.contains("RIGHT")) verarbeitungsurl=tmp_both;*/ //System.out.println(verarbeitungsurl); //just in case..... if(!side.contains("LEFT") && !side.contains("RIGHT")) verarbeitungsurl=tmp_left; - //String verarbeitungsstring="http://greententacle.techfak.uni-bielefeld.de:5171/sparql?default-graph-uri=&query=PREFIX+rdfs%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23%3E%0D%0APREFIX+res%3A+%3Chttp%3A%2F%2Fdbpedia.org%2Fresource%2F%3E%0D%0A%0D%0ASELECT+DISTINCT+%3Fp+%3Fl+WHERE++{%0D%0A+{+res%3A"+vergleich+"+%3Fp+%3Fo+.+}%0D%0A+UNION%0D%0A+{+%3Fs+%3Fp+res%3A"+vergleich+"+.+}%0D%0A+{+%3Fp+rdfs%3Alabel+%3Fl+.+}%0D%0A}%0D%0A&format=text%2Fhtml&debug=on&timeout="; - URL url; - InputStream is; - InputStreamReader isr; - BufferedReader r; - String str; String result=""; - - try { - url = new URL(verarbeitungsurl); - is = url.openStream(); - isr = new InputStreamReader(is); - r = new BufferedReader(isr); - do { - str = r.readLine(); - if (str != null) - result=result+str; - } while (str != null); - } catch (MalformedURLException e) { - System.out.println("Must enter a valid URL"); - } catch (IOException e) { - System.out.println("Can not connect"); - } + HttpURLConnection connection = null; + BufferedReader rd = null; + StringBuilder sb = null; + String line = null; - /* FileWriter w = new FileWriter("answer_property"); - w.write(result); - w.close(); - */ + URL serverAddress = null; + try { + serverAddress = new URL(verarbeitungsurl); + //set up out communications stuff + connection = null; + + //Set up the initial connection + connection = (HttpURLConnection)serverAddress.openConnection(); + connection.setRequestMethod("GET"); + connection.setDoOutput(true); + connection.setReadTimeout(timeToTimeoutOnServer); + + connection.connect(); + rd = new BufferedReader(new InputStreamReader(connection.getInputStream())); + sb = new StringBuilder(); + + while ((line = rd.readLine()) != null) + { + sb.append(line + '\n'); + } + + //System.out.println(sb.toString()); + result=sb.toString(); + + } catch (MalformedURLException e) { + System.out.println("Must enter a valid URL"); + } catch (IOException e) { + System.out.println("Can not connect or timeout"); + } + finally + { + //close the connection, set all objects to null + connection.disconnect(); + rd = null; + sb = null; + Object wr = null; + connection = null; + } + HashMap<String,String> hm = new HashMap(); result=result.replace("<th>s</th>",""); result=result.replace("<th>p</th>",""); Modified: trunk/components-ext/src/main/java/org/dllearner/algorithm/tbsl/exploration/Sparql/SparqlObject.java =================================================================== --- trunk/components-ext/src/main/java/org/dllearner/algorithm/tbsl/exploration/Sparql/SparqlObject.java 2012-01-06 14:24:45 UTC (rev 3541) +++ trunk/components-ext/src/main/java/org/dllearner/algorithm/tbsl/exploration/Sparql/SparqlObject.java 2012-01-08 13:42:22 UTC (rev 3542) @@ -9,8 +9,10 @@ import java.io.InputStream; import java.io.InputStreamReader; import java.io.OutputStreamWriter; +import java.net.HttpURLConnection; import java.net.MalformedURLException; import java.net.URL; +import java.net.URLConnection; import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; @@ -26,15 +28,18 @@ import net.didion.jwnl.data.POS; import org.dllearner.algorithm.tbsl.exploration.sax.ParseXmlHtml; +import org.dllearner.algorithm.tbsl.nlp.StanfordLemmatizer; import org.dllearner.algorithm.tbsl.nlp.WordNet; import org.dllearner.algorithm.tbsl.sparql.BasicQueryTemplate; import org.dllearner.algorithm.tbsl.sparql.Path; import org.dllearner.algorithm.tbsl.sparql.SPARQL_Filter; +import org.dllearner.algorithm.tbsl.sparql.SPARQL_Having; import org.dllearner.algorithm.tbsl.sparql.SPARQL_Term; import org.dllearner.algorithm.tbsl.sparql.Slot; import org.dllearner.algorithm.tbsl.sparql.Template; import org.dllearner.algorithm.tbsl.templator.BasicTemplator; import org.dllearner.algorithm.tbsl.templator.Templator; +import org.xml.sax.InputSource; import java.sql.Connection; import java.sql.DriverManager; @@ -53,17 +58,20 @@ static int explorationdepthwordnet=2; static int iterationdepth =0; static int numberofanswers=1; - static double LevenstheinMin = 0.8; + static double LevenstheinMin = 0.9; static WordNet wordnet; BasicTemplator btemplator; Templator templator; private static mySQLDictionary myindex; boolean only_best_levensthein_query; + static StanfordLemmatizer lemmatiser; + //one Minute + private static int timeToTimeoutOnServer=60000; //change here and in getRessourcePropertys //String Prefix="http://greententacle.techfak.uni-bielefeld.de:5171/sparql"; - //String Prefix="http://dbpedia.org/sparql"; - String Prefix="http://purpurtentacle.techfak.uni-bielefeld.de:8892/sparql"; + String Prefix="http://dbpedia.org/sparql"; + //String Prefix="http://purpurtentacle.techfak.uni-bielefeld.de:8892/sparql"; //Konstruktor @@ -88,6 +96,7 @@ setNumberofanswers(1); only_best_levensthein_query=false; + lemmatiser = new StanfordLemmatizer(); } /* @@ -133,12 +142,19 @@ * "Main" Method of this Class. * */ - public queryInformation create_Sparql_query(queryInformation query_struct) throws JWNLException, IOException, SQLException{ + public queryInformation create_Sparql_query(queryInformation queryObject) throws JWNLException, IOException, SQLException{ //create_Sparql_query_new(string); ArrayList<ArrayList<String>> lstquery = new ArrayList<ArrayList<String>>(); long startParsingTime = System.currentTimeMillis(); - lstquery=getQuery(query_struct.getQuery()); + //lstquery=getQuery(queryObject.getQuery(),queryObject); + queryObject=getQuery(queryObject); + lstquery=queryObject.getQueryInformation(); + queryObject.setQueryInformation(lstquery); + /*BufferedReader in1 = new BufferedReader(new InputStreamReader(System.in)); + String line; + + line = in1.readLine();*/ long endParsingTime = System.currentTimeMillis(); long startIterationTime = System.currentTimeMillis(); System.out.println("The Questionparsing took "+ (endParsingTime-startParsingTime)+ " ms"); @@ -146,7 +162,7 @@ Set<String> final_query_hash = new HashSet<String>(); if(lstquery.isEmpty()){ - saveNotParsedQuestions(query_struct.getQuery()); + saveNotParsedQuestions(queryObject.getQuery()); } for(ArrayList<String> querylist : lstquery){ @@ -188,7 +204,7 @@ String out=null; if (query.equals("") || query.equals(" ")||query.length()==0) query="Could not parse"; - out=tmp + "\n" + query_struct.getQuery() + ":\n"+query+"\n"; + out=tmp + "\n" + queryObject.getQuery() + ":\n"+query+"\n"; BufferedWriter outfile = new BufferedWriter( new OutputStreamWriter( @@ -243,19 +259,23 @@ ArrayList<String> final_answer_tmp = new ArrayList<String>(); ArrayList<String> final_query_tmp=new ArrayList<String>(); - if(querylist.size()==4){ + if(querylist.size()==4&&!query.contains("rdf:type")){ - final_query_tmp=simpleCase(querylist, query, "LEVENSTHEIN"); + final_query_tmp=simpleCase(querylist, query, "LEVENSTHEIN",queryObject); for(String i: final_query_tmp){ final_query_hash.add(i); } } + //e.g. Select ßy Where (?y rdf:type <http://..../ontology/School> + if(querylist.size()==4&&query.contains("rdf:type")){ + final_query_hash.add(query); + } if(querylist.size()>4&&query.contains("rdf:type")){ - final_query_tmp=isAIteration(querylist, query,"LEVENSTHEIN"); + final_query_tmp=isAIteration(querylist, query,"LEVENSTHEIN",queryObject.getIsaResource()); for(String i: final_query_tmp){ final_query_hash.add(i); @@ -285,17 +305,21 @@ ArrayList<String> final_query_tmp = new ArrayList<String>(); //isAIteration(querylist, query); - if(querylist.size()==4){ + if(querylist.size()==4&&!query.contains("rdf:type")){ - final_query_tmp=simpleCase(querylist, query, "WORDNET"); + final_query_tmp=simpleCase(querylist, query, "WORDNET",queryObject); for(String i: final_query_tmp){ final_query_hash.add(i); } } + //e.g. Select ßy Where (?y rdf:type <http://..../ontology/School> + if(querylist.size()==4&&query.contains("rdf:type")){ + final_query_hash.add(query); + } if(querylist.size()>4&&query.contains("rdf:type")){ - final_query_tmp=isAIteration(querylist, query,"WORDNET"); + final_query_tmp=isAIteration(querylist, query,"WORDNET",queryObject.getIsaResource()); for(String i: final_query_tmp){ final_query_hash.add(i); } @@ -323,48 +347,60 @@ - Iterator it = final_query_hash.iterator(); + Iterator<String> it = final_query_hash.iterator(); while (it.hasNext()) { System.out.println(it.next()); - String answer_tmp; + ArrayList<String> answer= new ArrayList<String>(); try{ String anfrage=it.next().toString(); - answer_tmp=sendServerQuestionRequest(anfrage); + answer=sendServerQuestionRequestArray(anfrage); + // @en is also in the ML + /* answer_tmp=answer_tmp.replace("\"@en", ""); - answer_tmp=answer_tmp.replace("\"", ""); + answer_tmp=answer_tmp.replace("\"", "");*/ //filter answers! - if(query_struct.isHint()){ - System.out.println("Using hint!"); - /* - * Answertyps: resource, string, boolean, num, date - */ - if(query_struct.getType().contains("boolean")){ - if(answer_tmp.contains("true")||answer_tmp.contains("false")) final_answer.add(answer_tmp); - - } - else if (query_struct.getType().contains("resource")){ - final_answer.add(answer_tmp); - } - else if (query_struct.getType().contains("string")){ - if(!answer_tmp.contains("http")&&!answer_tmp.contains("EmtyAnswer")) { - String[] tmparray = answer_tmp.split("\n"); - for(String z : tmparray)final_answer.add(z); - } - - } - else if (query_struct.getType().contains("num")){ - if(answer_tmp.matches("[0-9]*")) final_answer.add(answer_tmp); - - } - else if (query_struct.getType().contains("date")){ - final_answer.add(answer_tmp); - } + for(String answer_tmp : answer ){ + if(answer_tmp!="EmtyAnswer"){ + if(queryObject.isHint()){ + //System.out.println("Using hint!"); + /* + * Answertyps: resource, string, boolean, num, date + */ + if(queryObject.getType().contains("boolean")){ + if(answer_tmp.contains("true")||answer_tmp.contains("false")) final_answer.add(answer_tmp); + + } + else if (queryObject.getType().contains("resource")){ + try{ + String[] tmparray = answer_tmp.split("\n"); + for(String z : tmparray)final_answer.add(z); + } + catch(Exception e){ + final_answer.add(answer_tmp); + } + } + else if (queryObject.getType().contains("string")||queryObject.getType().contains("uri")){ + if(!answer_tmp.contains("EmtyAnswer")) { + String[] tmparray = answer_tmp.split("\n"); + for(String z : tmparray)final_answer.add(z); + } + + } + else if (queryObject.getType().contains("num")){ + if(answer_tmp.matches("[0-9]*")) final_answer.add(answer_tmp); + + } + else if (queryObject.getType().contains("date")){ + final_answer.add(answer_tmp); + } + } + else{ + //final_answer.add("Begin:\n"+anfrage +"\n"+answer_tmp+" \n End"); + final_answer.add(answer_tmp); + } + } } - else{ - //final_answer.add("Begin:\n"+anfrage +"\n"+answer_tmp+" \n End"); - final_answer.add(answer_tmp); - } } catch (Exception e){ @@ -372,13 +408,20 @@ } + long stopIterationTime = System.currentTimeMillis(); + /* + * Set time + */ + + queryObject.setTimeGesamt(stopIterationTime-startParsingTime); + queryObject.setTimeParser(endParsingTime-startParsingTime); + queryObject.setTimeWithoutParser(stopIterationTime-startIterationTime); + queryObject.setResult(final_answer); - query_struct.setResult(final_answer); - - return query_struct; + return queryObject; } - private ArrayList<String> newIteration(ArrayList<String> querylist, String query) throws SQLException, + private ArrayList<String> newIteration(ArrayList<String> querylist, String query, queryInformation queryObject) throws SQLException, JWNLException { //only for special case, that the first condition has a resource ArrayList<String> final_answer=new ArrayList<String>(); @@ -439,7 +482,7 @@ querylist_new.add("PROPERTY"+firstProperty); querylist_new.add(sideOfProperty+firstResource); if(answer_tmp.isEmpty()){ - answer_tmp=simpleCase(querylist_new,firstquery,"WORDNET"); + answer_tmp=simpleCase(querylist_new,firstquery,"WORDNET",queryObject); } //if answer_tmp is still empty return null and exit function if(answer_tmp.isEmpty()){final_answer.add("new Iteration didnt work"); @@ -481,7 +524,7 @@ for(ArrayList as: secondquerylist){ ArrayList<String> answer_tmp_two=new ArrayList<String>(); //answer_tmp_two=sendServerQuestionRequestArray(s); - answer_tmp=simpleCase(as,as.get(0).toString(),"WORDNET"); + answer_tmp=simpleCase(as,as.get(0).toString(),"WORDNET",queryObject); for(String t :answer_tmp_two){ final_answer.add(t); System.out.println("Answer from advanced Iteration: "+ t); @@ -495,7 +538,7 @@ - private ArrayList<String> isAIteration(ArrayList<String> querylist, String query, String fall) throws SQLException, + private ArrayList<String> isAIteration(ArrayList<String> querylist, String query, String fall, String uri_isA_Resource) throws SQLException, JWNLException { ArrayList<String> new_queries= new ArrayList<String>(); //TODO: in get Query change, that there will be a second query, but only with the part of the condition upsidedown, which doesnt contains an isA @@ -506,29 +549,17 @@ */ - //take query and use regex, to take only the part beween the {} - Pattern p = Pattern.compile (".*\\{(.*\\<http.*)\\}.*"); - Matcher m = p.matcher (query); ArrayList<String> list_of_x=new ArrayList<String>(); String query_for_x=null; - while(m.find()){ - String tmp=m.group(1); - - Pattern p2=Pattern.compile (".*(http://dbpedia.org/ontology/[A-Z].*)\\>\\W.*"); - Matcher m2 = p2.matcher (tmp); - //now we know, that we are in the part with the rdf type thing - while(m2.find()){ - query_for_x="PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> SELECT ?x WHERE { ?x rdf:type <"+m2.group(1)+">}"; - //System.out.println("Done: "+ query_for_x); - } - - } + + + + query_for_x="PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> SELECT ?x WHERE { ?x rdf:type <"+uri_isA_Resource+">}"; //now send query_for_x to the server, to get all x System.out.println("IsA x-query: "+query_for_x); if(query_for_x!=null)list_of_x=sendServerQuestionRequestArray(query_for_x); - /* * Zweiter Schritt: * alle Propertys z.B. der ersten 5 xe holen und in eine Liste packen @@ -543,6 +574,7 @@ /* * First use left and also right Propertys */ + tmpcounter++; if(tmpcounter <=number_of_x_used){ HashMap<String,String> propertiesleft = new HashMap<String, String>(); @@ -550,8 +582,8 @@ GetRessourcePropertys property = new GetRessourcePropertys(); try { - propertiesleft=property.getPropertys(s,"LEFT"); - propertiesright=property.getPropertys(s,"RIGHT"); + propertiesleft=property.getPropertys(s,"LEFT",timeToTimeoutOnServer); + propertiesright=property.getPropertys(s,"RIGHT",timeToTimeoutOnServer); } catch (Exception e){ @@ -565,7 +597,14 @@ } } - //System.out.println(list_of_properties); + /* System.out.println("List of Properties: "); + for (Entry<String, String> entry : list_of_properties.entrySet()) { + String key = entry.getKey(); + key=key.replace("\"",""); + key=key.replace("@en",""); + String value = entry.getValue(); + System.out.println("Key: "+ key + " Value: "+value); + }*/ /* * get Property used in the original query @@ -577,47 +616,44 @@ //http://dbpedia.org/ontology/officialLanguage //look for property - Pattern p3=Pattern.compile (".*\\<(http://dbpedia.org/property/.*)\\>\\W\\?.*"); + Pattern p3=Pattern.compile (".*\\<(http://dbpedia.org/property/.*)\\>\\W\\W*\\?.*"); Matcher m3 = p3.matcher(query); - while(m3.find()) System.out.println("Property in IsA: "+m3.group(1)); + String property_to_compare_with_uri=""; + while(m3.find()) { + property_to_compare_with_uri=m3.group(1); + System.out.println("Property in IsA: "+m3.group(1)); + } - //look for ontology, which is NO class - //Pattern p4=Pattern.compile (".*\\<(http://dbpedia.org/ontology/^[A-Z].*)\\>\\W.*"); - Pattern p4=Pattern.compile (".*\\<(http://dbpedia.org/ontology/[a-z].*)\\>\\W\\?.*"); - Matcher m4 = p4.matcher(query); - String uri_property=null; - while(m4.find()) { - uri_property=m4.group(1); - System.out.println("Uri_Property: "+ uri_property); + //if there is no property but an ontology-property + if(property_to_compare_with_uri==""){ + Pattern p4=Pattern.compile (".*\\<(http://dbpedia.org/ontology/[a-z].*)\\>\\W\\W*\\?.*"); + Matcher m4 = p4.matcher(query); + while(m4.find()) { + property_to_compare_with_uri=m4.group(1); + System.out.println("Property in IsA: "+m4.group(1)); + } } - /* - * Nice, now i get http://dbpedia.org/ontology/officialLanguage - */ - if(uri_property!=null){ - String property=uri_property.replace("http://dbpedia.org/ontology/", "").replace("http://dbpedia.org/property/", ""); - String property_to_compare_with=""; - + String property_to_compare_with=property_to_compare_with_uri.replace("http://dbpedia.org/property/","").replace("http://dbpedia.org/ontology/",""); + + /* BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); + String line; - for(String s : querylist){ - if(s.contains("PROPERTY")){ - property_to_compare_with=s.replace("PROPERTY",""); - } - - } - - - /* - * Dritter Schritt: original Query nehmen und über die Liste mit den Propertys laufen und normal mit wordnet/levensthein vergleichen - */ - - //I think, i dont need here the last part of the uri but the original word from the query! - //new_queries=doWordnet(query,property,uri_property,list_of_properties); - - //if you want to use wordnet: - if(fall.contains("WORDNET")) new_queries=doWordnet(query,property_to_compare_with,uri_property,list_of_properties); - if(fall.contains("LEVENSTHEIN")) new_queries=doLevensthein(query,property_to_compare_with,uri_property,list_of_properties); - } + System.out.println("############################"); + System.out.println("query: "+query); + System.out.println("property_to_compare_with: "+property_to_compare_with); + System.out.println("property_to_compare_with_uri: "+property_to_compare_with_uri); + System.out.println("############################"); + try { + line = in.readLine(); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + }*/ + if(fall.contains("WORDNET")) new_queries=doWordnet(query,property_to_compare_with,property_to_compare_with_uri,list_of_properties); + if(fall.contains("LEVENSTHEIN")) new_queries=doLevensthein(query,property_to_compare_with_uri,property_to_compare_with_uri,list_of_properties); + + return new_queries; @@ -625,7 +661,7 @@ - private ArrayList<String> simpleCase(ArrayList<String> querylist, String query, String fall) throws SQLException, + private ArrayList<String> simpleCase(ArrayList<String> querylist, String query, String fall, queryInformation queryObject) throws SQLException, JWNLException { System.out.println("In Simpe levensthein case!!"); @@ -655,6 +691,7 @@ } } + System.out.println("ARRAY LIST: "+querylist); System.out.println("Property to compare:: "+ property_to_compare_with); System.out.println("Resource: "+ resource); @@ -664,11 +701,12 @@ Boolean goOnAfterProperty = true; - System.out.println("URI from Resource "+ resource +": "+getUriFromIndex(resource.toLowerCase(),0)); + //System.out.println("URI from Resource "+ resource +": "+getUriFromIndex(resource.toLowerCase(),0)); + System.out.println("URI from Resource "+ resource +": "+queryObject.getHashValue(resource.toLowerCase())); //gets Propertys left or right from the resource! try { - properties=property.getPropertys(getUriFromIndex(resource.toLowerCase(),0),sideOfProperty); + properties=property.getPropertys(queryObject.getHashValue(resource.toLowerCase()),sideOfProperty,timeToTimeoutOnServer); if (properties==null){ System.out.println("Begin:\n"+query +"\nError in getting Properties \n End"); @@ -684,8 +722,8 @@ } if(goOnAfterProperty==true){ - if(fall.contains("WORDNET")) new_queries=doWordnet(query, property_to_compare_with,getUriFromIndex(property_to_compare_with.toLowerCase(),1),properties); - if(fall.contains("LEVENSTHEIN")) new_queries=doLevensthein(query, property_to_compare_with,getUriFromIndex(property_to_compare_with.toLowerCase(),1),properties); + if(fall.contains("WORDNET")) new_queries=doWordnet(query, property_to_compare_with,queryObject.getHashValue(property_to_compare_with.toLowerCase()),properties); + if(fall.contains("LEVENSTHEIN")) new_queries=doLevensthein(query, property_to_compare_with,queryObject.getHashValue(property_to_compare_with.toLowerCase()),properties); //new_queries=doLevensthein(query, property_to_compare_with,getUriFromIndex(property_to_compare_with.toLowerCase(),1),properties); //add original query @@ -797,8 +835,8 @@ //Get Properties for Resource in condition One and Two from Server try { - propertiesOne=property.getPropertys(getUriFromIndex(resourceOne.toLowerCase(),0),sideOfPropertyOne); - propertiesTwo=property.getPropertys(getUriFromIndex(resourceTwo.toLowerCase(),0),sideOfPropertyTwo); + propertiesOne=property.getPropertys(getUriFromIndex(resourceOne.toLowerCase(),0),sideOfPropertyOne,timeToTimeoutOnServer); + propertiesTwo=property.getPropertys(getUriFromIndex(resourceTwo.toLowerCase(),0),sideOfPropertyTwo,timeToTimeoutOnServer); if (propertiesOne==null){ System.out.println("Begin:\n"+query +"\nError in getting Properties \n End"); @@ -1128,7 +1166,8 @@ - + + //TODO: Write function new!!!!! /** * Iterates thrue the conditions and returns an array, where one can see, if the Property is left or right from the resource * @param query @@ -1140,31 +1179,83 @@ Matcher m = p.matcher (query); ArrayList<String> lstquery = new ArrayList<String>(); while (m.find()) { - String tmp= m.group(1); + System.out.println("In While Loop!"); + String workingQuery= m.group(1); //if there is an .../ontology/C, dann ist das eine Klasse und das ganze soll dann nicht ersetzt reingepackt werden, sondern so bleiben, wie es ist. - System.out.println("Before new pattern and checking "+tmp); - Pattern p1=Pattern.compile (".*(http://dbpedia.org/ontology/[A-Z].*)\\>\\W.*"); - Matcher m1 = p1.matcher (tmp); + System.out.println("Before new pattern and checking "+workingQuery); + + //take the Filter out, so you only have the conditions left + Pattern p2=Pattern.compile (".*(\\.FILTER\\(.*\\)).*"); + Matcher m2 = p2.matcher (workingQuery); + while(m2.find()){ + System.out.println("FIlter: "+m2.group(1)); + workingQuery=workingQuery.replace(m2.group(1), ""); + System.out.println("Without Filter: "+workingQuery); + } + String resourceTemp=""; - while(m1.find()){ - resourceTemp="RESOURCE"+m1.group(1); - tmp=tmp.replace("<"+m1.group(1)+">", "SKIP"); - System.out.println("New temp: "+tmp); + if(workingQuery.contains("ontologie")){ + Pattern p1=Pattern.compile (".*\\<(http://dbpedia.org/ontology/[A-Z].*)\\>\\W\\W*.*"); + Matcher m1 = p1.matcher (workingQuery); + + + /* + * Das darf nicht sein: + * Replacment: <http://dbpedia.org/ontology/Caves> rdf:type ?x .?y <http://dbpedia.org/property/entrances> + */ + while(m1.find()){ + resourceTemp="RESOURCE"+m1.group(1); + String replacment="<"+m1.group(1)+">"; + //TODO: Make it nice!!! + //if he doesnt find the ontolokg party, kind of skip + if(!replacment.contains("property")&&!replacment.contains("resource")){ + System.out.println("Replacment: "+replacment); + workingQuery=workingQuery.replace(replacment, "SKIP"); + System.out.println("New temp: "+workingQuery); + } + + } + } - /* if(m1.find()){ - System.out.println("YEAHHHHHHHHHHHHHHHHHHHH "+m1.group(1)); + + /* + * dbpedia.org/class/yago/ + */ + if(workingQuery.contains("yago")){ + Pattern p3=Pattern.compile (".*\\<(http://dbpedia.org/class/yago//[A-Z].*)\\>\\W.*"); + Matcher m3 = p3.matcher (workingQuery); + + + /* + * Das darf nicht sein: + * Replacment: <http://dbpedia.org/ontology/Caves> rdf:type ?x .?y <http://dbpedia.org/property/entrances> + */ + while(m3.find()){ + resourceTemp="RESOURCE"+m3.group(1); + String replacment="<"+m3.group(1)+">"; + //TODO: Make it nice!!! + //if he doesnt find the ontolokg party, kind of skip + if(!replacment.contains("property")&&!replacment.contains("resource")){ + System.out.println("Replacment: "+replacment); + workingQuery=workingQuery.replace(replacment, "SKIP"); + System.out.println("New temp: "+workingQuery); + } + + } + } - else{*/ - + + System.out.println("TMP before replace :"+workingQuery); + workingQuery=workingQuery.replace("http://dbpedia.org/resource/","").replace("http://dbpedia.org/property/", "").replace("http://dbpedia.org/ontology/", ""); - tmp=tmp.replace("http://dbpedia.org/resource/","").replace("http://dbpedia.org/property/", "").replace("http://dbpedia.org/ontology/", ""); - + System.out.println("TMP After replace :"+workingQuery); //split on . for sign for end of conditions - String[] firstArray=tmp.split("\\."); + String[] firstArray=workingQuery.split("\\."); for(String i : firstArray){ String[] secondArray=i.split(" "); + //always in three counts int counter=0; for(String j : secondArray){ @@ -1189,7 +1280,7 @@ else if(j.contains("SKIP"))lstquery.add(resourceTemp); else if(j.contains("rdf:type"))lstquery.add("IsA"); } - if(counter==0)counter=0; + if(counter==3)counter=0; } @@ -1202,6 +1293,7 @@ } + //TODO: Plural Singual abfragen über die Wordnetdatei... /** @@ -1210,8 +1302,9 @@ * @return ArrayList of Sparql queries. * @throws SQLException */ - private ArrayList<ArrayList<String>> getQuery(String question) throws SQLException { + private queryInformation getQuery(queryInformation queryObject) throws SQLException { ArrayList<ArrayList<String>> lstquery = new ArrayList<ArrayList<String>>(); + String question=queryObject.getQuery(); Set<BasicQueryTemplate> querytemps = btemplator.buildBasicQueries(question); for (BasicQueryTemplate temp : querytemps) { @@ -1219,6 +1312,8 @@ ArrayList<String> lstquerupsidedown = new ArrayList<String>(); String query; String selTerms =""; + String yago_query=""; + String yago_query_upside_down=""; boolean addQuery=true; //sometimes there isnt an Selectterm, so dont use this query @@ -1248,6 +1343,14 @@ filters=""; addQuery=false; } + String having=""; + try{ + for(SPARQL_Having tmp : temp.getHavings()) having=having+tmp+" "; + } + catch(Exception e){ + having=""; + addQuery=false; + } //if there is no order by, replace with "" String orderdBy="ORDER BY "; @@ -1276,7 +1379,7 @@ } if(addQuery==true){ - query="PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> "+temp.getQt().toString()+" "+selTerms+" WHERE {"+ conditions.replace("--","") + filters+"}"+orderdBy +" "+limit; + query="PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> "+temp.getQt().toString()+" "+selTerms+" WHERE {"+ conditions.replace("--","") + filters+"}"+orderdBy+" "+having +" "+limit; String conditions_new = ""; for(Path condition: temp.getConditions()){ @@ -1300,7 +1403,7 @@ System.out.println("Conditions_new: " + conditions_new); - String query_upside_down = "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> "+temp.getQt().toString()+" "+selTerms+" WHERE {"+ conditions_new.replace("--","") +filters+ "}" + orderdBy +" "+limit; + String query_upside_down = "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> "+temp.getQt().toString()+" "+selTerms+" WHERE {"+ conditions_new.replace("--","") +filters+"}" + orderdBy +" "+having+" "+limit; String[] slots= null; @@ -1313,7 +1416,7 @@ int slotcounter=1; /* - * the one after the isA, has to be an ontology Class!!! + * the one after the isA, has to be an ontology Class or an Yago Class!!! * so first find out, which one is behind the isA * best with regex or so.... take the condition, regex the thing between isA and . for End of Condition * kind of regex=[*a IsA (\\?*a.)*a] @@ -1381,6 +1484,10 @@ System.out.println("Property "+property);*/ boolean skip=false; + + /* + * Der geht hier garnicht in die Schleife. + */ if(resource.contains(isaComponent.replace("?", "")) || property.contains(isaComponent.replace("?", ""))){ skip=true; @@ -1402,8 +1509,40 @@ catch(Exception e){ } - String hm_result=myindex.getontologyClassURI(array[1]); - if(hm_result==null)hm_result="http://dbpedia.org/ontology/"+Character.toUpperCase(array[1].charAt(0)) + array[1].substring(1, array[1].length()); + + /* + * Here lookup in ontology and in Yago, if ontology doesnt exist, use Yago, if not, use Ontology + * if both exist, add yago_query and yago_query upsideDown, but also change the isACase function for Yago + */ + //first look in Hasmap, if there is already an entry, if not, add founded result + String hm_result=""; + hm_result=queryObject.getHashValue(array[1]); + if(hm_result.contains("NONE")){ + //hm_result=myindex.getontologyClassURI(array[1]); + hm_result=getUriFromIndex(array[1].toLowerCase(),2); + System.out.println("direkt gefunden URI: "+hm_result); + if(hm_result.contains("NONE")){ + hm_result=getUriFromIndex(array[1].toLowerCase(),3); + if(hm_result.contains("NONE"))hm_result="http://dbpedia.org/ontology/"+Character.toUpperCase(array[1].charAt(0)) + array[1].substring(1, array[1].length()); + } + queryObject.setHashValue(array[1], hm_result); + } + + //check for Yago! + String hm_result_new=getUriFromIndex(array[1].toLowerCase(),3); + /*if(!hm_result_new.contains("NONE")){ + //set identefire + yago_query="YAGO"+query.replace(replace, "<"+hm_result_new+">"); + yago_query_upside_down="YAGO"+query_upside_down.replace(replace, "<"+hm_result_new+">"); + } + else{*/ + yago_query="NONE"; + yago_query_upside_down="NONE"; + //} + //add the uri for the Resource in isA case, so I dont have to search for it again + queryObject.setIsaResource(hm_result); + + System.out.println(array[1]+" for getOntologyClass "+hm_result); //System.out.print("URI for_ThingGettingURIfor: "+hm_result); try @@ -1431,8 +1570,13 @@ if(array[0].length()<2)replace = "?"+array[0]+" "; else replace="?"+array[0]; - String hm_result=getUriFromIndex(array[1],0); - //System.out.print("URI for_ThingGettingURIfor: "+hm_result); + String hm_result=""; + hm_result=queryObject.getHashValue(array[1]); + if(hm_result.contains("NONE")){ + hm_result=getUriFromIndex(array[1],0); + queryObject.setHashValue(array[1], hm_result); + } + try { if(hm_result.contains("Category:")) hm_result=hm_result.replace("Category:",""); @@ -1446,6 +1590,10 @@ //System.out.println("Query: "+query); query_upside_down=query_upside_down.replace(replace, "<"+hm_result+">"); //System.out.println("Query Up Side Down: "+query_upside_down); + /* if(!yago_query.contains("NONE")){ + yago_query=yago_query.replace(replace, "<"+hm_result+">"); + yago_query_upside_down=yago_query_upside_down.replace(replace, "<"+hm_result+">"); + }*/ } @@ -1455,12 +1603,21 @@ if(array[0].length()<2)replace = "?"+array[0]+" "; else replace="?"+array[0]; - String hm_result=getUriFromIndex(array[1],1); + String hm_result=""; + hm_result=queryObject.getHashValue(array[1]); + if(hm_result.contains("NONE")){ + hm_result=getUriFromIndex(array[1],1); + queryObject.setHashValue(array[1], hm_result); + } query=query.replace(replace, "<"+hm_result+">"); //System.out.println("Query: "+query); query_upside_down=query_upside_down.replace(replace, "<"+hm_result+">"); //System.out.println("Query Up Side Down: "+query_upside_down); + /* if(!yago_query.contains("NONE")){ + yago_query=yago_query.replace(replace, "<"+hm_result+">"); + yago_query_upside_down=yago_query_upside_down.replace(replace, "<"+hm_result+">"); + }*/ } @@ -1470,6 +1627,12 @@ query=query.replace("><","> <").replace(">?", "> ?"); query=query.replace("/__", "/"); query_upside_down=query_upside_down.replace("/__", "/"); + /*if(!yago_query.contains("NONE")){ + yago_query_upside_down=yago_query_upside_down.replace("><","> <").replace(">?", "> ?"); + yago_query=yago_query.replace("><","> <").replace(">?", "> ?"); + yago_query=yago_query.replace("/__", "/"); + yago_query_upside_down=yago_query_upside_down.replace("/__", "/"); + }*/ lstquerupsidedown.add(query_upside_down); lstquerynew.add(query); System.out.println("Query: "+query); @@ -1484,6 +1647,7 @@ ArrayList<String> lsttmp=createLeftAndRightPropertyArray(query); //if its lower than three, we dont have any conditions and dont need to check it. //also if the size%3 isnt 0, than something else is wrong and we dont need to test the query + System.out.println("lsttmp :"+lsttmp); if(lsttmp.size()>=3&&lsttmp.size()%3==0){ for(String i : lsttmp) lstquerynew.add(i.replace("__","")); lstquery.add(lstquerynew); @@ -1515,7 +1679,8 @@ } System.out.println("List of Query: "+lstquery); - return lstquery; + queryObject.setQueryInformation(lstquery); + return queryObject; } @@ -1558,7 +1723,7 @@ /** * * @param string - * @param fall 1 Property 0 no Property + * @param fall 1=Property, 0=Resource, 2=OntologyClass, 3=Yago * @return * @throws SQLException */ @@ -1574,25 +1739,114 @@ String result=null; String tmp1=null; String tmp2 = null; - //just to be sure its only 0 or 1 - if(fall!=0 && fall!=1) fall=0; + if(fall==0){ - //first try: take always the ontology if existing and not the Resource - tmp1=myindex.getResourceURI(string.toLowerCase()); - tmp2=myindex.getontologyClassURI(string.toLowerCase()); - /*System.out.println("URI from resource: "+tmp1); - System.out.println("URI from ontologyClass: "+tmp2);*/ + result=myindex.getResourceURI(string.toLowerCase()); + if(result==null){ + /* + * Second try lemmatised one + */ + result=myindex.getResourceURI(lemmatiser.stem(string.toLowerCase())); + if(result==null){ + /* + * Third try lemmatised with like + */ + ArrayList<String> tmp=myindex.getResourceURILike(lemmatiser.stem(string.toLowerCase())); + double highestNLD=0; + String bestWord=""; + try{ + if(!tmp.isEmpty()){ + for(String i : tmp){ + double nld_tmp=Levenshtein.nld(string.toLowerCase(), i); + if(nld_tmp>highestNLD) bestWord=i; + } + result=bestWord; + } + else{ + result="NONE"; + } + } + catch(Exception e){ + result="NONE"; + } + } + } + + } + if(fall==2){ + System.out.println("Im Ontology Fall"); + result=myindex.getontologyClassURI(string.toLowerCase()); + if(result==null){ + /* + * Second try lemmatised one + */ + result=myindex.getontologyClassURI(lemmatiser.stem(string.toLowerCase())); + if(result==null){ + /* + * Third try lemmatised with like + */ + ArrayList<String> tmp=myindex.getontologyClassURILike(lemmatiser.stem(string.toLowerCase())); + double highestNLD=0; + String bestWord=""; + try{ + if(!tmp.isEmpty()){ + for(String i : tmp){ + double nld_tmp=Levenshtein.nld(string.toLowerCase(), i); + if(nld_tmp>highestNLD) bestWord=i; + } + result=bestWord; + } + else{ + result="NONE"; + } + } + catch(Exception e){ + result="NONE"; + } + } + } + System.out.println("URi in Ontology: "+result); + + } + if(fall==3){ - - if(tmp1!=null && tmp2!=null) result=tmp2; - if(tmp1!=null && tmp2==null) result=tmp1; - if(tmp1==null && tmp2!=null) result=tmp2; - - //result=myindex.getResourceURI(string.toLowerCase()); - if(result==null)result=myindex.getPropertyURI(string.toLowerCase()); + System.out.println("Im Yago Fall"); + result=myindex.getYagoURI(string.toLowerCase()); + if(result==null){ + /* + * Second try lemmatised one + */ + result=myindex.getYagoURI(lemmatiser.stem(string.toLowerCase())); + if(result==null){ + /* + * Third try lemmatised with like + */ + ArrayList<String> tmp=myindex.getYagoURILike(lemmatiser.stem(string.toLowerCase())); + double highestNLD=0; + String bestWord=""; + try{ + if(!tmp.isEmpty()){ + for(String i : tmp){ + double nld_tmp=Levenshtein.nld(string.toLowerCase(), i); + if(nld_tmp>highestNLD) bestWord=i; + } + result=bestWord; + } + else{ + result="NONE"; + } + } + catch(Exception e){ + result="NONE"; + } + } + } + System.out.println("URi in Ontology: "+result); + } + if(fall==1){ tmp1=myindex.getPropertyURI(string.toLowerCase()); tmp2=myindex.getontologyURI(string.toLowerCase()); @@ -1600,7 +1854,10 @@ if(tmp1!=null && tmp2==null) result=tmp1; if(tmp1==null && tmp2!=null) result=tmp2; if(result==null){ + //kann ich mir sparen result=myindex.getResourceURI(string.toLowerCase()); + + if(result!=null) result=result.replace("resource", "property"); } @@ -1653,25 +1910,11 @@ ArrayList<String> semantics = new ArrayList<String>(); semantics=semanticsOrig; - /*//check out, if in the semantics are still terms, with _ or , - //if so, split on _ and , and add them to the semantic list - for(String id :semanticsOrig){ - if(id.contains("_")){ - System.out.println("in _"); - String[] tmp=id.split("_"); - for(String i: tmp) if(!semantics.contains(i))semantics.add(i); - - //and also add a term without _ - if(!semantics.contains(id.replace("_"," ")))semantics.add(id.replace("_"," ")); - //remove old id - //semantics.remove(id); - } - if(id.contains(",")){ - System.out.println("in ,"); - String[] tmp=id.split(","); - for(String i: tmp) if(!semantics.contains(i))semantics.add(i); - //semantics.remove(id); - } + //also look at the stemmt part! + /*for(String s: semanticsOrig){ + String bla=lemmatiser.stem(s); + semantics.add(bla); + semantics.add(s); }*/ try{ @@ -1802,35 +2045,59 @@ * change to dbpedia http://dbpedia.org/sparql */ //String tmp="http://greententacle.techfak.uni-bielefeld.de:5171/sparql?default-graph-uri=&query="+createServerRequest(query)+"&format=text%2Fhtml&debug=on&timeout="; - String tmp=Prefix+"?default-graph-uri=&query="+createServerRequest(query)+"&format=text%2Fhtml&debug=on&timeout="; System.out.println(tmp); - URL url; - InputStream is; - InputStreamReader isr; - BufferedReader r; - String str=""; - String result=""; + String tmp=Prefix+"?default-graph-uri=&query="+createServerRequest(query)+"&format=text%2Fhtml&debug=on&timeout="; + //System.out.println(tmp); + String result=""; + HttpURLConnection connection = null; + OutputStreamWriter wr = null; + BufferedReader rd = null; + StringBuilder sb = null; + String line = null; + + URL serverAddress = null; + + try { + serverAddress = new URL(tmp); + //set up out communications stuff + connection = null; + + //Set up the initial connection + connection = (HttpURLConnection)serverAddress.openConnection(); + connection.setRequestMethod("GET"); + connection.setDoOutput(true); + connection.setReadTimeout(timeToTimeoutOnServer); + + connection.connect(); + rd = new BufferedReader(new InputStreamReader(connection.getInputStream())); + sb = new StringBuilder(); + + while ((line = rd.readLine()) != null) + { + sb.append(line + '\n'); + } + + //System.out.println(sb.toString()); + result=sb.toString(); + + } catch (MalformedURLException e) { + System.out.println("Must enter a valid URL"); + } catch (IOException e) { + System.out.println("Can not connect or timeout"); + } + finally + { + //close the connection, set all objects to null + connection.disconnect(); + rd = null; + sb = null; + wr = null; + connection = null; + } + - try { - url = new URL(tmp); - is = url.openStream(); - isr = new InputStreamReader(is); - r = new BufferedReader(isr); - int counter=0; - do { - str = r.readLine(); - if (str != null){ - result=result.concat(str); - counter=counter+1;} - } while (str != null); - - } catch (MalformedURLException e) { - System.out.println("Must enter a valid URL"); - } catch (IOException e) { - System.out.println("Can not connect"); - } + - return createAnswer(result); } @@ -1842,35 +2109,56 @@ //String tmp="http://greententacle.techfak.uni-bielefeld.de:5171/sparql?default-graph-uri=&query="+createServerRequest(query)+"&format=text%2Fhtml&debug=on&timeout="; String tmp=Prefix+"?default-graph-uri=&query="+createServerRequest(query)+"&format=text%2Fhtml&debug=on&timeout="; - System.out.println(tmp); - URL url; - InputStream is; - InputStreamReader isr; - BufferedReader r; - String str=""; - String result=""; - - try { - url = new URL(tmp); - is = url.openStream(); - isr = new InputStreamReader(is); - r = new BufferedReader(isr); - int counter=0; - do { - str = r.readLine(); - if (str != null){ - result=result.concat(str); - counter=counter+1;} - } while (str != null); - - } catch (MalformedURLException e) { - System.out.println("Must enter a valid URL"); - } catch (IOException e) { - System.out.println("Can not connect"); - } + //System.out.println(tmp); + String result=""; + HttpURLConnection connection = null; + OutputStreamWriter wr = null; + BufferedReader rd = null; + StringBuilder sb = null; + String line = null; + URL serverAddress = null; + try { + serverAddress = new URL(tmp); + //set up out communications stuff + connection = null; + + //Set up the initial connection + connection = (HttpURLConnection)serverAddress.openConnection(); + connection.setRequestMethod("GET"); + connection.setDoOutput(true); + connection.setReadTimeout(timeToTimeoutOnServer); + + connection.connect(); + rd = new BufferedReader(new InputStreamReader(connection.getInputStream())); + sb = new StringBuilder(); + + while ((line = rd.readLine()) != null) + { + sb.append(line + '\n'); + } + + //System.out.println(sb.toString()); + result=sb.toString(); + + } catch (MalformedURLException e) { + System.out.println("Must enter a valid URL"); + } catch (IOException e) { + System.out.println("Can not connect or timeout"); + } + finally + { + //close the connection, set all objects to null + connection.disconnect(); + rd = null; + sb = null; + wr = null; + connection = null; + } + + return createAnswerArray(result); } Modified: trunk/components-ext/src/main/java/org/dllearner/algorithm/tbsl/exploration/Sparql/mySQLDictionary.java =================================================================== --- trunk/components-ext/src/main/java/org/dllearner/algorithm/tbsl/exploration/Sparql/mySQLDictionary.java 2012-01-06 14:24:45 UTC (rev 3541) +++ trunk/components-ext/src/main/java/org/dllearner/algorithm/tbsl/exploration/Sparql/mySQLDictionary.java 2012-01-08 13:42:22 UTC (rev 3542) @@ -11,9 +11,13 @@ import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; +import java.util.ArrayList; +import org.dllearner.algorithm.tbsl.nlp.StanfordLemmatizer; + public class mySQLDictionary { private Connection conn; + StanfordLemmatizer lemma; public mySQLDictionary() throws ClassNotFoundException, SQLException { // TODO Auto-generated constructor stub @@ -23,18 +27,33 @@ createIndexResource(); createWordnetHelp(); createIndexOntology(); - createIndexoOntologyClass(); + createIndexOntologyClass(); + createIndexofYago(); + lemma = new StanfordLemmatizer(); //optional!! //createIndexWikipedia(); } + /* + * Next, we want to select the persons living in a city that contains the pattern "tav" from the "Persons" table. + +We use the following SELECT statement: +SELECT * FROM Persons +WHERE City LIKE '%tav%' + */ + public String getResourceURI(String string) throws SQLException{ + /* while(rs.next()) + {*/ Statement stat = conn.createStatement(); ResultSet rs; try { rs = stat.executeQuery("select uri from resource where name='"+string.toLowerCase()+"';"); + /*while(rs.next()){ + System.out.println("Next: "+rs.getString("uri")); + }*/ return rs.getString("uri"); } catch (Exception e) { // TODO Auto-generated catch block @@ -43,6 +62,66 @@ } } + + public ArrayList<String> getResourceURILike(String string) throws SQLException{ + /* while(rs.next()) + {*/ + Statement stat = conn.createStatement(); + ResultSet rs; + ArrayList<String> result= new ArrayList<String>(); + try { + rs = stat.executeQuery("select uri from resource where name like'"+string.toLowerCase()+"%';"); + while(rs.next()){ + System.out.println("Next: "+rs.getString("uri")); + result.add(rs.getString("uri")); + } + return result; + } catch (Exception e) { + // TODO Auto-generated catch block + //e.printStackTrace(); + return null; + } + + } + + public ArrayList<String> getYagoURILike(String string) throws SQLException{ + /* while(rs.next()) + {*/ + Statement stat = conn.createStatement(); + ResultSet rs; + ArrayList<String> result= new ArrayList<String>(); + try { + rs = stat.executeQuery("select uri from yago where name like'"+string.toLowerCase()+"%';"); + while(rs.next()){ + System.out.println("Next: "+rs.getString("uri")); + result.add(rs.getString("uri")); + } + return result; + } catch (Exception e) { + // TODO Auto-generated catch block + //e.printStackTrace(); + return null; + } + + } + + + public String getYagoURI(String string) throws SQLException{ + /* while(rs.next()) + {*/ + Statement stat = conn.createStatement(); + ResultSet rs; + try { + rs = stat.executeQuery("select uri from yago where name='"+string.toLowerCase()+"';"); + return rs.getString("uri"); + } catch (Exception e) { + // TODO Auto-generated catch block + //e.printStackTrace(); + return null; + } + + } + public String getPropertyURI(String string) throws SQLException{ Statement stat = conn.createStatement(); @@ -88,9 +167,28 @@ } + public ArrayList<String> getontologyClassURILike(String string) throws SQLException{ + Statement stat = conn.createStatement(); + ResultSet rs; + ArrayList<String> result= new ArrayList<String>(); + try { + rs = stat.executeQuery("select uri from ontologyClass where name like'"+string.toLowerCase()+"%';"); + while(rs.next()){ + System.out.println("Next: "+rs.getString("uri")); + result.add(rs.getString("uri")); + } + return result; + } catch (Exception e) { + // TODO Auto-generated catch block + //e.printStackTrace(); + return null; + } + + } + public String getWikipediaURI(String string) throws SQLException{ Statement stat = conn.createStatement(); ResultSet rs; @@ -233,16 +331,12 @@ System.out.println("Done"); } private void createIndexPropertys() throws ClassNotFoundException, SQLException{ - /*System.out.println("Start SQL test"); - Class.forName( "org.sqlite.JDBC" ); - conn = DriverManager.getConnection("jdbc:sqlite::memory:");*/ System.out.println("start indexing Properties"); Statement stat = conn.createStatement(); stat.executeUpdate("drop table if exists property;"); stat.executeUpdate("create table property (name, uri);"); PreparedStatement prep = conn.prepareStatement("insert into property values (?, ?);"); BufferedReader in=null; - // conn.setAutoCommit(false); int zaehler=0; try { in = new BufferedReader( @@ -256,12 +350,11 @@ prep.setString(2, tmp_array[1]); prep.addBatch(); zaehler=zaehler+1; - //if(zaehler%10000==0) System.out.println(zaehler); if(zaehler%1000000==0){ conn.setAutoCommit(false); prep.executeBatch(); conn.setAutoCommit(false); - System.out.println("done"); + // System.out.println(zaehler+" done"); } } @@ -282,18 +375,17 @@ conn.setAutoCommit(false); prep.executeBatch(); conn.setAutoCommit(true); + System.out.println("Number of Property: "+zaehler); System.out.println("Done"); } private void createIndexResource() throws ClassNotFoundException, SQLException{ - /*System.out.println("Start SQL test");*/ System.out.println("start indexing Resources"); Statement stat = conn.createStatement(); stat.executeUpdate("drop table if exists resource;"); stat.executeUpdate("create table resource (name, uri);"); PreparedStatement prep = conn.prepareStatement("insert into resource values (?, ?);"); BufferedReader in=null; - // conn.setAutoCommit(false); int zaehler=0; try { in = new BufferedReader( @@ -307,12 +399,10 @@ prep.setString(2, tmp_array[1]); prep.addBatch(); zaehler=zaehler+1; - // if(zaehler%10000==0) System.out.println(zaehler); if(zaehler%1000000==0){ conn.setAutoCommit(false); prep.executeBatch(); conn.setAutoCommit(false); - System.out.println("done"+zaehler); } } @@ -333,6 +423,7 @@ conn.setAutoCommit(false); prep.executeBatch(); conn.setAutoCommit(true); + System.out.println("Number of Resources: "+zaehler); System.out.println("Done"); @@ -365,7 +456,7 @@ conn.setAutoCommit(false); prep.executeBatch(); conn.setAutoCommit(false); - System.out.println("done" + zaehler); + //System.out.println("done" + zaehler); } } @@ -386,11 +477,12 @@ conn.setAutoCommit(false); prep.executeBatch(); conn.setAutoCommit(true); + System.out.println("Number of Ontologys: "+zaehler); System.out.println("Done"); } -private void createIndexoOntologyClass() throws ClassNotFoundException, SQLException{ +private void createIndexOntologyClass() throws ClassNotFoundException, SQLException{ /*System.out.println("Start SQL test");*/ System.out.println("start indexing ontologyClass"); Statement stat = conn.createStatement(); @@ -417,7 +509,7 @@ conn.setAutoCommit(false); prep.executeBatch(); conn.setAutoCommit(false); - System.out.println("done" + zaehler); + //System.out.println("done" + zaehler); } } @@ -438,9 +530,65 @@ conn.setAutoCommit(false); prep.executeBatch(); conn.setAutoCommit(true); + System.out.println("Number of OntologyClass: "+zaehler); System.out.println("Done"); } +private void createIndexofYago() throws ClassNotFoundException, SQLException{ + /*System.out.println("Start SQL test");*/ + System.out.println("start indexing yago"); + Statement stat = conn.createStatement(); + stat.executeUpdate("dro... [truncated message content] |
From: <lor...@us...> - 2012-01-06 14:24:55
|
Revision: 3541 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=3541&view=rev Author: lorenz_b Date: 2012-01-06 14:24:45 +0000 (Fri, 06 Jan 2012) Log Message: ----------- Small improvement in test case. Modified Paths: -------------- trunk/components-core/src/main/java/org/dllearner/algorithms/celoe/PCELOE.java Modified: trunk/components-core/src/main/java/org/dllearner/algorithms/celoe/PCELOE.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/algorithms/celoe/PCELOE.java 2012-01-06 12:08:06 UTC (rev 3540) +++ trunk/components-core/src/main/java/org/dllearner/algorithms/celoe/PCELOE.java 2012-01-06 14:24:45 UTC (rev 3541) @@ -39,7 +39,9 @@ import java.util.concurrent.ThreadPoolExecutor; import java.util.concurrent.TimeUnit; +import org.apache.log4j.ConsoleAppender; import org.apache.log4j.FileAppender; +import org.apache.log4j.Level; import org.apache.log4j.Logger; import org.apache.log4j.PatternLayout; import org.apache.log4j.SimpleLayout; @@ -114,7 +116,7 @@ private boolean useMinimizer = true; // all nodes in the search tree (used for selecting most promising node) - private TreeSet<OENode> nodes; + private SortedSet<OENode> nodes; private OEHeuristicRuntime heuristic; // = new OEHeuristicRuntime(); // root of search tree private OENode startNode; @@ -503,18 +505,20 @@ // we expand the best node of those, which have not achieved 100% accuracy // already and have a horizontal expansion equal to their length // (rationale: further extension is likely to add irrelevant syntactical constructs) - synchronized (nodes) {logger.info("in 1.lock of getNextNodeToExpand method"); - Iterator<OENode> it = nodes.descendingIterator();//logger.info(nodes.size()); - logger.info("search tree size: " + nodes.size()); - while(it.hasNext()) { - OENode node = it.next(); - logger.info("Checking node " + node + "..."); - if(!currentlyProcessedNodes.contains(node) && (node.getAccuracy() < 1.0 || node.getHorizontalExpansion() < node.getDescription().getLength())) { - currentlyProcessedNodes.add(node); - return node; + synchronized (nodes) { + logger.debug("in 1.lock of getNextNodeToExpand method"); + Iterator<OENode> it = nodes.iterator();//logger.info(nodes.size()); + logger.debug("search tree size: " + nodes.size()); + while(it.hasNext()) { + OENode node = it.next(); + logger.debug("Checking node " + node + "..."); + if(!currentlyProcessedNodes.contains(node) && (node.getAccuracy() < 1.0 || node.getHorizontalExpansion() < node.getDescription().getLength())) { + currentlyProcessedNodes.add(node); + logger.debug("...checked and return node."); + return node; + } + logger.debug("...checked."); } - logger.info("...checked."); - } } @@ -538,7 +542,7 @@ TreeSet<Description> refinements = (TreeSet<Description>) operator.refine(node.getDescription(), horizExp+1); node.incHorizontalExpansion(); node.setRefinementCount(refinements.size()); - synchronized (refinements) { + synchronized (nodes) { nodes.add(node); } @@ -556,17 +560,17 @@ if(!nonRedundant) { return false; } - logger.info("Check if description is allowed..."); + logger.debug("Check if description is allowed..."); // check whether the description is allowed if(!isDescriptionAllowed(description, parentNode)) { return false; } - logger.info("...done"); + logger.debug("...done"); // System.out.println("Test " + new Date()); // quality of description (return if too weak) double accuracy = learningProblem.getAccuracyOrTooWeak(description, noise); - logger.info("Accuracy: " + accuracy); + logger.debug("Accuracy: " + accuracy); // issue a warning if accuracy is not between 0 and 1 or -1 (too weak) if(accuracy > 1.0 || (accuracy < 0.0 && accuracy != -1)) { logger.warn("Invalid accuracy value " + accuracy + " for description " + description + ". This could be caused by a bug in the heuristic measure and should be reported to the DL-Learner bug tracker."); @@ -610,7 +614,7 @@ // we need to make sure that this does not get called more often than // necessary since rewriting is expensive boolean isCandidate = !bestEvaluatedDescriptions.isFull(); - logger.info("Is candidate:" + isCandidate); + logger.debug("Is candidate:" + isCandidate); if(!isCandidate) { EvaluatedDescription worst = bestEvaluatedDescriptions.getWorst(); double accThreshold = worst.getAccuracy(); @@ -645,7 +649,7 @@ } } - logger.info("Point 2"); + logger.debug("Point 2"); // System.out.println("shorter description? " + shorterDescriptionExists + " nice: " + niceDescription); filterFollowsFromKB = false; @@ -660,7 +664,7 @@ // System.out.println(bestEvaluatedDescriptions); } } - logger.info("Point 3"); + logger.debug("Point 3"); // System.out.println(bestEvaluatedDescriptions.getSet().size()); } @@ -775,7 +779,7 @@ (maxClassDescriptionTests != 0 && (expressionTests >= maxClassDescriptionTests)) || (maxExecutionTimeInSeconds != 0 && ((System.nanoTime() - nanoStartTime) >= (maxExecutionTimeInSeconds*1000000000l))) || (terminateOnNoiseReached && (100*getCurrentlyBestAccuracy()>=100-noisePercentage)); - logger.info("terminate: " + ret); + logger.debug("terminate: " + ret); return ret; } @@ -783,7 +787,7 @@ private void reset() { // set all values back to their default values (used for running // the algorithm more than once) - nodes = new TreeSet<OENode>(heuristic); + nodes = Collections.synchronizedSortedSet(new TreeSet<OENode>(heuristic)); descriptions = new TreeSet<Description>(new ConceptComparator()); bestEvaluatedDescriptions.getSet().clear(); expressionTests = 0; @@ -847,7 +851,7 @@ // the best accuracy that a node can achieve double scoreThreshold = heuristic.getNodeScore(node) + 1 - node.getAccuracy(); - for(OENode n : nodes.descendingSet()) { + for(OENode n : nodes) { if(n != node) { if(n.getHorizontalExpansion() == minHorizExp) { // we can stop instantly when another node with min. @@ -1013,8 +1017,11 @@ public static void main(String[] args) throws Exception{ + Logger.getRootLogger().setLevel(Level.INFO); + Logger.getLogger(PCELOE.class).setLevel(Level.DEBUG); Logger.getLogger(PCELOE.class).addAppender(new FileAppender(new PatternLayout( "[%t] %c: %m%n" ), "log/parallel_run.txt", false)); + AbstractKnowledgeSource ks = new OWLFile("../examples/family/father_oe.owl"); ks.init(); @@ -1045,7 +1052,7 @@ @Override public void run() { - logger.info("Started thread..."); + logger.debug("Started thread..."); OENode nextNode; double highestAccuracy = 0.0; @@ -1059,25 +1066,25 @@ } // chose best node according to heuristics - logger.info("Get next node to expand..."); + logger.debug("Get next node to expand..."); nextNode = getNextNodeToExpand(); - logger.info("...done"); + logger.debug("...done"); try { Thread.sleep(10); } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); } - logger.info("next Node: " + nextNode); + logger.debug("next Node: " + nextNode); if(nextNode != null){ int horizExp = nextNode.getHorizontalExpansion(); // apply operator Monitor mon = MonitorFactory.start("refineNode"); - logger.info("Refine node..."); + logger.debug("Refine node..."); TreeSet<Description> refinements = refineNode(nextNode, operator); mon.stop(); - logger.info("...done"); + logger.debug("...done"); while(refinements.size() != 0) { // pick element from set @@ -1090,10 +1097,10 @@ // System.out.println("potentially adding " + refinement + " to search tree as child of " + nextNode + " " + new Date()); Monitor mon2 = MonitorFactory.start("addNode"); - logger.info("Add node..."); + logger.debug("Add node..."); addNode(refinement, nextNode); mon2.stop(); - logger.info("...done"); + logger.debug("...done"); // adding nodes is potentially computationally expensive, so we have // to check whether max time is exceeded if(terminationCriteriaSatisfied()) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jen...@us...> - 2012-01-06 11:38:27
|
Revision: 3539 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=3539&view=rev Author: jenslehmann Date: 2012-01-06 11:38:20 +0000 (Fri, 06 Jan 2012) Log Message: ----------- adapted ELTL to new component system; fixed a bug in disjunctive ELTL Modified Paths: -------------- trunk/components-core/src/main/java/org/dllearner/algorithms/el/ELLearningAlgorithm.java trunk/components-core/src/main/java/org/dllearner/algorithms/el/ELLearningAlgorithmDisjunctive.java trunk/components-core/src/main/java/org/dllearner/core/AnnComponentManager.java Modified: trunk/components-core/src/main/java/org/dllearner/algorithms/el/ELLearningAlgorithm.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/algorithms/el/ELLearningAlgorithm.java 2012-01-06 11:37:27 UTC (rev 3538) +++ trunk/components-core/src/main/java/org/dllearner/algorithms/el/ELLearningAlgorithm.java 2012-01-06 11:38:20 UTC (rev 3539) @@ -25,6 +25,7 @@ import java.util.TreeSet; import org.apache.log4j.Logger; +import org.dllearner.core.ComponentAnn; import org.dllearner.core.ComponentInitException; import org.dllearner.core.EvaluatedDescription; import org.dllearner.core.AbstractCELA; @@ -38,10 +39,11 @@ import org.dllearner.learningproblems.PosNegLP; import org.dllearner.learningproblems.ScorePosNeg; import org.dllearner.refinementoperators.ELDown2; +import org.dllearner.utilities.Helper; import org.dllearner.utilities.owl.EvaluatedDescriptionSet; /** - * A learning algorithm for EL, which will be based on a (hopefully) + * A learning algorithm for EL, which is based on an * ideal refinement operator. * * TODO redundancy check @@ -49,6 +51,7 @@ * @author Jens Lehmann * */ +@ComponentAnn(name="ELTL", shortName="eltl", version=0.5, description="ELTL is an algorithm based on the refinement operator in http://jens-lehmann.org/files/2009/el_ilp.pdf.") public class ELLearningAlgorithm extends AbstractCELA { private static Logger logger = Logger.getLogger(ELLearningAlgorithm.class); @@ -73,6 +76,10 @@ private ELHeuristic heuristic; private TreeSet<SearchTreeNode> candidates; + public ELLearningAlgorithm() { + + } + public ELLearningAlgorithm(PosNegLP problem, AbstractReasonerComponent reasoner) { super(problem, reasoner); // configurator = new ELLearningAlgorithmConfigurator(this); @@ -144,7 +151,7 @@ } // print solution(s) - logger.info("solution : " + bestEvaluatedDescriptions.getBest()); + logger.info("solution : " + bestEvaluatedDescriptions.getBest() + " [time: " + Helper.prettyPrintNanoSeconds(System.nanoTime()-treeStartTime) + "]"); isRunning = false; } Modified: trunk/components-core/src/main/java/org/dllearner/algorithms/el/ELLearningAlgorithmDisjunctive.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/algorithms/el/ELLearningAlgorithmDisjunctive.java 2012-01-06 11:37:27 UTC (rev 3538) +++ trunk/components-core/src/main/java/org/dllearner/algorithms/el/ELLearningAlgorithmDisjunctive.java 2012-01-06 11:38:20 UTC (rev 3539) @@ -19,6 +19,7 @@ package org.dllearner.algorithms.el; +import java.text.DecimalFormat; import java.util.Collection; import java.util.Iterator; import java.util.LinkedList; @@ -31,11 +32,10 @@ import org.dllearner.core.AbstractCELA; import org.dllearner.core.AbstractLearningProblem; import org.dllearner.core.AbstractReasonerComponent; +import org.dllearner.core.ComponentAnn; import org.dllearner.core.ComponentInitException; import org.dllearner.core.EvaluatedDescription; -import org.dllearner.core.options.CommonConfigOptions; -import org.dllearner.core.options.ConfigOption; -import org.dllearner.core.options.StringConfigOption; +import org.dllearner.core.config.ConfigOption; import org.dllearner.core.owl.Description; import org.dllearner.core.owl.Individual; import org.dllearner.core.owl.Thing; @@ -80,6 +80,7 @@ * @author Jens Lehmann * */ +@ComponentAnn(name="Disjunctive ELTL", shortName="deltl", version=0.5, description="Disjunctive ELTL is an algorithm based on the refinement operator in http://jens-lehmann.org/files/2009/el_ilp.pdf with support for disjunctions.") public class ELLearningAlgorithmDisjunctive extends AbstractCELA { private static Logger logger = Logger.getLogger(ELLearningAlgorithmDisjunctive.class); @@ -100,8 +101,12 @@ // all trees (for fast redundancy check) private TreeSet<ELDescriptionTree> trees; - // tree search + @ConfigOption(name = "treeSearchTimeSeconds", defaultValue = "1.0", description="Specifies how long the algorithm should search for a partial solution (a tree).") private double treeSearchTimeSeconds = 1.0; + + @ConfigOption(name = "tryFullCoverage", defaultValue = "false", description="If yes, then the algorithm tries to cover all positive examples. Note that while this improves accuracy on the testing set, it may lead to overfitting.") + private boolean tryFullCoverage = false; + // private double noise = 0; private List<ELDescriptionTree> currentSolution = new LinkedList<ELDescriptionTree>(); private EvaluatedDescription bestEvaluatedDescription; @@ -117,8 +122,14 @@ // minimum score a tree must have to be part of the solution private double minimumTreeScore = -1; - private boolean instanceBasedDisjoints; + private boolean instanceBasedDisjoints; + + private DecimalFormat df = new DecimalFormat("0.00"); + public ELLearningAlgorithmDisjunctive() { + + } + public ELLearningAlgorithmDisjunctive(PosNegLP problem, AbstractReasonerComponent reasoner) { super(problem, reasoner); } @@ -134,13 +145,13 @@ } - public static Collection<ConfigOption<?>> createConfigOptions() { - Collection<ConfigOption<?>> options = new LinkedList<ConfigOption<?>>(); - options.add(CommonConfigOptions.getNoisePercentage()); - 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(CommonConfigOptions.getInstanceBasedDisjoints()); - return options; - } +// public static Collection<ConfigOption<?>> createConfigOptions() { +// Collection<ConfigOption<?>> options = new LinkedList<ConfigOption<?>>(); +// options.add(CommonConfigOptions.getNoisePercentage()); +// 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(CommonConfigOptions.getInstanceBasedDisjoints()); +// return options; +// } @Override public void init() throws ComponentInitException { @@ -210,12 +221,13 @@ // we found a tree (partial solution) currentSolution.add(bestCurrentNode.getDescriptionTree()); Description bestDescription = bestCurrentNode.getDescriptionTree().transformToDescription(); + Description bestCombinedDescription = bestDescription; // form union of trees found so far with if(treeCount==0) { bestEvaluatedDescription = learningProblem.evaluate(bestDescription); } else { - Union union = new Union(bestEvaluatedDescription.getDescription(), bestDescription); - bestEvaluatedDescription = learningProblem.evaluate(union); + bestCombinedDescription = new Union(bestEvaluatedDescription.getDescription(), bestDescription); + bestEvaluatedDescription = learningProblem.evaluate(bestCombinedDescription); } // remove already covered examples @@ -224,6 +236,7 @@ while(it.hasNext()) { Individual ind = it.next(); if(reasoner.hasType(bestDescription, ind)) { +// System.out.println("covered pos: " + ind); it.remove(); posCov++; } @@ -233,11 +246,13 @@ while(it.hasNext()) { Individual ind = it.next(); if(reasoner.hasType(bestDescription, ind)) { +// System.out.println("covered neg: " + ind); it.remove(); negCov++; } } - logger.info("tree found: " + bestDescription.toManchesterSyntaxString(baseURI, prefixes) + " (" + posCov + " pos covered, " + currentPosExamples.size() + " remaining, " + negCov + " neg covered, " + currentNegExamples.size() + " remaining, score: " + bestCurrentNode.getScore() + ")"); + logger.info("tree found: " + bestDescription.toManchesterSyntaxString(baseURI, prefixes) + " (" + posCov + " pos covered, " + currentPosExamples.size() + " remaining, " + negCov + " neg covered, " + currentNegExamples.size() + " remaining, score: " + bestCurrentNode.getScore() + ")"); + logger.info("combined accuracy: " + df .format(bestEvaluatedDescription.getAccuracy())); } else { logger.info("no tree found, which satisfies the minimum criteria - the best was: " + bestCurrentNode.getDescriptionTree().transformToDescription().toManchesterSyntaxString(baseURI, prefixes) + " with score " + bestCurrentNode.getScore()); } @@ -372,6 +387,11 @@ // SearchTreeNode bestNode = candidates.last(); // return (bestNode.getCoveredNegatives() == 0); + // stop if there are no more positive examples to cover + if(currentPosExamples.size()==0) { + return true; + } + // we stop when the score of the last tree added is too low // (indicating that the algorithm could not find anything appropriate // in the timeframe set) @@ -380,8 +400,12 @@ } // stop when almost all positive examples have been covered - int maxPosRemaining = (int) Math.ceil(startPosExamplesSize * 0.05d); - return (currentPosExamples.size()<=maxPosRemaining); + if(tryFullCoverage) { + return false; + } else { + int maxPosRemaining = (int) Math.ceil(startPosExamplesSize * 0.05d); + return (currentPosExamples.size()<=maxPosRemaining); + } } private void reset() { @@ -391,8 +415,9 @@ trees.clear(); currentSolution.clear(); bestEvaluatedDescription = learningProblem.evaluate(Thing.instance); - currentPosExamples = ((PosNegLP)getLearningProblem()).getPositiveExamples(); - currentNegExamples = ((PosNegLP)getLearningProblem()).getNegativeExamples(); + // we need to clone in order not to modify the learning problem + currentPosExamples = new TreeSet<Individual>(((PosNegLP)getLearningProblem()).getPositiveExamples()); + currentNegExamples = new TreeSet<Individual>(((PosNegLP)getLearningProblem()).getNegativeExamples()); startPosExamplesSize = currentPosExamples.size(); // startNegExamplesSize = currentNegExamples.size(); } @@ -438,6 +463,22 @@ public void setInstanceBasedDisjoints(boolean instanceBasedDisjoints) { this.instanceBasedDisjoints = instanceBasedDisjoints; + } + + public double getTreeSearchTimeSeconds() { + return treeSearchTimeSeconds; + } + + public void setTreeSearchTimeSeconds(double treeSearchTimeSeconds) { + this.treeSearchTimeSeconds = treeSearchTimeSeconds; + } + + public boolean isTryFullCoverage() { + return tryFullCoverage; + } + + public void setTryFullCoverage(boolean tryFullCoverage) { + this.tryFullCoverage = tryFullCoverage; } } Modified: trunk/components-core/src/main/java/org/dllearner/core/AnnComponentManager.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/core/AnnComponentManager.java 2012-01-06 11:37:27 UTC (rev 3538) +++ trunk/components-core/src/main/java/org/dllearner/core/AnnComponentManager.java 2012-01-06 11:38:20 UTC (rev 3539) @@ -51,6 +51,8 @@ // (CLI, GUI, Web Service) and scripts (HTML documentation generator) private static List<String> componentClassNames = new ArrayList<String> ( Arrays.asList(new String[]{ "org.dllearner.algorithms.celoe.CELOE", + "org.dllearner.algorithms.el.ELLearningAlgorithm", + "org.dllearner.algorithms.el.ELLearningAlgorithmDisjunctive", "org.dllearner.algorithms.fuzzydll.FuzzyCELOE", "org.dllearner.algorithms.BruteForceLearner", "org.dllearner.algorithms.RandomGuesser", This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jen...@us...> - 2012-01-06 11:37:34
|
Revision: 3538 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=3538&view=rev Author: jenslehmann Date: 2012-01-06 11:37:27 +0000 (Fri, 06 Jan 2012) Log Message: ----------- included ELTL (disjunctive or normal) configurations for all family benchmark examples Modified Paths: -------------- trunk/test/family-benchmark/Aunt.conf trunk/test/family-benchmark/Brother.conf trunk/test/family-benchmark/Cousin.conf trunk/test/family-benchmark/Daughter.conf trunk/test/family-benchmark/Father.conf trunk/test/family-benchmark/Granddaughter.conf trunk/test/family-benchmark/Grandfather.conf trunk/test/family-benchmark/Grandgranddaughter.conf trunk/test/family-benchmark/Grandgrandfather.conf trunk/test/family-benchmark/Grandgrandmother.conf trunk/test/family-benchmark/Grandgrandson.conf trunk/test/family-benchmark/Grandmother.conf trunk/test/family-benchmark/Grandson.conf trunk/test/family-benchmark/Mother.conf trunk/test/family-benchmark/PersonWithASibling.conf trunk/test/family-benchmark/Sister.conf trunk/test/family-benchmark/Son.conf trunk/test/family-benchmark/Uncle.conf Removed Paths: ------------- trunk/test/family-benchmark/Female.conf trunk/test/family-benchmark/Male.conf Modified: trunk/test/family-benchmark/Aunt.conf =================================================================== --- trunk/test/family-benchmark/Aunt.conf 2012-01-06 10:56:39 UTC (rev 3537) +++ trunk/test/family-benchmark/Aunt.conf 2012-01-06 11:37:27 UTC (rev 3538) @@ -25,6 +25,9 @@ // OCEL configuration alg.type = "ocel" +// Disjunctive ELTL +// alg.type = "deltl" + // learning problem lp.type = "posNegStandard" lp.positiveExamples = { Modified: trunk/test/family-benchmark/Brother.conf =================================================================== --- trunk/test/family-benchmark/Brother.conf 2012-01-06 10:56:39 UTC (rev 3537) +++ trunk/test/family-benchmark/Brother.conf 2012-01-06 11:37:27 UTC (rev 3538) @@ -10,10 +10,18 @@ reasoner.type = "fast instance checker" reasoner.sources = { ks } -// create learning algorithm to run +// CELOE +/* alg.type = "celoe" alg.terminateOnNoiseReached = true +*/ +// OCEL +alg.type = "ocel" + +// ELTL +// alg.type = "eltl" + // learning problem lp.type = "posNegStandard" lp.positiveExamples = { Modified: trunk/test/family-benchmark/Cousin.conf =================================================================== --- trunk/test/family-benchmark/Cousin.conf 2012-01-06 10:56:39 UTC (rev 3537) +++ trunk/test/family-benchmark/Cousin.conf 2012-01-06 11:37:27 UTC (rev 3538) @@ -25,6 +25,10 @@ alg.type = "ocel" +// Disjunctive ELTL +// alg.type = "deltl" +// alg.tryFullCoverage = true + // learning problem lp.type = "posNegStandard" lp.positiveExamples = { Modified: trunk/test/family-benchmark/Daughter.conf =================================================================== --- trunk/test/family-benchmark/Daughter.conf 2012-01-06 10:56:39 UTC (rev 3537) +++ trunk/test/family-benchmark/Daughter.conf 2012-01-06 11:37:27 UTC (rev 3538) @@ -18,6 +18,9 @@ // OCEL alg.type = "ocel" +// ELTL +// alg.type = "eltl" + // learning problem lp.type = "posNegStandard" lp.positiveExamples = { Modified: trunk/test/family-benchmark/Father.conf =================================================================== --- trunk/test/family-benchmark/Father.conf 2012-01-06 10:56:39 UTC (rev 3537) +++ trunk/test/family-benchmark/Father.conf 2012-01-06 11:37:27 UTC (rev 3538) @@ -18,6 +18,9 @@ // OCEL alg.type = "ocel" +// ELTL +// alg.type = "eltl" + // learning problem lp.type = "posNegStandard" lp.positiveExamples = { Deleted: trunk/test/family-benchmark/Female.conf =================================================================== --- trunk/test/family-benchmark/Female.conf 2012-01-06 10:56:39 UTC (rev 3537) +++ trunk/test/family-benchmark/Female.conf 2012-01-06 11:37:27 UTC (rev 3538) @@ -1,223 +0,0 @@ -// declare some prefixes to use as abbreviations -prefixes = [ ("ex","http://www.benchmark.org/family#") ] - -// knowledge source definition -ks.type = "OWL File" -ks.fileName = "family-benchmark.owl" - -// reasoner -reasoner.type = "fast instance checker" -reasoner.sources = { ks } - -// CELOE -/* -alg.type = "celoe" -alg.terminateOnNoiseReached = true -*/ - -// OCEL -alg.type = "ocel" - -// learning problem -lp.type = "posNegStandard" -lp.positiveExamples = { -"ex:F1F5" -,"ex:F1F7" -,"ex:F1F3" -,"ex:F1F2" -,"ex:F2F14" -,"ex:F2F17" -,"ex:F2F15" -,"ex:F2F12" -,"ex:F2F24" -,"ex:F2F22" -,"ex:F2F19" -,"ex:F2F26" -,"ex:F2F33" -,"ex:F2F30" -,"ex:F2F28" -,"ex:F2F38" -,"ex:F2F36" -,"ex:F2F10" -,"ex:F3F49" -,"ex:F3F52" -,"ex:F3F48" -,"ex:F3F46" -,"ex:F3F53" -,"ex:F3F42" -,"ex:F3F41" -,"ex:F4F58" -,"ex:F4F56" -,"ex:F4F55" -,"ex:F5F62" -,"ex:F5F67" -,"ex:F5F65" -,"ex:F5F61" -,"ex:F6F76" -,"ex:F6F74" -,"ex:F6F72" -,"ex:F6F79" -,"ex:F6F83" -,"ex:F6F82" -,"ex:F6F77" -,"ex:F6F86" -,"ex:F6F89" -,"ex:F6F87" -,"ex:F6F91" -,"ex:F6F84" -,"ex:F6F96" -,"ex:F6F97" -,"ex:F6F94" -,"ex:F6F101" -,"ex:F6F93" -,"ex:F6F70" -,"ex:F7F111" -,"ex:F7F108" -,"ex:F7F114" -,"ex:F7F106" -,"ex:F7F118" -,"ex:F7F116" -,"ex:F7F119" -,"ex:F7F126" -,"ex:F7F129" -,"ex:F7F127" -,"ex:F7F124" -,"ex:F7F121" -,"ex:F7F105" -,"ex:F7F103" -,"ex:F8F137" -,"ex:F8F135" -,"ex:F8F133" -,"ex:F9F145" -,"ex:F9F148" -,"ex:F9F150" -,"ex:F9F143" -,"ex:F9F152" -,"ex:F9F156" -,"ex:F9F154" -,"ex:F9F141" -,"ex:F9F160" -,"ex:F9F164" -,"ex:F9F163" -,"ex:F9F158" -,"ex:F9F169" -,"ex:F9F168" -,"ex:F9F140" -,"ex:F10F175" -,"ex:F10F177" -,"ex:F10F174" -,"ex:F10F179" -,"ex:F10F185" -,"ex:F10F181" -,"ex:F10F191" -,"ex:F10F189" -,"ex:F10F192" -,"ex:F10F193" -,"ex:F10F186" -,"ex:F10F200" -,"ex:F10F201" -,"ex:F10F198" -,"ex:F10F195" -,"ex:F10F172" -} - -lp.negativeExamples = { -"ex:F10M183" -,"ex:F3M43" -,"ex:F10M199" -,"ex:F2M16" -,"ex:F7M110" -,"ex:F4M54" -,"ex:F7M113" -,"ex:F7M107" -,"ex:F9M146" -,"ex:F2M20" -,"ex:F8M136" -,"ex:F6M75" -,"ex:F10M190" -,"ex:F9M157" -,"ex:F2M25" -,"ex:F1M8" -,"ex:F6M92" -,"ex:F3M47" -,"ex:F2M18" -,"ex:F5M64" -,"ex:F9M155" -,"ex:F8M138" -,"ex:F7M130" -,"ex:F9M170" -,"ex:F10M188" -,"ex:F3M45" -,"ex:F6M78" -,"ex:F7M102" -,"ex:F7M120" -,"ex:F10M180" -,"ex:F5M66" -,"ex:F3M50" -,"ex:F8M134" -,"ex:F5M60" -,"ex:F10M182" -,"ex:F7M122" -,"ex:F6M69" -,"ex:F2M21" -,"ex:F1M1" -,"ex:F6M81" -,"ex:F9M162" -,"ex:F6M71" -,"ex:F1M4" -,"ex:F10M176" -,"ex:F2M23" -,"ex:F10M171" -,"ex:F9M159" -,"ex:F4M59" -,"ex:F9M153" -,"ex:F9M167" -,"ex:F7M123" -,"ex:F2M32" -,"ex:F7M112" -,"ex:F7M125" -,"ex:F2M13" -,"ex:F9M147" -,"ex:F7M115" -,"ex:F7M128" -,"ex:F2M37" -,"ex:F10M194" -,"ex:F3M44" -,"ex:F2M29" -,"ex:F5M68" -,"ex:F6M90" -,"ex:F1M6" -,"ex:F2M9" -,"ex:F3M51" -,"ex:F10M196" -,"ex:F10M178" -,"ex:F9M139" -,"ex:F7M104" -,"ex:F9M149" -,"ex:F2M34" -,"ex:F10M173" -,"ex:F8M132" -,"ex:F7M131" -,"ex:F2M11" -,"ex:F6M85" -,"ex:F6M88" -,"ex:F10M184" -,"ex:F2M31" -,"ex:F2M27" -,"ex:F5M63" -,"ex:F10M187" -,"ex:F9M161" -,"ex:F10M202" -,"ex:F7M109" -,"ex:F4M57" -,"ex:F2M39" -,"ex:F10M197" -,"ex:F9M165" -,"ex:F7M117" -,"ex:F6M80" -,"ex:F9M142" -,"ex:F6M73" -,"ex:F6M100" -,"ex:F6M95" -,"ex:F6M98" -} \ No newline at end of file Modified: trunk/test/family-benchmark/Granddaughter.conf =================================================================== --- trunk/test/family-benchmark/Granddaughter.conf 2012-01-06 10:56:39 UTC (rev 3537) +++ trunk/test/family-benchmark/Granddaughter.conf 2012-01-06 11:37:27 UTC (rev 3538) @@ -18,6 +18,9 @@ // OCEL alg.type = "ocel" +// ELTL +// alg.type = "eltl" + // learning problem lp.type = "posNegStandard" lp.positiveExamples = { Modified: trunk/test/family-benchmark/Grandfather.conf =================================================================== --- trunk/test/family-benchmark/Grandfather.conf 2012-01-06 10:56:39 UTC (rev 3537) +++ trunk/test/family-benchmark/Grandfather.conf 2012-01-06 11:37:27 UTC (rev 3538) @@ -18,6 +18,9 @@ // OCEL alg.type = "ocel" +// ELTL +// alg.type = "eltl" + // learning problem lp.type = "posNegStandard" lp.positiveExamples = { Modified: trunk/test/family-benchmark/Grandgranddaughter.conf =================================================================== --- trunk/test/family-benchmark/Grandgranddaughter.conf 2012-01-06 10:56:39 UTC (rev 3537) +++ trunk/test/family-benchmark/Grandgranddaughter.conf 2012-01-06 11:37:27 UTC (rev 3538) @@ -18,6 +18,9 @@ // OCEL alg.type = "ocel" +// ELTL +// alg.type = "eltl" + // learning problem lp.type = "posNegStandard" lp.positiveExamples = { Modified: trunk/test/family-benchmark/Grandgrandfather.conf =================================================================== --- trunk/test/family-benchmark/Grandgrandfather.conf 2012-01-06 10:56:39 UTC (rev 3537) +++ trunk/test/family-benchmark/Grandgrandfather.conf 2012-01-06 11:37:27 UTC (rev 3538) @@ -18,6 +18,9 @@ // OCEL alg.type = "ocel" +// ELTL +// alg.type = "eltl" + // learning problem lp.type = "posNegStandard" lp.positiveExamples = { Modified: trunk/test/family-benchmark/Grandgrandmother.conf =================================================================== --- trunk/test/family-benchmark/Grandgrandmother.conf 2012-01-06 10:56:39 UTC (rev 3537) +++ trunk/test/family-benchmark/Grandgrandmother.conf 2012-01-06 11:37:27 UTC (rev 3538) @@ -18,6 +18,9 @@ // OCEL alg.type = "ocel" +// ELTL +// alg.type = "eltl" + // learning problem lp.type = "posNegStandard" lp.positiveExamples = { Modified: trunk/test/family-benchmark/Grandgrandson.conf =================================================================== --- trunk/test/family-benchmark/Grandgrandson.conf 2012-01-06 10:56:39 UTC (rev 3537) +++ trunk/test/family-benchmark/Grandgrandson.conf 2012-01-06 11:37:27 UTC (rev 3538) @@ -18,6 +18,9 @@ // OCEL alg.type = "ocel" +// ELTL +// alg.type = "eltl" + // learning problem lp.type = "posNegStandard" lp.positiveExamples = { Modified: trunk/test/family-benchmark/Grandmother.conf =================================================================== --- trunk/test/family-benchmark/Grandmother.conf 2012-01-06 10:56:39 UTC (rev 3537) +++ trunk/test/family-benchmark/Grandmother.conf 2012-01-06 11:37:27 UTC (rev 3538) @@ -18,6 +18,9 @@ // OCEL alg.type = "ocel" +// ELTL +// alg.type = "eltl" + // learning problem lp.type = "posNegStandard" lp.positiveExamples = { Modified: trunk/test/family-benchmark/Grandson.conf =================================================================== --- trunk/test/family-benchmark/Grandson.conf 2012-01-06 10:56:39 UTC (rev 3537) +++ trunk/test/family-benchmark/Grandson.conf 2012-01-06 11:37:27 UTC (rev 3538) @@ -18,6 +18,9 @@ // OCEL alg.type = "ocel" +// ELTL +// alg.type = "eltl" + // learning problem lp.type = "posNegStandard" lp.positiveExamples = { Deleted: trunk/test/family-benchmark/Male.conf =================================================================== --- trunk/test/family-benchmark/Male.conf 2012-01-06 10:56:39 UTC (rev 3537) +++ trunk/test/family-benchmark/Male.conf 2012-01-06 11:37:27 UTC (rev 3538) @@ -1,228 +0,0 @@ -// declare some prefixes to use as abbreviations -prefixes = [ ("ex","http://www.benchmark.org/family#") ] - -// knowledge source definition -ks.type = "OWL File" -ks.fileName = "family-benchmark.owl" - -// reasoner -reasoner.type = "fast instance checker" -reasoner.sources = { ks } - -// CELOE -/* -alg.type = "celoe" -alg.terminateOnNoiseReached = true -*/ - -// OCEL -alg.type = "ocel" - -// learning problem -lp.type = "posNegStandard" -lp.positiveExamples = { "ex:F1M6" -,"ex:F1M8" -,"ex:F1M4" -,"ex:F1M1" -,"ex:F2M13" -,"ex:F2M18" -,"ex:F2M16" -,"ex:F2M11" -,"ex:F2M25" -,"ex:F2M23" -,"ex:F2M21" -,"ex:F2M20" -,"ex:F2M27" -,"ex:F2M32" -,"ex:F2M35" -,"ex:F2M34" -,"ex:F2M31" -,"ex:F2M29" -,"ex:F2M39" -,"ex:F2M37" -,"ex:F2M9" -,"ex:F3M44" -,"ex:F3M51" -,"ex:F3M50" -,"ex:F3M47" -,"ex:F3M45" -,"ex:F3M43" -,"ex:F3M40" -,"ex:F4M59" -,"ex:F4M57" -,"ex:F4M54" -,"ex:F5M63" -,"ex:F5M68" -,"ex:F5M66" -,"ex:F5M64" -,"ex:F5M60" -,"ex:F6M75" -,"ex:F6M73" -,"ex:F6M71" -,"ex:F6M80" -,"ex:F6M81" -,"ex:F6M78" -,"ex:F6M88" -,"ex:F6M90" -,"ex:F6M85" -,"ex:F6M99" -,"ex:F6M98" -,"ex:F6M95" -,"ex:F6M100" -,"ex:F6M92" -,"ex:F6M69" -,"ex:F7M112" -,"ex:F7M110" -,"ex:F7M109" -,"ex:F7M113" -,"ex:F7M107" -,"ex:F7M117" -,"ex:F7M115" -,"ex:F7M120" -,"ex:F7M125" -,"ex:F7M130" -,"ex:F7M128" -,"ex:F7M123" -,"ex:F7M131" -,"ex:F7M122" -,"ex:F7M104" -,"ex:F7M102" -,"ex:F8M138" -,"ex:F8M136" -,"ex:F8M134" -,"ex:F8M132" -,"ex:F9M147" -,"ex:F9M146" -,"ex:F9M149" -,"ex:F9M144" -,"ex:F9M151" -,"ex:F9M155" -,"ex:F9M153" -,"ex:F9M142" -,"ex:F9M161" -,"ex:F9M159" -,"ex:F9M165" -,"ex:F9M166" -,"ex:F9M162" -,"ex:F9M157" -,"ex:F9M170" -,"ex:F9M167" -,"ex:F9M139" -,"ex:F10M176" -,"ex:F10M178" -,"ex:F10M173" -,"ex:F10M180" -,"ex:F10M183" -,"ex:F10M184" -,"ex:F10M182" -,"ex:F10M190" -,"ex:F10M188" -,"ex:F10M194" -,"ex:F10M187" -,"ex:F10M199" -,"ex:F10M202" -,"ex:F10M197" -,"ex:F10M196" -,"ex:F10M171" -} - -lp.negativeExamples = { -"ex:F1F5" -,"ex:F1F7" -,"ex:F1F3" -,"ex:F1F2" -,"ex:F2F14" -,"ex:F2F17" -,"ex:F2F15" -,"ex:F2F12" -,"ex:F2F24" -,"ex:F2F22" -,"ex:F2F19" -,"ex:F2F26" -,"ex:F2F33" -,"ex:F2F30" -,"ex:F2F28" -,"ex:F2F38" -,"ex:F2F36" -,"ex:F2F10" -,"ex:F3F49" -,"ex:F3F52" -,"ex:F3F48" -,"ex:F3F46" -,"ex:F3F53" -,"ex:F3F42" -,"ex:F3F41" -,"ex:F4F58" -,"ex:F4F56" -,"ex:F4F55" -,"ex:F5F62" -,"ex:F5F67" -,"ex:F5F65" -,"ex:F5F61" -,"ex:F6F76" -,"ex:F6F74" -,"ex:F6F72" -,"ex:F6F79" -,"ex:F6F83" -,"ex:F6F82" -,"ex:F6F77" -,"ex:F6F86" -,"ex:F6F89" -,"ex:F6F87" -,"ex:F6F91" -,"ex:F6F84" -,"ex:F6F96" -,"ex:F6F97" -,"ex:F6F94" -,"ex:F6F101" -,"ex:F6F93" -,"ex:F6F70" -,"ex:F7F111" -,"ex:F7F108" -,"ex:F7F114" -,"ex:F7F106" -,"ex:F7F118" -,"ex:F7F116" -,"ex:F7F119" -,"ex:F7F126" -,"ex:F7F129" -,"ex:F7F127" -,"ex:F7F124" -,"ex:F7F121" -,"ex:F7F105" -,"ex:F7F103" -,"ex:F8F137" -,"ex:F8F135" -,"ex:F8F133" -,"ex:F9F145" -,"ex:F9F148" -,"ex:F9F150" -,"ex:F9F143" -,"ex:F9F152" -,"ex:F9F156" -,"ex:F9F154" -,"ex:F9F141" -,"ex:F9F160" -,"ex:F9F164" -,"ex:F9F163" -,"ex:F9F158" -,"ex:F9F169" -,"ex:F9F168" -,"ex:F9F140" -,"ex:F10F175" -,"ex:F10F177" -,"ex:F10F174" -,"ex:F10F179" -,"ex:F10F185" -,"ex:F10F181" -,"ex:F10F191" -,"ex:F10F189" -,"ex:F10F192" -,"ex:F10F193" -,"ex:F10F186" -,"ex:F10F200" -,"ex:F10F201" -,"ex:F10F198" -,"ex:F10F195" -,"ex:F10F172" -} \ No newline at end of file Modified: trunk/test/family-benchmark/Mother.conf =================================================================== --- trunk/test/family-benchmark/Mother.conf 2012-01-06 10:56:39 UTC (rev 3537) +++ trunk/test/family-benchmark/Mother.conf 2012-01-06 11:37:27 UTC (rev 3538) @@ -18,6 +18,9 @@ // OCEL alg.type = "ocel" +// ELTL +// alg.type = "eltl" + // learning problem lp.type = "posNegStandard" lp.positiveExamples = { "ex:F1F3" Modified: trunk/test/family-benchmark/PersonWithASibling.conf =================================================================== --- trunk/test/family-benchmark/PersonWithASibling.conf 2012-01-06 10:56:39 UTC (rev 3537) +++ trunk/test/family-benchmark/PersonWithASibling.conf 2012-01-06 11:37:27 UTC (rev 3538) @@ -18,6 +18,9 @@ // OCEL alg.type = "ocel" +// ELTL +// alg.type = "eltl" + // learning problem lp.type = "posNegStandard" lp.positiveExamples = { "ex:F1F5" Modified: trunk/test/family-benchmark/Sister.conf =================================================================== --- trunk/test/family-benchmark/Sister.conf 2012-01-06 10:56:39 UTC (rev 3537) +++ trunk/test/family-benchmark/Sister.conf 2012-01-06 11:37:27 UTC (rev 3538) @@ -18,6 +18,9 @@ // OCEL alg.type = "ocel" +// ELTL +// alg.type = "eltl" + // learning problem lp.type = "posNegStandard" lp.positiveExamples = { "ex:F1F5" Modified: trunk/test/family-benchmark/Son.conf =================================================================== --- trunk/test/family-benchmark/Son.conf 2012-01-06 10:56:39 UTC (rev 3537) +++ trunk/test/family-benchmark/Son.conf 2012-01-06 11:37:27 UTC (rev 3538) @@ -18,6 +18,9 @@ // OCEL alg.type = "ocel" +// ELTL +// alg.type = "eltl" + // learning problem lp.type = "posNegStandard" lp.positiveExamples = { "ex:F2M13" Modified: trunk/test/family-benchmark/Uncle.conf =================================================================== --- trunk/test/family-benchmark/Uncle.conf 2012-01-06 10:56:39 UTC (rev 3537) +++ trunk/test/family-benchmark/Uncle.conf 2012-01-06 11:37:27 UTC (rev 3538) @@ -14,17 +14,19 @@ // op.useAllConstructor = false // CELOE cofiguration +/* h.type ="celoe_heuristic" h.expansionPenaltyFactor = 0.02 alg.type = "celoe" alg.maxExecutionTimeInSeconds = 200 alg.terminateOnNoiseReached = true +*/ // OCEL configuration -// alg.type = "ocel" +alg.type = "ocel" -// alg.writeSearchTree = true -// alg.replaceSearchTree = true +// Disjunctive ELTL +// alg.type = "deltl" // learning problem lp.type = "posNegStandard" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lor...@us...> - 2012-01-06 10:56:46
|
Revision: 3537 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=3537&view=rev Author: lorenz_b Date: 2012-01-06 10:56:39 +0000 (Fri, 06 Jan 2012) Log Message: ----------- Added more output. Modified Paths: -------------- trunk/components-core/src/main/java/org/dllearner/algorithms/celoe/PCELOE.java Modified: trunk/components-core/src/main/java/org/dllearner/algorithms/celoe/PCELOE.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/algorithms/celoe/PCELOE.java 2012-01-06 10:51:20 UTC (rev 3536) +++ trunk/components-core/src/main/java/org/dllearner/algorithms/celoe/PCELOE.java 2012-01-06 10:56:39 UTC (rev 3537) @@ -499,21 +499,21 @@ } - private OENode getNextNodeToExpand() { + synchronized private OENode getNextNodeToExpand() { // we expand the best node of those, which have not achieved 100% accuracy // already and have a horizontal expansion equal to their length // (rationale: further extension is likely to add irrelevant syntactical constructs) - synchronized (nodes) {logger.info("in 1.lock"); + synchronized (nodes) {logger.info("in 1.lock of getNextNodeToExpand method"); Iterator<OENode> it = nodes.descendingIterator();//logger.info(nodes.size()); logger.info("search tree size: " + nodes.size()); while(it.hasNext()) { OENode node = it.next(); - logger.info("checking node " + node); + logger.info("Checking node " + node + "..."); if(!currentlyProcessedNodes.contains(node) && (node.getAccuracy() < 1.0 || node.getHorizontalExpansion() < node.getDescription().getLength())) { currentlyProcessedNodes.add(node); return node; } - logger.info("Checked."); + logger.info("...checked."); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lor...@us...> - 2012-01-06 10:51:27
|
Revision: 3536 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=3536&view=rev Author: lorenz_b Date: 2012-01-06 10:51:20 +0000 (Fri, 06 Jan 2012) Log Message: ----------- Added more output. Modified Paths: -------------- trunk/components-core/src/main/java/org/dllearner/algorithms/celoe/PCELOE.java Modified: trunk/components-core/src/main/java/org/dllearner/algorithms/celoe/PCELOE.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/algorithms/celoe/PCELOE.java 2012-01-06 10:19:04 UTC (rev 3535) +++ trunk/components-core/src/main/java/org/dllearner/algorithms/celoe/PCELOE.java 2012-01-06 10:51:20 UTC (rev 3536) @@ -21,6 +21,7 @@ import java.io.File; import java.text.DecimalFormat; +import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.HashMap; @@ -38,7 +39,10 @@ import java.util.concurrent.ThreadPoolExecutor; import java.util.concurrent.TimeUnit; +import org.apache.log4j.FileAppender; import org.apache.log4j.Logger; +import org.apache.log4j.PatternLayout; +import org.apache.log4j.SimpleLayout; import org.dllearner.core.AbstractCELA; import org.dllearner.core.AbstractKnowledgeSource; import org.dllearner.core.AbstractLearningProblem; @@ -86,7 +90,6 @@ @ComponentAnn(name="PCELOE", shortName="pceloe", version=1.0, description="CELOE is an adapted and extended version of the OCEL algorithm applied for the ontology engineering use case. See http://jens-lehmann.org/files/2011/celoe.pdf for reference.") public class PCELOE extends AbstractCELA { - Map<Thread, RefinementOperator> ops = new HashMap<Thread, RefinementOperator>(); //parameters for thread pool //Parallel running Threads(Executor) on System private static int corePoolSize = 5; @@ -441,101 +444,31 @@ addNode(startClass, null); int nrOfThreads = Runtime.getRuntime().availableProcessors(); + nrOfThreads = 8;//only for tests TODO make number of threads configurable ExecutorService service = Executors.newFixedThreadPool(nrOfThreads); - for(int i = 0; i < 2; i++){ - service.submit(new Runnable() { - - - - @Override - public void run() { - // we use a default operator and inject the class hierarchy for now - RefinementOperator operator = new RhoDRDown(); - ((RhoDRDown)operator).setStartClass(startClass); - ((RhoDRDown)operator).setReasoner(reasoner); - try { - ((RhoDRDown)operator).init(); - } catch (ComponentInitException e) { - e.printStackTrace(); - } - // TODO: find a better solution as this is quite difficult to debug - ((RhoDRDown)operator).setSubHierarchy(reasoner.getClassHierarchy().clone()); - ((RhoDRDown)operator).setObjectPropertyHierarchy(reasoner.getObjectPropertyHierarchy()); - ((RhoDRDown)operator).setDataPropertyHierarchy(reasoner.getDatatypePropertyHierarchy()); - - ops.put(Thread.currentThread(), operator); - - OENode nextNode; - double highestAccuracy = 0.0; - int loop = 0; - while (!terminationCriteriaSatisfied()) { - - - if(!singleSuggestionMode && bestEvaluatedDescriptions.getBestAccuracy() > highestAccuracy) { - highestAccuracy = bestEvaluatedDescriptions.getBestAccuracy(); - logger.info("more accurate (" + dfPercent.format(highestAccuracy) + ") class expression found: " + descriptionToString(bestEvaluatedDescriptions.getBest().getDescription())); - } - - // chose best node according to heuristics - logger.info("Get next node to expand..."); - nextNode = getNextNodeToExpand(); - logger.info("...done"); - try { - Thread.sleep(10); - } catch (InterruptedException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - logger.info("next Node: " + nextNode); - if(nextNode != null){ - int horizExp = nextNode.getHorizontalExpansion(); - - // apply operator - Monitor mon = MonitorFactory.start("refineNode"); - logger.info("Refine node..."); - TreeSet<Description> refinements = refineNode(nextNode); - mon.stop(); - logger.info("...done"); - - while(refinements.size() != 0) { - // pick element from set - Description refinement = refinements.pollFirst(); - int length = refinement.getLength(); - - // we ignore all refinements with lower length and too high depth - // (this also avoids duplicate node children) - if(length > horizExp && refinement.getDepth() <= maxDepth) { - -// System.out.println("potentially adding " + refinement + " to search tree as child of " + nextNode + " " + new Date()); - Monitor mon2 = MonitorFactory.start("addNode"); - logger.info("Add node..."); - addNode(refinement, nextNode); - mon2.stop(); - logger.info("...done"); - // adding nodes is potentially computationally expensive, so we have - // to check whether max time is exceeded - if(terminationCriteriaSatisfied()) { - break; - } -// System.out.println("addNode finished" + " " + new Date()); - } - -// System.out.println(" refinement queue length: " + refinements.size()); - } - -// updateMinMaxHorizExp(nextNode); - - loop++; - currentlyProcessedNodes.remove(nextNode); - } - - } - - } - }); + List<Runnable> tasks = new ArrayList<Runnable>(); + + for(int i = 0; i < nrOfThreads; i++){ + RhoDRDown operator = new RhoDRDown(); + operator.setStartClass(startClass); + operator.setReasoner(reasoner); + try { + operator.init(); + } catch (ComponentInitException e) { + e.printStackTrace(); + } + operator.setSubHierarchy(reasoner.getClassHierarchy().clone()); + operator.setObjectPropertyHierarchy(reasoner.getObjectPropertyHierarchy()); + operator.setDataPropertyHierarchy(reasoner.getDatatypePropertyHierarchy()); + + tasks.add(new Worker(operator)); } + for(Runnable task : tasks){ + service.submit(task); + } + try { service.awaitTermination(maxExecutionTimeInSeconds, TimeUnit.SECONDS); } catch (InterruptedException e) { @@ -554,12 +487,14 @@ } // print solution(s) + +// System.out.println("isRunning: " + isRunning); + logger.info("solutions:\n" + getSolutionString()); // System.out.println(startNode.toTreeString(baseURI)); isRunning = false; -// System.out.println("isRunning: " + isRunning); service.shutdown(); } @@ -568,34 +503,45 @@ // we expand the best node of those, which have not achieved 100% accuracy // already and have a horizontal expansion equal to their length // (rationale: further extension is likely to add irrelevant syntactical constructs) + synchronized (nodes) {logger.info("in 1.lock"); Iterator<OENode> it = nodes.descendingIterator();//logger.info(nodes.size()); - while(it.hasNext()) { - OENode node = it.next(); - if(!currentlyProcessedNodes.contains(node) && (node.getAccuracy() < 1.0 || node.getHorizontalExpansion() < node.getDescription().getLength())) { - currentlyProcessedNodes.add(node); - return node; + logger.info("search tree size: " + nodes.size()); + while(it.hasNext()) { + OENode node = it.next(); + logger.info("checking node " + node); + if(!currentlyProcessedNodes.contains(node) && (node.getAccuracy() < 1.0 || node.getHorizontalExpansion() < node.getDescription().getLength())) { + currentlyProcessedNodes.add(node); + return node; + } + logger.info("Checked."); } } + // this should practically never be called, since for any reasonable learning // task, we will always have at least one node with less than 100% accuracy return null; } // expand node horizontically - private TreeSet<Description> refineNode(OENode node) { + private TreeSet<Description> refineNode(OENode node, RhoDRDown operator) { // we have to remove and add the node since its heuristic evaluation changes through the expansion // (you *must not* include any criteria in the heuristic which are modified outside of this method, // otherwise you may see rarely occurring but critical false ordering in the nodes set) - nodes.remove(node); + synchronized (nodes) { + nodes.remove(node); + } + // System.out.println("refining: " + node); int horizExp = node.getHorizontalExpansion(); // TreeSet<Description> refinements = (TreeSet<Description>) operator.refine(node.getDescription(), horizExp+1); - RefinementOperator operator = ops.get(Thread.currentThread()); //logger.info("Got operator"); TreeSet<Description> refinements = (TreeSet<Description>) operator.refine(node.getDescription(), horizExp+1); node.incHorizontalExpansion(); node.setRefinementCount(refinements.size()); - nodes.add(node); + synchronized (refinements) { + nodes.add(node); + } + return refinements; } @@ -688,13 +634,16 @@ // A is not a candidate; on the other hand this suppresses many meaningless extensions of A boolean shorterDescriptionExists = false; if(forceMutualDifference) { - for(EvaluatedDescription ed : bestEvaluatedDescriptions.getSet()) { - if(Math.abs(ed.getAccuracy()-accuracy) <= 0.00001 && ConceptTransformation.isSubdescription(niceDescription, ed.getDescription())) { -// System.out.println("shorter: " + ed.getDescription()); - shorterDescriptionExists = true; - break; - } - } + synchronized (bestEvaluatedDescriptions) { + for(EvaluatedDescription ed : bestEvaluatedDescriptions.getSet()) { + if(Math.abs(ed.getAccuracy()-accuracy) <= 0.00001 && ConceptTransformation.isSubdescription(niceDescription, ed.getDescription())) { +// System.out.println("shorter: " + ed.getDescription()); + shorterDescriptionExists = true; + break; + } + } + } + } logger.info("Point 2"); @@ -822,11 +771,13 @@ } private boolean terminationCriteriaSatisfied() { - return - stop || - (maxClassDescriptionTests != 0 && (expressionTests >= maxClassDescriptionTests)) || - (maxExecutionTimeInSeconds != 0 && ((System.nanoTime() - nanoStartTime) >= (maxExecutionTimeInSeconds*1000000000l))) || - (terminateOnNoiseReached && (100*getCurrentlyBestAccuracy()>=100-noisePercentage)); + boolean ret = stop || + (maxClassDescriptionTests != 0 && (expressionTests >= maxClassDescriptionTests)) || + (maxExecutionTimeInSeconds != 0 && ((System.nanoTime() - nanoStartTime) >= (maxExecutionTimeInSeconds*1000000000l))) || + (terminateOnNoiseReached && (100*getCurrentlyBestAccuracy()>=100-noisePercentage)); + logger.info("terminate: " + ret); + return ret; + } private void reset() { @@ -1062,6 +1013,8 @@ public static void main(String[] args) throws Exception{ + Logger.getLogger(PCELOE.class).addAppender(new FileAppender(new PatternLayout( "[%t] %c: %m%n" ), "log/parallel_run.txt", false)); + AbstractKnowledgeSource ks = new OWLFile("../examples/family/father_oe.owl"); ks.init(); @@ -1070,15 +1023,98 @@ ClassLearningProblem lp = new ClassLearningProblem(rc); lp.setClassToDescribe(new NamedClass("http://example.com/father#father")); + lp.setCheckConsistency(false); lp.init(); PCELOE alg = new PCELOE(lp, rc); alg.setMaxExecutionTimeInSeconds(10); - alg.setMaxClassDescriptionTests(100); +// alg.setMaxClassDescriptionTests(200); alg.init(); alg.start(); } + class Worker implements Runnable{ + + private RhoDRDown operator; + + public Worker(RhoDRDown operator) { + this.operator = operator; + } + + @Override + public void run() { + logger.info("Started thread..."); + + OENode nextNode; + double highestAccuracy = 0.0; + int loop = 0; + while (!terminationCriteriaSatisfied()) { + + + if(!singleSuggestionMode && bestEvaluatedDescriptions.getBestAccuracy() > highestAccuracy) { + highestAccuracy = bestEvaluatedDescriptions.getBestAccuracy(); + logger.info("more accurate (" + dfPercent.format(highestAccuracy) + ") class expression found: " + descriptionToString(bestEvaluatedDescriptions.getBest().getDescription())); + } + + // chose best node according to heuristics + logger.info("Get next node to expand..."); + nextNode = getNextNodeToExpand(); + logger.info("...done"); + try { + Thread.sleep(10); + } catch (InterruptedException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + logger.info("next Node: " + nextNode); + if(nextNode != null){ + int horizExp = nextNode.getHorizontalExpansion(); + + // apply operator + Monitor mon = MonitorFactory.start("refineNode"); + logger.info("Refine node..."); + TreeSet<Description> refinements = refineNode(nextNode, operator); + mon.stop(); + logger.info("...done"); + + while(refinements.size() != 0) { + // pick element from set + Description refinement = refinements.pollFirst(); + int length = refinement.getLength(); + + // we ignore all refinements with lower length and too high depth + // (this also avoids duplicate node children) + if(length > horizExp && refinement.getDepth() <= maxDepth) { + +// System.out.println("potentially adding " + refinement + " to search tree as child of " + nextNode + " " + new Date()); + Monitor mon2 = MonitorFactory.start("addNode"); + logger.info("Add node..."); + addNode(refinement, nextNode); + mon2.stop(); + logger.info("...done"); + // adding nodes is potentially computationally expensive, so we have + // to check whether max time is exceeded + if(terminationCriteriaSatisfied()) { + break; + } +// System.out.println("addNode finished" + " " + new Date()); + } + +// System.out.println(" refinement queue length: " + refinements.size()); + } + +// updateMinMaxHorizExp(nextNode); + + loop++; + currentlyProcessedNodes.remove(nextNode); + } + + } + + } + + } + } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jen...@us...> - 2012-01-06 10:19:10
|
Revision: 3535 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=3535&view=rev Author: jenslehmann Date: 2012-01-06 10:19:04 +0000 (Fri, 06 Jan 2012) Log Message: ----------- CELOE heuristic improvements Modified Paths: -------------- trunk/components-core/src/main/java/org/dllearner/algorithms/celoe/CELOE.java trunk/components-core/src/main/java/org/dllearner/algorithms/celoe/OEHeuristicRuntime.java trunk/components-core/src/main/java/org/dllearner/core/AnnComponentManager.java trunk/components-core/src/main/java/org/dllearner/core/ComponentAnn.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 2012-01-06 10:18:12 UTC (rev 3534) +++ trunk/components-core/src/main/java/org/dllearner/algorithms/celoe/CELOE.java 2012-01-06 10:19:04 UTC (rev 3535) @@ -219,7 +219,7 @@ @Override public void init() throws ComponentInitException { - if(maxExecutionTimeInSeconds != 0) { + if(maxExecutionTimeInSeconds != 0 && maxExecutionTimeInSecondsAfterImprovement != 0) { maxExecutionTimeInSeconds = Math.min(maxExecutionTimeInSeconds, maxExecutionTimeInSecondsAfterImprovement); } @@ -514,7 +514,7 @@ if (stop) { logger.info("Algorithm stopped ("+expressionTests+" descriptions tested). " + nodes.size() + " nodes in the search tree.\n"); } else { - logger.info("Algorithm terminated successfully ("+expressionTests+" descriptions tested). " + nodes.size() + " nodes in the search tree.\n"); + logger.info("Algorithm terminated successfully (time: " + Helper.prettyPrintNanoSeconds(System.nanoTime()-nanoStartTime) + ", "+expressionTests+" descriptions tested, " + nodes.size() + " nodes in the search tree).\n"); logger.info(reasoner.toString()); } Modified: trunk/components-core/src/main/java/org/dllearner/algorithms/celoe/OEHeuristicRuntime.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/algorithms/celoe/OEHeuristicRuntime.java 2012-01-06 10:18:12 UTC (rev 3534) +++ trunk/components-core/src/main/java/org/dllearner/algorithms/celoe/OEHeuristicRuntime.java 2012-01-06 10:19:04 UTC (rev 3535) @@ -21,7 +21,11 @@ import java.util.Comparator; +import org.dllearner.core.Component; import org.dllearner.core.ComponentAnn; +import org.dllearner.core.ComponentInitException; +import org.dllearner.core.config.ConfigOption; +import org.dllearner.core.config.DoubleEditor; import org.dllearner.utilities.owl.ConceptComparator; /** @@ -32,8 +36,8 @@ * @author Jens Lehmann * */ -@ComponentAnn(name = "OEHeuristicRuntime", shortName = "OEHeuristicRuntime", version = 0.5) -public class OEHeuristicRuntime implements Comparator<OENode>{ +@ComponentAnn(name = "OEHeuristicRuntime", shortName = "celoe_heuristic", version = 0.5) +public class OEHeuristicRuntime implements Component, Comparator<OENode>{ // strong penalty for long descriptions private double expansionPenaltyFactor = 0.1; @@ -45,11 +49,19 @@ // syntactic comparison as final comparison criterion private ConceptComparator conceptComparator = new ConceptComparator(); + @ConfigOption(name = "startNodeBonus", defaultValue="0.1") + private double startNodeBonus = 0.1; + public OEHeuristicRuntime() { } @Override + public void init() throws ComponentInitException { + + } + + @Override public int compare(OENode node1, OENode node2) { // System.out.println("node1 " + node1); // System.out.println("score: " + getNodeScore(node1)); @@ -74,6 +86,9 @@ if(!node.isRoot()) { double parentAccuracy = node.getParent().getAccuracy(); score += (parentAccuracy - score) * gainBonusFactor; + // the root node also gets a bonus to possibly spawn useful disjunctions + } else { + score += startNodeBonus; } // penalty for horizontal expansion score -= node.getHorizontalExpansion() * expansionPenaltyFactor; @@ -104,5 +119,15 @@ public void setExpansionPenaltyFactor(double expansionPenaltyFactor) { this.expansionPenaltyFactor = expansionPenaltyFactor; - } + } + + public double getStartNodeBonus() { + return startNodeBonus; + } + + public void setStartNodeBonus(double startNodeBonus) { + this.startNodeBonus = startNodeBonus; + } + + } Modified: trunk/components-core/src/main/java/org/dllearner/core/AnnComponentManager.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/core/AnnComponentManager.java 2012-01-06 10:18:12 UTC (rev 3534) +++ trunk/components-core/src/main/java/org/dllearner/core/AnnComponentManager.java 2012-01-06 10:19:04 UTC (rev 3535) @@ -85,6 +85,7 @@ "org.dllearner.reasoning.fuzzydll.FuzzyOWLAPIReasoner", "org.dllearner.algorithms.ocel.OCEL", "org.dllearner.algorithms.ocel.MultiHeuristic", + "org.dllearner.algorithms.celoe.OEHeuristicRuntime", "org.dllearner.refinementoperators.RhoDRDown", } )); private static Collection<Class<? extends Component>> components; Modified: trunk/components-core/src/main/java/org/dllearner/core/ComponentAnn.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/core/ComponentAnn.java 2012-01-06 10:18:12 UTC (rev 3534) +++ trunk/components-core/src/main/java/org/dllearner/core/ComponentAnn.java 2012-01-06 10:19:04 UTC (rev 3535) @@ -42,7 +42,7 @@ /** * The short name of this component, which should exclusively consist of - * lower case ASCII symbols without whitespace. + * lower case ASCII symbols and "_" without whitespace. * @return The short name of this component. */ String shortName(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lor...@us...> - 2012-01-06 10:10:14
|
Revision: 3533 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=3533&view=rev Author: lorenz_b Date: 2012-01-06 10:10:08 +0000 (Fri, 06 Jan 2012) Log Message: ----------- Extended tests for CELOE. Modified Paths: -------------- trunk/components-core/src/main/java/org/dllearner/refinementoperators/RhoDRDown.java Modified: trunk/components-core/src/main/java/org/dllearner/refinementoperators/RhoDRDown.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/refinementoperators/RhoDRDown.java 2012-01-06 03:59:49 UTC (rev 3532) +++ trunk/components-core/src/main/java/org/dllearner/refinementoperators/RhoDRDown.java 2012-01-06 10:10:08 UTC (rev 3533) @@ -1458,7 +1458,7 @@ result = isDisjointInstanceBased(d1,d2); } else { Description d = new Intersection(d1, d2); - result = reasoner.isSuperClassOf(new Nothing(), d); + result = reasoner.isSuperClassOf(new Nothing(), d); System.out.println("TEST"); } // add the result to the cache (we add it twice such that // the order of access does not matter) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |