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: <hee...@us...> - 2008-06-10 11:17:43
|
Revision: 950 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=950&view=rev Author: heeroyuy Date: 2008-06-10 04:17:42 -0700 (Tue, 10 Jun 2008) Log Message: ----------- started new simple suggestion learning algorithm Added Paths: ----------- trunk/src/dl-learner/org/dllearner/algorithms/SimpleSuggestionLearningAlgorithm.java Added: trunk/src/dl-learner/org/dllearner/algorithms/SimpleSuggestionLearningAlgorithm.java =================================================================== --- trunk/src/dl-learner/org/dllearner/algorithms/SimpleSuggestionLearningAlgorithm.java (rev 0) +++ trunk/src/dl-learner/org/dllearner/algorithms/SimpleSuggestionLearningAlgorithm.java 2008-06-10 11:17:42 UTC (rev 950) @@ -0,0 +1,80 @@ +package org.dllearner.algorithms; + +import java.util.Set; +import java.util.List; +import java.util.*; + +import org.dllearner.core.LearningAlgorithm; +import org.dllearner.core.LearningProblem; +import org.dllearner.core.ReasoningService; +import org.dllearner.core.owl.Description; +import org.dllearner.core.config.ConfigEntry; +import org.dllearner.core.Score; +import org.dllearner.core.owl.*; + +public class SimpleSuggestionLearningAlgorithm extends LearningAlgorithm implements Runnable{ + +private Score solutionScore; +private boolean stop = false; +private Description bestSollution; +private Set<Description> simpleSuggestions; +private LearningProblem learningProblem; + + public SimpleSuggestionLearningAlgorithm() + { + //this.learningProblem = learningProblem; + } + + public Description getBestSolution() + { + return bestSollution; + } + + + public void stop() + { + stop = true; + } + + public void start() + { + + } + + public <T> void applyConfigEntry(ConfigEntry<T> entry) + { + + } + + public void init() + { + + } + + public Score getSolutionScore() + { + return solutionScore; + } + + public void run() + { + + } + + public Set<Description> getSimpleSuggestions(ReasoningService rs,Set<Individual> indi) { + // EXISTS property.TOP + // ESISTS hasChild + // EXISTS hasChild.male + simpleSuggestions= new HashSet<Description>(); + List<ObjectProperty> test=rs.getAtomicRolesList(); + while(test.iterator().hasNext()) + { + test.iterator().next(); + Description d1 = new ObjectSomeRestriction(test.iterator().next(), new Thing()); + test.remove(rs.getAtomicRolesList().iterator().next()); + System.out.println("TADA: "+d1); + simpleSuggestions.add(d1); + } + return simpleSuggestions; + } +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hee...@us...> - 2008-06-10 11:16:44
|
Revision: 949 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=949&view=rev Author: heeroyuy Date: 2008-06-10 04:16:42 -0700 (Tue, 10 Jun 2008) Log Message: ----------- -started new knowledge source to deliver the reasoner an OWLOntology directly Added Paths: ----------- trunk/src/dl-learner/org/dllearner/kb/OWLAPIOntology.java Added: trunk/src/dl-learner/org/dllearner/kb/OWLAPIOntology.java =================================================================== --- trunk/src/dl-learner/org/dllearner/kb/OWLAPIOntology.java (rev 0) +++ trunk/src/dl-learner/org/dllearner/kb/OWLAPIOntology.java 2008-06-10 11:16:42 UTC (rev 949) @@ -0,0 +1,52 @@ +package org.dllearner.kb; + +import java.io.File; +import java.net.URI; + +import org.dllearner.core.KnowledgeSource; +import org.dllearner.core.OntologyFormat; +import org.dllearner.core.config.ConfigEntry; +import org.dllearner.core.config.InvalidConfigOptionValueException; +import org.dllearner.core.owl.KB; + +import org.semanticweb.owl.model.OWLOntology; + +public class OWLAPIOntology extends KnowledgeSource { + + private OWLOntology ontology; + + public OWLAPIOntology(OWLOntology onto) + { + this.ontology = onto; + } + + public <T> void applyConfigEntry(ConfigEntry<T> entry) throws InvalidConfigOptionValueException + { + + } + + public OWLOntology getOWLOntolgy() + { + return ontology; + } + + public KB toKB() + { + throw new Error("OWL -> KB conversion not implemented yet."); + } + + public void init() + { + + } + + public void export(File file, OntologyFormat format) + { + + } + + public String toDIG(URI kbURI) + { + return null; + } +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hee...@us...> - 2008-06-10 11:14:54
|
Revision: 948 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=948&view=rev Author: heeroyuy Date: 2008-06-10 04:14:52 -0700 (Tue, 10 Jun 2008) Log Message: ----------- -small changes -started to comment methods Modified Paths: -------------- trunk/src/dl-learner/org/dllearner/tools/protege/ActionHandler.java trunk/src/dl-learner/org/dllearner/tools/protege/DLLearnerModel.java trunk/src/dl-learner/org/dllearner/tools/protege/OWLClassDescriptionEditorWithDLLearnerTab.java Modified: trunk/src/dl-learner/org/dllearner/tools/protege/ActionHandler.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/protege/ActionHandler.java 2008-06-06 15:08:05 UTC (rev 947) +++ trunk/src/dl-learner/org/dllearner/tools/protege/ActionHandler.java 2008-06-10 11:14:52 UTC (rev 948) @@ -2,15 +2,49 @@ -import java.awt.event.*; -//TODO: Concepte und errormessages aus model holen +//import java.awt.event.*; +import java.awt.event.ActionListener; +import java.awt.event.ItemListener; +import java.awt.event.MouseListener; +import java.awt.event.ActionEvent; +import java.awt.event.ItemEvent; +import java.awt.event.MouseEvent; +import java.awt.event.TextEvent; + +import org.dllearner.core.owl.Description; +/** + * + * @author Heero Yuy + * + */ public class ActionHandler implements ActionListener, ItemListener, MouseListener{ + /** + * + */ private DLLearnerModel model; - + /** + * + */ private String id; + /** + * + */ private boolean toggled; + /** + * + */ private Thread dlLearner; + /** + * + */ private OWLClassDescriptionEditorWithDLLearnerTab.DLLearnerView view; + /** + * + * @param a + * @param m + * @param view + * @param i + */ public ActionHandler(ActionHandler a,DLLearnerModel m,OWLClassDescriptionEditorWithDLLearnerTab.DLLearnerView view ,String i) { this.view = view; @@ -20,13 +54,20 @@ } + /** + * + */ public void actionPerformed(ActionEvent z){ if(z.getActionCommand().equals("Suggest "+id)) { + if(model.getAlreadyLearned()==true) + { + model.unsetListModel(); + } if(view.getOptionPanel().getComponentCount()<=2) { - view.renderErrorMessage("No Examples available"); + view.renderErrorMessage("Could not start learning. No Examples where available"); } else{ view.renderErrorMessage("Learning started"); @@ -34,8 +75,6 @@ view.getRunButton().setEnabled(false); view.getCancelButton().setEnabled(true); dlLearner.start(); - //String error = "Learning succesful"; - //view.renderErrorMessage(error); } } @@ -47,20 +86,12 @@ view.renderErrorMessage(error); dlLearner.interrupt(); model.getLearningAlgorithm().stop(); + model.setErrorMessage(error); } if(z.getActionCommand().equals("ADD")) { - String suggest=view.getSuggestionList().getSelectedValue().toString(); - for(int i = 0;i<model.getSolutions().length;i++) - { - if(model.getSolutions()[i].toString().equals(suggest)) - { - System.out.println(model.getSolutions()[i]); - model.changeDLLearnerDescriptionsToOWLDescriptions(model.getSolutions()[i]); - } - } - + model.changeDLLearnerDescriptionsToOWLDescriptions((Description)view.getSuggestionList().getSelectedValue()); String message ="Concept added"; view.renderErrorMessage(message); } @@ -69,7 +100,7 @@ { if(z.getSource().toString().contains("PosHelpButton")) { - String hilfe="A Instance that follows from the classdescription. Per Default all that belongs to the class."; + String hilfe="A Instance that follows from the classdescription.\nPer Default all that belongs to the class."; view.renderHelpMessage(hilfe); } @@ -94,52 +125,79 @@ view.setExamplePanelVisible(toggled); } } - } - + } + + /** + * + * @return + */ public String getID() { return id; } - + /** + * + */ public void itemStateChanged(ItemEvent i) { //System.out.println(i.getItem()); } - + /** + * + */ public void mouseReleased(MouseEvent m) { } - + /** + * + */ public void mouseEntered(MouseEvent m) { } - + /** + * + */ public void mouseClicked(MouseEvent m) { } - + /** + * + */ public void mouseExited(MouseEvent m) { } - + /** + * + */ public void mousePressed(MouseEvent m) { - + if(!view.getAddButton().isEnabled()) + { + view.getAddButton().setEnabled(true); + } } + /** + * + * @param t + */ public void textValueChanged(TextEvent t) { } - + /** + * + */ public void destroyDLLearnerThread() { dlLearner =null; } - + /** + * + */ public void resetToggled() { toggled = false; Modified: trunk/src/dl-learner/org/dllearner/tools/protege/DLLearnerModel.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/protege/DLLearnerModel.java 2008-06-06 15:08:05 UTC (rev 947) +++ trunk/src/dl-learner/org/dllearner/tools/protege/DLLearnerModel.java 2008-06-10 11:14:52 UTC (rev 948) @@ -1,72 +1,194 @@ package org.dllearner.tools.protege; -import org.dllearner.core.ComponentManager; -import org.dllearner.kb.OWLFile; - import java.util.Observable; import java.util.Set; import java.util.TreeSet; import java.util.Vector; -import org.dllearner.core.owl.Description; +import java.util.HashSet; +import java.util.Iterator; +import java.util.SortedSet; + +import java.io.*; + +import javax.swing.DefaultListModel; import javax.swing.JCheckBox; -import org.dllearner.core.*; -import org.protege.editor.owl.OWLEditorKit; -import org.protege.editor.owl.ui.frame.OWLFrame; -import org.semanticweb.owl.apibinding.OWLManager; -import org.semanticweb.owl.model.*; -import org.dllearner.learningproblems.*; + import java.net.URI; -import org.dllearner.core.owl.*; -import org.dllearner.core.owl.NamedClass; -import org.semanticweb.owl.model.OWLOntology; -import org.dllearner.reasoning.OWLAPIReasoner; -import org.semanticweb.owl.model.OWLOntologyManager; -import org.dllearner.reasoning.OWLAPIDescriptionConvertVisitor; -import java.io.File; -import org.semanticweb.owl.model.OWLDescription; -import java.util.HashSet; -import java.util.*; + import org.dllearner.algorithms.refinement.ROLearner; +import org.dllearner.algorithms.SimpleSuggestionLearningAlgorithm; + +import org.dllearner.core.owl.Description; import org.dllearner.core.KnowledgeSource; import org.dllearner.core.LearningAlgorithm; import org.dllearner.core.LearningProblem; +import org.dllearner.core.ComponentManager; +import org.dllearner.core.ComponentInitException; import org.dllearner.core.LearningProblemUnsupportedException; import org.dllearner.core.ReasoningService; + +import org.dllearner.core.owl.Individual; +import org.dllearner.core.owl.NamedClass; + +import org.dllearner.kb.OWLFile; +import org.dllearner.kb.OWLAPIOntology; + +import org.dllearner.learningproblems.PosNegInclusionLP; import org.dllearner.learningproblems.PosNegDefinitionLP; +import org.dllearner.reasoning.OWLAPIDescriptionConvertVisitor; +import org.dllearner.reasoning.OWLAPIReasoner; +import org.protege.editor.owl.OWLEditorKit; +import org.protege.editor.owl.ui.frame.OWLFrame; + +import org.semanticweb.owl.apibinding.OWLManager; +import org.semanticweb.owl.model.OWLClass; +import org.semanticweb.owl.model.OWLOntologyCreationException; +import org.semanticweb.owl.model.AddAxiom; +import org.semanticweb.owl.model.OWLOntologyFormat; +import org.semanticweb.owl.model.OWLAxiom; +import org.semanticweb.owl.model.OWLDataFactory; + +import org.semanticweb.owl.model.OWLOntology; +import org.semanticweb.owl.model.OWLOntologyManager; +import org.semanticweb.owl.model.OWLDescription; + + + + + + +/** + * This Class provides the necessary methods to learn Concepts from the DL-Learner. + * @author Heero Yuy + * + */ public class DLLearnerModel extends Observable implements Runnable{ + /** + * The Sting is for components that are available in the DL-Learner + */ private String[] componenten={"org.dllearner.kb.OWLFile","org.dllearner.reasoning.OWLAPIReasoner", "org.dllearner.reasoning.DIGReasoner","org.dllearner.reasoning.FastRetrievalReasoner","org.dllearner.learningproblems.PosNegInclusionLP" ,"org.dllearner.learningproblems.PosNegDefinitionLP","org.dllearner.algorithms.RandomGuesser","org.dllearner.algorithms.BruteForceLearner","org.dllearner.algorithms.refinement.ROLearner","org.dllearner.algorithms.refexamples.ExampleBasedROLComponent","org.dllearner.algorithms.gp.GP"}; + /** + * This Vector stores the check boxes for the view. + */ private Vector<JCheckBox> positiv; + /** + * This Vector stores the negative Examples. + */ private Vector<JCheckBox> negativ; + /** + * + */ private ComponentManager cm; + /** + * + */ private ReasoningService rs; + /** + * + */ private KnowledgeSource source; + /** + * + */ private OWLClassDescriptionEditorWithDLLearnerTab.DLLearnerView view; + /** + * This is the count of Concepts which you get after learning + */ private static final int anzahl = 6; - private Description[] description = new Description[anzahl]; + /** + * + */ + private Description[] description; + /** + * + */ private LearningProblem lp; + /** + * This boolean is + */ + private boolean alreadyLearned=false; + /** + * + */ private OWLOntology ontology; + /** + * This is the learning algorithm + */ private LearningAlgorithm la = null; + /** + * + */ private OWLEditorKit editor; + /** + * + */ private OWLFrame<OWLClass> aktuell; + /** + * + */ private OWLAPIReasoner reasoner; + /** + * + */ private Set<OWLDescription> OWLDescription; + /** + * This set stores the positive examples. + */ private Set<String> positiveExamples; + /** + * This set stores the negative examples that doesn't belong to the concept. + */ private Set<String> negativeExamples; - private Vector<Individual> indis; + /** + * + */ private OWLDescription desc; + /** + * + */ private String id; + /** + * + */ private OWLDescription newConceptOWLAPI; + /** + * + */ private OWLDescription oldConceptOWLAPI; + /** + * + */ private Set<OWLDescription> ds; - private Vector<Individual> individual; + /** + * + */ + private DefaultListModel suggestModel; + /** + * + */ + private Set<Individual> individual; + /** + * + */ + private SimpleSuggestionLearningAlgorithm test; + /** + * + */ + private String error; + /** + * This is the constructor for DL-Learner model + * @param editorKit + * @param h + * @param id String if it learns a subclass or a superclass. + * @param view current view of the DL-Learner tab + */ public DLLearnerModel(OWLEditorKit editorKit, OWLFrame<OWLClass> h,String id,OWLClassDescriptionEditorWithDLLearnerTab.DLLearnerView view) - { editor=editorKit; aktuell=h; @@ -75,53 +197,88 @@ OWLDescription = new HashSet<OWLDescription>(); positiv = new Vector<JCheckBox>(); negativ = new Vector<JCheckBox>(); - indis = new Vector<Individual>(); - individual = new Vector<Individual>(); + test = new SimpleSuggestionLearningAlgorithm(); ComponentManager.setComponentClasses(componenten); cm = ComponentManager.getInstance(); ds = new HashSet<OWLDescription>(); + suggestModel = new DefaultListModel(); } + + /** + * This method initializes the SimpleSuggestionLearningAlgorithm and adds the + * suggestions to the suggest panel model. + */ public void initReasoner() { + alreadyLearned = false; setKnowledgeSource(); setReasoner(); SortedSet<Individual> pos=rs.getIndividuals(); - System.out.println(pos); - while(pos.iterator().hasNext()) + Set<Description> desc = test.getSimpleSuggestions(rs, pos); + int i = 0; + for(Iterator<Description> j = desc.iterator();j.hasNext();) { - indis.add(pos.iterator().next()); - pos.remove(pos.iterator().next()); + suggestModel.add(i,j.next()); } - - //this.neg=rs.getIndividuals(); } + + /** + * This method adds the solutions from the DL-Learner to the + * model for the + */ + private void addToListModel() + { + for(int j = 0;j<la.getBestSolutions(anzahl).size();j++) + { + suggestModel.add(j,la.getBestSolutions(anzahl).get(j)); + } + } + + /** + * This method checks which positive and negative examples are checked + * and puts the checked examples into a treeset. + */ public void setPositiveAndNegativeExamples() { positiveExamples = new TreeSet<String>(); + negativeExamples = new TreeSet<String>(); for(int i=0;i<positiv.size();i++) { if(positiv.get(i).isSelected()) { positiveExamples.add(positiv.get(i).getText()); } - } - negativeExamples = new TreeSet<String>(); - for(int i=0;i<negativ.size();i++) - { + if(negativ.get(i).isSelected()) { negativeExamples.add(negativ.get(i).getText()); } } - } + /** + * This method returns the data for the suggest panel. + * @return Model for the suggest panel. + */ + public DefaultListModel getSuggestList() + { + return suggestModel; + } + + /** + * This method returns an array of descriptions learned by the DL-Learner. + * @return Array of descriptions learned by the DL-Learner. + */ public Description[] getDescriptions() { return description; } + /** + * This method sets the knowledge source for the learning process. + * Only OWLAPIOntology will be available. + */ public void setKnowledgeSource() { this.source = cm.knowledgeSource(OWLFile.class); @@ -135,6 +292,10 @@ } } + /** + * This method sets the reasoner and the reasoning service + * Only OWLAPIReasoner is available. + */ public void setReasoner() { this.reasoner =cm.reasoner(OWLAPIReasoner.class,source); @@ -142,6 +303,11 @@ rs = cm.reasoningService(reasoner); } + /** + * This method sets the Learning problem for the learning process. + * PosNegDefinitonLp for equivalent classes and + * PosNegInclusionLP for superclasses. + */ public void setLearningProblem() { if(id.equals("Equivalent classes")) @@ -164,6 +330,9 @@ } } + /** + * This method sets the learning algorithm for the learning process. + */ public void setLearningAlgorithm() { try { @@ -180,41 +349,68 @@ catch(ComponentInitException e){ e.printStackTrace(); } + alreadyLearned = true; } + /** + * This method starts the learning process. + */ public void run() { + error = "Learning succesful"; setKnowledgeSource(); setReasoner(); - setPositiveAndNegativeExamples();; + setPositiveAndNegativeExamples(); setLearningProblem(); setLearningAlgorithm(); // start the algorithm and print the best concept found la.start(); description = new Description[la.getBestSolutions(anzahl).size()]; - for(int j = 0;j<la.getBestSolutions(anzahl).size();j++) - { - description[j]=la.getBestSolutions(anzahl).get(j); - } - view.draw(description); + addToListModel(); + view.renderErrorMessage(error); + view.draw(); } + /** + * This method returns the Concepts from the DL-Learner. + * @return Array of learned Concepts. + */ public Description[] getSolutions() { return description; } + /** + * This method returns the check boxes for the positive examples. + * @return Vector of check boxes for positive examples + */ public Vector<JCheckBox> getPosVector() { return positiv; } + /** + * This method returns the check boxes for the negative examples. + * @return Vector of check boxes for negative examples + */ public Vector<JCheckBox> getNegVector() { return negativ; } + /** + * This method gets an error message and storess it. + * @param error error message + */ + public void setErrorMessage(String error) + { + this.error = error; + } + /** + * This method gets an uri for an ontology and loads it. + * @param uri Uri for the Ontology + */ public void loadOntology(URI uri) { OWLOntologyManager manager = OWLManager.createOWLOntologyManager(); @@ -227,11 +423,16 @@ } } + /** + * This method sets the check boxes for the positive check boxes checked + * if the individuals matches the concept that is chosen in protege. + */ public void setPosVector() - { setPositiveConcept(); - for(int i = 0 ; i<indis.size() ; i++) + { + setPositiveConcept(); + for(Iterator<Individual> j = rs.getIndividuals().iterator(); j.hasNext();) { - String ind = indis.get(i).toString(); + String ind = j.next().toString(); if(setPositivExamplesChecked(ind)) { positiv.add(new JCheckBox(ind.toString(),true)); @@ -245,11 +446,9 @@ } } - - public void setNegVector() - { - - } + /** + * This method resets the Concepts that are learned. + */ public void unsetNewConcepts() { while(OWLDescription.iterator().hasNext()) @@ -257,69 +456,71 @@ OWLDescription.remove(OWLDescription.iterator().next()); } } + + /** + * This method sets the individuals that belong to the concept which is chosen in protege. + */ public void setPositiveConcept() { - Set<NamedClass> concepts = rs.getAtomicConcepts(); - System.out.println("!"+rs.getAtomicConcepts()); - System.out.println("2"+aktuell.getRootObject()); - SortedSet<Individual> individuals = null; - while(concepts.iterator().hasNext()&&individuals==null) + for(Iterator<NamedClass> i = rs.getAtomicConcepts().iterator(); i.hasNext();) { - System.out.println(concepts.size()); - System.out.println(individuals==null); - NamedClass concept = concepts.iterator().next(); - System.out.println("\xA7"+rs.retrieval(concept)); - if(concept.toString().endsWith("#"+aktuell.getRootObject().toString())) + if(individuals==null) { - if(rs.retrieval(concept)!=null){ - System.out.println(":-) "+rs.retrieval(concept)); - individuals = rs.retrieval(concept); + NamedClass concept = i.next(); + if(concept.toString().endsWith("#"+aktuell.getRootObject().toString())) + { + if(rs.retrieval(concept)!=null){ + individual = rs.retrieval(concept); + break; + } } } - concepts.remove(concept); - System.out.println(individuals); } - System.out.println(individuals==null); - if(individuals!=null) - { - while(individuals.iterator().hasNext()) - { - individual.add(individuals.iterator().next()); - individuals.remove(individuals.iterator().next()); - } - } } + /** + * This method gets an Individual and checks if this individual belongs to the concept + * chosen in protege. + * @param indi Individual to check if it belongs to the chosen concept + * @return is Individual belongs to the concept which is chosen in protege. + */ public boolean setPositivExamplesChecked(String indi) { boolean isChecked = false; - for(int i = 0; i<individual.size()&& isChecked==false;i++) - { - String indi1=individual.get(i).getName(); - System.out.println("1: "+indi); - System.out.println("2 :"+indi1); - if(indi1.toString().equals(indi.toString())) - { - System.out.println(indi); - isChecked = true; - } - else - { - isChecked = false; - } - } + if(individual.toString().contains(indi)) + { + isChecked = true; + } + /*for(Iterator<Individual> j = individual.iterator(); j.hasNext();) + { + String indi1 = j.next().getName(); + System.out.println("Individuals: "+ indi1); + if(indi1.toString().equals(indi.toString())) + { + System.out.println(indi); + isChecked = true; + break; + } + }*/ return isChecked; } + /** + * This method resets the vectors where the check boxes for positive and negative Examples + * are stored. It is called when the DL-Learner View is closed. + */ public void clearVector() { positiv.removeAllElements(); negativ.removeAllElements(); - indis.removeAllElements(); } + /** + * This method returns the physical uri of the ontology which is currently loaded in protege. + * @return pysical uri of the loaded ontology + */ public String getUri() { char[] test = editor.getOWLModelManager().getOntologyPhysicalURI(editor.getOWLModelManager().getActiveOntology()).toString().toCharArray(); @@ -331,27 +532,49 @@ return uri; } + /** + * This method gets an array of concepts from the DL-Learner and stores it + * in the description array. + * @param list Array of concepts from DL-Learner + */ public void setDescriptionList(Description[] list) { description=list; } - + /** + * This method returns the current learning algorithm that is used to learn new concepts. + * @return Learning algorithm that is used for learning concepts. + */ public LearningAlgorithm getLearningAlgorithm() { return la; } + /** + * This method gets an integer to return the positive examples check box on that position. + * @param i integer for the position in the vector + * @return Positive examples check box on position i. + */ public JCheckBox getPositivJCheckBox(int i) { return positiv.get(i); } + /** + * This method gets an integer to return the negative examples check box on that position. + * @param i integer for the position in the vector + * @return Negative examples check box on position i. + */ public JCheckBox getNegativJCheckBox(int i) { return negativ.get(i); } + /** + * This method resets the array of concepts from the DL_Learner. + * It is called after the DL-Learner tab is closed. + */ public void resetSuggestionList() { for(int i=0;i<description.length;i++) @@ -360,6 +583,10 @@ } } + /** + * This method unchecks the checkboxes that are checked after the process + * of learning. + */ public void unsetJCheckBoxen() { for(int j=0;j<positiv.size();j++) @@ -370,9 +597,6 @@ i.setSelected(false); positiv.set(j, i); } - } - for(int j=0;j<negativ.size();j++) - { if(negativ.get(j).isSelected()) { JCheckBox i = negativ.get(j); @@ -382,90 +606,118 @@ } } + /** + * This method resets the model for the suggest panel. + * It is called befor the DL-Learner learns the second time or when the + * DL-Learner tab is closed. + */ + public void unsetListModel() + { + if(suggestModel!=null) + { + suggestModel.removeAllElements(); + } + } + + /** + * This method gets a description from the DL-Learner and adds is to the model from the suggest panel. + * @param desc Description from the DL-Learner + */ + public void setSuggestModel(Description desc) + { + suggestModel.add(0, desc); + } + + /** + * This method returns the current OWLOntology that is loaded in protege. + * @return current ontology + */ public OWLOntology getOWLOntology() { return ontology; } + /** + * This method returns a set of concepts that are learned by the DL-Learner. + * They are already converted into the OWLDescription format. + * @return Set of learned concepts in OWLDescription format + */ public Set<OWLDescription> getNewOWLDescription() { return OWLDescription; } + /** + * This method returns the old concept which is chosen in protege in OWLDescription format. + * @return Old Concept in OWLDescription format. + */ public OWLDescription getOldConceptOWLAPI() { return oldConceptOWLAPI; } - public Set<OWLDescription> getNewOWLDescriptions() + /** + * This method returns the currently learned description in OWLDescription format. + * @return currently used description in OWLDescription format + */ + public OWLDescription getSolution() { - return null; - } - - public OWLDescription getSollution() - { return desc; } + /** + * Thsi method gets a description learned by the DL-Learner an converts it + * to the OWLDescription format. + * @param desc Description learned by the DL-Learner + */ public void setNewConceptOWLAPI(Description desc) { - for(int i = 0;i<description.length;i++) - { - - if(desc.toString().equals(description[i].toString())) - { - newConceptOWLAPI = OWLAPIDescriptionConvertVisitor.getOWLDescription(desc); - ds.add(newConceptOWLAPI); - OWLDescription.add(newConceptOWLAPI); - } - this.desc = newConceptOWLAPI; - - System.out.println("hallo:"+OWLDescription); - } + newConceptOWLAPI = OWLAPIDescriptionConvertVisitor.getOWLDescription(desc); + ds.add(newConceptOWLAPI); + OWLDescription.add(newConceptOWLAPI); + this.desc = newConceptOWLAPI; } + /** + * This method gets the old concept from checking the positive examples. + */ public void setOldConceptOWLAPI() { SortedSet<Individual> indi=rs.getIndividuals(); - while(positiveExamples.iterator().hasNext()) + for(Iterator<Individual> i = indi.iterator(); i.hasNext();) { - String indi1=positiveExamples.iterator().next(); - - for(int i = 0; i<indi.size();i++) + Individual indi2 = i.next(); + if(positiveExamples.toString().contains(indi2.toString())) { - Individual indi2 = indi.iterator().next(); - if(indi2.toString().equals(indi1.toString())) + Set<NamedClass> concept=reasoner.getConcepts(indi2); + for(Iterator<NamedClass> k = concept.iterator();k.hasNext();) { - Set<NamedClass> concept=reasoner.getConcepts(indi2); - while(concept.iterator().hasNext()) - { - OWLDescription oldConceptOWLAPI = OWLAPIDescriptionConvertVisitor.getOWLDescription(concept.iterator().next()); - concept.remove(concept.iterator().next()); + OWLDescription oldConceptOWLAPI = OWLAPIDescriptionConvertVisitor.getOWLDescription(k.next()); ds.add(oldConceptOWLAPI); - } + } - } - indi.remove(indi2); } - indi=rs.getIndividuals(); - positiveExamples.remove(indi1); } } + /** + * This method stores the new concept learned by the DL-Learner in the Ontology. + * @param desc Description learne by the DL-Learner + */ public void changeDLLearnerDescriptionsToOWLDescriptions(Description desc) { setNewConceptOWLAPI(desc); setOldConceptOWLAPI(); - //OWLOntologyManager manager = OWLManager.createOWLOntologyManager(); + OWLOntologyManager manager = OWLManager.createOWLOntologyManager(); - //OWLDataFactory factory = manager.getOWLDataFactory(); - //System.out.println("Manager: "+manager); - //OWLAxiom axiomOWLAPI = factory.getOWLEquivalentClassesAxiom(ds); - //OWLOntologyFormat format = new OWLOntologyFormat(); - //format = manager.getOntologyFormat(ontology); - //OWLOntology ontology = editor.getOWLModelManager().getActiveOntology(); - //System.out.println("Format: "+format); - //AddAxiom axiom = new AddAxiom(ontology, axiomOWLAPI); + OWLDataFactory factory = manager.getOWLDataFactory(); + System.out.println("Manager: "+manager); + OWLAxiom axiomOWLAPI = factory.getOWLEquivalentClassesAxiom(ds); + OWLOntologyFormat format = new OWLOntologyFormat(); + format = manager.getOntologyFormat(ontology); + OWLOntology ontology = editor.getOWLModelManager().getActiveOntology(); + System.out.println("Format: "+format); + AddAxiom axiom = new AddAxiom(ontology, axiomOWLAPI); /*try { manager.applyChange(axiom); } catch (OWLOntologyChangeException e) { @@ -474,20 +726,31 @@ } try { - manager.saveOntology(ontology,format,editor.getOWLModelManager().getActiveOntology().getURI()); + manager.saveOntology(ontology,new RDFXMLOntologyFormat(),editor.getOWLModelManager().getActiveOntology().getURI()); } catch (UnknownOWLOntologyException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (OWLOntologyStorageException e) { // TODO Auto-generated catch block e.printStackTrace(); - } */ + }*/ } + /** + * This method returns the currently used reasoning service. + * @return current reasoning service + */ public ReasoningService getReasoningService() { return rs; } - - + + /** + * + * @return + */ + public boolean getAlreadyLearned() + { + return alreadyLearned; + } } \ No newline at end of file Modified: trunk/src/dl-learner/org/dllearner/tools/protege/OWLClassDescriptionEditorWithDLLearnerTab.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/protege/OWLClassDescriptionEditorWithDLLearnerTab.java 2008-06-06 15:08:05 UTC (rev 947) +++ trunk/src/dl-learner/org/dllearner/tools/protege/OWLClassDescriptionEditorWithDLLearnerTab.java 2008-06-10 11:14:52 UTC (rev 948) @@ -1,12 +1,13 @@ package org.dllearner.tools.protege; -import org.dllearner.core.owl.Description; + import org.protege.editor.core.ui.util.ComponentFactory; import org.protege.editor.owl.OWLEditorKit; import org.protege.editor.owl.ui.clsdescriptioneditor.ExpressionEditor; import org.protege.editor.owl.ui.clsdescriptioneditor.OWLDescriptionChecker; import org.protege.editor.owl.ui.selector.OWLClassSelectorPanel; import org.protege.editor.owl.ui.selector.OWLObjectPropertySelectorPanel; + import org.semanticweb.owl.model.OWLClass; import org.semanticweb.owl.model.OWLDataFactory; import org.semanticweb.owl.model.OWLDescription; @@ -252,41 +253,133 @@ public void removeStatusChangedListener(InputVerificationStatusChangedListener listener) { listeners.remove(listener); } - + /** + * + * @author Heero Yuy + * + */ public class DLLearnerView extends JPanel{ - private JLabel pos; - private final static long serialVersionUID = 624829578325729385L; - private DLLearnerViewPanel panel; - private JComponent learner; - private JButton accept; - private JButton run; - private OWLEditorKit editor; - private JPanel option; - private JList suggest; - private JLabel neg; - private JDialog hilfe; - private JLabel help; - private JLabel adv; - private JScrollPane scrollPane; - private final Color Color_RED = Color.red; - private final Color COLOR_BLACK = Color.black; - private JButton cancel; - private JPanel posLabelPanel; - private JPanel negLabelPanel; - private JButton helpForPosExamples; - private JButton helpForNegExamples; - private JLabel errorMessage; + /** + * + */ + private JLabel pos; + /** + * + */ + private final static long serialVersionUID = 624829578325729385L; + /** + * + */ + private DLLearnerViewPanel panel; + /** + * + */ + private JComponent learner; + /** + * + */ + private JButton accept; + /** + * + */ + private JButton run; + /** + * + */ + private OWLEditorKit editor; + /** + * + */ + private JPanel option; + /** + * + */ + private JList suggest; + /** + * + */ + private JLabel neg; + /** + * + */ + private JDialog hilfe; + /** + * + */ + private JTextArea help; + /** + * + */ + private JLabel adv; + /** + * + */ + private JScrollPane scrollPane; + /** + * + */ + private final Color Color_RED = Color.red; + /** + * + */ + private final Color COLOR_BLACK = Color.black; + /** + * + */ + private JButton cancel; + /** + * + */ + private JPanel posLabelPanel; + /** + * + */ + private JPanel negLabelPanel; + /** + * + */ + private JButton helpForPosExamples; + /** + * + */ + private JButton helpForNegExamples; + /** + * + */ + private JLabel errorMessage; + /** + * + */ private JToggleButton advanced; + /** + * + */ private JScrollPane suggestScroll; + /** + * + */ private ActionHandler action; + /** + * + */ private DLLearnerModel model; - private Description[] descriptions = new Description[10]; - + /** + * + */ + private DefaultListModel descriptions; + /** + * + * @return + */ public DLLearnerViewPanel getDLLearnerViewPanel() { return panel; } - + /** + * The constructor for the DL-Learner tab in the class description editor + * @param aktuell + * @param label + */ public DLLearnerView(OWLFrame<OWLClass> aktuell,String label){ editor = editorKit; model = new DLLearnerModel(editorKit,aktuell, label,this); @@ -332,24 +425,26 @@ addAdvancedButtonListener(this.action); } - + /** + * + */ public void makeView() { model.clearVector(); + model.unsetListModel(); model.initReasoner(); model.setPosVector(); - model.setNegVector(); setJCheckBoxen(); - suggest = new JList(); + suggest = new JList(model.getSuggestList()); cancel.setEnabled(false); accept.setEnabled(false); action.resetToggled(); advanced.setSelected(false); suggest.setBounds(10,40,490,110); - suggest.setVisible(true); adv.setBounds(40,200,200,20); run.setBounds(10,0,200,30); advanced.setBounds(10,200,20,20); + suggest.setVisible(true); scrollPane.setViewportView(option); scrollPane.setBounds(10, 230, 490, 250); suggestScroll.setViewportView(suggest); @@ -367,55 +462,92 @@ learner.add(scrollPane); scrollPane.setVisible(false); add(learner); + suggest.addMouseListener(action); addListener(); } - + /** + * + * @return + */ public JComponent getLearnerPanel() { return learner; } - + /** + * + * @param visible + */ public void setExamplePanelVisible(boolean visible) { scrollPane.setVisible(visible); } - + /** + * + * @return + */ public JPanel getOptionPanel() { return option; } - + /** + * + * @return + */ + public JButton getAddButton() + { + return accept; + } + /** + * + * @param helfen + */ public void renderHelpMessage(String helfen) { - help = new JLabel(); + JScrollPane scrollHelp = new JScrollPane(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); + + help = new JTextArea(); hilfe = new JDialog(); + help.setEditable(false); hilfe.setName("Hilfe"); - hilfe.setSize(500,50); + hilfe.setSize(300,100); hilfe.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); hilfe.setVisible(true); hilfe.setResizable(false); help.setForeground(COLOR_BLACK); help.setText("Help: "+helfen); - hilfe.add(help); + scrollHelp.setViewportView(help); + scrollHelp.setBounds(0, 0, 300, 100); + hilfe.add(scrollHelp); } - + /** + * + * @return + */ public URI getUri() { URI uri = editor.getOWLModelManager().getOntologyPhysicalURI(editor.getOWLModelManager().getActiveOntology()); return uri; } - + /** + * + * @return + */ public Set<OWLDescription> getSollutions() { return model.getNewOWLDescription(); } - + /** + * + * @return + */ public OWLDescription getSollution() { - System.out.println(model.getSollution()); - return model.getSollution(); + System.out.println(model.getSolution()); + return model.getSolution(); } - + /** + * + */ private void setJCheckBoxen() { option.add(posLabelPanel); @@ -427,107 +559,147 @@ } } - + /** + * + */ public void unsetEverything() { option.removeAll(); run.setEnabled(true); model.unsetNewConcepts(); + //model.unsetListModel(); action.destroyDLLearnerThread(); suggest.removeAll(); errorMessage.setText(""); learner.removeAll(); } - + /** + * + * @param s + */ public void renderErrorMessage(String s) { errorMessage.setForeground(Color_RED); errorMessage.setText(s); } - + /** + * + */ private void addListener() { for(int i=0;i<model.getPosVector().size();i++) { model.getPositivJCheckBox(i).addItemListener(action); + model.getNegativJCheckBox(i).addItemListener(action); } - - for(int i=0;i<model.getNegVector().size();i++) - { - model.getNegativJCheckBox(i).addItemListener(action); - } + } - + /** + * + * @param m + * @param c + */ public void update(Observable m,Object c) { if( model != m) return; //draw(); } - - protected void draw(Description[] desc) { - if (model != null) { - run.setEnabled(true); - cancel.setEnabled(false); - accept.setEnabled(true); - learner.remove(suggestScroll); - suggestScroll.remove(suggest); - descriptions = desc; - suggest=new JList(descriptions); - suggest.setBounds(10,40,490,110); - suggest.setVisible(true); - suggestScroll.setViewportView(suggest); - suggestScroll.setBounds(10,40,490,110); - learner.add(suggestScroll); - //suggest.repaint(); - suggest.addMouseListener(action); - suggestScroll.repaint(); - model.unsetJCheckBoxen(); - option.removeAll(); - setJCheckBoxen(); - - } + /** + * + */ + protected void draw() + { + run.setEnabled(true); + cancel.setEnabled(false); + descriptions = model.getSuggestList(); + suggest=new JList(model.getSuggestList()); + suggest.setBounds(10,40,490,110); + suggest.setVisible(true); + suggestScroll.setViewportView(suggest); + suggestScroll.setBounds(10,40,490,110); + learner.add(suggestScroll); + suggest.repaint(); + suggest.addMouseListener(action); + suggestScroll.repaint(); + model.unsetJCheckBoxen(); + option.removeAll(); + setJCheckBoxen(); } - + /** + * + * @return + */ public JList getSuggestionList() { return suggest; } - + /** + * + * @return + */ public JButton getRunButton() { return run; } - + /** + * + * @return + */ public JButton getCancelButton() { return cancel; } - + /** + * + */ public void dispose() { } - + /** + * + * @param a + */ + public void addSuggestListToChangeListener(ActionListener a) + { + + } + /** + * + * @param a + */ public void addRunButtonListener(ActionListener a) { run.addActionListener(a); } - + /** + * + * @param a + */ public void addCancelButtonListener(ActionListener a) { cancel.addActionListener(a); } - + /** + * + * @param a + */ public void addAcceptButtonListener(ActionListener a) { accept.addActionListener(a); } - + /** + * + * @param a + */ public void addHelpButtonListener(ActionListener a) { helpForPosExamples.addActionListener(a); helpForNegExamples.addActionListener(a); } - + /** + * + * @param a + */ public void addAdvancedButtonListener(ActionListener a) { advanced.addActionListener(a); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: Anita J. <jan...@go...> - 2008-06-09 09:09:06
|
From: <jen...@us...> - 2008-06-06 15:08:43
|
Revision: 947 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=947&view=rev Author: jenslehmann Date: 2008-06-06 08:08:05 -0700 (Fri, 06 Jun 2008) Log Message: ----------- YinYang benchmark cross validation results Modified Paths: -------------- trunk/examples/yinyang_files/forteLearningProblemYinYang.xml trunk/examples/yinyang_files/fortePositivesYinYang.txt Added Paths: ----------- trunk/examples/yinyang_files/forteLearningProblemCV.xml trunk/examples/yinyang_files/forte_run.txt trunk/examples/yinyang_files/moralComplexLearningProblemCV.xml trunk/examples/yinyang_files/moralSimpleLearningProblemCV.xml trunk/examples/yinyang_files/moral_complex_run.txt trunk/examples/yinyang_files/moral_simple_run.txt trunk/examples/yinyang_files/pair_run.txt trunk/examples/yinyang_files/run_unstable trunk/examples/yinyang_files/straightLearningProblemCV.xml trunk/examples/yinyang_files/trainsLearningProblemCV.xml trunk/examples/yinyang_files/trains_run.txt Added: trunk/examples/yinyang_files/forteLearningProblemCV.xml =================================================================== --- trunk/examples/yinyang_files/forteLearningProblemCV.xml (rev 0) +++ trunk/examples/yinyang_files/forteLearningProblemCV.xml 2008-06-06 15:08:05 UTC (rev 947) @@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<LearningProblem + + xmlns="http://www.di.uniba.it/learning" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.di.uniba.it/learning/ ../LearningProblem.xsd" + + knowledgeBase="file:../forte/forte_family.owl" + positiveExampleSource="fortePositivesYinYang.txt" + negativeExampleSource="forteNegativesYinYang.txt" + abstractionClass="it.uniba.di.dl.abstraction.KBoundMSCApproximatorRefinement" + learn="true" + normalize="true" + consistencyCheck="true" + reasonerURL ="http://localhost:8081" > + <Experiments> + <kFoldCrossValidation folds="5" + reasonerURL="http://localhost:8081" + positiveExampleSource="fortePositivesYinYang.txt" + negativeExampleSource="forteNegativesYinYang.txt" + abstractionClass="it.uniba.di.dl.abstraction.KBoundMSCApproximatorRefinement" + learn="true" + normalize="true" + consistencyCheck="true" /> + </Experiments> + <Namespaces> + <Namespace uri="http://localhost/foo#"></Namespace> + </Namespaces> + +</LearningProblem> Modified: trunk/examples/yinyang_files/forteLearningProblemYinYang.xml =================================================================== --- trunk/examples/yinyang_files/forteLearningProblemYinYang.xml 2008-06-06 10:35:34 UTC (rev 946) +++ trunk/examples/yinyang_files/forteLearningProblemYinYang.xml 2008-06-06 15:08:05 UTC (rev 947) @@ -6,7 +6,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.di.uniba.it/learning/ ../LearningProblem.xsd" - knowledgeBase="file:../forte/forte.owl" + knowledgeBase="file:../forte/forte_family.owl" positiveExampleSource="fortePositivesYinYang.txt" negativeExampleSource="forteNegativesYinYang.txt" abstractionClass="it.uniba.di.dl.abstraction.KBoundMSCApproximatorRefinement" Modified: trunk/examples/yinyang_files/fortePositivesYinYang.txt =================================================================== --- trunk/examples/yinyang_files/fortePositivesYinYang.txt 2008-06-06 10:35:34 UTC (rev 946) +++ trunk/examples/yinyang_files/fortePositivesYinYang.txt 2008-06-06 15:08:05 UTC (rev 947) @@ -17,8 +17,8 @@ http://localhost/foo#melvin http://localhost/foo#neil http://localhost/foo#nero -http://localhost/foo#owen -http://localhost/foo#paul +// http://localhost/foo#owen +// http://localhost/foo#paul http://localhost/foo#peter http://localhost/foo#umo // http://localhost/foo#walt \ No newline at end of file Added: trunk/examples/yinyang_files/forte_run.txt =================================================================== --- trunk/examples/yinyang_files/forte_run.txt (rev 0) +++ trunk/examples/yinyang_files/forte_run.txt 2008-06-06 15:08:05 UTC (rev 947) @@ -0,0 +1,1130 @@ +Start create default model: file:../forte/forte_family.owl +End create default model: file:../forte/forte_family.owl +Start create ont model: file:../forte/forte_family.owl +End create ont model: file:../forte/forte_family.owl +Problems with Individual URI: // auskommentierte Beispiele würden zum Crash von YinYang führen it will be skipped +Problems with Individual URI: // http://localhost/foo#george it will be skipped +Problems with Individual URI: // http://localhost/foo#owen it will be skipped +Problems with Individual URI: // http://localhost/foo#paul it will be skipped +Problems with Individual URI: // http://localhost/foo#walt it will be skipped +Problems with Individual URI: // auskommentierte Beispiele würden zum Crash von YinYang führen it will be skipped +Problems with Individual URI: // http://localhost/foo#bob it will be skipped +[Fri Jun 06 15:53:59 CEST 2008]: Abstraction builder used: class it.uniba.di.dl.abstraction.KBoundMSCApproximatorRefinement with k = 1 +[Fri Jun 06 15:53:59 CEST 2008]: Starting msc calculation at: Fri Jun 06 15:53:59 CEST 2008 +[Fri Jun 06 15:53:59 CEST 2008]: Calculating msc no.1 +[Fri Jun 06 15:53:59 CEST 2008]: Calculating msc no.2 +[Fri Jun 06 15:53:59 CEST 2008]: Calculating msc no.3 +[Fri Jun 06 15:53:59 CEST 2008]: Calculating msc no.4 +[Fri Jun 06 15:53:59 CEST 2008]: Calculating msc no.5 +[Fri Jun 06 15:53:59 CEST 2008]: Calculating msc no.6 +[Fri Jun 06 15:54:00 CEST 2008]: Calculating msc no.7 +[Fri Jun 06 15:54:00 CEST 2008]: Calculating msc no.8 +[Fri Jun 06 15:54:00 CEST 2008]: Calculating msc no.9 +[Fri Jun 06 15:54:00 CEST 2008]: Calculating msc no.10 +[Fri Jun 06 15:54:00 CEST 2008]: Calculating msc no.11 +[Fri Jun 06 15:54:00 CEST 2008]: Calculating msc no.12 +[Fri Jun 06 15:54:00 CEST 2008]: Calculating msc no.13 +[Fri Jun 06 15:54:00 CEST 2008]: Calculating msc no.14 +[Fri Jun 06 15:54:00 CEST 2008]: Calculating msc no.15 +[Fri Jun 06 15:54:00 CEST 2008]: Calculating msc no.16 +[Fri Jun 06 15:54:00 CEST 2008]: Calculating msc no.17 +[Fri Jun 06 15:54:00 CEST 2008]: Calculating msc no.18 +[Fri Jun 06 15:54:00 CEST 2008]: Calculating msc no.19 +[Fri Jun 06 15:54:00 CEST 2008]: Finished positives at: Fri Jun 06 15:54:00 CEST 2008 after 1019 millisecs +[Fri Jun 06 15:54:00 CEST 2008]: Calculating msc no.1 +[Fri Jun 06 15:54:00 CEST 2008]: Calculating msc no.2 +[Fri Jun 06 15:54:00 CEST 2008]: ************************* +[Fri Jun 06 15:54:00 CEST 2008]: Reformulating the problem +[Fri Jun 06 15:54:00 CEST 2008]: Abstraction builder used: class it.uniba.di.dl.abstraction.KBoundMSCApproximatorRefinement with k = 2 +[Fri Jun 06 15:54:00 CEST 2008]: Starting msc calculation at: Fri Jun 06 15:54:00 CEST 2008 +[Fri Jun 06 15:54:00 CEST 2008]: Calculating msc no.1 +[Fri Jun 06 15:54:00 CEST 2008]: Calculating msc no.2 +[Fri Jun 06 15:54:01 CEST 2008]: Calculating msc no.3 +[Fri Jun 06 15:54:01 CEST 2008]: Calculating msc no.4 +[Fri Jun 06 15:54:01 CEST 2008]: Calculating msc no.5 +[Fri Jun 06 15:54:01 CEST 2008]: Calculating msc no.6 +[Fri Jun 06 15:54:01 CEST 2008]: Calculating msc no.7 +[Fri Jun 06 15:54:01 CEST 2008]: Calculating msc no.8 +[Fri Jun 06 15:54:01 CEST 2008]: Calculating msc no.9 +[Fri Jun 06 15:54:02 CEST 2008]: Calculating msc no.10 +[Fri Jun 06 15:54:02 CEST 2008]: Calculating msc no.11 +[Fri Jun 06 15:54:02 CEST 2008]: Calculating msc no.12 +[Fri Jun 06 15:54:02 CEST 2008]: Calculating msc no.13 +[Fri Jun 06 15:54:02 CEST 2008]: Calculating msc no.14 +[Fri Jun 06 15:54:02 CEST 2008]: Calculating msc no.15 +[Fri Jun 06 15:54:02 CEST 2008]: Calculating msc no.16 +[Fri Jun 06 15:54:02 CEST 2008]: Calculating msc no.17 +[Fri Jun 06 15:54:02 CEST 2008]: Calculating msc no.18 +[Fri Jun 06 15:54:02 CEST 2008]: Calculating msc no.19 +[Fri Jun 06 15:54:02 CEST 2008]: Finished positives at: Fri Jun 06 15:54:02 CEST 2008 after 2126 millisecs +[Fri Jun 06 15:54:02 CEST 2008]: Calculating msc no.1 +[Fri Jun 06 15:54:03 CEST 2008]: Calculating msc no.2 +[Fri Jun 06 15:54:03 CEST 2008]: Calculating msc no.3 +[Fri Jun 06 15:54:03 CEST 2008]: Calculating msc no.4 +[Fri Jun 06 15:54:03 CEST 2008]: Calculating msc no.5 +[Fri Jun 06 15:54:03 CEST 2008]: Calculating msc no.6 +[Fri Jun 06 15:54:03 CEST 2008]: Calculating msc no.7 +[Fri Jun 06 15:54:03 CEST 2008]: Calculating msc no.8 +[Fri Jun 06 15:54:03 CEST 2008]: Calculating msc no.9 +[Fri Jun 06 15:54:03 CEST 2008]: Calculating msc no.10 +[Fri Jun 06 15:54:03 CEST 2008]: Calculating msc no.11 +[Fri Jun 06 15:54:03 CEST 2008]: Calculating msc no.12 +[Fri Jun 06 15:54:03 CEST 2008]: Calculating msc no.13 +[Fri Jun 06 15:54:04 CEST 2008]: Calculating msc no.14 +[Fri Jun 06 15:54:04 CEST 2008]: Calculating msc no.15 +[Fri Jun 06 15:54:04 CEST 2008]: Calculating msc no.16 +[Fri Jun 06 15:54:04 CEST 2008]: Calculating msc no.17 +[Fri Jun 06 15:54:04 CEST 2008]: Calculating msc no.18 +[Fri Jun 06 15:54:04 CEST 2008]: Calculating msc no.19 +[Fri Jun 06 15:54:04 CEST 2008]: Calculating msc no.20 +[Fri Jun 06 15:54:04 CEST 2008]: Calculating msc no.21 +[Fri Jun 06 15:54:04 CEST 2008]: Calculating msc no.22 +[Fri Jun 06 15:54:04 CEST 2008]: Calculating msc no.23 +[Fri Jun 06 15:54:04 CEST 2008]: Calculating msc no.24 +[Fri Jun 06 15:54:04 CEST 2008]: Calculating msc no.25 +[Fri Jun 06 15:54:04 CEST 2008]: Calculating msc no.26 +[Fri Jun 06 15:54:04 CEST 2008]: Calculating msc no.27 +[Fri Jun 06 15:54:04 CEST 2008]: Calculating msc no.28 +[Fri Jun 06 15:54:04 CEST 2008]: Calculating msc no.29 +[Fri Jun 06 15:54:04 CEST 2008]: Calculating msc no.30 +[Fri Jun 06 15:54:05 CEST 2008]: Calculating msc no.31 +[Fri Jun 06 15:54:05 CEST 2008]: Calculating msc no.32 +[Fri Jun 06 15:54:05 CEST 2008]: Calculating msc no.33 +[Fri Jun 06 15:54:05 CEST 2008]: Calculating msc no.34 +[Fri Jun 06 15:54:05 CEST 2008]: Calculating msc no.35 +[Fri Jun 06 15:54:05 CEST 2008]: Calculating msc no.36 +[Fri Jun 06 15:54:05 CEST 2008]: Calculating msc no.37 +[Fri Jun 06 15:54:05 CEST 2008]: Calculating msc no.38 +[Fri Jun 06 15:54:05 CEST 2008]: Calculating msc no.39 +[Fri Jun 06 15:54:05 CEST 2008]: Calculating msc no.40 +[Fri Jun 06 15:54:05 CEST 2008]: Calculating msc no.41 +[Fri Jun 06 15:54:05 CEST 2008]: Calculating msc no.42 +[Fri Jun 06 15:54:05 CEST 2008]: Calculating msc no.43 +[Fri Jun 06 15:54:05 CEST 2008]: Calculating msc no.44 +[Fri Jun 06 15:54:05 CEST 2008]: Calculating msc no.45 +[Fri Jun 06 15:54:05 CEST 2008]: Calculating msc no.46 +[Fri Jun 06 15:54:05 CEST 2008]: Calculating msc no.47 +[Fri Jun 06 15:54:05 CEST 2008]: Calculating msc no.48 +[Fri Jun 06 15:54:06 CEST 2008]: Calculating msc no.49 +[Fri Jun 06 15:54:06 CEST 2008]: Calculating msc no.50 +[Fri Jun 06 15:54:06 CEST 2008]: Calculating msc no.51 +[Fri Jun 06 15:54:06 CEST 2008]: Calculating msc no.52 +[Fri Jun 06 15:54:06 CEST 2008]: Calculating msc no.53 +[Fri Jun 06 15:54:06 CEST 2008]: Calculating msc no.54 +[Fri Jun 06 15:54:06 CEST 2008]: Calculating msc no.55 +[Fri Jun 06 15:54:06 CEST 2008]: Calculating msc no.56 +[Fri Jun 06 15:54:06 CEST 2008]: Calculating msc no.57 +[Fri Jun 06 15:54:06 CEST 2008]: Calculating msc no.58 +[Fri Jun 06 15:54:06 CEST 2008]: Calculating msc no.59 +[Fri Jun 06 15:54:06 CEST 2008]: Calculating msc no.60 +[Fri Jun 06 15:54:06 CEST 2008]: Calculating msc no.61 +[Fri Jun 06 15:54:06 CEST 2008]: Calculating msc no.62 +[Fri Jun 06 15:54:06 CEST 2008]: Checking intersection between postives and negatives +[Fri Jun 06 15:54:06 CEST 2008]: Finished msc calculation at: Fri Jun 06 15:54:06 CEST 2008 after 6208 millisecs +[Fri Jun 06 15:54:06 CEST 2008]: Learning Problem +[Fri Jun 06 15:54:06 CEST 2008]: positive size: 19 +[Fri Jun 06 15:54:06 CEST 2008]: negative size: 43 +[Fri Jun 06 15:54:06 CEST 2008]: Start generalization at: Fri Jun 06 15:54:06 CEST 2008 +[Fri Jun 06 15:54:06 CEST 2008]: Before delta covered positives size: 6 +[Fri Jun 06 15:54:07 CEST 2008]: Starting inner deltas +[Fri Jun 06 15:54:07 CEST 2008]: Trying generalizing with: it.uniba.di.dl.yinyang.refinement.DropConjunctDelta +[Fri Jun 06 15:54:07 CEST 2008]: Ranking Conjuncts.... +[Fri Jun 06 15:54:07 CEST 2008]: Absent conjunct need to rank it +[Fri Jun 06 15:54:07 CEST 2008]: Absent conjunct need to rank it +[Fri Jun 06 15:54:07 CEST 2008]: Projecting... +[Fri Jun 06 15:54:07 CEST 2008]: ... Pojection finished +[Fri Jun 06 15:54:07 CEST 2008]: ...Finished Ranking Conjuncts +[Fri Jun 06 15:54:07 CEST 2008]: Covering: 12 negatives +[Fri Jun 06 15:54:07 CEST 2008]: Covering: 19 positives +[Fri Jun 06 15:54:07 CEST 2008]: Found a possible refinement +[Fri Jun 06 15:54:07 CEST 2008]: Previous heuristic value = 0.0 now it is = 0.6129032258064516 +[Fri Jun 06 15:54:07 CEST 2008]: Covering: 6 negatives +[Fri Jun 06 15:54:07 CEST 2008]: Covering: 6 positives +[Fri Jun 06 15:54:07 CEST 2008]: Generalization obtained: male +[Fri Jun 06 15:54:07 CEST 2008]: It covers 12 negatives +[Fri Jun 06 15:54:07 CEST 2008]: It covers 19 positives +[Fri Jun 06 15:54:07 CEST 2008]: Generalization: male +[Fri Jun 06 15:54:07 CEST 2008]: *******Specialization called ******** + [Fri Jun 06 15:54:07 CEST 2008]: Evaluating the possible counterfactual... + [Fri Jun 06 15:54:08 CEST 2008]: No worth trying counterfactuals + [Fri Jun 06 15:54:08 CEST 2008]: Positive size decreased after counterfactuals of 19 units out of 19 + [Fri Jun 06 15:54:41 CEST 2008]: Non solvable problem + [Fri Jun 06 15:54:41 CEST 2008]: Failed in learning lcs substituted + [Fri Jun 06 15:54:42 CEST 2008]: Non solvable problem + [Fri Jun 06 15:54:42 CEST 2008]: Failed in learning lcs substituted + [Fri Jun 06 15:54:43 CEST 2008]: Non solvable problem + [Fri Jun 06 15:54:43 CEST 2008]: Failed in learning lcs substituted + [Fri Jun 06 15:54:45 CEST 2008]: Non solvable problem + [Fri Jun 06 15:54:45 CEST 2008]: Failed in learning lcs substituted + [Fri Jun 06 15:54:46 CEST 2008]: Non solvable problem + [Fri Jun 06 15:54:46 CEST 2008]: Failed in learning lcs substituted + [Fri Jun 06 15:54:48 CEST 2008]: Non solvable problem + [Fri Jun 06 15:54:48 CEST 2008]: Failed in learning lcs substituted + [Fri Jun 06 15:54:50 CEST 2008]: Non solvable problem + [Fri Jun 06 15:54:50 CEST 2008]: Failed in learning lcs substituted + [Fri Jun 06 15:54:52 CEST 2008]: Non solvable problem + [Fri Jun 06 15:54:52 CEST 2008]: Failed in learning lcs substituted + [Fri Jun 06 15:54:54 CEST 2008]: Non solvable problem + [Fri Jun 06 15:54:54 CEST 2008]: Failed in learning lcs substituted +[Fri Jun 06 15:54:54 CEST 2008]: *******Specialization ended ******** +[Fri Jun 06 15:54:54 CEST 2008]: Residual positives size: 0 +[Fri Jun 06 15:54:54 CEST 2008]: Finished at: Fri Jun 06 15:54:54 CEST 2008 after 47938 millisecs +Consistency check start +Consistency check end +Learnt concept: + +(or + (and + male + (some sibling + (and + female + (some sibling + *TOP* + ) + (some married + male + ) + (some parent + female + ) + (some parent + male + ) + ) + ) + (some parent + (and + (some sibling + male + ) + male + ) + ) + (some parent + (and + male + (some sibling + *TOP* + ) + (some parent + female + ) + (some parent + male + ) + ) + ) + ) + (and + male + (all sibling + (and + (some sibling + female + ) + female + ) + ) + (some sibling + (and + female + (some sibling + *TOP* + ) + (some married + male + ) + (some parent + female + ) + (some parent + male + ) + ) + ) + (some parent + (and + (some sibling + male + ) + male + ) + ) + ) + (and + male + (some sibling + (and + female + (some sibling + *TOP* + ) + (some married + male + ) + (some parent + female + ) + (some parent + male + ) + ) + ) + (some parent + (and + male + (some sibling + female + ) + (some parent + male + ) + ) + ) + (some parent + (and + (some sibling + *TOP* + ) + female + ) + ) + ) + (and + male + (some parent + (and + (some sibling + female + ) + female + ) + ) + ) + (and + (some sibling + (and + male + (some sibling + *TOP* + ) + (some parent + female + ) + (some parent + male + ) + ) + ) + male + ) + (and + male + (all sibling + (and + female + (some married + male + ) + (some sibling + female + ) + (some parent + female + ) + (some parent + male + ) + ) + ) + (some sibling + (and + female + (some sibling + *TOP* + ) + (some married + male + ) + (some parent + female + ) + ) + ) + ) +) + +Learnt concept size: 6 +Disjunct no.: 1 covers 2 examples +Empty Coverage for the following disjunct: + +(and + male + (all sibling + (and + (some sibling + female + ) + female + ) + ) + (some sibling + (and + female + (some sibling + *TOP* + ) + (some married + male + ) + (some parent + female + ) + (some parent + male + ) + ) + ) + (some parent + (and + (some sibling + male + ) + male + ) + ) +) + +Disjunct no.: 2 covers 0 examples +Disjunct no.: 3 covers 3 examples +Disjunct no.: 4 covers 7 examples +Disjunct no.: 5 covers 6 examples +Empty Coverage for the following disjunct: + +(and + male + (all sibling + (and + female + (some married + male + ) + (some sibling + female + ) + (some parent + female + ) + (some parent + male + ) + ) + ) + (some sibling + (and + female + (some sibling + *TOP* + ) + (some married + male + ) + (some parent + female + ) + ) + ) +) + +Disjunct no.: 6 covers 0 examples +Problems with Individual URI: // auskommentierte Beispiele würden zum Crash von YinYang führen it will be skipped +Problems with Individual URI: // http://localhost/foo#george it will be skipped +Problems with Individual URI: // http://localhost/foo#owen it will be skipped +Problems with Individual URI: // http://localhost/foo#paul it will be skipped +Problems with Individual URI: // http://localhost/foo#walt it will be skipped +Problems with Individual URI: // auskommentierte Beispiele würden zum Crash von YinYang führen it will be skipped +Problems with Individual URI: // http://localhost/foo#bob it will be skipped +[Fri Jun 06 15:55:36 CEST 2008]: Abstraction builder used: class it.uniba.di.dl.abstraction.KBoundMSCApproximatorRefinement with k = 2 +[Fri Jun 06 15:55:36 CEST 2008]: Starting msc calculation at: Fri Jun 06 15:55:36 CEST 2008 +[Fri Jun 06 15:55:36 CEST 2008]: Calculating msc no.1 +[Fri Jun 06 15:55:36 CEST 2008]: Calculating msc no.2 +[Fri Jun 06 15:55:36 CEST 2008]: Calculating msc no.3 +[Fri Jun 06 15:55:36 CEST 2008]: Calculating msc no.4 +[Fri Jun 06 15:55:36 CEST 2008]: Calculating msc no.5 +[Fri Jun 06 15:55:36 CEST 2008]: Calculating msc no.6 +[Fri Jun 06 15:55:36 CEST 2008]: Calculating msc no.7 +[Fri Jun 06 15:55:36 CEST 2008]: Calculating msc no.8 +[Fri Jun 06 15:55:36 CEST 2008]: Calculating msc no.9 +[Fri Jun 06 15:55:36 CEST 2008]: Calculating msc no.10 +[Fri Jun 06 15:55:36 CEST 2008]: Calculating msc no.11 +[Fri Jun 06 15:55:36 CEST 2008]: Calculating msc no.12 +[Fri Jun 06 15:55:36 CEST 2008]: Calculating msc no.13 +[Fri Jun 06 15:55:36 CEST 2008]: Calculating msc no.14 +[Fri Jun 06 15:55:36 CEST 2008]: Calculating msc no.15 +[Fri Jun 06 15:55:36 CEST 2008]: Finished positives at: Fri Jun 06 15:55:36 CEST 2008 after 1 millisecs +[Fri Jun 06 15:55:36 CEST 2008]: Calculating msc no.1 +[Fri Jun 06 15:55:36 CEST 2008]: Calculating msc no.2 +[Fri Jun 06 15:55:36 CEST 2008]: Calculating msc no.3 +[Fri Jun 06 15:55:36 CEST 2008]: Calculating msc no.4 +[Fri Jun 06 15:55:36 CEST 2008]: Calculating msc no.5 +[Fri Jun 06 15:55:36 CEST 2008]: Calculating msc no.6 +[Fri Jun 06 15:55:36 CEST 2008]: Calculating msc no.7 +[Fri Jun 06 15:55:36 CEST 2008]: Calculating msc no.8 +[Fri Jun 06 15:55:36 CEST 2008]: Calculating msc no.9 +[Fri Jun 06 15:55:36 CEST 2008]: Calculating msc no.10 +[Fri Jun 06 15:55:36 CEST 2008]: Calculating msc no.11 +[Fri Jun 06 15:55:36 CEST 2008]: Calculating msc no.12 +[Fri Jun 06 15:55:36 CEST 2008]: Calculating msc no.13 +[Fri Jun 06 15:55:36 CEST 2008]: Calculating msc no.14 +[Fri Jun 06 15:55:36 CEST 2008]: Calculating msc no.15 +[Fri Jun 06 15:55:36 CEST 2008]: Calculating msc no.16 +[Fri Jun 06 15:55:36 CEST 2008]: Calculating msc no.17 +[Fri Jun 06 15:55:36 CEST 2008]: Calculating msc no.18 +[Fri Jun 06 15:55:36 CEST 2008]: Calculating msc no.19 +[Fri Jun 06 15:55:36 CEST 2008]: Calculating msc no.20 +[Fri Jun 06 15:55:36 CEST 2008]: Calculating msc no.21 +[Fri Jun 06 15:55:36 CEST 2008]: Calculating msc no.22 +[Fri Jun 06 15:55:36 CEST 2008]: Calculating msc no.23 +[Fri Jun 06 15:55:36 CEST 2008]: Calculating msc no.24 +[Fri Jun 06 15:55:37 CEST 2008]: Calculating msc no.25 +[Fri Jun 06 15:55:37 CEST 2008]: Calculating msc no.26 +[Fri Jun 06 15:55:37 CEST 2008]: Calculating msc no.27 +[Fri Jun 06 15:55:37 CEST 2008]: Calculating msc no.28 +[Fri Jun 06 15:55:37 CEST 2008]: Calculating msc no.29 +[Fri Jun 06 15:55:37 CEST 2008]: Calculating msc no.30 +[Fri Jun 06 15:55:37 CEST 2008]: Calculating msc no.31 +[Fri Jun 06 15:55:37 CEST 2008]: Calculating msc no.32 +[Fri Jun 06 15:55:37 CEST 2008]: Calculating msc no.33 +[Fri Jun 06 15:55:37 CEST 2008]: Calculating msc no.34 +[Fri Jun 06 15:55:37 CEST 2008]: Calculating msc no.35 +[Fri Jun 06 15:55:37 CEST 2008]: Calculating msc no.36 +[Fri Jun 06 15:55:37 CEST 2008]: Calculating msc no.37 +[Fri Jun 06 15:55:37 CEST 2008]: Calculating msc no.38 +[Fri Jun 06 15:55:37 CEST 2008]: Calculating msc no.39 +[Fri Jun 06 15:55:37 CEST 2008]: Calculating msc no.40 +[Fri Jun 06 15:55:37 CEST 2008]: Calculating msc no.41 +[Fri Jun 06 15:55:37 CEST 2008]: Calculating msc no.42 +[Fri Jun 06 15:55:37 CEST 2008]: Calculating msc no.43 +[Fri Jun 06 15:55:37 CEST 2008]: Calculating msc no.44 +[Fri Jun 06 15:55:37 CEST 2008]: Calculating msc no.45 +[Fri Jun 06 15:55:37 CEST 2008]: Calculating msc no.46 +[Fri Jun 06 15:55:37 CEST 2008]: Calculating msc no.47 +[Fri Jun 06 15:55:37 CEST 2008]: Calculating msc no.48 +[Fri Jun 06 15:55:37 CEST 2008]: Calculating msc no.49 +[Fri Jun 06 15:55:37 CEST 2008]: Calculating msc no.50 +[Fri Jun 06 15:55:37 CEST 2008]: Checking intersection between postives and negatives +[Fri Jun 06 15:55:37 CEST 2008]: Finished msc calculation at: Fri Jun 06 15:55:37 CEST 2008 after 1205 millisecs +[Fri Jun 06 15:55:37 CEST 2008]: Learning Problem +[Fri Jun 06 15:55:37 CEST 2008]: positive size: 15 +[Fri Jun 06 15:55:37 CEST 2008]: negative size: 37 +[Fri Jun 06 15:55:37 CEST 2008]: Start generalization at: Fri Jun 06 15:55:37 CEST 2008 +[Fri Jun 06 15:55:37 CEST 2008]: Before delta covered positives size: 4 +[Fri Jun 06 15:55:37 CEST 2008]: Starting inner deltas +[Fri Jun 06 15:55:37 CEST 2008]: Trying generalizing with: it.uniba.di.dl.yinyang.refinement.ClimbTaxonomyDelta +[Fri Jun 06 15:55:37 CEST 2008]: Hypothesis: (and (some sibling (and male (some sibling *TOP* ) (some parent female ) (some parent male ) ) ) male ) +[Fri Jun 06 15:55:37 CEST 2008]: Refining w.r.t Positive: (and male (some sibling (and female (some married male ) (some sibling *TOP* ) (some sibling male ) (some parent female ) (some parent male ) ) ) (some sibling (and (some sibling *TOP* ) male ) ) (some parent (and (some sibling male ) female ) ) (some parent (and male (some sibling *TOP* ) (some sibling male ) ) ) (some parent (and (some sibling *TOP* ) male ) ) ) +[Fri Jun 06 15:55:38 CEST 2008]: Refining w.r.t Positive: (and male (some parent (and male (some sibling female ) (some parent male ) ) ) (some parent (and female (some sibling *TOP* ) (some sibling female ) ) ) (some parent (and female (some sibling *TOP* ) (some married male ) (some parent female ) (some parent male ) ) ) ) +[Fri Jun 06 15:55:38 CEST 2008]: Refining w.r.t Positive: (and male (some parent (and female (some sibling female ) (some sibling male ) ) ) (some parent (and male (some sibling *TOP* ) (some sibling female ) ) ) (some parent (and (some sibling *TOP* ) female ) ) ) +[Fri Jun 06 15:55:38 CEST 2008]: Refining w.r.t Positive: (and male (some parent (and male (some sibling female ) (some sibling male ) ) ) (some parent (and female (some married male ) (some sibling *TOP* ) (some sibling male ) (some parent female ) (some parent male ) ) ) (some parent (and male (some sibling *TOP* ) (some parent female ) (some parent male ) ) ) ) +[Fri Jun 06 15:55:38 CEST 2008]: Refining w.r.t Positive: (and male (some parent (and female (some sibling female ) (some sibling male ) ) ) (some parent (and female (some sibling *TOP* ) (some sibling male ) ) ) (some parent (and (some sibling *TOP* ) male ) ) ) +[Fri Jun 06 15:55:38 CEST 2008]: Refining w.r.t Positive: (and male (some parent (and (some sibling female ) female ) ) (some parent (and (some sibling *TOP* ) female ) ) ) +[Fri Jun 06 15:55:38 CEST 2008]: Refining w.r.t Positive: (and male (some parent (and female (some sibling female ) (some sibling male ) ) ) (some parent (and male (some parent male ) (some sibling *TOP* ) (some sibling female ) ) ) (some parent (and female (some sibling *TOP* ) (some married male ) (some parent female ) (some parent male ) ) ) ) +[Fri Jun 06 15:55:38 CEST 2008]: Generalization: (and male (some sibling (some parent *TOP* ) ) ) +[Fri Jun 06 15:55:38 CEST 2008]: Starting inner deltas +[Fri Jun 06 15:55:38 CEST 2008]: Trying generalizing with: it.uniba.di.dl.yinyang.refinement.ClimbTaxonomyDelta +[Fri Jun 06 15:55:38 CEST 2008]: Hypothesis: (and male (some sibling (some parent *TOP* ) ) ) +[Fri Jun 06 15:55:38 CEST 2008]: Refining w.r.t Positive: (and male (some parent (and male (some sibling female ) (some parent male ) ) ) (some parent (and female (some sibling *TOP* ) (some sibling female ) ) ) (some parent (and female (some sibling *TOP* ) (some married male ) (some parent female ) (some parent male ) ) ) ) +[Fri Jun 06 15:55:39 CEST 2008]: Refining w.r.t Positive: (and male (some parent (and female (some sibling female ) (some sibling male ) ) ) (some parent (and male (some sibling *TOP* ) (some sibling female ) ) ) (some parent (and (some sibling *TOP* ) female ) ) ) +[Fri Jun 06 15:55:39 CEST 2008]: Refining w.r.t Positive: (and male (some parent (and male (some sibling female ) (some sibling male ) ) ) (some parent (and female (some married male ) (some sibling *TOP* ) (some sibling male ) (some parent female ) (some parent male ) ) ) (some parent (and male (some sibling *TOP* ) (some parent female ) (some parent male ) ) ) ) +[Fri Jun 06 15:55:39 CEST 2008]: Refining w.r.t Positive: (and male (some parent (and female (some sibling female ) (some sibling male ) ) ) (some parent (and female (some sibling *TOP* ) (some sibling male ) ) ) (some parent (and (some sibling *TOP* ) male ) ) ) +[Fri Jun 06 15:55:39 CEST 2008]: Refining w.r.t Positive: (and male (some parent (and (some sibling female ) female ) ) (some parent (and (some sibling *TOP* ) female ) ) ) +[Fri Jun 06 15:55:39 CEST 2008]: Refining w.r.t Positive: (and male (some parent (and female (some sibling female ) (some sibling male ) ) ) (some parent (and male (some parent male ) (some sibling *TOP* ) (some sibling female ) ) ) (some parent (and female (some sibling *TOP* ) (some married male ) (some parent female ) (some parent male ) ) ) ) +[Fri Jun 06 15:55:39 CEST 2008]: Generalization: (and male (some sibling (some parent *TOP* ) ) ) +[Fri Jun 06 15:55:39 CEST 2008]: Starting inner deltas +[Fri Jun 06 15:55:39 CEST 2008]: Trying generalizing with: it.uniba.di.dl.yinyang.refinement.TopDownGreedyDelta +[Fri Jun 06 15:55:40 CEST 2008]: Found a possible refinement: 0.5 +[Fri Jun 06 15:55:40 CEST 2008]: Lenght: 1 +[Fri Jun 06 15:55:40 CEST 2008]: Found a possible refinement: 0.5555555555555556 +[Fri Jun 06 15:55:40 CEST 2008]: Lenght: 1 +[Fri Jun 06 15:55:40 CEST 2008]: Found a possible refinement: 1.0 +[Fri Jun 06 15:55:40 CEST 2008]: Lenght: 2 +[Fri Jun 06 15:55:40 CEST 2008]: Generalization: (and male (some sibling (some parent *TOP* ) ) ) +[Fri Jun 06 15:55:40 CEST 2008]: Starting inner deltas +[Fri Jun 06 15:55:40 CEST 2008]: Trying generalizing with: it.uniba.di.dl.yinyang.refinement.DropConjunctDelta +[Fri Jun 06 15:55:40 CEST 2008]: Ranking Conjuncts.... +[Fri Jun 06 15:55:40 CEST 2008]: Absent conjunct need to rank it +[Fri Jun 06 15:55:40 CEST 2008]: Absent conjunct need to rank it +[Fri Jun 06 15:55:41 CEST 2008]: Projecting... +[Fri Jun 06 15:55:41 CEST 2008]: ... Pojection finished +[Fri Jun 06 15:55:41 CEST 2008]: ...Finished Ranking Conjuncts +[Fri Jun 06 15:55:41 CEST 2008]: Covering: 12 negatives +[Fri Jun 06 15:55:41 CEST 2008]: Covering: 15 positives +[Fri Jun 06 15:55:41 CEST 2008]: Found a possible refinement +[Fri Jun 06 15:55:41 CEST 2008]: Previous heuristic value = 0.0 now it is = 0.5555555555555556 +[Fri Jun 06 15:55:41 CEST 2008]: Covering: 9 negatives +[Fri Jun 06 15:55:41 CEST 2008]: Covering: 9 positives +[Fri Jun 06 15:55:41 CEST 2008]: Generalization obtained: male +[Fri Jun 06 15:55:41 CEST 2008]: It covers 12 negatives +[Fri Jun 06 15:55:41 CEST 2008]: It covers 15 positives +[Fri Jun 06 15:55:41 CEST 2008]: Generalization: male +[Fri Jun 06 15:55:41 CEST 2008]: *******Specialization called ******** + [Fri Jun 06 15:55:41 CEST 2008]: Evaluating the possible counterfactual... + [Fri Jun 06 15:55:41 CEST 2008]: No worth trying counterfactuals + [Fri Jun 06 15:55:41 CEST 2008]: Positive size decreased after counterfactuals of 15 units out of 15 + [Fri Jun 06 15:56:00 CEST 2008]: Non solvable problem + [Fri Jun 06 15:56:00 CEST 2008]: Failed in learning lcs substituted + [Fri Jun 06 15:56:00 CEST 2008]: Non solvable problem + [Fri Jun 06 15:56:00 CEST 2008]: Failed in learning lcs substituted + [Fri Jun 06 15:56:01 CEST 2008]: Non solvable problem + [Fri Jun 06 15:56:01 CEST 2008]: Failed in learning lcs substituted + [Fri Jun 06 15:56:03 CEST 2008]: Non solvable problem + [Fri Jun 06 15:56:03 CEST 2008]: Failed in learning lcs substituted + [Fri Jun 06 15:56:04 CEST 2008]: Non solvable problem + [Fri Jun 06 15:56:04 CEST 2008]: Failed in learning lcs substituted + [Fri Jun 06 15:56:06 CEST 2008]: Non solvable problem + [Fri Jun 06 15:56:06 CEST 2008]: Failed in learning lcs substituted + [Fri Jun 06 15:56:07 CEST 2008]: Non solvable problem + [Fri Jun 06 15:56:07 CEST 2008]: Failed in learning lcs substituted + [Fri Jun 06 15:56:09 CEST 2008]: Non solvable problem + [Fri Jun 06 15:56:09 CEST 2008]: Failed in learning lcs substituted +[Fri Jun 06 15:56:09 CEST 2008]: *******Specialization ended ******** +[Fri Jun 06 15:56:09 CEST 2008]: Residual positives size: 0 +[Fri Jun 06 15:56:09 CEST 2008]: Finished at: Fri Jun 06 15:56:09 CEST 2008 after 31889 millisecs +True positive size: 3 out of 4 +True negatives size: 12 out of 12 +[Fri Jun 06 15:56:10 CEST 2008]: Abstraction builder used: class it.uniba.di.dl.abstraction.KBoundMSCApproximatorRefinement with k = 2 +[Fri Jun 06 15:56:10 CEST 2008]: Starting msc calculation at: Fri Jun 06 15:56:10 CEST 2008 +[Fri Jun 06 15:56:10 CEST 2008]: Calculating msc no.1 +[Fri Jun 06 15:56:10 CEST 2008]: Calculating msc no.2 +[Fri Jun 06 15:56:10 CEST 2008]: Calculating msc no.3 +[Fri Jun 06 15:56:10 CEST 2008]: Calculating msc no.4 +[Fri Jun 06 15:56:10 CEST 2008]: Calculating msc no.5 +[Fri Jun 06 15:56:10 CEST 2008]: Calculating msc no.6 +[Fri Jun 06 15:56:10 CEST 2008]: Calculating msc no.7 +[Fri Jun 06 15:56:10 CEST 2008]: Calculating msc no.8 +[Fri Jun 06 15:56:10 CEST 2008]: Calculating msc no.9 +[Fri Jun 06 15:56:10 CEST 2008]: Calculating msc no.10 +[Fri Jun 06 15:56:10 CEST 2008]: Calculating msc no.11 +[Fri Jun 06 15:56:10 CEST 2008]: Calculating msc no.12 +[Fri Jun 06 15:56:10 CEST 2008]: Calculating msc no.13 +[Fri Jun 06 15:56:10 CEST 2008]: Calculating msc no.14 +[Fri Jun 06 15:56:10 CEST 2008]: Calculating msc no.15 +[Fri Jun 06 15:56:10 CEST 2008]: Calculating msc no.16 +[Fri Jun 06 15:56:10 CEST 2008]: Calculating msc no.17 +[Fri Jun 06 15:56:10 CEST 2008]: Finished positives at: Fri Jun 06 15:56:10 CEST 2008 after 2 millisecs +[Fri Jun 06 15:56:10 CEST 2008]: Calculating msc no.1 +[Fri Jun 06 15:56:10 CEST 2008]: Calculating msc no.2 +[Fri Jun 06 15:56:10 CEST 2008]: Calculating msc no.3 +[Fri Jun 06 15:56:10 CEST 2008]: Calculating msc no.4 +[Fri Jun 06 15:56:10 CEST 2008]: Calculating msc no.5 +[Fri Jun 06 15:56:10 CEST 2008]: Calculating msc no.6 +[Fri Jun 06 15:56:10 CEST 2008]: Calculating msc no.7 +[Fri Jun 06 15:56:10 CEST 2008]: Calculating msc no.8 +[Fri Jun 06 15:56:10 CEST 2008]: Calculating msc no.9 +[Fri Jun 06 15:56:10 CEST 2008]: Calculating msc no.10 +[Fri Jun 06 15:56:10 CEST 2008]: Calculating msc no.11 +[Fri Jun 06 15:56:10 CEST 2008]: Calculating msc no.12 +[Fri Jun 06 15:56:10 CEST 2008]: Calculating msc no.13 +[Fri Jun 06 15:56:10 CEST 2008]: Calculating msc no.14 +[Fri Jun 06 15:56:10 CEST 2008]: Calculating msc no.15 +[Fri Jun 06 15:56:10 CEST 2008]: Calculating msc no.16 +[Fri Jun 06 15:56:10 CEST 2008]: Calculating msc no.17 +[Fri Jun 06 15:56:10 CEST 2008]: Calculating msc no.18 +[Fri Jun 06 15:56:10 CEST 2008]: Calculating msc no.19 +[Fri Jun 06 15:56:10 CEST 2008]: Calculating msc no.20 +[Fri Jun 06 15:56:10 CEST 2008]: Calculating msc no.21 +[Fri Jun 06 15:56:10 CEST 2008]: Calculating msc no.22 +[Fri Jun 06 15:56:10 CEST 2008]: Calculating msc no.23 +[Fri Jun 06 15:56:10 CEST 2008]: Calculating msc no.24 +[Fri Jun 06 15:56:10 CEST 2008]: Calculating msc no.25 +[Fri Jun 06 15:56:10 CEST 2008]: Calculating msc no.26 +[Fri Jun 06 15:56:10 CEST 2008]: Calculating msc no.27 +[Fri Jun 06 15:56:10 CEST 2008]: Calculating msc no.28 +[Fri Jun 06 15:56:11 CEST 2008]: Calculating msc no.29 +[Fri Jun 06 15:56:11 CEST 2008]: Calculating msc no.30 +[Fri Jun 06 15:56:11 CEST 2008]: Calculating msc no.31 +[Fri Jun 06 15:56:11 CEST 2008]: Calculating msc no.32 +[Fri Jun 06 15:56:11 CEST 2008]: Calculating msc no.33 +[Fri Jun 06 15:56:11 CEST 2008]: Calculating msc no.34 +[Fri Jun 06 15:56:11 CEST 2008]: Calculating msc no.35 +[Fri Jun 06 15:56:11 CEST 2008]: Calculating msc no.36 +[Fri Jun 06 15:56:11 CEST 2008]: Calculating msc no.37 +[Fri Jun 06 15:56:11 CEST 2008]: Calculating msc no.38 +[Fri Jun 06 15:56:11 CEST 2008]: Calculating msc no.39 +[Fri Jun 06 15:56:11 CEST 2008]: Calculating msc no.40 +[Fri Jun 06 15:56:11 CEST 2008]: Calculating msc no.41 +[Fri Jun 06 15:56:11 CEST 2008]: Calculating msc no.42 +[Fri Jun 06 15:56:11 CEST 2008]: Calculating msc no.43 +[Fri Jun 06 15:56:11 CEST 2008]: Calculating msc no.44 +[Fri Jun 06 15:56:11 CEST 2008]: Calculating msc no.45 +[Fri Jun 06 15:56:11 CEST 2008]: Calculating msc no.46 +[Fri Jun 06 15:56:11 CEST 2008]: Calculating msc no.47 +[Fri Jun 06 15:56:11 CEST 2008]: Calculating msc no.48 +[Fri Jun 06 15:56:11 CEST 2008]: Checking intersection between postives and negatives +[Fri Jun 06 15:56:11 CEST 2008]: Finished msc calculation at: Fri Jun 06 15:56:11 CEST 2008 after 1520 millisecs +[Fri Jun 06 15:56:11 CEST 2008]: Learning Problem +[Fri Jun 06 15:56:11 CEST 2008]: positive size: 17 +[Fri Jun 06 15:56:11 CEST 2008]: negative size: 35 +[Fri Jun 06 15:56:11 CEST 2008]: Start generalization at: Fri Jun 06 15:56:11 CEST 2008 +[Fri Jun 06 15:56:11 CEST 2008]: Before delta covered positives size: 2 +[Fri Jun 06 15:56:11 CEST 2008]: Starting inner deltas +[Fri Jun 06 15:56:11 CEST 2008]: Picked Generalization: it.uniba.di.dl.yinyang.refinement.ClimbTaxonomyDelta +[Fri Jun 06 15:56:11 CEST 2008]: Trying generalizing with: it.uniba.di.dl.yinyang.refinement.ClimbTaxonomyDelta +[Fri Jun 06 15:56:11 CEST 2008]: Hypothesis: (and male (some sibling (and female (some married male ) (some sibling *TOP* ) (some sibling male ) (some parent female ) (some parent male ) ) ) (some sibling (and male (some sibling *TOP* ) (some parent female ) (some parent male ) ) ) ) +[Fri Jun 06 15:56:11 CEST 2008]: Refining w.r.t Positive: (and male (some sibling (and female (some married male ) (some sibling *TOP* ) (some sibling male ) (some parent female ) (some parent male ) ) ) (some sibling (and (some sibling *TOP* ) male ) ) (some parent (and (some sibling male ) female ) ) (some parent (and male (some sibling *TOP* ) (some sibling male ) ) ) (some parent (and (some sibling *TOP* ) male ) ) ) +[Fri Jun 06 15:56:12 CEST 2008]: Refining w.r.t Positive: (and male (some sibling (and male (some sibling *TOP* ) (some sibling female ) (some parent female ) (some parent male ) ) ) (some sibling (and female (some married male ) (some sibling *TOP* ) (some sibling female ) (some parent female ) (some parent male ) ) ) (some sibling (and female (some sibling *TOP* ) (some married male ) ) ) (some parent (and female (some married male ) (some sibling female ) (some sibling male ) (some parent female ) (some parent male ) ) ) (some parent (and male (some sibling *TOP* ) (some sibling female ) ) ) (some parent (and female (some sibling *TOP* ) (some married male ) (some parent female ) ) ) ) +[Fri Jun 06 15:56:12 CEST 2008]: Generalization: (and male (some sibling (some parent *TOP* ) ) (some sibling (and (some married *TOP* ) (some sibling *TOP* ) (some parent *TOP* ) ) ) ) +[Fri Jun 06 15:56:12 CEST 2008]: Starting inner deltas +[Fri Jun 06 15:56:12 CEST 2008]: Picked Generalization: it.uniba.di.dl.yinyang.refinement.ClimbTaxonomyDelta +[Fri Jun 06 15:56:12 CEST 2008]: Trying generalizing with: it.uniba.di.dl.yinyang.refinement.ClimbTaxonomyDelta +[Fri Jun 06 15:56:12 CEST 2008]: Hypothesis: (and male (some sibling (some parent *TOP* ) ) (some sibling (and (some married *TOP* ) (some sibling *TOP* ) (some parent *TOP* ) ) ) ) +[Fri Jun 06 15:56:12 CEST 2008]: Generalization: (and male (some sibling (some parent *TOP* ) ) (some sibling (and (some married *TOP* ) (some sibling *TOP* ) (some parent *TOP* ) ) ) ) +[Fri Jun 06 15:56:12 CEST 2008]: Starting inner deltas +[Fri Jun 06 15:56:12 CEST 2008]: Trying generalizing with: it.uniba.di.dl.yinyang.refinement.TopDownGreedyDelta +[Fri Jun 06 15:56:13 CEST 2008]: Found a possible refinement: 0.75 +[Fri Jun 06 15:56:13 CEST 2008]: Lenght: 1 +[Fri Jun 06 15:56:13 CEST 2008]: Lenght: 1 +[Fri Jun 06 15:56:13 CEST 2008]: Lenght: 1 +[Fri Jun 06 15:56:14 CEST 2008]: Lenght: 2 +[Fri Jun 06 15:56:14 CEST 2008]: Found a possible refinement: 1.0 +[Fri Jun 06 15:56:14 CEST 2008]: Lenght: 2 +[Fri Jun 06 15:56:14 CEST 2008]: Generalization: (and (some sibling (and (some married *TOP* ) (some sibling *TOP* ) (some parent *TOP* ) ) ) male ) +[Fri Jun 06 15:56:14 CEST 2008]: Starting inner deltas +[Fri Jun 06 15:56:14 CEST 2008]: Trying generalizing with: it.uniba.di.dl.yinyang.refinement.DropConjunctDelta +[Fri Jun 06 15:56:14 CEST 2008]: Ranking Conjuncts.... +[Fri Jun 06 15:56:14 CEST 2008]: Absent conjunct need to rank it +[Fri Jun 06 15:56:14 CEST 2008]: Absent conjunct need to rank it +[Fri Jun 06 15:56:14 CEST 2008]: Projecting... +[Fri Jun 06 15:56:14 CEST 2008]: ... Pojection finished +[Fri Jun 06 15:56:14 CEST 2008]: ...Finished Ranking Conjuncts +[Fri Jun 06 15:56:14 CEST 2008]: Covering: 9 negatives +[Fri Jun 06 15:56:14 CEST 2008]: Covering: 17 positives +[Fri Jun 06 15:56:14 CEST 2008]: Found a possible refinement +[Fri Jun 06 15:56:14 CEST 2008]: Previous heuristic value = 0.0 now it is = 0.6538461538461539 +[Fri Jun 06 15:56:14 CEST 2008]: Covering: 4 negatives +[Fri Jun 06 15:56:14 CEST 2008]: Covering: 12 positives +[Fri Jun 06 15:56:14 CEST 2008]: Found a possible refinement +[Fri Jun 06 15:56:14 CEST 2008]: Previous heuristic value = 0.6538461538461539 now it is = 0.75 +[Fri Jun 06 15:56:14 CEST 2008]: Generalization obtained: (some sibling (and (some married *TOP* ) (some sibling *TOP* ) (some parent *TOP* ) ) ) +[Fri Jun 06 15:56:14 CEST 2008]: It covers 4 negatives +[Fri Jun 06 15:56:14 CEST 2008]: It covers 12 positives +[Fri Jun 06 15:56:14 CEST 2008]: Generalization: (some sibling (and (some married *TOP* ) (some sibling *TOP* ) (some parent *TOP* ) ) ) +[Fri Jun 06 15:56:14 CEST 2008]: *******Specialization called ******** + [Fri Jun 06 15:56:14 CEST 2008]: Evaluating the possible counterfactual... + [Fri Jun 06 15:56:16 CEST 2008]: Before delta covered positives size: 2 + [Fri Jun 06 15:56:16 CEST 2008]: Starting inner deltas + [Fri Jun 06 15:56:16 CEST 2008]: Trying generalizing with: it.uniba.di.dl.yinyang.refinement.ClimbTaxonomyDelta + [Fri Jun 06 15:56:16 CEST 2008]: Hypothesis: (and female (some sibling (and male (some parent male ) (some sibling *TOP* ) (some sibling female ) ) ) (some sibling (and female (some sibling *TOP* ) (some married male ) (some parent female ) (some parent male ) ) ) ) + [Fri Jun 06 15:56:16 CEST 2008]: Refining w.r.t Positive: (and female (some married (and (some parent female ) male ) ) (some sibling (and female (some married male ) (some sibling *TOP* ) (some sibling male ) (some parent female ) (some parent male ) ) ) (some sibling (and (some sibling *TOP* ) male ) ) (some parent (and (some sibling female ) female ) ) (some parent (and (some sibling *TOP* ) female ) ) ) + [Fri Jun 06 15:56:17 CEST 2008]: Generalization: (and female (some sibling (and female (some sibling *TOP* ) (some married male ) (some parent female ) (some parent male ) ) ) (some sibling (and (some parent *TOP* ) (some sibling *TOP* ) ) ) ) + [Fri Jun 06 15:56:17 CEST 2008]: Starting inner deltas + [Fri Jun 06 15:56:17 CEST 2008]: Trying generalizing with: it.uniba.di.dl.yinyang.refinement.ClimbTaxonomyDelta + [Fri Jun 06 15:56:17 CEST 2008]: Hypothesis: (and female (some sibling (and female (some sibling *TOP* ) (some married male ) (some parent female ) (some parent male ) ) ) (some sibling (and (some parent *TOP* ) (some sibling *TOP* ) ) ) ) + [Fri Jun 06 15:56:17 CEST 2008]: Refining w.r.t Positive: (and (some sibling (and female (some sibling *TOP* ) (some married male ) (some parent female ) ) ) (some married (and male (some sibling female ) (some sibling male ) (some parent female ) (some parent male ) ) ) (some parent (and female (some sibling *TOP* ) (some sibling female ) ) ) (some parent (and (some sibling female ) male ) ) (some sibling (and male (some sibling *TOP* ) (some sibling female ) ) ) female ) + [Fri Jun 06 15:56:17 CEST 2008]: Generalization: (and female (some sibling (and (some parent *TOP* ) (some sibling *TOP* ) ) ) (some sibling (and (some married *TOP* ) (some parent *TOP* ) ) ) ) + [Fri Jun 06 15:56:17 CEST 2008]: Residual positives size: 0 +[Fri Jun 06 15:56:17 CEST 2008]: *******Specialization ended ******** +[Fri Jun 06 15:56:17 CEST 2008]: Residual positives size: 5 +[Fri Jun 06 15:56:17 CEST 2008]: Before delta covered positives size: 4 +[Fri Jun 06 15:56:17 CEST 2008]: Starting inner deltas +[Fri Jun 06 15:56:17 CEST 2008]: Trying generalizing with: it.uniba.di.dl.yinyang.refinement.ClimbTaxonomyDelta +[Fri Jun 06 15:56:17 CEST 2008]: Hypothesis: (and male (some parent (and (some sibling female ) female ) ) (some parent (and (some sibling *TOP* ) female ) ) ) +[Fri Jun 06 15:56:17 CEST 2008]: Refining w.r.t Positive: (and male (some parent (and male (some sibling female ) (some sibling male ) ) ) (some parent (and female (some married male ) (some sibling *TOP* ) (some sibling male ) (some parent female ) (some parent male ) ) ) (some parent (and male (some sibling *TOP* ) (some parent female ) (some parent male ) ) ) ) +[Fri Jun 06 15:56:17 CEST 2008]: Generalization: (and male (some parent (and (some sibling female ) female ) ) (some parent (and (some sibling *TOP* ) female ) ) ) +[Fri Jun 06 15:56:17 CEST 2008]: Starting inner deltas +[Fri Jun 06 15:56:17 CEST 2008]: Trying generalizing with: it.uniba.di.dl.yinyang.refinement.DropConjunctDelta +[Fri Jun 06 15:56:17 CEST 2008]: Ranking Conjuncts.... +[Fri Jun 06 15:56:17 CEST 2008]: Absent conjunct need to rank it +[Fri Jun 06 15:56:17 CEST 2008]: Absent conjunct need to rank it +[Fri Jun 06 15:56:17 CEST 2008]: Absent conjunct need to rank it +[Fri Jun 06 15:56:18 CEST 2008]: Projecting... +[Fri Jun 06 15:56:18 CEST 2008]: ... Pojection finished +[Fri Jun 06 15:56:18 CEST 2008]: ...Finished Ranking Conjuncts +[Fri Jun 06 15:56:18 CEST 2008]: Covering: 0 negatives +[Fri Jun 06 15:56:18 CEST 2008]: Covering: 4 positives +[Fri Jun 06 15:56:18 CEST 2008]: Found a possible refinement +[Fri Jun 06 15:56:18 CEST 2008]: Previous heuristic value = 0.0 now it is = 1.0 +[Fri Jun 06 15:56:18 CEST 2008]: Covering: 3 negatives +[Fri Jun 06 15:56:18 CEST 2008]: Covering: 5 positives +[Fri Jun 06 15:56:18 CEST 2008]: Covering: 7 negatives +[Fri Jun 06 15:56:18 CEST 2008]: Covering: 4 positives +[Fri Jun 06 15:56:18 CEST 2008]: Generalization obtained: (and male (some parent (and (some sibling female ) female ) ) ) +[Fri Jun 06 15:56:18 CEST 2008]: It covers 0 negatives +[Fri Jun 06 15:56:18 CEST 2008]: It covers 4 positives +[Fri Jun 06 15:56:18 CEST 2008]: Generalization: (and male (some parent (and (some sibling female ) female ) ) ) +[Fri Jun 06 15:56:18 CEST 2008]: Starting inner deltas +[Fri Jun 06 15:56:18 CEST 2008]: Trying generalizing with: it.uniba.di.dl.yinyang.refinement.TopDownGreedyDelta +[Fri Jun 06 15:56:18 CEST 2008]: Found a possible refinement: 0.36363636363636365 +[Fri Jun 06 15:56:18 CEST 2008]: Lenght: 1 +[Fri Jun 06 15:56:18 CEST 2008]: Lenght: 1 +[Fri Jun 06 15:56:18 CEST 2008]: Found a possible refinement: 1.0 +[Fri Jun 06 15:56:18 CEST 2008]: Lenght: 2 +[Fri Jun 06 15:56:18 CEST 2008]: Generalization: (and male (some parent (and (some sibling female ) female ) ) ) +[Fri Jun 06 15:56:18 CEST 2008]: Residual positives size: 1 +[Fri Jun 06 15:56:18 CEST 2008]: Before delta covered positives size: 1 +[Fri Jun 06 15:56:19 CEST 2008]: Residual positives size: 0 +[Fri Jun 06 15:56:19 CEST 2008]: Finished at: Fri Jun 06 15:56:19 CEST 2008 after 7487 millisecs +True positive size: 1 out of 2 +True negatives size: 14 out of 14 +[Fri Jun 06 15:56:19 CEST 2008]: Abstraction builder used: class it.uniba.di.dl.abstraction.KBoundMSCApproximatorRefinement with k = 2 +[Fri Jun 06 15:56:19 CEST 2008]: Starting msc calculation at: Fri Jun 06 15:56:19 CEST 2008 +[Fri Jun 06 15:56:19 CEST 2008]: Calculating msc no.1 +[Fri Jun 06 15:56:19 CEST 2008]: Calculating msc no.2 +[Fri Jun 06 15:56:19 CEST 2008]: Calculating msc no.3 +[Fri Jun 06 15:56:19 CEST 2008]: Calculating msc no.4 +[Fri Jun 06 15:56:19 CEST 2008]: Calculating msc no.5 +[Fri Jun 06 15:56:19 CEST 2008]: Calculating msc no.6 +[Fri Jun 06 15:56:19 CEST 2008]: Calculating msc no.7 +[Fri Jun 06 15:56:19 CEST 2008]: Calculating msc no.8 +[Fri Jun 06 15:56:19 CEST 2008]: Calculating msc no.9 +[Fri Jun 06 15:56:19 CEST 2008]: Calculating msc no.10 +[Fri Jun 06 15:56:19 CEST 2008]: Calculating msc no.11 +[Fri Jun 06 15:56:19 CEST 2008]: Calculating msc no.12 +[Fri Jun 06 15:56:19 CEST 2008]: Calculating msc no.13 +[Fri Jun 06 15:56:19 CEST 2008]: Calculating msc no.14 +[Fri Jun 06 15:56:19 CEST 2008]: Calculating msc no.15 +[Fri Jun 06 15:56:19 CEST 2008]: Calculating msc no.16 +[Fri Jun 06 15:56:19 CEST 2008]: Finished positives at: Fri Jun 06 15:56:19 CEST 2008 after 1 millisecs +[Fri Jun 06 15:56:19 CEST 2008]: Calculating msc no.1 +[Fri Jun 06 15:56:19 CEST 2008]: Calculating msc no.2 +[Fri Jun 06 15:56:19 CEST 2008]: Calculating msc no.3 +[Fri Jun 06 15:56:19 CEST 2008]: Calculating msc no.4 +[Fri Jun 06 15:56:19 CEST 2008]: Calculating msc no.5 +[Fri Jun 06 15:56:19 CEST 2008]: Calculating msc no.6 +[Fri Jun 06 15:56:19 CEST 2008]: Calculating msc no.7 +[Fri Jun 06 15:56:19 CEST 2008]: Calculating msc no.8 +[Fri Jun 06 15:56:19 CEST 2008]: Calculating msc no.9 +[Fri Jun 06 15:56:19 CEST 2008]: Calculating msc no.10 +[Fri Jun 06 15:56:19 CEST 2008]: Calculating msc no.11 +[Fri Jun 06 15:56:19 CEST 2008]: Calculating msc no.12 +[Fri Jun 06 15:56:19 CEST 2008]: Calculating msc no.13 +[Fri Jun 06 15:56:19 CEST 2008]: Calculating msc no.14 +[Fri Jun 06 15:56:19 CEST 2008]: Calculating msc no.15 +[Fri Jun 06 15:56:19 CEST 2008]: Calculating msc no.16 +[Fri Jun 06 15:56:19 CEST 2008]: Calculating msc no.17 +[Fri Jun 06 15:56:19 CEST 2008]: Calculating msc no.18 +[Fri Jun 06 15:56:19 CEST 2008]: Calculating msc no.19 +[Fri Jun 06 15:56:19 CEST 2008]: Calculating msc no.20 +[Fri Jun 06 15:56:19 CEST 2008]: Calculating msc no.21 +[Fri Jun 06 15:56:19 CEST 2008]: Calculating msc no.22 +[Fri Jun 06 15:56:19 CEST 2008]: Calculating msc no.23 +[Fri Jun 06 15:56:19 CEST 2008]: Calculating msc no.24 +[Fri Jun 06 15:56:19 CEST 2008]: Calculating msc no.25 +[Fri Jun 06 15:56:19 CEST 2008]: Calculating msc no.26 +[Fri Jun 06 15:56:19 CEST 2008]: Calculating msc no.27 +[Fri Jun 06 15:56:20 CEST 2008]: Calculating msc no.28 +[Fri Jun 06 15:56:20 CEST 2008]: Calculating msc no.29 +[Fri Jun 06 15:56:20 CEST 2008]: Calculating msc no.30 +[Fri Jun 06 15:56:20 CEST 2008]: Calculating msc no.31 +[Fri Jun 06 15:56:20 CEST 2008]: Calculating msc no.32 +[Fri Jun 06 15:56:20 CEST 2008]: Calculating msc no.33 +[Fri Jun 06 15:56:20 CEST 2008]: Calculating msc no.34 +[Fri Jun 06 15:56:20 CEST 2008]: Calculating msc no.35 +[Fri Jun 06 15:56:20 CEST 2008]: Calculating msc no.36 +[Fri Jun 06 15:56:20 CEST 2008]: Calculating msc no.37 +[Fri Jun 06 15:56:20 CEST 2008]: Calculating msc no.38 +[Fri Jun 06 15:56:20 CEST 2008]: Calculating msc no.39 +[Fri Jun 06 15:56:20 CEST 2008]: Calculating msc no.40 +[Fri Jun 06 15:56:20 CEST 2008]: Calculating msc no.41 +[Fri Jun 06 15:56:20 CEST 2008]: Calculating msc no.42 +[Fri Jun 06 15:56:20 CEST 2008]: Calculating msc no.43 +[Fri Jun 06 15:56:20 CEST 2008]: Calculating msc no.44 +[Fri Jun 06 15:56:20 CEST 2008]: Calculating msc no.45 +[Fri Jun 06 15:56:20 CEST 2008]: Calculating msc no.46 +[Fri Jun 06 15:56:20 CEST 2008]: Calculating msc no.47 +[Fri Jun 06 15:56:20 CEST 2008]: Calculating msc no.48 +[Fri Jun 06 15:56:20 CEST 2008]: Calculating msc no.49 +[Fri Jun 06 15:56:20 CEST 2008]: Checking intersection between postives and negatives +[Fri Jun 06 15:56:20 CEST 2008]: Finished msc calculation at: Fri Jun 06 15:56:20 CEST 2008 after 1315 millisecs +[Fri Jun 06 15:56:20 CEST 2008]: Learning Problem +[Fri Jun 06 15:56:20 CEST 2008]: positive size: 16 +[Fri Jun 06 15:56:20 CEST 2008]: negative size: 38 +[Fri Jun 06 15:56:20 CEST 2008]: Start generalization at: Fri Jun 06 15:56:20 CEST 2008 +[Fri Jun 06 15:56:20 CEST 2008]: Before delta covered positives size: 5 +[Fri Jun 06 15:56:20 CEST 2008]: Starting inner deltas +[Fri Jun 06 15:56:20 CEST 2008]: Trying generalizing with: it.uniba.di.dl.yinyang.refinement.DropConjunctDelta +[Fri Jun 06 15:56:20 CEST 2008]: Ranking Conjuncts.... +[Fri Jun 06 15:56:20 CEST 2008]: Absent conjunct need to rank it +[Fri Jun 06 15:56:21 CEST 2008]: Absent conjunct need to rank it +[Fri Jun 06 15:56:21 CEST 2008]: Projecting... +[Fri Jun 06 15:56:21 CEST 2008]: ... Pojection finished +[Fri Jun 06 15:56:21 CEST 2008]: ...Finished Ranking Conjuncts +[Fri Jun 06 15:56:21 CEST 2008]: Covering: 10 negatives +[Fri Jun 06 15:56:21 CEST 2008]: Covering: 16 positives +[Fri Jun 06 15:56:21 CEST 2008]: Found a possible refinement +[Fri Jun 06 15:56:21 CEST 2008]: Previous heuristic value = 0.0 now it is = 0.6153846153846154 +[Fri Jun 06 15:56:21 CEST 2008]: Covering: 6 negatives +[Fri Jun 06 15:56:21 CEST 2008]: Covering: 5 positives +[Fri Jun 06 15:56:21 CEST 2008]: Generalization obtained: male +[Fri Jun 06 15:56:21 CEST 2008]: It covers 10 negatives +[Fri Jun 06 15:56:21 CEST 2008]: It covers 16 positives +[Fri Jun 06 15:56:21 CEST 2008]: Generalization: male +[Fri Jun 06 15:56:21 CEST 2008]: *******Specialization called ******** + [Fri Jun 06 15:56:21 CEST 2008]: Evaluating the possible counterfactual... + [Fri Jun 06 15:56:21 CEST 2008]: No worth trying counterfactuals + [Fri Jun 06 15:56:21 CEST 2008]: Positive size decreased after counterfactuals of 16 units out of 16 + [Fri Jun 06 15:56:43 CEST 2008]: Non solvable problem + [Fri Jun 06 15:56:43 CEST 2008]: Failed in learning lcs substituted + [Fri Jun 06 15:56:43 CEST 2008]: Non solvable problem + [Fri Jun 06 15:56:43 CEST 2008]: Failed in learning lcs substituted + [Fri Jun 06 15:56:44 CEST 2008]: Non solvable problem + [Fri Jun 06 15:56:44 CEST 2008]: Failed in learning lcs substituted + [Fri Jun 06 15:56:45 CEST 2008]: Non solvable problem + [Fri Jun 06 15:56:45 CEST 2008]: Failed in learning lcs substituted + [Fri Jun 06 15:56:46 CEST 2008]: Non solvable problem + [Fri Jun 06 15:56:46 CEST 2008]: Failed in learning lcs substituted + [Fri Jun 06 15:56:47 CEST 2008]: Non solvable problem + [Fri Jun 06 15:56:47 CEST 2008]: Failed in learning lcs substituted + [Fri Jun 06 15:56:48 CEST 2008]: Non solvable problem + [Fri Jun 06 15:56:48 CEST 2008]: Failed in learning lcs substituted + [Fri Jun 06 15:56:50 CEST 2008]: Non solvable problem + [Fri Jun 06 15:56:50 CEST 2008]: Failed in learning lcs substituted + [Fri Jun 06 15:56:51 CEST 2008]: Non solvable problem + [Fri Jun 06 15:56:51 CEST 2008]: Failed in learning lcs substituted +[Fri Jun 06 15:56:51 CEST 2008]: *******Specialization ended ******** +[Fri Jun 06 15:56:51 CEST 2008]: Residual positives size: 0 +[Fri Jun 06 15:56:51 CEST 2008]: Finished at: Fri Jun 06 15:56:51 CEST 2008 after 31115 millisecs +True positive size: 2 out of 3 +True negatives size: 13 out of 13 +[Fri Jun 06 15:56:52 CEST 2008]: Abstraction builder used: class it.uniba.di.dl.abstraction.KBoundMSCApproximatorRefinement with k = 2 +[Fri Jun 06 15:56:52 CEST 2008]: Starting msc calculation at: Fri Jun 06 15:56:52 CEST 2008 +[Fri Jun 06 15:56:52 CEST 2008]: Calculating msc no.1 +[Fri Jun 06 15:56:52 CEST 2008]: Calculating msc no.2 +[Fri Jun 06 15:56:52 CEST 2008]: Calculating msc no.3 +[Fri Jun 06 15:56:52 CEST 2008]: Calculating msc no.4 +[Fri Jun 06 15:56:52 CEST 2008]: Calculating msc no.5 +[Fri Jun 06 15:56:52 CEST 2008]: Calculating msc no.6 +[Fri Jun 06 15:56:52 CEST 2008]: Calculating msc no.7 +[Fri Jun 06 15:56:52 CEST 2008]: Calculating msc no.8 +[Fri Jun 06 15:56:52 CEST 2008]: Calculating msc no.9 +[Fri Jun 06 15:56:52 CEST 2008]: Calculating msc no.10 +[Fri Jun 06 15:56:52 CEST 2008]: Calculating msc no.11 +[Fri Jun 06 15:56:52 CEST 2008]: Calculating msc no.12 +[Fri Jun 06 15:56:52 CEST 2008]: Calculating msc no.13 +[Fri Jun 06 15:56:52 CEST 2008]: Calculating msc no.14 +[Fri Jun 06 15:56:52 CEST 2008]: Finished positives at: Fri Jun 06 15:56:52 CEST 2008 after 1 millisecs +[Fri Jun 06 15:56:52 CEST 2008]: Calculating msc no.1 +[Fri Jun 06 15:56:52 CEST 2008]: Calculating msc no.2 +[Fri Jun 06 15:56:52 CEST 2008]: Calculating msc no.3 +[Fri Jun 06 15:56:52 CEST 2008]: Calculating msc no.4 +[Fri Jun 06 15:56:52 CEST 2008]: Calculating msc no.5 +[Fri Jun 06 15:56:52 CEST 2008]: Calculating msc no.6 +[Fri Jun 06 15:56:52 CEST 2008]: Calculating msc no.7 +[Fri Jun 06 15:56:52 CEST 2008]: Calculating msc no.8 +[Fri Jun 06 15:56:52 CEST 2008]: Calculating msc no.9 +[Fri Jun 06 15:56:52 CEST 2008]: Calculating msc no.10 +[Fri Jun 06 15:56:52 CEST 2008]: Calculating msc no.11 +[Fri Jun 06 15:56:52 CEST 2008]: Calculating msc no.12 +[Fri Jun 06 15:56:52 CEST 2008]: Calculating msc no.13 +[Fri Jun 06 15:56:52 CEST 2008]: Calculating msc no.14 +[Fri Jun 06 15:56:52 CEST 2008]: Calculating msc no.15 +[Fri Jun 06 15:56:52 CEST 2008]: Calculating msc no.16 +[Fri Jun 06 15:56:52 CEST 2008]: Calculating msc no.17 +[Fri Jun 06 15:56:52 CEST 2008]: Calculating msc no.18 +[Fri Jun 06 15:56:52 CEST 2008]: Calculating msc no.19 +[Fri Jun 06 15:56:52 CEST 2008]: Calculating msc no.20 +[Fri Jun 06 15:56:52 CEST 2008]: Calculating msc no.21 +[Fri Jun 06 15:56:52 CEST 2008]: Calculating msc no.22 +[Fri Jun 06 15:56:52 CEST 2008]: Calculating msc no.23 +[Fri Jun 06 15:56:52 CEST 2008]: Calculating msc no.24 +[Fri Jun 06 15:56:53 CEST 2008]: Calculating msc no.25 +[Fri Jun 06 15:56:53 CEST 2008]: Calculating msc no.26 +[Fri Jun 06 15:56:53 CEST 2008]: Calculating msc no.27 +[Fri Jun 06 15:56:53 CEST 2008]: Calculating msc no.28 +[Fri Jun 06 15:56:53 CEST 2008]: Calculating msc no.29 +[Fri Jun 06 15:56:53 CEST 2008]: Calculating msc no.30 +[Fri Jun 06 15:56:53 CEST 2008]: Calculating msc no.31 +[Fri Jun 06 15:56:53 CEST 2008]: Calculating msc no.32 +[Fri Jun 06 15:56:53 CEST 2008]: Calculating msc no.33 +[Fri Jun 06 15:56:53 CEST 2008]: Calculating msc no.34 +[Fri Jun 06 15:56:53 CEST 2008]: Calculating msc no.35 +[Fri Jun 06 15:56:53 CEST 2008]: Calculating msc no.36 +[Fri Jun 06 15:56:53 CEST 2008]: Calculating msc no.37 +[Fri Jun 06 15:56:53 CEST 2008]: Calculating msc no.38 +[Fri Jun 06 15:56:53 CEST 2008]: Calculating msc no.39 +[Fri Jun 06 15:56:53 CEST 2008]: Calculating msc no.40 +[Fri Jun 06 15:56:53 CEST 2008]: Calculating msc no.41 +[Fri Jun 06 15:56:53 CEST 2008]: Calculating msc no.42 +[Fri Jun 06 15:56:53 CEST 2008]: Calculating msc no.43 +[Fri Jun 06 15:56:53 CEST 2008]: Calculating msc no.44 +[Fri Jun 06 15:56:53 CEST 2008]: Calculating msc no.45 +[Fri Jun 06 15:56:53 CEST 2008]: Calculating msc no.46 +[Fri Jun 06 15:56:53 CEST 2008]: Calculating msc no.47 +[Fri Jun 06 15:56:53 CEST 2008]: Calculating msc no.48 +[Fri Jun 06 15:56:53 CEST 2008]: Calculating msc no.49 +[Fri Jun 06 15:56:53 CEST 2008]: Calculating msc no.50 +[Fri Jun 06 15:56:53 CEST 2008]: Calculating msc no.51 +[Fri Jun 06 15:56:53 CEST 2008]: Checking intersection between postives and negatives +[Fri Jun 06 15:56:53 CEST 2008]: Finished msc calculation at: Fri Jun 06 15:56:53 CEST 2008 after 1319 millisecs +[Fri Jun 06 15:56:53 CEST 2008]: Learning Problem +[Fri Jun 06 15:56:53 CEST 2008]: positive size: 14 +[Fri Jun 06 15:56:53 CEST 2008]: negative size: 37 +[Fri Jun 06 15:56:53 CEST 2008]: Start generalization at: Fri Jun 06 15:56:53 CEST 2008 +[Fri Jun 06 15:56:53 CEST 2008]: Before delta covered positives size: 5 +[Fri Jun 06 15:56:53 CEST 2008]: Starting inner deltas +[Fri Jun 06 15:56:53 CEST 2008]: Trying generalizing with: it.uniba.di.dl.yinyang.refinement.DropConjunctDelta +[Fri Jun 06 15:56:53 CEST 2008]: Ranking Conjuncts.... +[Fri Jun 06 15:56:53 CEST 2008]: Absent conjunct need to rank it +[Fri Jun 06 15:56:54 CEST 2008]: Absent conjunct need to rank it +[Fri Jun 06 15:56:54 CEST 2008]: Projecting... +[Fri Jun 06 15:56:54 CEST 2008]: ... Pojection finished +[Fri Jun 06 15:56:54 CEST 2008]: ...Finished Ranking Conjuncts +[Fri Jun 06 15:56:54 CEST 2008]: Covering: 11 negatives +[Fri Jun 06 15:56:54 CEST 2008]: Covering: 14 positives +[Fri Jun 06 15:56:54 CEST 2008]: Found a possible refinement +[Fri Jun 06 15:56:54 CEST 2008]: Previous heuristic value = 0.0 now it is = 0.56 +[Fri Jun 06 15:56:54 CEST 2008]: Covering: 5 negatives +[Fri Jun 06 15:56:54 CEST 2008]: Covering: 5 positives +[Fri Jun 06 15:56:54 CEST 2008]: Generalization obtained: male +[Fri Jun 06 15:56:54 CEST 2008]: It covers 11 negatives +[Fri Jun 06 15:56:54 CEST 2008]: It covers 14 positives +[Fri Jun 06 15:56:54 CEST 2008]: Generalization: male +[Fri Jun 06 15:56:54 CEST 2008]: *******Specialization called ******** + [Fri Jun 06 15:56:54 CEST 2008]: Evaluating the possible counterfactual... + [Fri Jun 06 15:56:54 CEST 2008]: No worth trying counterfactuals + [Fri Jun 06 15:56:54 CEST 2008]: Positive size decreased after counterfactuals of 14 units out of 14 + [Fri Jun 06 15:57:14 CEST 2008]: Non solvable problem + [Fri Jun 06 15:57:14 CEST 2008]: Failed in learning lcs substituted + [Fri Jun 06 15:57:14 CEST 2008]: Non solvable problem + [Fri Jun 06 15:57:14 CEST 2008]: Failed in learning lcs substituted + [Fri Jun 06 15:57:15 CEST 2008]: Non solvable problem + [Fri Jun 06 15:57:15 CEST 2008]: Failed in learning lcs substituted + [Fri Jun 06 15:57:16 CEST 2008]: Non solvable problem + [Fri Jun 06 15:57:16 CEST 2008]: Failed in learning lcs substituted + [Fri Jun 06 15:57:17 CEST 2008]: Non solvable problem + [Fri Jun 06 15:57:17 CEST 2008]: Failed in learning lcs substituted + [Fri Jun 06 15:57:18 CEST 2008]: Non solvable problem + [Fri Jun 06 15:57:18 CEST 2008]: Failed in learning lcs substituted + [Fri Jun 06 15:57:19 CEST 2008]: Non solvable problem + [Fri Jun 06 15:57:19 CEST 2008]: Failed in learning lcs substituted + [Fri Jun 06 15:57:21 CEST 2008]: Non solvable problem + [Fri Jun 06 15:57:21 CEST 2008]: Failed in learning lcs substituted +[Fri Jun 06 15:57:21 CEST 2008]: *******Specialization ended ******** +[Fri Jun 06 15:57:21 CEST 2008]: Residual positives size: 0 +[Fri Jun 06 15:57:21 CEST 2008]: Finished at: Fri Jun 06 15:57:21 CEST... [truncated message content] |
From: <jen...@us...> - 2008-06-06 10:35:39
|
Revision: 946 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=946&view=rev Author: jenslehmann Date: 2008-06-06 03:35:34 -0700 (Fri, 06 Jun 2008) Log Message: ----------- final statistics script Modified Paths: -------------- trunk/examples/cross-benchmark/forte/uncle_gp.conf trunk/examples/cross-benchmark/forte/uncle_hybrid.conf trunk/examples/cross-benchmark/forte/uncle_refexamples.conf trunk/examples/cross-benchmark/forte/uncle_refexamples_fast.conf trunk/examples/cross-benchmark/moral_reasoner/moral_43examples_complex_refexamples.conf trunk/examples/cross-benchmark/moral_reasoner/moral_43examples_complex_refexamples_fast.conf trunk/examples/cross-benchmark/moral_reasoner/moral_43examples_simple_refexamples.conf trunk/examples/cross-benchmark/moral_reasoner/moral_43examples_simple_refexamples_fast.conf trunk/examples/cross-benchmark/poker/pair_refexamples.conf trunk/examples/cross-benchmark/poker/pair_refexamples_fast.conf trunk/examples/cross-benchmark/poker/straight_refexamples.conf trunk/examples/cross-benchmark/poker/straight_refexamples_fast.conf trunk/examples/cross-benchmark/trains/trains_refexamples.conf trunk/examples/cross-benchmark/trains/trains_refexamples_fast.conf trunk/examples/yinyang_files/moralSimpleLearningProblem.xml trunk/src/dl-learner/org/dllearner/algorithms/refexamples/MultiHeuristic.java Modified: trunk/examples/cross-benchmark/forte/uncle_gp.conf =================================================================== --- trunk/examples/cross-benchmark/forte/uncle_gp.conf 2008-06-05 19:06:48 UTC (rev 945) +++ trunk/examples/cross-benchmark/forte/uncle_gp.conf 2008-06-06 10:35:34 UTC (rev 946) @@ -28,7 +28,7 @@ posNegDefinitionLP.percentPerLenghtUnit = 0.02; gp.maxConceptLength = 30; reasoner = owlAPI; -import("forte_family.kb"); +import("forte_family.owl"); /** examples **/ Modified: trunk/examples/cross-benchmark/forte/uncle_hybrid.conf =================================================================== --- trunk/examples/cross-benchmark/forte/uncle_hybrid.conf 2008-06-05 19:06:48 UTC (rev 945) +++ trunk/examples/cross-benchmark/forte/uncle_hybrid.conf 2008-06-06 10:35:34 UTC (rev 946) @@ -29,7 +29,7 @@ posNegDefinitionLP.percentPerLenghtUnit = 0.02; gp.maxConceptLength = 30; reasoner = owlAPI; -import("forte_family.kb"); +import("forte_family.owl"); /** examples **/ Modified: trunk/examples/cross-benchmark/forte/uncle_refexamples.conf =================================================================== --- trunk/examples/cross-benchmark/forte/uncle_refexamples.conf 2008-06-05 19:06:48 UTC (rev 945) +++ trunk/examples/cross-benchmark/forte/uncle_refexamples.conf 2008-06-06 10:35:34 UTC (rev 946) @@ -17,8 +17,9 @@ algorithm = refexamples; +refexamples.useCardinalityRestrictions = false; reasoner = owlAPI; -import("forte_family.kb"); +import("forte_family.owl"); /** examples **/ Modified: trunk/examples/cross-benchmark/forte/uncle_refexamples_fast.conf =================================================================== --- trunk/examples/cross-benchmark/forte/uncle_refexamples_fast.conf 2008-06-05 19:06:48 UTC (rev 945) +++ trunk/examples/cross-benchmark/forte/uncle_refexamples_fast.conf 2008-06-06 10:35:34 UTC (rev 946) @@ -16,8 +16,9 @@ */ algorithm = refexamples; +refexamples.useCardinalityRestrictions = false; reasoner = fastInstanceChecker; -import("forte_family.kb"); +import("forte_family.owl"); /** examples **/ Modified: trunk/examples/cross-benchmark/moral_reasoner/moral_43examples_complex_refexamples.conf =================================================================== --- trunk/examples/cross-benchmark/moral_reasoner/moral_43examples_complex_refexamples.conf 2008-06-05 19:06:48 UTC (rev 945) +++ trunk/examples/cross-benchmark/moral_reasoner/moral_43examples_complex_refexamples.conf 2008-06-06 10:35:34 UTC (rev 946) @@ -9,6 +9,7 @@ ***********************/ algorithm = refexamples; +refexamples.useCardinalityRestrictions = false; reasoner = owlAPI; /** background knowledge **/ import("moral_43instances_complex.owl"); Modified: trunk/examples/cross-benchmark/moral_reasoner/moral_43examples_complex_refexamples_fast.conf =================================================================== --- trunk/examples/cross-benchmark/moral_reasoner/moral_43examples_complex_refexamples_fast.conf 2008-06-05 19:06:48 UTC (rev 945) +++ trunk/examples/cross-benchmark/moral_reasoner/moral_43examples_complex_refexamples_fast.conf 2008-06-06 10:35:34 UTC (rev 946) @@ -9,6 +9,7 @@ ***********************/ algorithm = refexamples; +refexamples.useCardinalityRestrictions = false; reasoner = fastInstanceChecker; /** background knowledge **/ import("moral_43instances_complex.owl"); Modified: trunk/examples/cross-benchmark/moral_reasoner/moral_43examples_simple_refexamples.conf =================================================================== --- trunk/examples/cross-benchmark/moral_reasoner/moral_43examples_simple_refexamples.conf 2008-06-05 19:06:48 UTC (rev 945) +++ trunk/examples/cross-benchmark/moral_reasoner/moral_43examples_simple_refexamples.conf 2008-06-06 10:35:34 UTC (rev 946) @@ -9,6 +9,7 @@ ***********************/ algorithm = refexamples; +refexamples.useCardinalityRestrictions = false; reasoner = owlAPI; /** background knowledge **/ import("moral_43instances.owl"); Modified: trunk/examples/cross-benchmark/moral_reasoner/moral_43examples_simple_refexamples_fast.conf =================================================================== --- trunk/examples/cross-benchmark/moral_reasoner/moral_43examples_simple_refexamples_fast.conf 2008-06-05 19:06:48 UTC (rev 945) +++ trunk/examples/cross-benchmark/moral_reasoner/moral_43examples_simple_refexamples_fast.conf 2008-06-06 10:35:34 UTC (rev 946) @@ -9,6 +9,7 @@ ***********************/ algorithm = refexamples; +refexamples.useCardinalityRestrictions = false; reasoner = fastInstanceChecker; /** background knowledge **/ import("moral_43instances.owl"); Modified: trunk/examples/cross-benchmark/poker/pair_refexamples.conf =================================================================== --- trunk/examples/cross-benchmark/poker/pair_refexamples.conf 2008-06-05 19:06:48 UTC (rev 945) +++ trunk/examples/cross-benchmark/poker/pair_refexamples.conf 2008-06-06 10:35:34 UTC (rev 946) @@ -5,6 +5,7 @@ * Copyright (C) 2007, Jens Lehmann */ algorithm = refexamples; +refexamples.useCardinalityRestrictions = false; reasoner = owlAPI; /*Background knowledge*/ Modified: trunk/examples/cross-benchmark/poker/pair_refexamples_fast.conf =================================================================== --- trunk/examples/cross-benchmark/poker/pair_refexamples_fast.conf 2008-06-05 19:06:48 UTC (rev 945) +++ trunk/examples/cross-benchmark/poker/pair_refexamples_fast.conf 2008-06-06 10:35:34 UTC (rev 946) @@ -6,6 +6,7 @@ */ algorithm = refexamples; +refexamples.useCardinalityRestrictions = false; reasoner = fastInstanceChecker; /*Background knowledge*/ import("pair50.owl"); Modified: trunk/examples/cross-benchmark/poker/straight_refexamples.conf =================================================================== --- trunk/examples/cross-benchmark/poker/straight_refexamples.conf 2008-06-05 19:06:48 UTC (rev 945) +++ trunk/examples/cross-benchmark/poker/straight_refexamples.conf 2008-06-06 10:35:34 UTC (rev 946) @@ -7,6 +7,7 @@ /*Background knowledge*/ algorithm = refexamples; +refexamples.useCardinalityRestrictions = false; reasoner = owlAPI; import("straight.owl"); Modified: trunk/examples/cross-benchmark/poker/straight_refexamples_fast.conf =================================================================== --- trunk/examples/cross-benchmark/poker/straight_refexamples_fast.conf 2008-06-05 19:06:48 UTC (rev 945) +++ trunk/examples/cross-benchmark/poker/straight_refexamples_fast.conf 2008-06-06 10:35:34 UTC (rev 946) @@ -7,6 +7,7 @@ /*Background knowledge*/ algorithm = refexamples; +refexamples.useCardinalityRestrictions = false; reasoner = fastInstanceChecker; import("straight.owl"); Modified: trunk/examples/cross-benchmark/trains/trains_refexamples.conf =================================================================== --- trunk/examples/cross-benchmark/trains/trains_refexamples.conf 2008-06-05 19:06:48 UTC (rev 945) +++ trunk/examples/cross-benchmark/trains/trains_refexamples.conf 2008-06-06 10:35:34 UTC (rev 946) @@ -6,6 +6,7 @@ */ algorithm = refexamples; +refexamples.useCardinalityRestrictions = false; reasoner = owlAPI; hidePrefix = "http://example.com/foo#"; Modified: trunk/examples/cross-benchmark/trains/trains_refexamples_fast.conf =================================================================== --- trunk/examples/cross-benchmark/trains/trains_refexamples_fast.conf 2008-06-05 19:06:48 UTC (rev 945) +++ trunk/examples/cross-benchmark/trains/trains_refexamples_fast.conf 2008-06-06 10:35:34 UTC (rev 946) @@ -6,6 +6,7 @@ */ algorithm = refexamples; +refexamples.useCardinalityRestrictions = false; reasoner = fastInstanceChecker; hidePrefix = "http://example.com/foo#"; Modified: trunk/examples/yinyang_files/moralSimpleLearningProblem.xml =================================================================== --- trunk/examples/yinyang_files/moralSimpleLearningProblem.xml 2008-06-05 19:06:48 UTC (rev 945) +++ trunk/examples/yinyang_files/moralSimpleLearningProblem.xml 2008-06-06 10:35:34 UTC (rev 946) @@ -19,7 +19,9 @@ > -<Experiments/> +<Experiments> + <kFoldCrossValidation k="5"/> + </Experiments> <Namespaces> <Namespace uri="http://localhost/foo#"></Namespace> </Namespaces> Modified: trunk/src/dl-learner/org/dllearner/algorithms/refexamples/MultiHeuristic.java =================================================================== --- trunk/src/dl-learner/org/dllearner/algorithms/refexamples/MultiHeuristic.java 2008-06-05 19:06:48 UTC (rev 945) +++ trunk/src/dl-learner/org/dllearner/algorithms/refexamples/MultiHeuristic.java 2008-06-06 10:35:34 UTC (rev 946) @@ -51,7 +51,7 @@ * The value of a node is calculated as follows: * * <p><code>value = accuracy + gain bonus factor * accuracy gain - expansion penalty - * factor * horizontal expansion</code></p> + * factor * horizontal expansion - node children penalty factor * number of children of node</code></p> * * <p><code>accuracy = (TP + TN)/(P + N)</code></p> * @@ -62,11 +62,6 @@ * N = number of negative examples<br /> * </code></p> * - * TODO: Maybe the number of children of a node could be used instead of - * horiz. exp, because if a node has a very high number of children, the - * algorithm gets stuck easily, while it could still be very agile in other - * parts of the search space. - * * @author Jens Lehmann * */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jen...@us...> - 2008-06-05 19:06:52
|
Revision: 945 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=945&view=rev Author: jenslehmann Date: 2008-06-05 12:06:48 -0700 (Thu, 05 Jun 2008) Log Message: ----------- examples modified Added Paths: ----------- trunk/examples/cross-benchmark/forte/uncle_gp.conf trunk/examples/cross-benchmark/forte/uncle_hybrid.conf trunk/examples/cross-benchmark/moral_reasoner/moral_43examples_complex_gp.conf trunk/examples/cross-benchmark/moral_reasoner/moral_43examples_complex_hybrid.conf trunk/examples/cross-benchmark/poker/pair_gp.conf trunk/examples/cross-benchmark/poker/pair_hybrid.conf trunk/examples/cross-benchmark/poker/straight_gp.conf trunk/examples/cross-benchmark/poker/straight_hybrid.conf Removed Paths: ------------- trunk/examples/cross-benchmark/forte/uncle_refexamples_gp.conf trunk/examples/cross-benchmark/forte/uncle_refexamples_hybrid.conf trunk/examples/cross-benchmark/moral_reasoner/moral_43examples_complex_refexamples_gp.conf trunk/examples/cross-benchmark/moral_reasoner/moral_43examples_complex_refexamples_hybrid.conf trunk/examples/cross-benchmark/poker/pair_refexamples_gp.conf trunk/examples/cross-benchmark/poker/pair_refexamples_hybrid.conf trunk/examples/cross-benchmark/poker/straight_refexamples_gp.conf trunk/examples/cross-benchmark/poker/straight_refexamples_hybrid.conf Copied: trunk/examples/cross-benchmark/forte/uncle_gp.conf (from rev 944, trunk/examples/cross-benchmark/forte/uncle_refexamples_gp.conf) =================================================================== --- trunk/examples/cross-benchmark/forte/uncle_gp.conf (rev 0) +++ trunk/examples/cross-benchmark/forte/uncle_gp.conf 2008-06-05 19:06:48 UTC (rev 945) @@ -0,0 +1,124 @@ +/** + * Extracted from the FORTE (First Order Revision of Theories from Examples) + * data set: + * + * http://www.cs.utexas.edu/users/ml/forte.html + * + * The goal of this learning problem is to learn the concept of an uncle. + * + * In the file forte_family.kb, you can find a graphical representation of the + * family tree corresponding to the facts in this file. + * + * possible solution: (male AND (EXISTS hasSibling.EXISTS hasChild.TOP + * OR EXISTS married.EXISTS hasSibling.EXISTS hasChild.TOP)) + * + * Copyright (C) 2007, Jens Lehmann + */ + +algorithm = gp; +gp.algorithmType = generational; +gp.selectionType = rankSelection; +gp.generations = 50; +gp.useFixedNumberOfGenerations = true; +gp.numberOfIndividuals = 501; +gp.refinementProbability = 0; +gp.mutationProbability = 0.02; +gp.crossoverProbability = 0.8; +gp.hillClimbingProbability = 0; +posNegDefinitionLP.percentPerLenghtUnit = 0.02; +gp.maxConceptLength = 30; +reasoner = owlAPI; +import("forte_family.kb"); + +/** examples **/ + + +// complete example set ++art ++calvin ++carlos ++david ++eric ++fred ++frederick ++george ++harry ++jack ++james ++jonas ++karl ++leon ++mark ++melvin ++neil ++nero ++owen ++paul ++peter ++umo ++walt + +-alfred +-alice +-angela +-ann +-beatrice +-bob +-callie +-carl +-christy +-cornelia +-deanna +-elisa +-f12 +-f14 +-f19 +-f2 +-f20 +-f21 +-f22 +-f23 +-f25 +-f26 +-f28 +-f8 +-fannie +-gail +-helen +-jane +-janet +-kari +-lorrie +-m1 +-m10 +-m11 +-m13 +-m15 +-m16 +-m17 +-m18 +-m24 +-m27 +-m29 +-m3 +-m4 +-m5 +-m6 +-m7 +-m9 +-maria +-martha +-nancy +-nonnie +-oma +-paula +-prissie +-rachel +-ray +-regina +-steve +-susan +-terri +-terry +-wendy + Copied: trunk/examples/cross-benchmark/forte/uncle_hybrid.conf (from rev 944, trunk/examples/cross-benchmark/forte/uncle_refexamples_hybrid.conf) =================================================================== --- trunk/examples/cross-benchmark/forte/uncle_hybrid.conf (rev 0) +++ trunk/examples/cross-benchmark/forte/uncle_hybrid.conf 2008-06-05 19:06:48 UTC (rev 945) @@ -0,0 +1,125 @@ +/** + * Extracted from the FORTE (First Order Revision of Theories from Examples) + * data set: + * + * http://www.cs.utexas.edu/users/ml/forte.html + * + * The goal of this learning problem is to learn the concept of an uncle. + * + * In the file forte_family.kb, you can find a graphical representation of the + * family tree corresponding to the facts in this file. + * + * possible solution: (male AND (EXISTS hasSibling.EXISTS hasChild.TOP + * OR EXISTS married.EXISTS hasSibling.EXISTS hasChild.TOP)) + * + * Copyright (C) 2007, Jens Lehmann + */ + + +algorithm = gp; +gp.algorithmType = generational; +gp.selectionType = rankSelection; +gp.generations = 50; +gp.useFixedNumberOfGenerations = true; +gp.numberOfIndividuals = 501; +gp.refinementProbability = 0.65; +gp.mutationProbability = 0.02; +gp.crossoverProbability = 0.2; +gp.hillClimbingProbability = 0; +posNegDefinitionLP.percentPerLenghtUnit = 0.02; +gp.maxConceptLength = 30; +reasoner = owlAPI; +import("forte_family.kb"); + +/** examples **/ + + +// complete example set ++art ++calvin ++carlos ++david ++eric ++fred ++frederick ++george ++harry ++jack ++james ++jonas ++karl ++leon ++mark ++melvin ++neil ++nero ++owen ++paul ++peter ++umo ++walt + +-alfred +-alice +-angela +-ann +-beatrice +-bob +-callie +-carl +-christy +-cornelia +-deanna +-elisa +-f12 +-f14 +-f19 +-f2 +-f20 +-f21 +-f22 +-f23 +-f25 +-f26 +-f28 +-f8 +-fannie +-gail +-helen +-jane +-janet +-kari +-lorrie +-m1 +-m10 +-m11 +-m13 +-m15 +-m16 +-m17 +-m18 +-m24 +-m27 +-m29 +-m3 +-m4 +-m5 +-m6 +-m7 +-m9 +-maria +-martha +-nancy +-nonnie +-oma +-paula +-prissie +-rachel +-ray +-regina +-steve +-susan +-terri +-terry +-wendy + Deleted: trunk/examples/cross-benchmark/forte/uncle_refexamples_gp.conf =================================================================== --- trunk/examples/cross-benchmark/forte/uncle_refexamples_gp.conf 2008-06-05 14:29:31 UTC (rev 944) +++ trunk/examples/cross-benchmark/forte/uncle_refexamples_gp.conf 2008-06-05 19:06:48 UTC (rev 945) @@ -1,124 +0,0 @@ -/** - * Extracted from the FORTE (First Order Revision of Theories from Examples) - * data set: - * - * http://www.cs.utexas.edu/users/ml/forte.html - * - * The goal of this learning problem is to learn the concept of an uncle. - * - * In the file forte_family.kb, you can find a graphical representation of the - * family tree corresponding to the facts in this file. - * - * possible solution: (male AND (EXISTS hasSibling.EXISTS hasChild.TOP - * OR EXISTS married.EXISTS hasSibling.EXISTS hasChild.TOP)) - * - * Copyright (C) 2007, Jens Lehmann - */ - -algorithm = gp; -gp.algorithmType = generational; -gp.selectionType = rankSelection; -gp.generations = 50; -gp.useFixedNumberOfGenerations = true; -gp.numberOfIndividuals = 501; -gp.refinementProbability = 0; -gp.mutationProbability = 0.02; -gp.crossoverProbability = 0.8; -gp.hillClimbingProbability = 0; -posNegDefinitionLP.percentPerLenghtUnit = 0.02; -gp.maxConceptLength = 30; -reasoner = owlAPI; -import("forte_family.kb"); - -/** examples **/ - - -// complete example set -+art -+calvin -+carlos -+david -+eric -+fred -+frederick -+george -+harry -+jack -+james -+jonas -+karl -+leon -+mark -+melvin -+neil -+nero -+owen -+paul -+peter -+umo -+walt - --alfred --alice --angela --ann --beatrice --bob --callie --carl --christy --cornelia --deanna --elisa --f12 --f14 --f19 --f2 --f20 --f21 --f22 --f23 --f25 --f26 --f28 --f8 --fannie --gail --helen --jane --janet --kari --lorrie --m1 --m10 --m11 --m13 --m15 --m16 --m17 --m18 --m24 --m27 --m29 --m3 --m4 --m5 --m6 --m7 --m9 --maria --martha --nancy --nonnie --oma --paula --prissie --rachel --ray --regina --steve --susan --terri --terry --wendy - Deleted: trunk/examples/cross-benchmark/forte/uncle_refexamples_hybrid.conf =================================================================== --- trunk/examples/cross-benchmark/forte/uncle_refexamples_hybrid.conf 2008-06-05 14:29:31 UTC (rev 944) +++ trunk/examples/cross-benchmark/forte/uncle_refexamples_hybrid.conf 2008-06-05 19:06:48 UTC (rev 945) @@ -1,125 +0,0 @@ -/** - * Extracted from the FORTE (First Order Revision of Theories from Examples) - * data set: - * - * http://www.cs.utexas.edu/users/ml/forte.html - * - * The goal of this learning problem is to learn the concept of an uncle. - * - * In the file forte_family.kb, you can find a graphical representation of the - * family tree corresponding to the facts in this file. - * - * possible solution: (male AND (EXISTS hasSibling.EXISTS hasChild.TOP - * OR EXISTS married.EXISTS hasSibling.EXISTS hasChild.TOP)) - * - * Copyright (C) 2007, Jens Lehmann - */ - - -algorithm = gp; -gp.algorithmType = generational; -gp.selectionType = rankSelection; -gp.generations = 50; -gp.useFixedNumberOfGenerations = true; -gp.numberOfIndividuals = 501; -gp.refinementProbability = 0.65; -gp.mutationProbability = 0.02; -gp.crossoverProbability = 0.2; -gp.hillClimbingProbability = 0; -posNegDefinitionLP.percentPerLenghtUnit = 0.02; -gp.maxConceptLength = 30; -reasoner = owlAPI; -import("forte_family.kb"); - -/** examples **/ - - -// complete example set -+art -+calvin -+carlos -+david -+eric -+fred -+frederick -+george -+harry -+jack -+james -+jonas -+karl -+leon -+mark -+melvin -+neil -+nero -+owen -+paul -+peter -+umo -+walt - --alfred --alice --angela --ann --beatrice --bob --callie --carl --christy --cornelia --deanna --elisa --f12 --f14 --f19 --f2 --f20 --f21 --f22 --f23 --f25 --f26 --f28 --f8 --fannie --gail --helen --jane --janet --kari --lorrie --m1 --m10 --m11 --m13 --m15 --m16 --m17 --m18 --m24 --m27 --m29 --m3 --m4 --m5 --m6 --m7 --m9 --maria --martha --nancy --nonnie --oma --paula --prissie --rachel --ray --regina --steve --susan --terri --terry --wendy - Copied: trunk/examples/cross-benchmark/moral_reasoner/moral_43examples_complex_gp.conf (from rev 944, trunk/examples/cross-benchmark/moral_reasoner/moral_43examples_complex_refexamples_gp.conf) =================================================================== --- trunk/examples/cross-benchmark/moral_reasoner/moral_43examples_complex_gp.conf (rev 0) +++ trunk/examples/cross-benchmark/moral_reasoner/moral_43examples_complex_gp.conf 2008-06-05 19:06:48 UTC (rev 945) @@ -0,0 +1,72 @@ + /*********************** + solution is: +(severity_harm AND (NOT benefit_victim) AND (vicarious OR voluntary)) + + + Examples: + 23 positive + 20 negative + + ***********************/ + algorithm = gp; +gp.algorithmType = generational; +gp.selectionType = rankSelection; +gp.generations = 50; +gp.useFixedNumberOfGenerations = true; +gp.numberOfIndividuals = 501; +gp.refinementProbability = 0; +gp.mutationProbability = 0.02; +gp.crossoverProbability = 0.8; +gp.hillClimbingProbability = 0; +posNegDefinitionLP.percentPerLenghtUnit = 0.02; +gp.maxConceptLength = 30; +reasoner = owlAPI; +/** background knowledge **/ +import("moral_43instances_complex.owl"); + + +/** Examples **/ ++p0 ++p1 ++p2 ++p3 ++p4 ++p5 ++p6 ++p7 ++p8 ++p9 ++p10 ++p90 ++p91 ++p92 ++p93 ++p94 ++p95 ++p96 ++p97 ++p98 ++p99 ++p100 ++p101 +-n0 +-n1 +-n2 +-n3 +//-n4 +-n5 +-n6 +-n7 +-n8 +-n9 +-n10 +-n90 +-n91 +-n92 +-n93 +-n94 +-n95 +-n96 +-n97 +-n98 +-n99 Copied: trunk/examples/cross-benchmark/moral_reasoner/moral_43examples_complex_hybrid.conf (from rev 944, trunk/examples/cross-benchmark/moral_reasoner/moral_43examples_complex_refexamples_hybrid.conf) =================================================================== --- trunk/examples/cross-benchmark/moral_reasoner/moral_43examples_complex_hybrid.conf (rev 0) +++ trunk/examples/cross-benchmark/moral_reasoner/moral_43examples_complex_hybrid.conf 2008-06-05 19:06:48 UTC (rev 945) @@ -0,0 +1,72 @@ + /*********************** + solution is: +(severity_harm AND (NOT benefit_victim) AND (vicarious OR voluntary)) + + + Examples: + 23 positive + 20 negative + + ***********************/ + algorithm = gp; +gp.algorithmType = generational; +gp.selectionType = rankSelection; +gp.generations = 50; +gp.useFixedNumberOfGenerations = true; +gp.numberOfIndividuals = 501; +gp.refinementProbability = 0.65; +gp.mutationProbability = 0.02; +gp.crossoverProbability = 0.2; +gp.hillClimbingProbability = 0; +posNegDefinitionLP.percentPerLenghtUnit = 0.02; +gp.maxConceptLength = 30; +reasoner = owlAPI; +/** background knowledge **/ +import("moral_43instances_complex.owl"); + + +/** Examples **/ ++p0 ++p1 ++p2 ++p3 ++p4 ++p5 ++p6 ++p7 ++p8 ++p9 ++p10 ++p90 ++p91 ++p92 ++p93 ++p94 ++p95 ++p96 ++p97 ++p98 ++p99 ++p100 ++p101 +-n0 +-n1 +-n2 +-n3 +//-n4 +-n5 +-n6 +-n7 +-n8 +-n9 +-n10 +-n90 +-n91 +-n92 +-n93 +-n94 +-n95 +-n96 +-n97 +-n98 +-n99 Deleted: trunk/examples/cross-benchmark/moral_reasoner/moral_43examples_complex_refexamples_gp.conf =================================================================== --- trunk/examples/cross-benchmark/moral_reasoner/moral_43examples_complex_refexamples_gp.conf 2008-06-05 14:29:31 UTC (rev 944) +++ trunk/examples/cross-benchmark/moral_reasoner/moral_43examples_complex_refexamples_gp.conf 2008-06-05 19:06:48 UTC (rev 945) @@ -1,72 +0,0 @@ - /*********************** - solution is: -(severity_harm AND (NOT benefit_victim) AND (vicarious OR voluntary)) - - - Examples: - 23 positive - 20 negative - - ***********************/ - algorithm = gp; -gp.algorithmType = generational; -gp.selectionType = rankSelection; -gp.generations = 50; -gp.useFixedNumberOfGenerations = true; -gp.numberOfIndividuals = 501; -gp.refinementProbability = 0; -gp.mutationProbability = 0.02; -gp.crossoverProbability = 0.8; -gp.hillClimbingProbability = 0; -posNegDefinitionLP.percentPerLenghtUnit = 0.02; -gp.maxConceptLength = 30; -reasoner = owlAPI; -/** background knowledge **/ -import("moral_43instances_complex.owl"); - - -/** Examples **/ -+p0 -+p1 -+p2 -+p3 -+p4 -+p5 -+p6 -+p7 -+p8 -+p9 -+p10 -+p90 -+p91 -+p92 -+p93 -+p94 -+p95 -+p96 -+p97 -+p98 -+p99 -+p100 -+p101 --n0 --n1 --n2 --n3 -//-n4 --n5 --n6 --n7 --n8 --n9 --n10 --n90 --n91 --n92 --n93 --n94 --n95 --n96 --n97 --n98 --n99 Deleted: trunk/examples/cross-benchmark/moral_reasoner/moral_43examples_complex_refexamples_hybrid.conf =================================================================== --- trunk/examples/cross-benchmark/moral_reasoner/moral_43examples_complex_refexamples_hybrid.conf 2008-06-05 14:29:31 UTC (rev 944) +++ trunk/examples/cross-benchmark/moral_reasoner/moral_43examples_complex_refexamples_hybrid.conf 2008-06-05 19:06:48 UTC (rev 945) @@ -1,72 +0,0 @@ - /*********************** - solution is: -(severity_harm AND (NOT benefit_victim) AND (vicarious OR voluntary)) - - - Examples: - 23 positive - 20 negative - - ***********************/ - algorithm = gp; -gp.algorithmType = generational; -gp.selectionType = rankSelection; -gp.generations = 50; -gp.useFixedNumberOfGenerations = true; -gp.numberOfIndividuals = 501; -gp.refinementProbability = 0.65; -gp.mutationProbability = 0.02; -gp.crossoverProbability = 0.2; -gp.hillClimbingProbability = 0; -posNegDefinitionLP.percentPerLenghtUnit = 0.02; -gp.maxConceptLength = 30; -reasoner = owlAPI; -/** background knowledge **/ -import("moral_43instances_complex.owl"); - - -/** Examples **/ -+p0 -+p1 -+p2 -+p3 -+p4 -+p5 -+p6 -+p7 -+p8 -+p9 -+p10 -+p90 -+p91 -+p92 -+p93 -+p94 -+p95 -+p96 -+p97 -+p98 -+p99 -+p100 -+p101 --n0 --n1 --n2 --n3 -//-n4 --n5 --n6 --n7 --n8 --n9 --n10 --n90 --n91 --n92 --n93 --n94 --n95 --n96 --n97 --n98 --n99 Copied: trunk/examples/cross-benchmark/poker/pair_gp.conf (from rev 944, trunk/examples/cross-benchmark/poker/pair_refexamples_gp.conf) =================================================================== --- trunk/examples/cross-benchmark/poker/pair_gp.conf (rev 0) +++ trunk/examples/cross-benchmark/poker/pair_gp.conf 2008-06-05 19:06:48 UTC (rev 945) @@ -0,0 +1,73 @@ +/** + * See pair.conf. This is the same learning problem, but loading + * background knowledge from an OWL file instead. + * + * Copyright (C) 2007, Jens Lehmann + */ + +algorithm = gp; +gp.algorithmType = generational; +gp.selectionType = rankSelection; +gp.generations = 50; +gp.useFixedNumberOfGenerations = true; +gp.numberOfIndividuals = 501; +gp.refinementProbability = 0; +gp.mutationProbability = 0.02; +gp.crossoverProbability = 0.8; +gp.hillClimbingProbability = 0; +posNegDefinitionLP.percentPerLenghtUnit = 0.02; +gp.maxConceptLength = 30; +reasoner = owlAPI; +/*Background knowledge*/ +import("pair50.owl"); + +/*Examples*/ +-"http://localhost/foo#hand0" +-"http://localhost/foo#hand1" +-"http://localhost/foo#hand2" +-"http://localhost/foo#hand3" +-"http://localhost/foo#hand4" +-"http://localhost/foo#hand5" +-"http://localhost/foo#hand6" +-"http://localhost/foo#hand7" +-"http://localhost/foo#hand8" ++"http://localhost/foo#hand9" +-"http://localhost/foo#hand10" +-"http://localhost/foo#hand11" +-"http://localhost/foo#hand12" ++"http://localhost/foo#hand13" +-"http://localhost/foo#hand14" +-"http://localhost/foo#hand15" +-"http://localhost/foo#hand16" +-"http://localhost/foo#hand17" ++"http://localhost/foo#hand18" ++"http://localhost/foo#hand19" +-"http://localhost/foo#hand20" ++"http://localhost/foo#hand21" ++"http://localhost/foo#hand22" ++"http://localhost/foo#hand23" ++"http://localhost/foo#hand24" ++"http://localhost/foo#hand25" ++"http://localhost/foo#hand26" +-"http://localhost/foo#hand27" +-"http://localhost/foo#hand28" ++"http://localhost/foo#hand29" +-"http://localhost/foo#hand30" +-"http://localhost/foo#hand31" +-"http://localhost/foo#hand32" +-"http://localhost/foo#hand33" +-"http://localhost/foo#hand34" ++"http://localhost/foo#hand35" ++"http://localhost/foo#hand36" +-"http://localhost/foo#hand37" ++"http://localhost/foo#hand38" ++"http://localhost/foo#hand39" ++"http://localhost/foo#hand40" ++"http://localhost/foo#hand41" +-"http://localhost/foo#hand42" ++"http://localhost/foo#hand43" +-"http://localhost/foo#hand44" +-"http://localhost/foo#hand45" +-"http://localhost/foo#hand46" ++"http://localhost/foo#hand47" ++"http://localhost/foo#hand48" Copied: trunk/examples/cross-benchmark/poker/pair_hybrid.conf (from rev 944, trunk/examples/cross-benchmark/poker/pair_refexamples_hybrid.conf) =================================================================== --- trunk/examples/cross-benchmark/poker/pair_hybrid.conf (rev 0) +++ trunk/examples/cross-benchmark/poker/pair_hybrid.conf 2008-06-05 19:06:48 UTC (rev 945) @@ -0,0 +1,73 @@ +/** + * See pair.conf. This is the same learning problem, but loading + * background knowledge from an OWL file instead. + * + * Copyright (C) 2007, Jens Lehmann + */ + +algorithm = gp; +gp.algorithmType = generational; +gp.selectionType = rankSelection; +gp.generations = 50; +gp.useFixedNumberOfGenerations = true; +gp.numberOfIndividuals = 501; +gp.refinementProbability = 0.65; +gp.mutationProbability = 0.02; +gp.crossoverProbability = 0.2; +gp.hillClimbingProbability = 0; +posNegDefinitionLP.percentPerLenghtUnit = 0.02; +gp.maxConceptLength = 30; +reasoner = owlAPI; +/*Background knowledge*/ +import("pair50.owl"); + +/*Examples*/ +-"http://localhost/foo#hand0" +-"http://localhost/foo#hand1" +-"http://localhost/foo#hand2" +-"http://localhost/foo#hand3" +-"http://localhost/foo#hand4" +-"http://localhost/foo#hand5" +-"http://localhost/foo#hand6" +-"http://localhost/foo#hand7" +-"http://localhost/foo#hand8" ++"http://localhost/foo#hand9" +-"http://localhost/foo#hand10" +-"http://localhost/foo#hand11" +-"http://localhost/foo#hand12" ++"http://localhost/foo#hand13" +-"http://localhost/foo#hand14" +-"http://localhost/foo#hand15" +-"http://localhost/foo#hand16" +-"http://localhost/foo#hand17" ++"http://localhost/foo#hand18" ++"http://localhost/foo#hand19" +-"http://localhost/foo#hand20" ++"http://localhost/foo#hand21" ++"http://localhost/foo#hand22" ++"http://localhost/foo#hand23" ++"http://localhost/foo#hand24" ++"http://localhost/foo#hand25" ++"http://localhost/foo#hand26" +-"http://localhost/foo#hand27" +-"http://localhost/foo#hand28" ++"http://localhost/foo#hand29" +-"http://localhost/foo#hand30" +-"http://localhost/foo#hand31" +-"http://localhost/foo#hand32" +-"http://localhost/foo#hand33" +-"http://localhost/foo#hand34" ++"http://localhost/foo#hand35" ++"http://localhost/foo#hand36" +-"http://localhost/foo#hand37" ++"http://localhost/foo#hand38" ++"http://localhost/foo#hand39" ++"http://localhost/foo#hand40" ++"http://localhost/foo#hand41" +-"http://localhost/foo#hand42" ++"http://localhost/foo#hand43" +-"http://localhost/foo#hand44" +-"http://localhost/foo#hand45" +-"http://localhost/foo#hand46" ++"http://localhost/foo#hand47" ++"http://localhost/foo#hand48" Deleted: trunk/examples/cross-benchmark/poker/pair_refexamples_gp.conf =================================================================== --- trunk/examples/cross-benchmark/poker/pair_refexamples_gp.conf 2008-06-05 14:29:31 UTC (rev 944) +++ trunk/examples/cross-benchmark/poker/pair_refexamples_gp.conf 2008-06-05 19:06:48 UTC (rev 945) @@ -1,73 +0,0 @@ -/** - * See pair.conf. This is the same learning problem, but loading - * background knowledge from an OWL file instead. - * - * Copyright (C) 2007, Jens Lehmann - */ - -algorithm = gp; -gp.algorithmType = generational; -gp.selectionType = rankSelection; -gp.generations = 50; -gp.useFixedNumberOfGenerations = true; -gp.numberOfIndividuals = 501; -gp.refinementProbability = 0; -gp.mutationProbability = 0.02; -gp.crossoverProbability = 0.8; -gp.hillClimbingProbability = 0; -posNegDefinitionLP.percentPerLenghtUnit = 0.02; -gp.maxConceptLength = 30; -reasoner = owlAPI; -/*Background knowledge*/ -import("pair50.owl"); - -/*Examples*/ --"http://localhost/foo#hand0" --"http://localhost/foo#hand1" --"http://localhost/foo#hand2" --"http://localhost/foo#hand3" --"http://localhost/foo#hand4" --"http://localhost/foo#hand5" --"http://localhost/foo#hand6" --"http://localhost/foo#hand7" --"http://localhost/foo#hand8" -+"http://localhost/foo#hand9" --"http://localhost/foo#hand10" --"http://localhost/foo#hand11" --"http://localhost/foo#hand12" -+"http://localhost/foo#hand13" --"http://localhost/foo#hand14" --"http://localhost/foo#hand15" --"http://localhost/foo#hand16" --"http://localhost/foo#hand17" -+"http://localhost/foo#hand18" -+"http://localhost/foo#hand19" --"http://localhost/foo#hand20" -+"http://localhost/foo#hand21" -+"http://localhost/foo#hand22" -+"http://localhost/foo#hand23" -+"http://localhost/foo#hand24" -+"http://localhost/foo#hand25" -+"http://localhost/foo#hand26" --"http://localhost/foo#hand27" --"http://localhost/foo#hand28" -+"http://localhost/foo#hand29" --"http://localhost/foo#hand30" --"http://localhost/foo#hand31" --"http://localhost/foo#hand32" --"http://localhost/foo#hand33" --"http://localhost/foo#hand34" -+"http://localhost/foo#hand35" -+"http://localhost/foo#hand36" --"http://localhost/foo#hand37" -+"http://localhost/foo#hand38" -+"http://localhost/foo#hand39" -+"http://localhost/foo#hand40" -+"http://localhost/foo#hand41" --"http://localhost/foo#hand42" -+"http://localhost/foo#hand43" --"http://localhost/foo#hand44" --"http://localhost/foo#hand45" --"http://localhost/foo#hand46" -+"http://localhost/foo#hand47" -+"http://localhost/foo#hand48" Deleted: trunk/examples/cross-benchmark/poker/pair_refexamples_hybrid.conf =================================================================== --- trunk/examples/cross-benchmark/poker/pair_refexamples_hybrid.conf 2008-06-05 14:29:31 UTC (rev 944) +++ trunk/examples/cross-benchmark/poker/pair_refexamples_hybrid.conf 2008-06-05 19:06:48 UTC (rev 945) @@ -1,73 +0,0 @@ -/** - * See pair.conf. This is the same learning problem, but loading - * background knowledge from an OWL file instead. - * - * Copyright (C) 2007, Jens Lehmann - */ - -algorithm = gp; -gp.algorithmType = generational; -gp.selectionType = rankSelection; -gp.generations = 50; -gp.useFixedNumberOfGenerations = true; -gp.numberOfIndividuals = 501; -gp.refinementProbability = 0.65; -gp.mutationProbability = 0.02; -gp.crossoverProbability = 0.2; -gp.hillClimbingProbability = 0; -posNegDefinitionLP.percentPerLenghtUnit = 0.02; -gp.maxConceptLength = 30; -reasoner = owlAPI; -/*Background knowledge*/ -import("pair50.owl"); - -/*Examples*/ --"http://localhost/foo#hand0" --"http://localhost/foo#hand1" --"http://localhost/foo#hand2" --"http://localhost/foo#hand3" --"http://localhost/foo#hand4" --"http://localhost/foo#hand5" --"http://localhost/foo#hand6" --"http://localhost/foo#hand7" --"http://localhost/foo#hand8" -+"http://localhost/foo#hand9" --"http://localhost/foo#hand10" --"http://localhost/foo#hand11" --"http://localhost/foo#hand12" -+"http://localhost/foo#hand13" --"http://localhost/foo#hand14" --"http://localhost/foo#hand15" --"http://localhost/foo#hand16" --"http://localhost/foo#hand17" -+"http://localhost/foo#hand18" -+"http://localhost/foo#hand19" --"http://localhost/foo#hand20" -+"http://localhost/foo#hand21" -+"http://localhost/foo#hand22" -+"http://localhost/foo#hand23" -+"http://localhost/foo#hand24" -+"http://localhost/foo#hand25" -+"http://localhost/foo#hand26" --"http://localhost/foo#hand27" --"http://localhost/foo#hand28" -+"http://localhost/foo#hand29" --"http://localhost/foo#hand30" --"http://localhost/foo#hand31" --"http://localhost/foo#hand32" --"http://localhost/foo#hand33" --"http://localhost/foo#hand34" -+"http://localhost/foo#hand35" -+"http://localhost/foo#hand36" --"http://localhost/foo#hand37" -+"http://localhost/foo#hand38" -+"http://localhost/foo#hand39" -+"http://localhost/foo#hand40" -+"http://localhost/foo#hand41" --"http://localhost/foo#hand42" -+"http://localhost/foo#hand43" --"http://localhost/foo#hand44" --"http://localhost/foo#hand45" --"http://localhost/foo#hand46" -+"http://localhost/foo#hand47" -+"http://localhost/foo#hand48" Copied: trunk/examples/cross-benchmark/poker/straight_gp.conf (from rev 944, trunk/examples/cross-benchmark/poker/straight_refexamples_gp.conf) =================================================================== --- trunk/examples/cross-benchmark/poker/straight_gp.conf (rev 0) +++ trunk/examples/cross-benchmark/poker/straight_gp.conf 2008-06-05 19:06:48 UTC (rev 945) @@ -0,0 +1,80 @@ +/** + * See straight.conf. This is the same learning problem, but loading + * background knowledge from an OWL file instead. + * + * Copyright (C) 2007, Jens Lehmann + */ + +/*Background knowledge*/ +algorithm = gp; +gp.algorithmType = generational; +gp.selectionType = rankSelection; +gp.generations = 50; +gp.useFixedNumberOfGenerations = true; +gp.numberOfIndividuals = 501; +gp.refinementProbability = 0; +gp.mutationProbability = 0.02; +gp.crossoverProbability = 0.8; +gp.hillClimbingProbability = 0; +posNegDefinitionLP.percentPerLenghtUnit = 0.02; +gp.maxConceptLength = 30; +reasoner = owlAPI; +import("straight.owl"); + +/*Examples*/ ++"http://localhost/foo#hand1" ++"http://localhost/foo#hand22" ++"http://localhost/foo#hand40" ++"http://localhost/foo#hand44" + +-"http://localhost/foo#hand0" +-"http://localhost/foo#hand2" +-"http://localhost/foo#hand3" +-"http://localhost/foo#hand4" +-"http://localhost/foo#hand5" +-"http://localhost/foo#hand6" +-"http://localhost/foo#hand7" +-"http://localhost/foo#hand8" +-"http://localhost/foo#hand9" +-"http://localhost/foo#hand10" +-"http://localhost/foo#hand11" +-"http://localhost/foo#hand12" +-"http://localhost/foo#hand13" +-"http://localhost/foo#hand14" +-"http://localhost/foo#hand15" +-"http://localhost/foo#hand16" +-"http://localhost/foo#hand17" +-"http://localhost/foo#hand18" +-"http://localhost/foo#hand19" +-"http://localhost/foo#hand20" +-"http://localhost/foo#hand21" +-"http://localhost/foo#hand23" +-"http://localhost/foo#hand24" +-"http://localhost/foo#hand25" +-"http://localhost/foo#hand26" +-"http://localhost/foo#hand27" +-"http://localhost/foo#hand28" +-"http://localhost/foo#hand29" +-"http://localhost/foo#hand30" +-"http://localhost/foo#hand31" +-"http://localhost/foo#hand32" +-"http://localhost/foo#hand33" +-"http://localhost/foo#hand34" +-"http://localhost/foo#hand35" +-"http://localhost/foo#hand36" +-"http://localhost/foo#hand37" +-"http://localhost/foo#hand38" +-"http://localhost/foo#hand39" +-"http://localhost/foo#hand41" +-"http://localhost/foo#hand42" +-"http://localhost/foo#hand43" +-"http://localhost/foo#hand45" +-"http://localhost/foo#hand46" +-"http://localhost/foo#hand47" +-"http://localhost/foo#hand48" +-"http://localhost/foo#hand49" +-"http://localhost/foo#hand50" +-"http://localhost/foo#hand51" +-"http://localhost/foo#hand52" +-"http://localhost/foo#hand53" +-"http://localhost/foo#hand54" Copied: trunk/examples/cross-benchmark/poker/straight_hybrid.conf (from rev 944, trunk/examples/cross-benchmark/poker/straight_refexamples_hybrid.conf) =================================================================== --- trunk/examples/cross-benchmark/poker/straight_hybrid.conf (rev 0) +++ trunk/examples/cross-benchmark/poker/straight_hybrid.conf 2008-06-05 19:06:48 UTC (rev 945) @@ -0,0 +1,80 @@ +/** + * See straight.conf. This is the same learning problem, but loading + * background knowledge from an OWL file instead. + * + * Copyright (C) 2007, Jens Lehmann + */ + +/*Background knowledge*/ +algorithm = gp; +gp.algorithmType = generational; +gp.selectionType = rankSelection; +gp.generations = 50; +gp.useFixedNumberOfGenerations = true; +gp.numberOfIndividuals = 501; +gp.refinementProbability = 0.65; +gp.mutationProbability = 0.02; +gp.crossoverProbability = 0.2; +gp.hillClimbingProbability = 0; +posNegDefinitionLP.percentPerLenghtUnit = 0.02; +gp.maxConceptLength = 30; +reasoner = owlAPI; +import("straight.owl"); + +/*Examples*/ ++"http://localhost/foo#hand1" ++"http://localhost/foo#hand22" ++"http://localhost/foo#hand40" ++"http://localhost/foo#hand44" + +-"http://localhost/foo#hand0" +-"http://localhost/foo#hand2" +-"http://localhost/foo#hand3" +-"http://localhost/foo#hand4" +-"http://localhost/foo#hand5" +-"http://localhost/foo#hand6" +-"http://localhost/foo#hand7" +-"http://localhost/foo#hand8" +-"http://localhost/foo#hand9" +-"http://localhost/foo#hand10" +-"http://localhost/foo#hand11" +-"http://localhost/foo#hand12" +-"http://localhost/foo#hand13" +-"http://localhost/foo#hand14" +-"http://localhost/foo#hand15" +-"http://localhost/foo#hand16" +-"http://localhost/foo#hand17" +-"http://localhost/foo#hand18" +-"http://localhost/foo#hand19" +-"http://localhost/foo#hand20" +-"http://localhost/foo#hand21" +-"http://localhost/foo#hand23" +-"http://localhost/foo#hand24" +-"http://localhost/foo#hand25" +-"http://localhost/foo#hand26" +-"http://localhost/foo#hand27" +-"http://localhost/foo#hand28" +-"http://localhost/foo#hand29" +-"http://localhost/foo#hand30" +-"http://localhost/foo#hand31" +-"http://localhost/foo#hand32" +-"http://localhost/foo#hand33" +-"http://localhost/foo#hand34" +-"http://localhost/foo#hand35" +-"http://localhost/foo#hand36" +-"http://localhost/foo#hand37" +-"http://localhost/foo#hand38" +-"http://localhost/foo#hand39" +-"http://localhost/foo#hand41" +-"http://localhost/foo#hand42" +-"http://localhost/foo#hand43" +-"http://localhost/foo#hand45" +-"http://localhost/foo#hand46" +-"http://localhost/foo#hand47" +-"http://localhost/foo#hand48" +-"http://localhost/foo#hand49" +-"http://localhost/foo#hand50" +-"http://localhost/foo#hand51" +-"http://localhost/foo#hand52" +-"http://localhost/foo#hand53" +-"http://localhost/foo#hand54" Deleted: trunk/examples/cross-benchmark/poker/straight_refexamples_gp.conf =================================================================== --- trunk/examples/cross-benchmark/poker/straight_refexamples_gp.conf 2008-06-05 14:29:31 UTC (rev 944) +++ trunk/examples/cross-benchmark/poker/straight_refexamples_gp.conf 2008-06-05 19:06:48 UTC (rev 945) @@ -1,80 +0,0 @@ -/** - * See straight.conf. This is the same learning problem, but loading - * background knowledge from an OWL file instead. - * - * Copyright (C) 2007, Jens Lehmann - */ - -/*Background knowledge*/ -algorithm = gp; -gp.algorithmType = generational; -gp.selectionType = rankSelection; -gp.generations = 50; -gp.useFixedNumberOfGenerations = true; -gp.numberOfIndividuals = 501; -gp.refinementProbability = 0; -gp.mutationProbability = 0.02; -gp.crossoverProbability = 0.8; -gp.hillClimbingProbability = 0; -posNegDefinitionLP.percentPerLenghtUnit = 0.02; -gp.maxConceptLength = 30; -reasoner = owlAPI; -import("straight.owl"); - -/*Examples*/ -+"http://localhost/foo#hand1" -+"http://localhost/foo#hand22" -+"http://localhost/foo#hand40" -+"http://localhost/foo#hand44" - --"http://localhost/foo#hand0" --"http://localhost/foo#hand2" --"http://localhost/foo#hand3" --"http://localhost/foo#hand4" --"http://localhost/foo#hand5" --"http://localhost/foo#hand6" --"http://localhost/foo#hand7" --"http://localhost/foo#hand8" --"http://localhost/foo#hand9" --"http://localhost/foo#hand10" --"http://localhost/foo#hand11" --"http://localhost/foo#hand12" --"http://localhost/foo#hand13" --"http://localhost/foo#hand14" --"http://localhost/foo#hand15" --"http://localhost/foo#hand16" --"http://localhost/foo#hand17" --"http://localhost/foo#hand18" --"http://localhost/foo#hand19" --"http://localhost/foo#hand20" --"http://localhost/foo#hand21" --"http://localhost/foo#hand23" --"http://localhost/foo#hand24" --"http://localhost/foo#hand25" --"http://localhost/foo#hand26" --"http://localhost/foo#hand27" --"http://localhost/foo#hand28" --"http://localhost/foo#hand29" --"http://localhost/foo#hand30" --"http://localhost/foo#hand31" --"http://localhost/foo#hand32" --"http://localhost/foo#hand33" --"http://localhost/foo#hand34" --"http://localhost/foo#hand35" --"http://localhost/foo#hand36" --"http://localhost/foo#hand37" --"http://localhost/foo#hand38" --"http://localhost/foo#hand39" --"http://localhost/foo#hand41" --"http://localhost/foo#hand42" --"http://localhost/foo#hand43" --"http://localhost/foo#hand45" --"http://localhost/foo#hand46" --"http://localhost/foo#hand47" --"http://localhost/foo#hand48" --"http://localhost/foo#hand49" --"http://localhost/foo#hand50" --"http://localhost/foo#hand51" --"http://localhost/foo#hand52" --"http://localhost/foo#hand53" --"http://localhost/foo#hand54" Deleted: trunk/examples/cross-benchmark/poker/straight_refexamples_hybrid.conf =================================================================== --- trunk/examples/cross-benchmark/poker/straight_refexamples_hybrid.conf 2008-06-05 14:29:31 UTC (rev 944) +++ trunk/examples/cross-benchmark/poker/straight_refexamples_hybrid.conf 2008-06-05 19:06:48 UTC (rev 945) @@ -1,80 +0,0 @@ -/** - * See straight.conf. This is the same learning problem, but loading - * background knowledge from an OWL file instead. - * - * Copyright (C) 2007, Jens Lehmann - */ - -/*Background knowledge*/ -algorithm = gp; -gp.algorithmType = generational; -gp.selectionType = rankSelection; -gp.generations = 50; -gp.useFixedNumberOfGenerations = true; -gp.numberOfIndividuals = 501; -gp.refinementProbability = 0.65; -gp.mutationProbability = 0.02; -gp.crossoverProbability = 0.2; -gp.hillClimbingProbability = 0; -posNegDefinitionLP.percentPerLenghtUnit = 0.02; -gp.maxConceptLength = 30; -reasoner = owlAPI; -import("straight.owl"); - -/*Examples*/ -+"http://localhost/foo#hand1" -+"http://localhost/foo#hand22" -+"http://localhost/foo#hand40" -+"http://localhost/foo#hand44" - --"http://localhost/foo#hand0" --"http://localhost/foo#hand2" --"http://localhost/foo#hand3" --"http://localhost/foo#hand4" --"http://localhost/foo#hand5" --"http://localhost/foo#hand6" --"http://localhost/foo#hand7" --"http://localhost/foo#hand8" --"http://localhost/foo#hand9" --"http://localhost/foo#hand10" --"http://localhost/foo#hand11" --"http://localhost/foo#hand12" --"http://localhost/foo#hand13" --"http://localhost/foo#hand14" --"http://localhost/foo#hand15" --"http://localhost/foo#hand16" --"http://localhost/foo#hand17" --"http://localhost/foo#hand18" --"http://localhost/foo#hand19" --"http://localhost/foo#hand20" --"http://localhost/foo#hand21" --"http://localhost/foo#hand23" --"http://localhost/foo#hand24" --"http://localhost/foo#hand25" --"http://localhost/foo#hand26" --"http://localhost/foo#hand27" --"http://localhost/foo#hand28" --"http://localhost/foo#hand29" --"http://localhost/foo#hand30" --"http://localhost/foo#hand31" --"http://localhost/foo#hand32" --"http://localhost/foo#hand33" --"http://localhost/foo#hand34" --"http://localhost/foo#hand35" --"http://localhost/foo#hand36" --"http://localhost/foo#hand37" --"http://localhost/foo#hand38" --"http://localhost/foo#hand39" --"http://localhost/foo#hand41" --"http://localhost/foo#hand42" --"http://localhost/foo#hand43" --"http://localhost/foo#hand45" --"http://localhost/foo#hand46" --"http://localhost/foo#hand47" --"http://localhost/foo#hand48" --"http://localhost/foo#hand49" --"http://localhost/foo#hand50" --"http://localhost/foo#hand51" --"http://localhost/foo#hand52" --"http://localhost/foo#hand53" --"http://localhost/foo#hand54" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Jen...@us...> - 2008-06-05 14:29:44
|
Revision: 944 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=944&view=rev Author: JensLehmann Date: 2008-06-05 07:29:31 -0700 (Thu, 05 Jun 2008) Log Message: ----------- more examples Added Paths: ----------- trunk/examples/cross-benchmark/arch/ trunk/examples/cross-benchmark/arch/arch.owl trunk/examples/cross-benchmark/arch/arch_gp.conf trunk/examples/cross-benchmark/arch/arch_hybrid.conf trunk/examples/cross-benchmark/arch/arch_refexamples.conf trunk/examples/cross-benchmark/arch/arch_refexamples_fast.conf trunk/examples/cross-benchmark/forte/ trunk/examples/cross-benchmark/forte/forte_family.owl trunk/examples/cross-benchmark/forte/uncle_refexamples.conf trunk/examples/cross-benchmark/forte/uncle_refexamples_fast.conf trunk/examples/cross-benchmark/forte/uncle_refexamples_gp.conf trunk/examples/cross-benchmark/forte/uncle_refexamples_hybrid.conf trunk/examples/cross-benchmark/moral_reasoner/ trunk/examples/cross-benchmark/moral_reasoner/moral_43examples_complex_refexamples.conf trunk/examples/cross-benchmark/moral_reasoner/moral_43examples_complex_refexamples_fast.conf trunk/examples/cross-benchmark/moral_reasoner/moral_43examples_complex_refexamples_gp.conf trunk/examples/cross-benchmark/moral_reasoner/moral_43examples_complex_refexamples_hybrid.conf trunk/examples/cross-benchmark/moral_reasoner/moral_43examples_simple_gp.conf trunk/examples/cross-benchmark/moral_reasoner/moral_43examples_simple_hybrid.conf trunk/examples/cross-benchmark/moral_reasoner/moral_43examples_simple_refexamples.conf trunk/examples/cross-benchmark/moral_reasoner/moral_43examples_simple_refexamples_fast.conf trunk/examples/cross-benchmark/moral_reasoner/moral_43instances.owl trunk/examples/cross-benchmark/moral_reasoner/moral_43instances_complex.owl trunk/examples/cross-benchmark/poker/ trunk/examples/cross-benchmark/poker/pair50.owl trunk/examples/cross-benchmark/poker/pair_refexamples.conf trunk/examples/cross-benchmark/poker/pair_refexamples_fast.conf trunk/examples/cross-benchmark/poker/pair_refexamples_gp.conf trunk/examples/cross-benchmark/poker/pair_refexamples_hybrid.conf trunk/examples/cross-benchmark/poker/straight.owl trunk/examples/cross-benchmark/poker/straight_refexamples.conf trunk/examples/cross-benchmark/poker/straight_refexamples_fast.conf trunk/examples/cross-benchmark/poker/straight_refexamples_gp.conf trunk/examples/cross-benchmark/poker/straight_refexamples_hybrid.conf trunk/examples/cross-benchmark/trains/ trunk/examples/cross-benchmark/trains/trains.owl trunk/examples/cross-benchmark/trains/trains_gp.conf trunk/examples/cross-benchmark/trains/trains_hybrid.conf trunk/examples/cross-benchmark/trains/trains_refexamples.conf trunk/examples/cross-benchmark/trains/trains_refexamples_fast.conf Added: trunk/examples/cross-benchmark/arch/arch.owl =================================================================== --- trunk/examples/cross-benchmark/arch/arch.owl (rev 0) +++ trunk/examples/cross-benchmark/arch/arch.owl 2008-06-05 14:29:31 UTC (rev 944) @@ -0,0 +1,362 @@ +<?xml version="1.0"?> + + +<!DOCTYPE rdf:RDF [ + <!ENTITY foo "http://localhost/foo#" > + <!ENTITY owl "http://www.w3.org/2002/07/owl#" > + <!ENTITY owl11 "http://www.w3.org/2006/12/owl11#" > + <!ENTITY xsd "http://www.w3.org/2001/XMLSchema#" > + <!ENTITY owl11xml "http://www.w3.org/2006/12/owl11-xml#" > + <!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#" > + <!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#" > +]> + + +<rdf:RDF xmlns="http://localhost/foo#" + xml:base="http://localhost/foo" + xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" + xmlns:owl11="http://www.w3.org/2006/12/owl11#" + xmlns:owl11xml="http://www.w3.org/2006/12/owl11-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:foo="http://localhost/foo#"> + <owl:Ontology rdf:about=""/> + + + + <!-- + /////////////////////////////////////////////////////////////////////////////////////// + // + // Object Properties + // + /////////////////////////////////////////////////////////////////////////////////////// + --> + + + + + <!-- http://localhost/foo#hasParallelpipe --> + + <owl:ObjectProperty rdf:about="&foo;hasParallelpipe"> + <rdfs:range rdf:resource="&foo;parallelpipe"/> + <rdfs:domain rdf:resource="&foo;construction"/> + </owl:ObjectProperty> + + + + <!-- http://localhost/foo#hasPillar --> + + <owl:ObjectProperty rdf:about="&foo;hasPillar"> + <rdfs:domain rdf:resource="&foo;construction"/> + <rdfs:range rdf:resource="&foo;pillar"/> + </owl:ObjectProperty> + + + + <!-- http://localhost/foo#leftof --> + + <owl:ObjectProperty rdf:about="&foo;leftof"> + <rdfs:domain rdf:resource="&foo;pillar"/> + <rdfs:range rdf:resource="&foo;pillar"/> + </owl:ObjectProperty> + + + + <!-- http://localhost/foo#supports --> + + <owl:ObjectProperty rdf:about="&foo;supports"> + <rdfs:range rdf:resource="&foo;parallelpipe"/> + <rdfs:domain rdf:resource="&foo;pillar"/> + </owl:ObjectProperty> + + + + <!-- http://localhost/foo#touches --> + + <owl:ObjectProperty rdf:about="&foo;touches"> + <rdfs:domain rdf:resource="&foo;pillar"/> + <rdfs:range rdf:resource="&foo;pillar"/> + </owl:ObjectProperty> + + + + <!-- + /////////////////////////////////////////////////////////////////////////////////////// + // + // Classes + // + /////////////////////////////////////////////////////////////////////////////////////// + --> + + + + + <!-- http://localhost/foo#brick --> + + <owl:Class rdf:about="&foo;brick"/> + + + + <!-- http://localhost/foo#construction --> + + <owl:Class rdf:about="&foo;construction"/> + + + + <!-- http://localhost/foo#freeStandingPillar --> + + <owl:Class rdf:about="&foo;freeStandingPillar"> + <owl:equivalentClass> + <owl:Class> + <owl:intersectionOf rdf:parseType="Collection"> + <rdf:Description rdf:about="&foo;pillar"/> + <owl:Class> + <owl:complementOf> + <owl:Restriction> + <owl:onProperty rdf:resource="&foo;touches"/> + <owl:someValuesFrom rdf:resource="&owl;Thing"/> + </owl:Restriction> + </owl:complementOf> + </owl:Class> + </owl:intersectionOf> + </owl:Class> + </owl:equivalentClass> + </owl:Class> + + + + <!-- http://localhost/foo#parallelpipe --> + + <owl:Class rdf:about="&foo;parallelpipe"> + <owl:equivalentClass> + <owl:Class> + <owl:unionOf rdf:parseType="Collection"> + <rdf:Description rdf:about="&foo;wedge"/> + <rdf:Description rdf:about="&foo;brick"/> + </owl:unionOf> + </owl:Class> + </owl:equivalentClass> + </owl:Class> + + + + <!-- http://localhost/foo#pillar --> + + <owl:Class rdf:about="&foo;pillar"/> + + + + <!-- http://localhost/foo#wedge --> + + <owl:Class rdf:about="&foo;wedge"/> + + + + <!-- http://www.w3.org/2002/07/owl#Nothing --> + + <owl:Class rdf:about="&owl;Nothing"> + <owl:equivalentClass> + <owl:Class> + <owl:intersectionOf rdf:parseType="Collection"> + <rdf:Description rdf:about="&foo;pillar"/> + <rdf:Description rdf:about="&foo;parallelpipe"/> + </owl:intersectionOf> + </owl:Class> + </owl:equivalentClass> + <owl:equivalentClass> + <owl:Class> + <owl:intersectionOf rdf:parseType="Collection"> + <rdf:Description rdf:about="&foo;construction"/> + <rdf:Description rdf:about="&foo;parallelpipe"/> + </owl:intersectionOf> + </owl:Class> + </owl:equivalentClass> + <owl:equivalentClass> + <owl:Class> + <owl:intersectionOf rdf:parseType="Collection"> + <rdf:Description rdf:about="&foo;construction"/> + <rdf:Description rdf:about="&foo;pillar"/> + </owl:intersectionOf> + </owl:Class> + </owl:equivalentClass> + </owl:Class> + + + + <!-- http://www.w3.org/2002/07/owl#Thing --> + + <owl:Class rdf:about="&owl;Thing"/> + + + + <!-- + /////////////////////////////////////////////////////////////////////////////////////// + // + // Individuals + // + /////////////////////////////////////////////////////////////////////////////////////// + --> + + + + + <!-- http://localhost/foo#a --> + + <foo:brick rdf:about="&foo;a"/> + + + + <!-- http://localhost/foo#b --> + + <foo:brick rdf:about="&foo;b"/> + + + + <!-- http://localhost/foo#c --> + + <foo:brick rdf:about="&foo;c"/> + + + + <!-- http://localhost/foo#c1 --> + + <foo:construction rdf:about="&foo;c1"> + <foo:hasParallelpipe rdf:resource="&foo;a"/> + <foo:hasPillar rdf:resource="&foo;p2"/> + <foo:hasPillar rdf:resource="&foo;p1"/> + </foo:construction> + + + + <!-- http://localhost/foo#c2 --> + + <foo:construction rdf:about="&foo;c2"> + <foo:hasPillar rdf:resource="&foo;p3"/> + <foo:hasParallelpipe rdf:resource="&foo;b"/> + <foo:hasPillar rdf:resource="&foo;p4"/> + </foo:construction> + + + + <!-- http://localhost/foo#c3 --> + + <foo:construction rdf:about="&foo;c3"> + <foo:hasPillar rdf:resource="&foo;p5"/> + <foo:hasParallelpipe rdf:resource="&foo;c"/> + <foo:hasPillar rdf:resource="&foo;p6"/> + </foo:construction> + + + + <!-- http://localhost/foo#c4 --> + + <foo:construction rdf:about="&foo;c4"> + <foo:hasParallelpipe rdf:resource="&foo;d"/> + <foo:hasPillar rdf:resource="&foo;p8"/> + <foo:hasPillar rdf:resource="&foo;p7"/> + </foo:construction> + + + + <!-- http://localhost/foo#c5 --> + + <foo:construction rdf:about="&foo;c5"> + <foo:hasPillar rdf:resource="&foo;p9"/> + <foo:hasParallelpipe rdf:resource="&foo;e"/> + </foo:construction> + + + + <!-- http://localhost/foo#d --> + + <foo:wedge rdf:about="&foo;d"/> + + + + <!-- http://localhost/foo#e --> + + <foo:wedge rdf:about="&foo;e"/> + + + + <!-- http://localhost/foo#p1 --> + + <foo:pillar rdf:about="&foo;p1"> + <rdf:type rdf:resource="&foo;freeStandingPillar"/> + <foo:supports rdf:resource="&foo;a"/> + <foo:leftof rdf:resource="&foo;p2"/> + </foo:pillar> + + + + <!-- http://localhost/foo#p2 --> + + <foo:pillar rdf:about="&foo;p2"> + <rdf:type rdf:resource="&foo;freeStandingPillar"/> + <foo:supports rdf:resource="&foo;a"/> + </foo:pillar> + + + + <!-- http://localhost/foo#p3 --> + + <foo:freeStandingPillar rdf:about="&foo;p3"> + <rdf:type rdf:resource="&foo;pillar"/> + <foo:leftof rdf:resource="&foo;p4"/> + </foo:freeStandingPillar> + + + + <!-- http://localhost/foo#p4 --> + + <foo:freeStandingPillar rdf:about="&foo;p4"> + <rdf:type rdf:resource="&foo;pillar"/> + </foo:freeStandingPillar> + + + + <!-- http://localhost/foo#p5 --> + + <foo:pillar rdf:about="&foo;p5"> + <foo:supports rdf:resource="&foo;c"/> + <foo:touches rdf:resource="&foo;p6"/> + <foo:leftof rdf:resource="&foo;p6"/> + </foo:pillar> + + + + <!-- http://localhost/foo#p6 --> + + <foo:pillar rdf:about="&foo;p6"> + <foo:supports rdf:resource="&foo;c"/> + </foo:pillar> + + + + <!-- http://localhost/foo#p7 --> + + <foo:freeStandingPillar rdf:about="&foo;p7"> + <rdf:type rdf:resource="&foo;pillar"/> + <foo:leftof rdf:resource="&foo;p8"/> + <foo:supports rdf:resource="&foo;d"/> + </foo:freeStandingPillar> + + + + <!-- http://localhost/foo#p8 --> + + <foo:freeStandingPillar rdf:about="&foo;p8"> + <rdf:type rdf:resource="&foo;pillar"/> + <foo:supports rdf:resource="&foo;d"/> + </foo:freeStandingPillar> + + + + <!-- http://localhost/foo#p9 --> + + <foo:freeStandingPillar rdf:about="&foo;p9"> + <rdf:type rdf:resource="&foo;pillar"/> + <foo:supports rdf:resource="&foo;e"/> + </foo:freeStandingPillar> +</rdf:RDF> Added: trunk/examples/cross-benchmark/arch/arch_gp.conf =================================================================== --- trunk/examples/cross-benchmark/arch/arch_gp.conf (rev 0) +++ trunk/examples/cross-benchmark/arch/arch_gp.conf 2008-06-05 14:29:31 UTC (rev 944) @@ -0,0 +1,22 @@ +algorithm = gp; +gp.algorithmType = generational; +gp.selectionType = rankSelection; +gp.generations = 50; +gp.useFixedNumberOfGenerations = true; +gp.numberOfIndividuals = 501; +gp.refinementProbability = 0; +gp.mutationProbability = 0.02; +gp.crossoverProbability = 0.8; +gp.hillClimbingProbability = 0; +posNegDefinitionLP.percentPerLenghtUnit = 0.02; +gp.maxConceptLength = 30; +reasoner = owlAPI; + +import("arch.owl"); + ++c1 ++c4 +-c2 +-c3 +-c5 + Added: trunk/examples/cross-benchmark/arch/arch_hybrid.conf =================================================================== --- trunk/examples/cross-benchmark/arch/arch_hybrid.conf (rev 0) +++ trunk/examples/cross-benchmark/arch/arch_hybrid.conf 2008-06-05 14:29:31 UTC (rev 944) @@ -0,0 +1,21 @@ +algorithm = gp; +gp.algorithmType = generational; +gp.selectionType = rankSelection; +gp.generations = 50; +gp.useFixedNumberOfGenerations = true; +gp.numberOfIndividuals = 501; +gp.refinementProbability = 0.65; +gp.mutationProbability = 0.02; +gp.crossoverProbability = 0.2; +gp.hillClimbingProbability = 0; +posNegDefinitionLP.percentPerLenghtUnit = 0.02; +gp.maxConceptLength = 30; +reasoner = owlAPI; + +import("arch.owl"); + ++c1 ++c4 +-c2 +-c3 +-c5 Added: trunk/examples/cross-benchmark/arch/arch_refexamples.conf =================================================================== --- trunk/examples/cross-benchmark/arch/arch_refexamples.conf (rev 0) +++ trunk/examples/cross-benchmark/arch/arch_refexamples.conf 2008-06-05 14:29:31 UTC (rev 944) @@ -0,0 +1,9 @@ +algorithm = refexamples; +reasoner = owlAPI; +import("arch.owl"); + ++c1 ++c4 +-c2 +-c3 +-c5 Added: trunk/examples/cross-benchmark/arch/arch_refexamples_fast.conf =================================================================== --- trunk/examples/cross-benchmark/arch/arch_refexamples_fast.conf (rev 0) +++ trunk/examples/cross-benchmark/arch/arch_refexamples_fast.conf 2008-06-05 14:29:31 UTC (rev 944) @@ -0,0 +1,9 @@ +algorithm = refexamples; +reasoner = fastInstanceChecker; +import("arch.owl"); + ++c1 ++c4 +-c2 +-c3 +-c5 Added: trunk/examples/cross-benchmark/forte/forte_family.owl =================================================================== --- trunk/examples/cross-benchmark/forte/forte_family.owl (rev 0) +++ trunk/examples/cross-benchmark/forte/forte_family.owl 2008-06-05 14:29:31 UTC (rev 944) @@ -0,0 +1,547 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!DOCTYPE rdf:RDF [ + <!ENTITY owl 'http://www.w3.org/2002/07/owl#'> +]> + +<rdf:RDF + xml:base="http://localhost/foo" + xmlns:a="http://localhost/foo#" + xmlns:owl="http://www.w3.org/2002/07/owl#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"> + +<owl:Ontology rdf:about=""/> + +<owl:Class rdf:about="&owl;Nothing"> + <owl:equivalentClass> + <owl:Class> + <owl:intersectionOf rdf:parseType="Collection"> + <owl:Class rdf:about="#male"/> + <owl:Class rdf:about="#female"/> + </owl:intersectionOf> + </owl:Class> + </owl:equivalentClass> +</owl:Class> + +<owl:ObjectProperty rdf:ID="married"> + <rdf:type rdf:resource="&owl;SymmetricProperty"/> + <rdf:type rdf:resource="&owl;FunctionalProperty"/> +</owl:ObjectProperty> + +<owl:ObjectProperty rdf:ID="sibling"> + <rdf:type rdf:resource="&owl;SymmetricProperty"/> +</owl:ObjectProperty> + +<a:male rdf:ID="alfred"> + <a:parent rdf:resource="#david"/> + <a:parent rdf:resource="#elisa"/> +</a:male> + +<a:female rdf:ID="alice"> + <a:married rdf:resource="#art"/> + <a:parent rdf:resource="#f14"/> + <a:parent rdf:resource="#m13"/> + <a:parent rdf:resource="#m15"/> +</a:female> + +<a:female rdf:ID="angela"> + <a:sibling rdf:resource="#ray"/> +</a:female> + +<a:female rdf:ID="ann"> + <a:married rdf:resource="#alfred"/> + <a:parent rdf:resource="#david"/> + <a:parent rdf:resource="#elisa"/> +</a:female> + +<a:male rdf:ID="art"> + <a:parent rdf:resource="#f14"/> + <a:parent rdf:resource="#m13"/> + <a:parent rdf:resource="#m15"/> + <a:sibling rdf:resource="#umo"/> + <a:sibling rdf:resource="#wendy"/> +</a:male> + +<a:female rdf:ID="beatrice"> + <a:married rdf:resource="#bob"/> + <a:parent rdf:resource="#eric"/> + <a:parent rdf:resource="#fannie"/> + <a:parent rdf:resource="#gail"/> + <a:parent rdf:resource="#harry"/> +</a:female> + +<a:male rdf:ID="bob"> + <a:parent rdf:resource="#eric"/> + <a:parent rdf:resource="#fannie"/> + <a:parent rdf:resource="#gail"/> + <a:parent rdf:resource="#harry"/> +</a:male> + +<a:female rdf:ID="callie"> + <a:married rdf:resource="#carl"/> + <a:parent rdf:resource="#karl"/> + <a:parent rdf:resource="#lorrie"/> + <a:parent rdf:resource="#mark"/> +</a:female> + +<a:male rdf:ID="calvin"> + <a:sibling rdf:resource="#christy"/> + <a:sibling rdf:resource="#jack"/> +</a:male> + +<a:male rdf:ID="carl"> + <a:parent rdf:resource="#karl"/> + <a:parent rdf:resource="#lorrie"/> + <a:parent rdf:resource="#mark"/> +</a:male> + +<a:male rdf:ID="carlos"> + <a:parent rdf:resource="#f26"/> + <a:parent rdf:resource="#f28"/> + <a:parent rdf:resource="#m27"/> +</a:male> + +<a:female rdf:ID="christy"> + <a:married rdf:resource="#carlos"/> + <a:parent rdf:resource="#f26"/> + <a:parent rdf:resource="#f28"/> + <a:parent rdf:resource="#m27"/> + <a:sibling rdf:resource="#calvin"/> + <a:sibling rdf:resource="#jack"/> +</a:female> + +<a:female rdf:ID="cornelia"> + <a:sibling rdf:resource="#melvin"/> + <a:sibling rdf:resource="#nancy"/> +</a:female> + +<a:male rdf:ID="david"> + <a:parent rdf:resource="#jonas"/> + <a:parent rdf:resource="#terry"/> + <a:sibling rdf:resource="#elisa"/> +</a:male> + +<a:female rdf:ID="deanna"> + <a:married rdf:resource="#david"/> + <a:parent rdf:resource="#jonas"/> + <a:parent rdf:resource="#terry"/> +</a:female> + +<a:female rdf:ID="elisa"> + <a:married rdf:resource="#eric"/> + <a:parent rdf:resource="#art"/> + <a:parent rdf:resource="#umo"/> + <a:parent rdf:resource="#wendy"/> + <a:sibling rdf:resource="#david"/> +</a:female> + +<a:male rdf:ID="eric"> + <a:parent rdf:resource="#art"/> + <a:parent rdf:resource="#umo"/> + <a:parent rdf:resource="#wendy"/> + <a:sibling rdf:resource="#fannie"/> + <a:sibling rdf:resource="#gail"/> + <a:sibling rdf:resource="#harry"/> +</a:male> + +<a:female rdf:ID="f12"> + <a:sibling rdf:resource="#m11"/> +</a:female> + +<a:female rdf:ID="f14"> + <a:sibling rdf:resource="#m13"/> + <a:sibling rdf:resource="#m15"/> +</a:female> + +<a:female rdf:ID="f19"> + <a:sibling rdf:resource="#f20"/> + <a:sibling rdf:resource="#m18"/> +</a:female> + +<a:female rdf:ID="f2"> + <a:sibling rdf:resource="#m1"/> +</a:female> + +<a:female rdf:ID="f20"> + <a:sibling rdf:resource="#f19"/> + <a:sibling rdf:resource="#m18"/> +</a:female> + +<a:female rdf:ID="f21"> + <a:sibling rdf:resource="#f22"/> +</a:female> + +<a:female rdf:ID="f22"> + <a:sibling rdf:resource="#f21"/> +</a:female> + +<a:female rdf:ID="f23"> + <a:sibling rdf:resource="#f25"/> + <a:sibling rdf:resource="#m24"/> +</a:female> + +<a:female rdf:ID="f25"> + <a:sibling rdf:resource="#f23"/> + <a:sibling rdf:resource="#m24"/> +</a:female> + +<a:female rdf:ID="f26"> + <a:sibling rdf:resource="#f28"/> + <a:sibling rdf:resource="#m27"/> +</a:female> + +<a:female rdf:ID="f28"> + <a:sibling rdf:resource="#f26"/> + <a:sibling rdf:resource="#m27"/> +</a:female> + +<a:female rdf:ID="f8"> + <a:sibling rdf:resource="#m10"/> + <a:sibling rdf:resource="#m9"/> +</a:female> + +<a:female rdf:ID="fannie"> + <a:married rdf:resource="#fred"/> + <a:parent rdf:resource="#cornelia"/> + <a:parent rdf:resource="#melvin"/> + <a:parent rdf:resource="#nancy"/> + <a:sibling rdf:resource="#eric"/> + <a:sibling rdf:resource="#gail"/> + <a:sibling rdf:resource="#harry"/> +</a:female> + +<a:male rdf:ID="fred"> + <a:parent rdf:resource="#cornelia"/> + <a:parent rdf:resource="#melvin"/> + <a:parent rdf:resource="#nancy"/> +</a:male> + +<a:male rdf:ID="frederick"> + <a:sibling rdf:resource="#jane"/> + <a:sibling rdf:resource="#prissie"/> +</a:male> + +<a:female rdf:ID="gail"> + <a:married rdf:resource="#george"/> + <a:sibling rdf:resource="#eric"/> + <a:sibling rdf:resource="#fannie"/> + <a:sibling rdf:resource="#harry"/> +</a:female> + +<a:male rdf:ID="george"/> + +<a:male rdf:ID="harry"> + <a:parent rdf:resource="#frederick"/> + <a:parent rdf:resource="#jane"/> + <a:parent rdf:resource="#prissie"/> + <a:sibling rdf:resource="#eric"/> + <a:sibling rdf:resource="#fannie"/> + <a:sibling rdf:resource="#gail"/> +</a:male> + +<a:female rdf:ID="helen"> + <a:married rdf:resource="#harry"/> + <a:parent rdf:resource="#frederick"/> + <a:parent rdf:resource="#jane"/> + <a:parent rdf:resource="#prissie"/> +</a:female> + +<a:male rdf:ID="jack"> + <a:parent rdf:resource="#f23"/> + <a:parent rdf:resource="#f25"/> + <a:parent rdf:resource="#m24"/> + <a:sibling rdf:resource="#calvin"/> + <a:sibling rdf:resource="#christy"/> +</a:male> + +<a:male rdf:ID="james"> + <a:parent rdf:resource="#calvin"/> + <a:parent rdf:resource="#christy"/> + <a:parent rdf:resource="#jack"/> +</a:male> + +<a:female rdf:ID="jane"> + <a:married rdf:resource="#jack"/> + <a:parent rdf:resource="#f23"/> + <a:parent rdf:resource="#f25"/> + <a:parent rdf:resource="#m24"/> + <a:sibling rdf:resource="#frederick"/> + <a:sibling rdf:resource="#prissie"/> +</a:female> + +<a:female rdf:ID="janet"> + <a:married rdf:resource="#james"/> + <a:parent rdf:resource="#calvin"/> + <a:parent rdf:resource="#christy"/> + <a:parent rdf:resource="#jack"/> + <a:sibling rdf:resource="#nero"/> +</a:female> + +<a:male rdf:ID="jonas"> + <a:sibling rdf:resource="#terry"/> +</a:male> + +<a:female rdf:ID="kari"> + <a:married rdf:resource="#karl"/> + <a:parent rdf:resource="#janet"/> + <a:parent rdf:resource="#nero"/> +</a:female> + +<a:male rdf:ID="karl"> + <a:parent rdf:resource="#janet"/> + <a:parent rdf:resource="#nero"/> + <a:sibling rdf:resource="#lorrie"/> + <a:sibling rdf:resource="#mark"/> +</a:male> + +<a:male rdf:ID="leon"> + <a:parent rdf:resource="#oma"/> + <a:parent rdf:resource="#paul"/> + <a:parent rdf:resource="#rachel"/> +</a:male> + +<a:female rdf:ID="lorrie"> + <a:married rdf:resource="#leon"/> + <a:parent rdf:resource="#oma"/> + <a:parent rdf:resource="#paul"/> + <a:parent rdf:resource="#rachel"/> + <a:sibling rdf:resource="#karl"/> + <a:sibling rdf:resource="#mark"/> +</a:female> + +<a:male rdf:ID="m1"> + <a:sibling rdf:resource="#f2"/> +</a:male> + +<a:male rdf:ID="m10"> + <a:sibling rdf:resource="#f8"/> + <a:sibling rdf:resource="#m9"/> +</a:male> + +<a:male rdf:ID="m11"> + <a:sibling rdf:resource="#f12"/> +</a:male> + +<a:male rdf:ID="m13"> + <a:sibling rdf:resource="#f14"/> + <a:sibling rdf:resource="#m15"/> +</a:male> + +<a:male rdf:ID="m15"> + <a:sibling rdf:resource="#f14"/> + <a:sibling rdf:resource="#m13"/> +</a:male> + +<a:male rdf:ID="m16"> + <a:sibling rdf:resource="#m17"/> +</a:male> + +<a:male rdf:ID="m17"> + <a:sibling rdf:resource="#m16"/> +</a:male> + +<a:male rdf:ID="m18"> + <a:sibling rdf:resource="#f19"/> + <a:sibling rdf:resource="#f20"/> +</a:male> + +<a:male rdf:ID="m24"> + <a:sibling rdf:resource="#f23"/> + <a:sibling rdf:resource="#f25"/> +</a:male> + +<a:male rdf:ID="m27"> + <a:sibling rdf:resource="#f26"/> + <a:sibling rdf:resource="#f28"/> +</a:male> + +<a:male rdf:ID="m29"/> + +<a:male rdf:ID="m3"/> + +<a:male rdf:ID="m4"> + <a:sibling rdf:resource="#m5"/> + <a:sibling rdf:resource="#m6"/> + <a:sibling rdf:resource="#m7"/> +</a:male> + +<a:male rdf:ID="m5"> + <a:sibling rdf:resource="#m4"/> + <a:sibling rdf:resource="#m6"/> + <a:sibling rdf:resource="#m7"/> +</a:male> + +<a:male rdf:ID="m6"> + <a:sibling rdf:resource="#m4"/> + <a:sibling rdf:resource="#m5"/> + <a:sibling rdf:resource="#m7"/> +</a:male> + +<a:male rdf:ID="m7"> + <a:sibling rdf:resource="#m4"/> + <a:sibling rdf:resource="#m5"/> + <a:sibling rdf:resource="#m6"/> +</a:male> + +<a:male rdf:ID="m9"> + <a:sibling rdf:resource="#f8"/> + <a:sibling rdf:resource="#m10"/> +</a:male> + +<a:female rdf:ID="maria"> + <a:married rdf:resource="#melvin"/> + <a:parent rdf:resource="#m16"/> + <a:parent rdf:resource="#m17"/> +</a:female> + +<a:male rdf:ID="mark"> + <a:parent rdf:resource="#susan"/> + <a:sibling rdf:resource="#karl"/> + <a:sibling rdf:resource="#lorrie"/> +</a:male> + +<a:female rdf:ID="martha"> + <a:married rdf:resource="#mark"/> + <a:parent rdf:resource="#susan"/> +</a:female> + +<a:male rdf:ID="melvin"> + <a:parent rdf:resource="#m16"/> + <a:parent rdf:resource="#m17"/> + <a:sibling rdf:resource="#cornelia"/> + <a:sibling rdf:resource="#nancy"/> +</a:male> + +<a:female rdf:ID="nancy"> + <a:married rdf:resource="#neil"/> + <a:parent rdf:resource="#f19"/> + <a:parent rdf:resource="#f20"/> + <a:parent rdf:resource="#m18"/> + <a:sibling rdf:resource="#cornelia"/> + <a:sibling rdf:resource="#melvin"/> +</a:female> + +<a:male rdf:ID="neil"> + <a:parent rdf:resource="#f19"/> + <a:parent rdf:resource="#f20"/> + <a:parent rdf:resource="#m18"/> +</a:male> + +<a:male rdf:ID="nero"> + <a:parent rdf:resource="#angela"/> + <a:parent rdf:resource="#ray"/> + <a:sibling rdf:resource="#janet"/> +</a:male> + +<a:female rdf:ID="nonnie"> + <a:married rdf:resource="#nero"/> + <a:parent rdf:resource="#angela"/> + <a:parent rdf:resource="#ray"/> +</a:female> + +<a:female rdf:ID="oma"> + <a:married rdf:resource="#owen"/> + <a:parent rdf:resource="#f2"/> + <a:parent rdf:resource="#m1"/> + <a:sibling rdf:resource="#paul"/> + <a:sibling rdf:resource="#rachel"/> +</a:female> + +<a:male rdf:ID="owen"> + <a:parent rdf:resource="#f2"/> + <a:parent rdf:resource="#m1"/> +</a:male> + +<a:male rdf:ID="paul"> + <a:parent rdf:resource="#m3"/> + <a:sibling rdf:resource="#oma"/> + <a:sibling rdf:resource="#rachel"/> +</a:male> + +<a:female rdf:ID="paula"> + <a:married rdf:resource="#paul"/> + <a:parent rdf:resource="#m3"/> +</a:female> + +<a:male rdf:ID="peter"> + <a:parent rdf:resource="#f21"/> + <a:parent rdf:resource="#f22"/> +</a:male> + +<a:female rdf:ID="prissie"> + <a:married rdf:resource="#peter"/> + <a:parent rdf:resource="#f21"/> + <a:parent rdf:resource="#f22"/> + <a:sibling rdf:resource="#frederick"/> + <a:sibling rdf:resource="#jane"/> +</a:female> + +<a:female rdf:ID="rachel"> + <a:sibling rdf:resource="#oma"/> + <a:sibling rdf:resource="#paul"/> +</a:female> + +<a:male rdf:ID="ray"> + <a:parent rdf:resource="#m29"/> + <a:sibling rdf:resource="#angela"/> +</a:male> + +<a:female rdf:ID="regina"> + <a:married rdf:resource="#ray"/> + <a:parent rdf:resource="#m29"/> +</a:female> + +<a:male rdf:ID="steve"> + <a:parent rdf:resource="#m4"/> + <a:parent rdf:resource="#m5"/> + <a:parent rdf:resource="#m6"/> + <a:parent rdf:resource="#m7"/> +</a:male> + +<a:female rdf:ID="susan"> + <a:married rdf:resource="#steve"/> + <a:parent rdf:resource="#m4"/> + <a:parent rdf:resource="#m5"/> + <a:parent rdf:resource="#m6"/> + <a:parent rdf:resource="#m7"/> +</a:female> + +<a:female rdf:ID="terri"> + <a:married rdf:resource="#terry"/> + <a:parent rdf:resource="#f8"/> + <a:parent rdf:resource="#m10"/> + <a:parent rdf:resource="#m9"/> +</a:female> + +<a:male rdf:ID="terry"> + <a:parent rdf:resource="#f8"/> + <a:parent rdf:resource="#m10"/> + <a:parent rdf:resource="#m9"/> + <a:sibling rdf:resource="#jonas"/> +</a:male> + +<a:male rdf:ID="umo"> + <a:sibling rdf:resource="#art"/> + <a:sibling rdf:resource="#wendy"/> +</a:male> + +<a:male rdf:ID="walt"> + <a:parent rdf:resource="#f12"/> + <a:parent rdf:resource="#m11"/> +</a:male> + +<a:female rdf:ID="wendy"> + <a:married rdf:resource="#walt"/> + <a:parent rdf:resource="#f12"/> + <a:parent rdf:resource="#m11"/> + <a:sibling rdf:resource="#art"/> + <a:sibling rdf:resource="#umo"/> +</a:female> + +<owl:Class rdf:ID="female"/> + +<owl:Class rdf:ID="male"/> + +<owl:ObjectProperty rdf:ID="parent"/> + +</rdf:RDF> Added: trunk/examples/cross-benchmark/forte/uncle_refexamples.conf =================================================================== --- trunk/examples/cross-benchmark/forte/uncle_refexamples.conf (rev 0) +++ trunk/examples/cross-benchmark/forte/uncle_refexamples.conf 2008-06-05 14:29:31 UTC (rev 944) @@ -0,0 +1,114 @@ +/** + * Extracted from the FORTE (First Order Revision of Theories from Examples) + * data set: + * + * http://www.cs.utexas.edu/users/ml/forte.html + * + * The goal of this learning problem is to learn the concept of an uncle. + * + * In the file forte_family.kb, you can find a graphical representation of the + * family tree corresponding to the facts in this file. + * + * possible solution: (male AND (EXISTS hasSibling.EXISTS hasChild.TOP + * OR EXISTS married.EXISTS hasSibling.EXISTS hasChild.TOP)) + * + * Copyright (C) 2007, Jens Lehmann + */ + + +algorithm = refexamples; +reasoner = owlAPI; +import("forte_family.kb"); + +/** examples **/ + + +// complete example set ++art ++calvin ++carlos ++david ++eric ++fred ++frederick ++george ++harry ++jack ++james ++jonas ++karl ++leon ++mark ++melvin ++neil ++nero ++owen ++paul ++peter ++umo ++walt + +-alfred +-alice +-angela +-ann +-beatrice +-bob +-callie +-carl +-christy +-cornelia +-deanna +-elisa +-f12 +-f14 +-f19 +-f2 +-f20 +-f21 +-f22 +-f23 +-f25 +-f26 +-f28 +-f8 +-fannie +-gail +-helen +-jane +-janet +-kari +-lorrie +-m1 +-m10 +-m11 +-m13 +-m15 +-m16 +-m17 +-m18 +-m24 +-m27 +-m29 +-m3 +-m4 +-m5 +-m6 +-m7 +-m9 +-maria +-martha +-nancy +-nonnie +-oma +-paula +-prissie +-rachel +-ray +-regina +-steve +-susan +-terri +-terry +-wendy + Added: trunk/examples/cross-benchmark/forte/uncle_refexamples_fast.conf =================================================================== --- trunk/examples/cross-benchmark/forte/uncle_refexamples_fast.conf (rev 0) +++ trunk/examples/cross-benchmark/forte/uncle_refexamples_fast.conf 2008-06-05 14:29:31 UTC (rev 944) @@ -0,0 +1,113 @@ +/** + * Extracted from the FORTE (First Order Revision of Theories from Examples) + * data set: + * + * http://www.cs.utexas.edu/users/ml/forte.html + * + * The goal of this learning problem is to learn the concept of an uncle. + * + * In the file forte_family.kb, you can find a graphical representation of the + * family tree corresponding to the facts in this file. + * + * possible solution: (male AND (EXISTS hasSibling.EXISTS hasChild.TOP + * OR EXISTS married.EXISTS hasSibling.EXISTS hasChild.TOP)) + * + * Copyright (C) 2007, Jens Lehmann + */ + +algorithm = refexamples; +reasoner = fastInstanceChecker; +import("forte_family.kb"); + +/** examples **/ + + +// complete example set ++art ++calvin ++carlos ++david ++eric ++fred ++frederick ++george ++harry ++jack ++james ++jonas ++karl ++leon ++mark ++melvin ++neil ++nero ++owen ++paul ++peter ++umo ++walt + +-alfred +-alice +-angela +-ann +-beatrice +-bob +-callie +-carl +-christy +-cornelia +-deanna +-elisa +-f12 +-f14 +-f19 +-f2 +-f20 +-f21 +-f22 +-f23 +-f25 +-f26 +-f28 +-f8 +-fannie +-gail +-helen +-jane +-janet +-kari +-lorrie +-m1 +-m10 +-m11 +-m13 +-m15 +-m16 +-m17 +-m18 +-m24 +-m27 +-m29 +-m3 +-m4 +-m5 +-m6 +-m7 +-m9 +-maria +-martha +-nancy +-nonnie +-oma +-paula +-prissie +-rachel +-ray +-regina +-steve +-susan +-terri +-terry +-wendy + Added: trunk/examples/cross-benchmark/forte/uncle_refexamples_gp.conf =================================================================== --- trunk/examples/cross-benchmark/forte/uncle_refexamples_gp.conf (rev 0) +++ trunk/examples/cross-benchmark/forte/uncle_refexamples_gp.conf 2008-06-05 14:29:31 UTC (rev 944) @@ -0,0 +1,124 @@ +/** + * Extracted from the FORTE (First Order Revision of Theories from Examples) + * data set: + * + * http://www.cs.utexas.edu/users/ml/forte.html + * + * The goal of this learning problem is to learn the concept of an uncle. + * + * In the file forte_family.kb, you can find a graphical representation of the + * family tree corresponding to the facts in this file. + * + * possible solution: (male AND (EXISTS hasSibling.EXISTS hasChild.TOP + * OR EXISTS married.EXISTS hasSibling.EXISTS hasChild.TOP)) + * + * Copyright (C) 2007, Jens Lehmann + */ + +algorithm = gp; +gp.algorithmType = generational; +gp.selectionType = rankSelection; +gp.generations = 50; +gp.useFixedNumberOfGenerations = true; +gp.numberOfIndividuals = 501; +gp.refinementProbability = 0; +gp.mutationProbability = 0.02; +gp.crossoverProbability = 0.8; +gp.hillClimbingProbability = 0; +posNegDefinitionLP.percentPerLenghtUnit = 0.02; +gp.maxConceptLength = 30; +reasoner = owlAPI; +import("forte_family.kb"); + +/** examples **/ + + +// complete example set ++art ++calvin ++carlos ++david ++eric ++fred ++frederick ++george ++harry ++jack ++james ++jonas ++karl ++leon ++mark ++melvin ++neil ++nero ++owen ++paul ++peter ++umo ++walt + +-alfred +-alice +-angela +-ann +-beatrice +-bob +-callie +-carl +-christy +-cornelia +-deanna +-elisa +-f12 +-f14 +-f19 +-f2 +-f20 +-f21 +-f22 +-f23 +-f25 +-f26 +-f28 +-f8 +-fannie +-gail +-helen +-jane +-janet +-kari +-lorrie +-m1 +-m10 +-m11 +-m13 +-m15 +-m16 +-m17 +-m18 +-m24 +-m27 +-m29 +-m3 +-m4 +-m5 +-m6 +-m7 +-m9 +-maria +-martha +-nancy +-nonnie +-oma +-paula +-prissie +-rachel +-ray +-regina +-steve +-susan +-terri +-terry +-wendy + Added: trunk/examples/cross-benchmark/forte/uncle_refexamples_hybrid.conf =================================================================== --- trunk/examples/cross-benchmark/forte/uncle_refexamples_hybrid.conf (rev 0) +++ trunk/examples/cross-benchmark/forte/uncle_refexamples_hybrid.conf 2008-06-05 14:29:31 UTC (rev 944) @@ -0,0 +1,125 @@ +/** + * Extracted from the FORTE (First Order Revision of Theories from Examples) + * data set: + * + * http://www.cs.utexas.edu/users/ml/forte.html + * + * The goal of this learning problem is to learn the concept of an uncle. + * + * In the file forte_family.kb, you can find a graphical representation of the + * family tree corresponding to the facts in this file. + * + * possible solution: (male AND (EXISTS hasSibling.EXISTS hasChild.TOP + * OR EXISTS married.EXISTS hasSibling.EXISTS hasChild.TOP)) + * + * Copyright (C) 2007, Jens Lehmann + */ + + +algorithm = gp; +gp.algorithmType = generational; +gp.selectionType = rankSelection; +gp.generations = 50; +gp.useFixedNumberOfGenerations = true; +gp.numberOfIndividuals = 501; +gp.refinementProbability = 0.65; +gp.mutationProbability = 0.02; +gp.crossoverProbability = 0.2; +gp.hillClimbingProbability = 0; +posNegDefinitionLP.percentPerLenghtUnit = 0.02; +gp.maxConceptLength = 30; +reasoner = owlAPI; +import("forte_family.kb"); + +/** examples **/ + + +// complete example set ++art ++calvin ++carlos ++david ++eric ++fred ++frederick ++george ++harry ++jack ++james ++jonas ++karl ++leon ++mark ++melvin ++neil ++nero ++owen ++paul ++peter ++umo ++walt + +-alfred +-alice +-angela +-ann +-beatrice +-bob +-callie +-carl +-christy +-cornelia +-deanna +-elisa +-f12 +-f14 +-f19 +-f2 +-f20 +-f21 +-f22 +-f23 +-f25 +-f26 +-f28 +-f8 +-fannie +-gail +-helen +-jane +-janet +-kari +-lorrie +-m1 +-m10 +-m11 +-m13 +-m15 +-m16 +-m17 +-m18 +-m24 +-m27 +-m29 +-m3 +-m4 +-m5 +-m6 +-m7 +-m9 +-maria +-martha +-nancy +-nonnie +-oma +-paula +-prissie +-rachel +-ray +-regina +-steve +-susan +-terri +-terry +-wendy + Added: trunk/examples/cross-benchmark/moral_reasoner/moral_43examples_complex_refexamples.conf =================================================================== --- trunk/examples/cross-benchmark/moral_reasoner/moral_43examples_complex_refexamples.conf (rev 0) +++ trunk/examples/cross-benchmark/moral_reasoner/moral_43examples_complex_refexamples.conf 2008-06-05 14:29:31 UTC (rev 944) @@ -0,0 +1,61 @@ + /*********************** + solution is: +(severity_harm AND (NOT benefit_victim) AND (vicarious OR voluntary)) + + + Examples: + 23 positive + 20 negative + + ***********************/ + algorithm = refexamples; +reasoner = owlAPI; +/** background knowledge **/ +import("moral_43instances_complex.owl"); + + +/** Examples **/ ++p0 ++p1 ++p2 ++p3 ++p4 ++p5 ++p6 ++p7 ++p8 ++p9 ++p10 ++p90 ++p91 ++p92 ++p93 ++p94 ++p95 ++p96 ++p97 ++p98 ++p99 ++p100 ++p101 +-n0 +-n1 +-n2 +-n3 +//-n4 +-n5 +-n6 +-n7 +-n8 +-n9 +-n10 +-n90 +-n91 +-n92 +-n93 +-n94 +-n95 +-n96 +-n97 +-n98 +-n99 Added: trunk/examples/cross-benchmark/moral_reasoner/moral_43examples_complex_refexamples_fast.conf =================================================================== --- trunk/examples/cross-benchmark/moral_reasoner/moral_43examples_complex_refexamples_fast.conf (rev 0) +++ trunk/examples/cross-benchmark/moral_reasoner/moral_43examples_complex_refexamples_fast.conf 2008-06-05 14:29:31 UTC (rev 944) @@ -0,0 +1,61 @@ + /*********************** + solution is: +(severity_harm AND (NOT benefit_victim) AND (vicarious OR voluntary)) + + + Examples: + 23 positive + 20 negative + + ***********************/ + algorithm = refexamples; +reasoner = fastInstanceChecker; +/** background knowledge **/ +import("moral_43instances_complex.owl"); + + +/** Examples **/ ++p0 ++p1 ++p2 ++p3 ++p4 ++p5 ++p6 ++p7 ++p8 ++p9 ++p10 ++p90 ++p91 ++p92 ++p93 ++p94 ++p95 ++p96 ++p97 ++p98 ++p99 ++p100 ++p101 +-n0 +-n1 +-n2 +-n3 +//-n4 +-n5 +-n6 +-n7 +-n8 +-n9 +-n10 +-n90 +-n91 +-n92 +-n93 +-n94 +-n95 +-n96 +-n97 +-n98 +-n99 Added: trunk/examples/cross-benchmark/moral_reasoner/moral_43examples_complex_refexamples_gp.conf =================================================================== --- trunk/examples/cross-benchmark/moral_reasoner/moral_43examples_complex_refexamples_gp.conf (rev 0) +++ trunk/examples/cross-benchmark/moral_reasoner/moral_43examples_complex_refexamples_gp.conf 2008-06-05 14:29:31 UTC (rev 944) @@ -0,0 +1,72 @@ + /*********************** + solution is: +(severity_harm AND (NOT benefit_victim) AND (vicarious OR voluntary)) + + + Examples: + 23 positive + 20 negative + + ***********************/ + algorithm = gp; +gp.algorithmType = generational; +gp.selectionType = rankSelection; +gp.generations = 50; +gp.useFixedNumberOfGenerations = true; +gp.numberOfIndividuals = 501; +gp.refinementProbability = 0; +gp.mutationProbability = 0.02; +gp.crossoverProbability = 0.8; +gp.hillClimbingProbability = 0; +posNegDefinitionLP.percentPerLenghtUnit = 0.02; +gp.maxConceptLength = 30; +reasoner = owlAPI; +/** background knowledge **/ +import("moral_43instances_complex.owl"); + + +/** Examples **/ ++p0 ++p1 ++p2 ++p3 ++p4 ++p5 ++p6 ++p7 ++p8 ++p9 ++p10 ++p90 ++p91 ++p92 ++p93 ++p94 ++p95 ++p96 ++p97 ++p98 ++p99 ++p100 ++p101 +-n0 +-n1 +-n2 +-n3 +//-n4 +-n5 +-n6 +-n7 +-n8 +-n9 +-n10 +-n90 +-n91 +-n92 +-n93 +-n94 +-n95 +-n96 +-n97 +-n98 +-n99 Added: trunk/examples/cross-benchmark/moral_reasoner/moral_43examples_complex_refexamples_hybrid.conf =================================================================== --- trunk/examples/cross-benchmark/moral_reasoner/moral_43examples_complex_refexamples_hybrid.conf (rev 0) +++ trunk/examples/cross-benchmark/moral_reasoner/moral_43examples_complex_refexamples_hybrid.conf 2008-06-05 14:29:31 UTC (rev 944) @@ -0,0 +1,72 @@ + /*********************** + solution is: +(severity_harm AND (NOT benefit_victim) AND (vicarious OR voluntary)) + + + Examples: + 23 positive + 20 negative + + ***********************/ + algorithm = gp; +gp.algorithmType = generational; +gp.selectionType = rankSelection; +gp.generations = 50; +gp.useFixedNumberOfGenerations = true; +gp.numberOfIndividuals = 501; +gp.refinementProbability = 0.65; +gp.mutationProbability = 0.02; +gp.crossoverProbability = 0.2; +gp.hillClimbingProbability = 0; +posNegDefinitionLP.percentPerLenghtUnit = 0.02; +gp.maxConceptLength = 30; +reasoner = owlAPI; +/** background knowledge **/ +import("moral_43instances_complex.owl"); + + +/** Examples **/ ++p0 ++p1 ++p2 ++p3 ++p4 ++p5 ++p6 ++p7 ++p8 ++p9 ++p10 ++p90 ++p91 ++p92 ++p93 ++p94 ++p95 ++p96 ++p97 ++p98 ++p99 ++p100 ++p101 +-n0 +-n1 +-n2 +-n3 +//-n4 +-n5 +-n6 +-n7 +-n8 +-n9 +-n10 +-n90 +-n91 +-n92 +-n93 +-n94 +-n95 +-n96 +-n97 +-n98 +-n99 Added: trunk/examples/cross-benchmark/moral_reasoner/moral_43examples_simple_gp.conf =================================================================== --- trunk/examples/cross-benchmark/moral_reasoner/moral_43examples_simple_gp.conf (rev 0) +++ trunk/examples/cross-benchmark/moral_reasoner/moral_43examples_simple_gp.conf 2008-06-05 14:29:31 UTC (rev 944) @@ -0,0 +1,73 @@ + /*********************** + solution should be: + guilty = (blameworthy OR vicarious_blame ). + + + Examples: + 23 positive + 20 negative + + ***********************/ + +algorithm = gp; +gp.algorithmType = generational; +gp.selectionType = rankSelection; +gp.generations = 50; +gp.useFixedNumberOfGenerations = true; +gp.numberOfIndividuals = 501; +gp.refinementProbability = 0; +gp.mutationProbability = 0.02; +gp.crossoverProbability = 0.8; +gp.hillClimbingProbability = 0; +posNegDefinitionLP.percentPerLenghtUnit = 0.02; +gp.maxConceptLength = 30; +reasoner = owlAPI; + /** background knowledge **/ + import("moral_43instances.owl"); + + + /** Examples **/ + +p0 + +p1 + +p2 + +p3 + +p4 + +p5 + +p6 + +p7 + +p8 + +p9 + +p10 + +p90 + +p91 + +p92 + +p93 + +p94 + +p95 + +p96 + +p97 + +p98 + +p99 + +p100 + +p101 + -n0 + -n1 + -n2 + -n3 + //-n4 + -n5 + -n6 + -n7 + -n8 + -n9 + -n10 + -n90 + -n91 + -n92 + -n93 + -n94 + -n95 + -n96 + -n97 + -n98 + -n99 Added: trunk/examples/cross-benchmark/moral_reasoner/moral_43examples_simple_hybrid.conf =================================================================== --- trunk/examples/cross-benchmark/moral_reasoner/moral_43examples_simple_hybrid.conf (rev 0) +++ trunk/examples/cross-benchmark/moral_reasoner/moral_43examples_simple_hybrid.conf 2008-06-05 14:29:31 UTC (rev 944) @@ -0,0 +1,72 @@ + /*********************** + solution should be: + guilty = (blameworthy OR vicarious_blame ). + + + Examples: + 23 positive + 20 negative + + ***********************/ +algorithm = gp; +gp.algorithmType = generational; +gp.selectionType = rankSelection; +gp.generations = 50; +gp.useFixedNumberOfGenerations = true; +gp.numberOfIndividuals = 501; +gp.refinementProbability = 0.65; +gp.mutationProbability = 0.02; +gp.crossoverProbability = 0.2; +gp.hillClimbingProbability = 0; +posNegDefinitionLP.percentPerLenghtUnit = 0.02; +gp.maxConceptLength = 30; +reasoner = owlAPI; + /** background knowledge **/ + import("moral_43instances.owl"); + + + /** Examples **/ + +p0 + +p1 + +p2 + +p3 + +p4 + +p5 + +p6 + +p7 + +p8 + +p9 + +p10 + +p90 + +p91 + +p92 + +p93 + +p94 + +p95 + +p96 + +p97 + +p98 + +p99 + +p100 + +p101 + -n0 + -n1 + -n2 + -n3 + //-n4 + -n5 + -n6 + -n7 + -n8 + -n9 + -n10 + -n90 + -n91 + -n92 + -n93 + -n94 + -n95 + -n96 + -n97 + -n98 + -n99 Added: trunk/examples/cross-benchmark/moral_reasoner/moral_43examples_simple_refexamples.conf =================================================================== --- trunk/examples/cross-benchmark/moral_reasoner/moral_43examples_simple_refexamples.conf (rev 0) +++ trunk/examples/cross-benchmark/moral_reasoner/moral_43examples_simple_refexamples.conf 2008-06-05 14:29:31 UTC (rev 944) @@ -0,0 +1,61 @@ + /*********************** + solution should be: + guilty = (blameworthy OR vicarious_blame ). + + + Examples: + 23 positive + 20 negative + + ***********************/ +algorithm = refexamples; +reasoner = owlAPI; + /** background knowledge **/ + import("moral_43instances.owl"); + + + /** Examples **/ + +p0 + +p1 + +p2 + +p3 + +p4 + +p5 + +p6 + +p7 + +p8 + +p9 + +p10 + +p90 + +p91 + +p92 + +p93 + +p94 + +p95 + +p96 + +p97 + +p98 + +p99 + +p100 + +p101 + -n0 + -n1 + -n2 + -n3 + //-n4 + -n5 + -n6 + -n7 + -n8 + -n9 + -n10 + -n90 + -n91 + -n92 + -n93 + -n94 + -n95 + -n96 + -n97 + -n98 + -n99 Added: trunk/examples/cross-benchmark/moral_reasoner/moral_43examples_simple_refexamples_fast.conf =================================================================== --- trunk/examples/cross-benchmark/moral_reasoner/moral_43examples_simple_refexamples_fast.conf (rev 0) +++ trunk/examples/cross-benchmark/moral_reasoner/moral_43examples_simple_refexamples_fast.conf 2008-06-05 14:29:31 UTC (rev 944) @@ -0,0 +1,61 @@ + /*********************** + solution should be: + guilty = (blameworthy OR vicarious_blame ). + + + Examples: + 23 positive + 20 negative + + ***********************/ +algorithm = refexamples; +reasoner = fastInstanceChecker; + /** background knowledge **/ + import("moral_43instances.owl"); + + + /** Examples **/ + +p0 + +p1 + +p2 + +p3 + +p4 + +p5 + +p6 + +p7 + +p8 + +p9 + +p10 + +p90 + +p91 + +p92 + +p93 + +p94 + +p95 + +p96 + +p97 + +p98 + +p99 + +p100 + +p101 + -n0 + -n1 + -n2 + -n3 + //-n4 + -n5 + -n6 + -n7 + -n8 + -n9 + -n10 + -n90 + -n91 + -n92 + -n93 + -n94 + -n95 + -n96 + -n97 + -n98 + -n99 Added: trunk/examples/cross-benchmark/moral_reasoner/moral_43instances.owl =================================================================== --- trunk/examples/cross-benchmark/moral_reasoner/moral_43instances.owl (rev 0) +++ trunk/examples/cross-benchmark/moral_reasoner/moral_43instances.owl 2008-06-05 14:29:31 UTC (rev 944) @@ -0,0 +1,4186 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!DOCTYPE rdf:RDF [ + <!ENTITY owl 'http://www.w3.org/2002/07/owl#'> +]> + +<rdf:RDF + xml:base="http://localhost/foo" + xmlns:a="http://localhost/foo#" + xmlns:owl="http://www.w3.org/2002/07/owl#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"> + +<owl:Ontology rdf:about=""/> + +<owl:Class rdf:ID="blameworthy"> + <owl:equivalentClass> + <owl:Class> + <owl:intersectionOf rdf:parseType="Collection"> + <owl:Class rdf:about="#responsible"/> + <owl:Class> + <owl:intersectionOf rdf:parseType="Collection"> + <owl:Class rdf:about="#severity_harm"/> + <owl:Class> + <owl:intersectionOf rdf:parseType="Collection"> + <owl:Class> + <owl:complementOf> + <owl:Class rdf:about="#benefit_victim"/> + </owl:complementOf> + </owl:Class> + <owl:Class> + <owl:complementOf> + <owl:Class rdf:about="#justified"/> + </owl:complementOf> + </owl:Class> + </owl:intersectionOf> + </owl:Class> + </owl:intersectionOf> + </owl:Class> + </owl:intersectionOf> + </owl:Class> + </owl:equivalentClass> +</owl:Class> + +<owl:Class rdf:ID="cause"> + <owl:equivalentClass> + <owl:Class> + <owl:unionOf rdf:parseType="Collection"> + <owl:Class rdf:about="#produce_harm"/> + <owl:Class> + <owl:unionOf rdf:parseType="Collection"> + <owl:Class rdf:about="#necessary_for_harm"/> + <owl:Class rdf:about="#sufficient_for_harm"/> + </owl:unionOf> + </owl:Class> + </owl:unionOf> + </owl:Class> + </owl:equivalentClass> +</owl:Class> + +<owl:Class rdf:ID="foreseeable"> + <owl:equivalentClass> + <owl:Class> + <owl:unionOf rdf:parseType="Collection"> + <owl:Class rdf:about="#high_foreseeability"/> + <owl:Class rdf:about="#low_foreseeability"/> + </owl:unionOf> + </owl:Class> + </owl:equivalentClass> +</owl:Class> + +<owl:Class rdf:ID="intend_c"> + <owl:equivalentClass> + <owl:Class> + <owl:unionOf rdf:parseType="Collection"> + <owl:Class rdf:about="#strong_intend"/> + <owl:Class rdf:about="#weak_intend"/> + </owl:unionOf> + </owl:Class> + </owl:equivalentClass> +</owl:Class> + +<owl:Class rdf:ID="intend_mental_state"> + <owl:equivalentClass> + <owl:Class> + <owl:intersectionOf rdf:parseType="Collection"> + <owl:Class> + <owl:complementOf> + <owl:Class rdf:about="#reckless_mental_state"/> + </owl:complementOf> + </owl:Class> + <owl:Class> + <owl:intersectionOf rdf:parseType="Collection"> + <owl:Class> + <owl:complementOf> + <owl:Class rdf:about="#negligent_mental_state"/> + </owl:complementOf> + </owl:Class> + <owl:Class> + <owl:complementOf> + <owl:Class rdf:about="#neither_mental_state"/> + </owl:complementOf> + </owl:Class> + </owl:intersectionOf> + </owl:Class> + </owl:intersectionOf> + </owl:Class> + </owl:equivalentClass> +</owl:Class> + +<owl:Class rdf:ID="intervening_cause"> + <owl:equivalentClass> + <owl:Class> + <owl:intersectionOf rdf:parseType="Collection"> + <owl:Class rdf:about="#intervening_contribution"/> + <owl:Class> + <owl:complementOf> + <owl:Class rdf:about="#foresee_intervention"/> + </owl:complementOf> + </owl:Class> + </owl:intersectionOf> + </owl:Class> + </owl:equivalentClass> +</owl:Class> + +<owl:Class rdf:ID="justified"> + <owl:equivalentClass> + <owl:Class> + <owl:intersectionOf rdf:parseType="Collection"> + <owl:Class rdf:about="#achieve_goal"/> + <owl:Class> + <owl:intersectionOf rdf:parseType="Collection"> + <owl:Class rdf:about="#goal_outweigh_harm"/> + <owl:Class> + <owl:complementOf> + <owl:Class rdf:about="#goal_achieveable_less_harmful"/> + </owl:complementOf> + </owl:Class> + </owl:intersectionOf> + </owl:Class> + </owl:intersectionOf> + </owl:Class> + </owl:equivalentClass> +</owl:Class> + +<owl:Class rdf:ID="negligent_c"> + <owl:equivalentClass> + <owl:Class> + <owl:unionOf rdf:parseType="Collection"> + <owl:Class rdf:about="#negligent_mental_state"/> + <owl:Class> + <owl:intersectionOf rdf:parseType="Collection"> + <owl:Class> + <owl:complementOf> + <owl:Class rdf:about="#careful"/> + </owl:complementOf> + </owl:Class> + <owl:Class> + <owl:intersectionOf rdf:parseType="Collection"> + <owl:Class> + <owl:complementOf> + <owl:Class rdf:about="#strong_intend"/> + </owl:complementOf> + </owl:Class> + <owl:Class rdf:about="#low_foreseeability"/> + </owl:intersectionOf> + </owl:Class> + </owl:intersectionOf> + </owl:Class> + </owl:unionOf> + </owl:Class> + </owl:equivalentClass> +</owl:Class> + +<owl:Class rdf:ID="negligent_mental_state"> + <owl:equivalentClass> + <owl:Class> + <owl:intersectionOf rdf:parseType="Collection"> + <owl:Class> + <owl:complementOf> + <owl:Class rdf:about="#reckless_mental_state"/> + </owl:complementOf> + </owl:Class> + <owl:Class> + <owl:intersectionOf rdf:parseType="Collection"> + <owl:Class> + <owl:complementOf> + <owl:Class rdf:about="#intend_mental_state"/> + </owl:complementOf> + </owl:Class> + <owl:Class> + <owl:complementOf> + <owl:Class rdf:about="#neither_mental_state"/> + </owl:complementOf> + </owl:Class> + </owl:intersectionOf> + </owl:Class> + </owl:intersectionOf> + </owl:Class> + </owl:equivalentClass> +</owl:Class> + +<owl:Class rdf:ID="neither_mental_state"> + <owl:equivalentClass> + <owl:Class> + <owl:intersectionOf rdf:parseType="Collection"> + <owl:Class> + <owl:complementOf> + <owl:Class rdf:about="#reckless_mental_state"/> + </owl:complementOf> + </owl:Class> + <owl:Class> + <owl:intersectionOf rdf:parseType="Collection"> + <owl:Class> + <owl:complementOf> + <owl:Class rdf:about="#negligent_mental_state"/> + </owl:complementOf> + </owl:Class> + <owl:Class> + <owl:complementOf> + <owl:Class rdf:about="#intend_mental_state"/> + </owl:complementOf> + </owl:Class> + </owl:intersectionOf> + </owl:Class> + </owl:intersectionOf> + </owl:Class> + </owl:equivalentClass> +</owl:Class> + +<owl:Class rdf:ID="notaccident"> + <owl:equivalentClass> + <owl:Class> + <owl:unionOf rdf:parseType="Collection"> + <owl:Class rdf:about="#intend_c"/> + <owl:Class> + <owl:unionOf rdf:parseType="Collection"> + <owl:Class rdf:about="#reckless_c"/> + <owl:Class rdf:about="#negligent_c"/> + </owl:unionOf> + </owl:Class> + </owl:unionOf> + </owl:Class> + </owl:equivalentClass> +</owl:Class> + +<owl:Class rdf:ID="reckless_c"> + <owl:equivalentClass> + <owl:Class> + <owl:unionOf rdf:parseType="Collection"> + <owl:Class rdf:about="#reckless_mental_state"/> + <owl:Class> + <owl:intersectionOf rdf:parseType="Collection"> + <owl:Class> + <owl:complementOf> + <owl:Class rdf:about="#careful"/> + </owl:complementOf> + </owl:Class> + <owl:Class> + <owl:intersectionOf rdf:parseType="Collection"> + <owl:Class rdf:about="#high_foreseeability"/> + <owl:Class> + <owl:complementOf> + <owl:Class rdf:about="#strong_intend"/> + </owl:complementOf> + </owl:Class> + </owl:intersectionOf> + </owl:Class> + </owl:intersectionOf> + </owl:Class> + </owl:unionOf> + </owl:Class> + </owl:equivalentClass> +</owl:Class> + +<owl:Class rdf:ID="reckless_mental_state"> + <owl:equivalentClass> + <owl:Class> + <owl:intersectionOf rdf:parseType="Collection"> + <owl:Class> + <owl:complementOf> + <owl:Class rdf:about="#intend_mental_state"/> + </owl:complementOf> + </owl:Class> + <owl:Class> + <owl:intersectionOf rdf:parseType="Collection"> + <owl:Class> + <owl:complementOf> + <owl:Class rdf:about="#negligent_mental_state"/> + </owl:complementOf> + </owl:Class> + <owl:Class> + <owl:complementOf> + <owl:Class rdf:about="#neither_mental_state"/> + </owl:complementOf> + </owl:Class> + </owl:intersectionOf> + </owl:Class> + </owl:intersectionOf> + </owl:Class> + </owl:equivalentClass> +</owl:Class> + +<owl:Class rdf:ID="responsible"> + <owl:equivalentClass> + <owl:Class> + <owl:intersectionOf rdf:parseType="Collection"> + <owl:Class rdf:about="#cause"/> + <owl:Class> + <owl:intersectionOf rdf:parseType="Collection"> + <owl:Class rdf:about="#notaccident"/> + <owl:Class> + <owl:intersectionOf rdf:parseType="Collection"> + <owl:Class rdf:about="#voluntary"/> + <owl:Class> + <owl:intersectionOf rdf:parseType="Collection"> + <owl:Class rdf:about="#foreseeable"/> + <owl:Class> + <owl:complementOf> + <owl:Class rdf:about="#intervening_cause"/> + </owl:complementOf> + </owl:Class> + </owl:intersectionOf> + </owl:Class> + </owl:intersectionOf> + </owl:Class> + </owl:intersectionOf> + </owl:Class> + </owl:intersectionOf> + </owl:Class> + </owl:equivalentClass> +</owl:Class> + +<owl:Class rdf:ID="strong_intend"> + <owl:equivalentClass> + <... [truncated message content] |
From: <Jen...@us...> - 2008-06-05 14:22:04
|
Revision: 943 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=943&view=rev Author: JensLehmann Date: 2008-06-05 07:21:49 -0700 (Thu, 05 Jun 2008) Log Message: ----------- evaluation examples Modified Paths: -------------- trunk/src/dl-learner/org/dllearner/scripts/PaperStatistics.java Added Paths: ----------- trunk/examples/cross-benchmark/ Modified: trunk/src/dl-learner/org/dllearner/scripts/PaperStatistics.java =================================================================== --- trunk/src/dl-learner/org/dllearner/scripts/PaperStatistics.java 2008-06-05 10:43:24 UTC (rev 942) +++ trunk/src/dl-learner/org/dllearner/scripts/PaperStatistics.java 2008-06-05 14:21:49 UTC (rev 943) @@ -97,16 +97,16 @@ String gnuplotBaseDir = "log/gnuplot/"; String statBaseDir = "log/stat/"; - File[] confFiles = new File[1]; - confFiles[0] = new File(exampleBaseDir + "trains", "trains_owl"); + File[] confFiles = new File[6]; + confFiles[0] = new File(exampleBaseDir + "trains", "trains"); // confFiles[0] = new File(exampleBaseDir + "arch", "arch"); - confFiles[1] = new File(exampleBaseDir + "moral_reasoner", "moral_43examples_owl"); - confFiles[2] = new File(exampleBaseDir + "moral_reasoner", "moral_43examples_complex_owl"); - confFiles[3] = new File(exampleBaseDir + "poker", "pair_owl"); - confFiles[4] = new File(exampleBaseDir + "poker", "straight_owl"); - confFiles[5] = new File(exampleBaseDir + "forte", "forte_uncle_owl"); + confFiles[1] = new File(exampleBaseDir + "moral_reasoner", "moral_43examples_simple"); + confFiles[2] = new File(exampleBaseDir + "moral_reasoner", "moral_43examples_complex"); + confFiles[3] = new File(exampleBaseDir + "poker", "pair"); + confFiles[4] = new File(exampleBaseDir + "poker", "straight"); + confFiles[5] = new File(exampleBaseDir + "forte", "uncle"); - String[] examples = new String[7]; + String[] examples = new String[6]; examples[0] = "trains"; // examples[0] = "arches"; examples[1] = "moral reasoner (43 examples, simple)"; @@ -124,7 +124,8 @@ algorithmPostfix[3] = "_hybrid"; int startAlgorithmNr = 0; - int[] folds = new int[] {5,5,5,5,5,5}; + // only max. 4 folds for straight problem + int[] folds = new int[] {5,5,5,5,4,5}; File statFile = new File(statBaseDir, "statistics.txt"); String statString = "**automatically generated statistics**\n\n"; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Jen...@us...> - 2008-06-05 10:43:29
|
Revision: 942 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=942&view=rev Author: JensLehmann Date: 2008-06-05 03:43:24 -0700 (Thu, 05 Jun 2008) Log Message: ----------- updated statistics and cross validation script Modified Paths: -------------- trunk/src/dl-learner/org/dllearner/algorithms/gp/GP.java trunk/src/dl-learner/org/dllearner/cli/Start.java trunk/src/dl-learner/org/dllearner/reasoning/FastInstanceChecker.java trunk/src/dl-learner/org/dllearner/reasoning/OWLAPIReasoner.java trunk/src/dl-learner/org/dllearner/refinementoperators/RhoDRDown.java trunk/src/dl-learner/org/dllearner/scripts/CrossValidation.java trunk/src/dl-learner/org/dllearner/scripts/PaperStatistics.java Modified: trunk/src/dl-learner/org/dllearner/algorithms/gp/GP.java =================================================================== --- trunk/src/dl-learner/org/dllearner/algorithms/gp/GP.java 2008-06-05 05:35:11 UTC (rev 941) +++ trunk/src/dl-learner/org/dllearner/algorithms/gp/GP.java 2008-06-05 10:43:24 UTC (rev 942) @@ -163,19 +163,20 @@ options.add(new BooleanConfigOption("elitism", "specifies whether to use elitism in selection", true)); StringConfigOption algorithmType = new StringConfigOption("algorithmType", "algorithm type", "steadyState"); algorithmType.setAllowedValues(new String[] {"generational", "steadyState"}); - DoubleConfigOption mutationProb = new DoubleConfigOption("mutationProbablitiy", "mutation probability", 0.03); + options.add(algorithmType); + DoubleConfigOption mutationProb = new DoubleConfigOption("mutationProbability", "mutation probability", 0.03); mutationProb.setLowerLimit(0.0); mutationProb.setUpperLimit(1.0); options.add(mutationProb); - DoubleConfigOption crossoverProb = new DoubleConfigOption("crossoverProbablitiy", "crossover probability", 0.95); + DoubleConfigOption crossoverProb = new DoubleConfigOption("crossoverProbability", "crossover probability", 0.95); crossoverProb.setLowerLimit(0.0); crossoverProb.setUpperLimit(1.0); options.add(crossoverProb); - DoubleConfigOption hillClimbingProb = new DoubleConfigOption("hillClimbingProbablitiy", "hill climbing probability", 0.0); + DoubleConfigOption hillClimbingProb = new DoubleConfigOption("hillClimbingProbability", "hill climbing probability", 0.0); hillClimbingProb.setLowerLimit(0.0); hillClimbingProb.setUpperLimit(1.0); options.add(hillClimbingProb); - DoubleConfigOption refinementProb = new DoubleConfigOption("refinementProbablitiy", "refinement operator probability (values higher than 0 turn this into a hybrid GP algorithm - see publication)", 0.00); + DoubleConfigOption refinementProb = new DoubleConfigOption("refinementProbability", "refinement operator probability (values higher than 0 turn this into a hybrid GP algorithm - see publication)", 0.00); refinementProb.setLowerLimit(0.0); refinementProb.setUpperLimit(1.0); options.add(refinementProb); Modified: trunk/src/dl-learner/org/dllearner/cli/Start.java =================================================================== --- trunk/src/dl-learner/org/dllearner/cli/Start.java 2008-06-05 05:35:11 UTC (rev 941) +++ trunk/src/dl-learner/org/dllearner/cli/Start.java 2008-06-05 10:43:24 UTC (rev 942) @@ -104,6 +104,7 @@ private LearningAlgorithm la; private LearningProblem lp; private ReasoningService rs; + private ReasonerComponent rc; /** * Entry point for CLI interface. @@ -183,10 +184,10 @@ // step 2: detect used reasoner ConfFileOption reasonerOption = parser.getConfOptionsByName("reasoner"); - ReasonerComponent reasoner = cm.reasoner(getReasonerClass(reasonerOption), sources); - configureComponent(cm, reasoner, componentPrefixMapping, parser); - initComponent(cm, reasoner); - rs = cm.reasoningService(reasoner); + rc = cm.reasoner(getReasonerClass(reasonerOption), sources); + configureComponent(cm, rc, componentPrefixMapping, parser); + initComponent(cm, rc); + rs = cm.reasoningService(rc); // step 3: detect learning problem ConfFileOption problemOption = parser.getConfOptionsByName("problem"); @@ -754,6 +755,10 @@ return lp; } + public ReasonerComponent getReasonerComponent() { + return rc; + } + public ReasoningService getReasoningService() { return rs; } @@ -829,4 +834,6 @@ return laClass; } + + } Modified: trunk/src/dl-learner/org/dllearner/reasoning/FastInstanceChecker.java =================================================================== --- trunk/src/dl-learner/org/dllearner/reasoning/FastInstanceChecker.java 2008-06-05 05:35:11 UTC (rev 941) +++ trunk/src/dl-learner/org/dllearner/reasoning/FastInstanceChecker.java 2008-06-05 10:43:24 UTC (rev 942) @@ -35,7 +35,6 @@ import org.dllearner.core.KnowledgeSource; import org.dllearner.core.ReasonerComponent; import org.dllearner.core.ReasoningMethodUnsupportedException; -import org.dllearner.core.ReasoningService; import org.dllearner.core.config.ConfigEntry; import org.dllearner.core.config.ConfigOption; import org.dllearner.core.config.InvalidConfigOptionValueException; @@ -100,7 +99,7 @@ private SortedSet<DatatypeProperty> intDatatypeProperties = new TreeSet<DatatypeProperty>(); private SortedSet<Individual> individuals; - private ReasoningService rs; +// private ReasoningService rs; private OWLAPIReasoner rc; private Set<KnowledgeSource> sources; @@ -177,7 +176,7 @@ atomicRoles = rc.getAtomicRoles(); individuals = rc.getIndividuals(); - rs = new ReasoningService(rc); +// rs = new ReasoningService(rc); // TODO: some code taken from Helper.createFlatABox, but pasted here // because additional things need to @@ -187,9 +186,9 @@ logger.debug("dematerialising concepts"); - for (NamedClass atomicConcept : rs.getAtomicConcepts()) { + for (NamedClass atomicConcept : rc.getAtomicConcepts()) { - SortedSet<Individual> pos = rs.retrieval(atomicConcept); + SortedSet<Individual> pos = rc.retrieval(atomicConcept); classInstancesPos.put(atomicConcept, pos); if(defaultNegation) { @@ -199,7 +198,7 @@ // on the carcinogenesis data set (and probably others), so we have to // be careful here Negation negatedAtomicConcept = new Negation(atomicConcept); - classInstancesNeg.put(atomicConcept, rs.retrieval(negatedAtomicConcept)); + classInstancesNeg.put(atomicConcept, rc.retrieval(negatedAtomicConcept)); } @@ -521,32 +520,32 @@ * @see org.dllearner.core.Reasoner#prepareSubsumptionHierarchy(java.util.Set) */ public void prepareSubsumptionHierarchy(Set<NamedClass> allowedConcepts) { - rs.prepareSubsumptionHierarchy(); + rc.prepareSubsumptionHierarchy(allowedConcepts); } @Override public SubsumptionHierarchy getSubsumptionHierarchy() { - return rs.getSubsumptionHierarchy(); + return rc.getSubsumptionHierarchy(); } @Override public void prepareRoleHierarchy(Set<ObjectProperty> allowedRoles) { - rs.prepareRoleHierarchy(allowedRoles); + rc.prepareRoleHierarchy(allowedRoles); } @Override public ObjectPropertyHierarchy getRoleHierarchy() { - return rs.getRoleHierarchy(); + return rc.getRoleHierarchy(); } @Override public void prepareDatatypePropertyHierarchy(Set<DatatypeProperty> allowedRoles) { - rs.prepareDatatypePropertyHierarchy(allowedRoles); + rc.prepareDatatypePropertyHierarchy(allowedRoles); } @Override public DatatypePropertyHierarchy getDatatypePropertyHierarchy() { - return rs.getDatatypePropertyHierarchy(); + return rc.getDatatypePropertyHierarchy(); } @Override @@ -554,7 +553,7 @@ // Negation neg = new Negation(subConcept); // Intersection c = new Intersection(neg,superConcept); // return fastRetrieval.calculateSets(c).getPosSet().isEmpty(); - return rs.subsumes(superConcept, subConcept); + return rc.subsumes(superConcept, subConcept); } /** Modified: trunk/src/dl-learner/org/dllearner/reasoning/OWLAPIReasoner.java =================================================================== --- trunk/src/dl-learner/org/dllearner/reasoning/OWLAPIReasoner.java 2008-06-05 05:35:11 UTC (rev 941) +++ trunk/src/dl-learner/org/dllearner/reasoning/OWLAPIReasoner.java 2008-06-05 10:43:24 UTC (rev 942) @@ -474,6 +474,9 @@ private TreeSet<Description> getMoreSpecialConcepts(Description concept) { Set<Set<OWLClass>> classes = null; try { +// System.out.println(OWLAPIDescriptionConvertVisitor.getOWLDescription(concept)); +// System.out.println(getSubsumptionHierarchy()); +// System.out.println(reasoner); classes = reasoner.getSubClasses(OWLAPIDescriptionConvertVisitor.getOWLDescription(concept)); } catch (OWLReasonerException e) { e.printStackTrace(); Modified: trunk/src/dl-learner/org/dllearner/refinementoperators/RhoDRDown.java =================================================================== --- trunk/src/dl-learner/org/dllearner/refinementoperators/RhoDRDown.java 2008-06-05 05:35:11 UTC (rev 941) +++ trunk/src/dl-learner/org/dllearner/refinementoperators/RhoDRDown.java 2008-06-05 10:43:24 UTC (rev 942) @@ -34,6 +34,7 @@ import org.apache.log4j.Logger; import org.dllearner.algorithms.refinement.RefinementOperator; +import org.dllearner.core.ReasoningMethodUnsupportedException; import org.dllearner.core.ReasoningService; import org.dllearner.core.owl.BooleanValueRestriction; import org.dllearner.core.owl.DataRange; Modified: trunk/src/dl-learner/org/dllearner/scripts/CrossValidation.java =================================================================== --- trunk/src/dl-learner/org/dllearner/scripts/CrossValidation.java 2008-06-05 05:35:11 UTC (rev 941) +++ trunk/src/dl-learner/org/dllearner/scripts/CrossValidation.java 2008-06-05 10:43:24 UTC (rev 942) @@ -115,7 +115,8 @@ } LearningProblem lp = start.getLearningProblem(); - ReasoningService rs = start.getReasoningService(); +// ReasoningService rs = start.getReasoningService(); +// start.getReasoningService().releaseKB(); // the training and test sets used later on List<Set<Individual>> trainingSetsPos = new LinkedList<Set<Individual>>(); @@ -194,7 +195,6 @@ try { start = new Start(file); } catch (ComponentInitException e) { - // TODO Auto-generated catch block e.printStackTrace(); } lp = start.getLearningProblem(); @@ -206,17 +206,17 @@ // System.out.println("neg: " + neg.size()); // System.exit(0); - // es fehlt init zwischendurch - - if(la == null) - la = start.getLearningAlgorithm(); + la = start.getLearningAlgorithm(); // init again, because examples have changed try { +// start.getReasonerComponent().init(); + lp.init(); la.init(); } catch (ComponentInitException e) { // TODO Auto-generated catch block e.printStackTrace(); } + long algorithmStartTime = System.nanoTime(); la.start(); long algorithmDuration = System.nanoTime() - algorithmStartTime; @@ -224,6 +224,7 @@ Description concept = la.getBestSolution(); + ReasoningService rs = start.getReasoningService(); Set<Individual> tmp = rs.instanceCheck(concept, testSetsPos.get(currFold)); Set<Individual> tmp2 = Helper.difference(testSetsPos.get(currFold), tmp); Set<Individual> tmp3 = rs.instanceCheck(concept, testSetsNeg.get(currFold)); @@ -258,7 +259,7 @@ System.out.println(" runtime: " + df.format(algorithmDuration/(double)1000000000) + "s"); // free all resources - start.getReasoningService().releaseKB(); + rs.releaseKB(); cm.freeAllComponents(); } @@ -312,7 +313,7 @@ return splits; } - private String statOutput(DecimalFormat df, Stat stat, String unit) { + public static String statOutput(DecimalFormat df, Stat stat, String unit) { String str = "av. " + df.format(stat.getMean()) + unit; str += " (deviation " + df.format(stat.getStandardDeviation()) + unit + "; "; str += "min " + df.format(stat.getMin()) + unit + "; "; Modified: trunk/src/dl-learner/org/dllearner/scripts/PaperStatistics.java =================================================================== --- trunk/src/dl-learner/org/dllearner/scripts/PaperStatistics.java 2008-06-05 05:35:11 UTC (rev 941) +++ trunk/src/dl-learner/org/dllearner/scripts/PaperStatistics.java 2008-06-05 10:43:24 UTC (rev 942) @@ -22,6 +22,7 @@ import java.io.File; import java.net.MalformedURLException; import java.net.URL; +import java.text.DecimalFormat; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -49,6 +50,8 @@ */ public class PaperStatistics { + private static DecimalFormat df = new DecimalFormat(); + /** * Points to the current statistic generation function. * @@ -82,7 +85,7 @@ // learning examples: // - trains - // - arches + // - arches => left out, insufficiently many examples // - moral (simple) // - moral (complex) // - poker (pair) @@ -95,22 +98,22 @@ String statBaseDir = "log/stat/"; File[] confFiles = new File[1]; -// confFiles[0] = new File(exampleBaseDir + "trains", "trains_owl"); - confFiles[0] = new File(exampleBaseDir + "arch", "arch"); -// confFiles[2] = new File(exampleBaseDir + "moral_reasoner", "moral_43examples_owl"); -// confFiles[3] = new File(exampleBaseDir + "moral_reasoner", "moral_43examples_complex_owl"); -// confFiles[4] = new File(exampleBaseDir + "poker", "pair_owl"); -// confFiles[5] = new File(exampleBaseDir + "poker", "straight_owl"); -// confFiles[6] = new File(exampleBaseDir + "forte", "forte_uncle_owl"); + confFiles[0] = new File(exampleBaseDir + "trains", "trains_owl"); +// confFiles[0] = new File(exampleBaseDir + "arch", "arch"); + confFiles[1] = new File(exampleBaseDir + "moral_reasoner", "moral_43examples_owl"); + confFiles[2] = new File(exampleBaseDir + "moral_reasoner", "moral_43examples_complex_owl"); + confFiles[3] = new File(exampleBaseDir + "poker", "pair_owl"); + confFiles[4] = new File(exampleBaseDir + "poker", "straight_owl"); + confFiles[5] = new File(exampleBaseDir + "forte", "forte_uncle_owl"); String[] examples = new String[7]; examples[0] = "trains"; - examples[1] = "arches"; - examples[2] = "moral reasoner (43 examples, simple)"; - examples[3] = "moral reasoner (43 examples, complex)"; - examples[4] = "poker (49 examples, pair)"; - examples[5] = "poker (55 examples, straight)"; - examples[6] = "uncle (FORTE data set)"; +// examples[0] = "arches"; + examples[1] = "moral reasoner (43 examples, simple)"; + examples[2] = "moral reasoner (43 examples, complex)"; + examples[3] = "poker (49 examples, pair)"; + examples[4] = "poker (55 examples, straight)"; + examples[5] = "uncle (FORTE data set)"; int startExampleNr = 0; // for any example, we create conf files for each configuration to be tested @@ -121,6 +124,8 @@ algorithmPostfix[3] = "_hybrid"; int startAlgorithmNr = 0; + int[] folds = new int[] {5,5,5,5,5,5}; + File statFile = new File(statBaseDir, "statistics.txt"); String statString = "**automatically generated statistics**\n\n"; @@ -132,16 +137,22 @@ File confFile = new File(confFiles[exampleNr] + algorithmPostfix[algorithmNr] + ".conf"); - CrossValidation cv = new CrossValidation(confFile, 5, false); - Stat classification = new Stat(); - Stat length = new Stat(); - Stat runtime = new Stat(); + System.out.println("running " + folds[exampleNr] + " fold cross validation on " + confFile); + CrossValidation cv = new CrossValidation(confFile, folds[exampleNr], false); + Stat accuracy = cv.getAccuracy(); + Stat length = cv.getLength(); + Stat runtime = cv.getRuntime(); + statString += "conf file: " + confFile + "\n"; - statString += "classification: " + classification.getMean() + "% (standard deviation: " + classification.getStandardDeviation() + "%)\n"; - statString += "concept length: " + length.getMean() + " (standard deviation: " + length.getStandardDeviation() + ")\n"; - statString += "runtime: " + Helper.prettyPrintNanoSeconds(Math.round(runtime.getMean())) + " (standard deviation: " + Helper.prettyPrintNanoSeconds(Math.round(runtime.getStandardDeviation())) + ")\n\n"; +// statString += "classification: " + classification.getMean() + "% (standard deviation: " + classification.getStandardDeviation() + "%)\n"; +// statString += "concept length: " + length.getMean() + " (standard deviation: " + length.getStandardDeviation() + ")\n"; +// statString += "runtime: " + runtime.getMean() + " (standard deviation: " + runtime.getStandardDeviation() + ")\n\n"; + statString += "accuracy: " + CrossValidation.statOutput(df, accuracy, "%") + "\n"; + statString += "length: " + CrossValidation.statOutput(df, length, "") + "\n"; + statString += "runtime: " + CrossValidation.statOutput(df, runtime, "s") + "\n\n"; + Files.createFile(statFile, statString); } // end algorithm loop This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jen...@us...> - 2008-06-05 05:35:13
|
Revision: 941 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=941&view=rev Author: jenslehmann Date: 2008-06-04 22:35:11 -0700 (Wed, 04 Jun 2008) Log Message: ----------- another round of @Override fixes Modified Paths: -------------- trunk/src/dl-learner/org/dllearner/tools/ore/NegExampleRepairDialog.java trunk/src/dl-learner/org/dllearner/tools/protege/DLLearnerViewPanel.java trunk/src/dl-learner/org/dllearner/tools/protege/OWLClassDescriptionEditorWithDLLearnerTab.java trunk/src/dl-learner/org/dllearner/tools/protege/OWLEquivalentClassesAxiomFrameSection.java trunk/src/dl-learner/org/dllearner/tools/protege/OWLSubClassAxiomFrameSection.java Modified: trunk/src/dl-learner/org/dllearner/tools/ore/NegExampleRepairDialog.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/ore/NegExampleRepairDialog.java 2008-06-05 05:28:04 UTC (rev 940) +++ trunk/src/dl-learner/org/dllearner/tools/ore/NegExampleRepairDialog.java 2008-06-05 05:35:11 UTC (rev 941) @@ -204,7 +204,6 @@ } - @Override public void actionPerformed(ActionEvent e) { System.out.println(e.getActionCommand()); if(e.getActionCommand().equals("delete instance")){ Modified: trunk/src/dl-learner/org/dllearner/tools/protege/DLLearnerViewPanel.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/protege/DLLearnerViewPanel.java 2008-06-05 05:28:04 UTC (rev 940) +++ trunk/src/dl-learner/org/dllearner/tools/protege/DLLearnerViewPanel.java 2008-06-05 05:35:11 UTC (rev 941) @@ -18,6 +18,7 @@ super(editor); } + @Override protected ViewComponentPlugin getViewComponentPlugin() { return new ViewComponentPluginAdapter() { Modified: trunk/src/dl-learner/org/dllearner/tools/protege/OWLClassDescriptionEditorWithDLLearnerTab.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/protege/OWLClassDescriptionEditorWithDLLearnerTab.java 2008-06-05 05:28:04 UTC (rev 940) +++ trunk/src/dl-learner/org/dllearner/tools/protege/OWLClassDescriptionEditorWithDLLearnerTab.java 2008-06-05 05:35:11 UTC (rev 941) @@ -184,7 +184,8 @@ } - public Set<OWLDescription> getEditedObjects() { + @Override + public Set<OWLDescription> getEditedObjects() { if (tabbedPane.getSelectedComponent() == classSelectorPanel) { return classSelectorPanel.getSelectedClasses(); } @@ -563,7 +564,8 @@ splitPane.setBorder(BorderFactory.createEmptyBorder(2, 2, 2, 2)); List<RestrictionCreator> types = new ArrayList<RestrictionCreator>(); types.add(new RestrictionCreator("Some (existential)") { - public void createRestrictions(Set<OWLObjectProperty> properties, Set<OWLDescription> fillers, + @Override + public void createRestrictions(Set<OWLObjectProperty> properties, Set<OWLDescription> fillers, Set<OWLDescription> result) { for (OWLObjectProperty prop : properties) { for (OWLDescription filler : fillers) { @@ -573,7 +575,8 @@ } }); types.add(new RestrictionCreator("Only (universal)") { - public void createRestrictions(Set<OWLObjectProperty> properties, Set<OWLDescription> fillers, + @Override + public void createRestrictions(Set<OWLObjectProperty> properties, Set<OWLDescription> fillers, Set<OWLDescription> result) { for (OWLObjectProperty prop : properties) { if (fillers.isEmpty()) { @@ -591,17 +594,20 @@ } }); types.add(new CardinalityRestrictionCreator("Min (min cardinality)", cardinalitySpinner) { - public OWLDescription createRestriction(OWLObjectProperty prop, OWLDescription filler, int card) { + @Override + public OWLDescription createRestriction(OWLObjectProperty prop, OWLDescription filler, int card) { return getDataFactory().getOWLObjectMinCardinalityRestriction(prop, card, filler); } }); types.add(new CardinalityRestrictionCreator("Exactly (exact cardinality)", cardinalitySpinner) { - public OWLDescription createRestriction(OWLObjectProperty prop, OWLDescription filler, int card) { + @Override + public OWLDescription createRestriction(OWLObjectProperty prop, OWLDescription filler, int card) { return getDataFactory().getOWLObjectExactCardinalityRestriction(prop, card, filler); } }); types.add(new CardinalityRestrictionCreator("Max (max cardinality)", cardinalitySpinner) { - public OWLDescription createRestriction(OWLObjectProperty prop, OWLDescription filler, int card) { + @Override + public OWLDescription createRestriction(OWLObjectProperty prop, OWLDescription filler, int card) { return getDataFactory().getOWLObjectMaxCardinalityRestriction(prop, card, filler); } }); @@ -658,7 +664,8 @@ } - public String toString() { + @Override + public String toString() { return name; } @@ -679,7 +686,8 @@ } - public void createRestrictions(Set<OWLObjectProperty> properties, Set<OWLDescription> fillers, + @Override + public void createRestrictions(Set<OWLObjectProperty> properties, Set<OWLDescription> fillers, Set<OWLDescription> result) { for (OWLObjectProperty prop : properties) { for (OWLDescription desc : fillers) { Modified: trunk/src/dl-learner/org/dllearner/tools/protege/OWLEquivalentClassesAxiomFrameSection.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/protege/OWLEquivalentClassesAxiomFrameSection.java 2008-06-05 05:28:04 UTC (rev 940) +++ trunk/src/dl-learner/org/dllearner/tools/protege/OWLEquivalentClassesAxiomFrameSection.java 2008-06-05 05:35:11 UTC (rev 941) @@ -44,7 +44,8 @@ } - protected void clear() { + @Override + protected void clear() { } @@ -52,7 +53,8 @@ * Refills the section with rows. This method will be called * by the system and should be directly called. */ - protected void refill(OWLOntology ontology) { + @Override + protected void refill(OWLOntology ontology) { for (OWLEquivalentClassesAxiom ax : ontology.getEquivalentClassesAxioms(getRootObject())) { addRow(new OWLEquivalentClassesAxiomFrameSectionRow(getOWLEditorKit(), this, @@ -68,7 +70,8 @@ } - protected void refillInferred() { + @Override + protected void refillInferred() { if (!inferredEquivalentClasses) { return; } @@ -105,24 +108,28 @@ } - public void visit(OWLEquivalentClassesAxiom axiom) { + @Override + public void visit(OWLEquivalentClassesAxiom axiom) { if (axiom.getDescriptions().contains(getRootObject())) { reset(); } } - protected OWLEquivalentClassesAxiom createAxiom(OWLDescription object) { + @Override + protected OWLEquivalentClassesAxiom createAxiom(OWLDescription object) { return getOWLDataFactory().getOWLEquivalentClassesAxiom(CollectionFactory.createSet(getRootObject(), object)); } - public OWLFrameSectionRowObjectEditor<OWLDescription> getObjectEditor() { + @Override + public OWLFrameSectionRowObjectEditor<OWLDescription> getObjectEditor() { return new OWLClassDescriptionEditorWithDLLearnerTab(getOWLEditorKit(), null,frame,LABEL); } - public boolean canAcceptDrop(List<OWLObject> objects) { + @Override + public boolean canAcceptDrop(List<OWLObject> objects) { for (OWLObject obj : objects) { if (!(obj instanceof OWLDescription)) { return false; @@ -132,7 +139,8 @@ } - public boolean dropObjects(List<OWLObject> objects) { + @Override + public boolean dropObjects(List<OWLObject> objects) { List<OWLOntologyChange> changes = new ArrayList<OWLOntologyChange>(); for (OWLObject obj : objects) { if (obj instanceof OWLDescription) { Modified: trunk/src/dl-learner/org/dllearner/tools/protege/OWLSubClassAxiomFrameSection.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/protege/OWLSubClassAxiomFrameSection.java 2008-06-05 05:28:04 UTC (rev 940) +++ trunk/src/dl-learner/org/dllearner/tools/protege/OWLSubClassAxiomFrameSection.java 2008-06-05 05:35:11 UTC (rev 941) @@ -40,7 +40,8 @@ } - protected void clear() { + @Override + protected void clear() { added.clear(); } @@ -49,7 +50,8 @@ * Refills the section with rows. This method will be called * by the system and should be directly called. */ - protected void refill(OWLOntology ontology) { + @Override + protected void refill(OWLOntology ontology) { for (OWLSubClassAxiom ax : ontology.getSubClassAxiomsForLHS(getRootObject())) { addRow(new OWLSubClassAxiomFrameSectionRow(getOWLEditorKit(), this, ontology, getRootObject(), ax)); added.add(ax.getSuperClass()); @@ -57,7 +59,8 @@ } - protected void refillInferred() { + @Override + protected void refillInferred() { try { if (getOWLModelManager().getReasoner().isSatisfiable(getRootObject())) { for (Set<OWLClass> descs : getOWLModelManager().getReasoner().getSuperClasses(getRootObject())) { @@ -82,17 +85,20 @@ } - protected OWLSubClassAxiom createAxiom(OWLDescription object) { + @Override + protected OWLSubClassAxiom createAxiom(OWLDescription object) { return getOWLDataFactory().getOWLSubClassAxiom(getRootObject(), object); } - public OWLFrameSectionRowObjectEditor<OWLDescription> getObjectEditor() { + @Override + public OWLFrameSectionRowObjectEditor<OWLDescription> getObjectEditor() { return new OWLClassDescriptionEditorWithDLLearnerTab(getOWLEditorKit(), null, frame,LABEL); } - public boolean canAcceptDrop(List<OWLObject> objects) { + @Override + public boolean canAcceptDrop(List<OWLObject> objects) { for (OWLObject obj : objects) { if (!(obj instanceof OWLDescription)) { return false; @@ -105,7 +111,8 @@ private OWLObjectProperty prop; - public boolean dropObjects(List<OWLObject> objects) { + @Override + public boolean dropObjects(List<OWLObject> objects) { List<OWLOntologyChange> changes = new ArrayList<OWLOntologyChange>(); for (OWLObject obj : objects) { if (obj instanceof OWLDescription) { @@ -132,7 +139,8 @@ } - public void visit(OWLSubClassAxiom axiom) { + @Override + public void visit(OWLSubClassAxiom axiom) { if (axiom.getSubClass().equals(getRootObject())) { reset(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jen...@us...> - 2008-06-05 05:28:08
|
Revision: 940 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=940&view=rev Author: jenslehmann Date: 2008-06-04 22:28:04 -0700 (Wed, 04 Jun 2008) Log Message: ----------- changed CLI defaults: reasoner = fastInstanceChecker; algorithm = refexamples Modified Paths: -------------- trunk/src/dl-learner/org/dllearner/cli/Start.java Modified: trunk/src/dl-learner/org/dllearner/cli/Start.java =================================================================== --- trunk/src/dl-learner/org/dllearner/cli/Start.java 2008-06-04 17:02:14 UTC (rev 939) +++ trunk/src/dl-learner/org/dllearner/cli/Start.java 2008-06-05 05:28:04 UTC (rev 940) @@ -204,7 +204,6 @@ try { la = cm.learningAlgorithm(getLearningAlgorithm(algorithmOption), lp, rs); } catch (LearningProblemUnsupportedException e) { - // TODO Auto-generated catch block e.printStackTrace(); } configureComponent(cm, la, componentPrefixMapping, parser); @@ -759,8 +758,6 @@ return rs; } - // edit by Tilo Hielscher - /** * Set Reasoner class. Define here all possible reasoners. * @@ -770,14 +767,14 @@ */ public static Class<? extends ReasonerComponent> getReasonerClass(ConfFileOption reasonerOption) { Class<? extends ReasonerComponent> reasonerClass = null; - if (reasonerOption == null || reasonerOption.getStringValue().equals("dig")) - reasonerClass = DIGReasoner.class; + if (reasonerOption == null || reasonerOption.getStringValue().equals("fastInstanceChecker")) + reasonerClass = FastInstanceChecker.class; else if (reasonerOption.getStringValue().equals("owlAPI")) reasonerClass = OWLAPIReasoner.class; else if (reasonerOption.getStringValue().equals("fastRetrieval")) reasonerClass = FastRetrievalReasoner.class; - else if (reasonerOption.getStringValue().equals("fastInstanceChecker")) - reasonerClass = FastInstanceChecker.class; + else if (reasonerOption.getStringValue().equals("dig")) + reasonerClass = DIGReasoner.class; else { handleError("Unknown value " + reasonerOption.getStringValue() + " for option \"reasoner\"."); @@ -817,10 +814,10 @@ public static Class<? extends LearningAlgorithm> getLearningAlgorithm( ConfFileOption algorithmOption) { Class<? extends LearningAlgorithm> laClass = null; - if (algorithmOption == null || algorithmOption.getStringValue().equals("refinement")) - laClass = ROLearner.class; - else if (algorithmOption.getStringValue().equals("refexamples")) + if (algorithmOption == null || algorithmOption.getStringValue().equals("refexamples")) laClass = ExampleBasedROLComponent.class; + else if (algorithmOption.getStringValue().equals("refinement")) + laClass = ROLearner.class; else if (algorithmOption.getStringValue().equals("gp")) laClass = GP.class; else if (algorithmOption.getStringValue().equals("bruteForce")) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lor...@us...> - 2008-06-04 17:02:47
|
Revision: 939 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=939&view=rev Author: lorenz_b Date: 2008-06-04 10:02:14 -0700 (Wed, 04 Jun 2008) Log Message: ----------- added noisePercentage TextField in LearningPanel added deleteInstance added removeClassAssertion added moveInstance Modified Paths: -------------- trunk/src/dl-learner/org/dllearner/tools/ore/ConceptPanel.java trunk/src/dl-learner/org/dllearner/tools/ore/KnowledgeSourcePanelDescriptor.java trunk/src/dl-learner/org/dllearner/tools/ore/LearningPanel.java trunk/src/dl-learner/org/dllearner/tools/ore/LearningPanelDescriptor.java trunk/src/dl-learner/org/dllearner/tools/ore/ORE.java trunk/src/dl-learner/org/dllearner/tools/ore/OntologyModifierOWLAPI.java trunk/src/dl-learner/org/dllearner/tools/ore/RepairPanel.java trunk/src/dl-learner/org/dllearner/tools/ore/RepairPanelDescriptor.java trunk/src/dl-learner/org/dllearner/tools/ore/WizardController.java Added Paths: ----------- trunk/src/dl-learner/org/dllearner/tools/ore/NegExampleRepairDialog.java Removed Paths: ------------- trunk/src/dl-learner/org/dllearner/tools/ore/MoveDialog.java Modified: trunk/src/dl-learner/org/dllearner/tools/ore/ConceptPanel.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/ore/ConceptPanel.java 2008-06-04 12:07:48 UTC (rev 938) +++ trunk/src/dl-learner/org/dllearner/tools/ore/ConceptPanel.java 2008-06-04 17:02:14 UTC (rev 939) @@ -104,35 +104,7 @@ return loadingLabel; } -// class BlinkLabel extends JLabel implements Runnable{ -// private boolean blinking = false; -// -// public void start(){ -// blinking = true; -// new Thread(this).start(); -// } -// public void stop(){ -// blinking = false; -// setForeground(Color.black); -// -// } -// public void run(){ -// while(blinking){ -// setText("Loading Concept"); -// -// //setForeground(Color.red); -// try { -// Thread.sleep(300); -// } catch (InterruptedException e) { -// return; -// } -// setText(""); -// -// } -// if(!blinking) -// setText("Done! Select Concept and press 'Next'"); -// } -// } + Modified: trunk/src/dl-learner/org/dllearner/tools/ore/KnowledgeSourcePanelDescriptor.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/ore/KnowledgeSourcePanelDescriptor.java 2008-06-04 12:07:48 UTC (rev 938) +++ trunk/src/dl-learner/org/dllearner/tools/ore/KnowledgeSourcePanelDescriptor.java 2008-06-04 17:02:14 UTC (rev 939) @@ -102,7 +102,7 @@ for (NamedClass cl : ind){ publish(cl); nextPanel.panel3.getModel().addElement(cl); - System.out.println(cl.toString()); + } return ind; } Modified: trunk/src/dl-learner/org/dllearner/tools/ore/LearningPanel.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/ore/LearningPanel.java 2008-06-04 12:07:48 UTC (rev 938) +++ trunk/src/dl-learner/org/dllearner/tools/ore/LearningPanel.java 2008-06-04 17:02:14 UTC (rev 939) @@ -3,6 +3,8 @@ import java.awt.BorderLayout; import java.awt.Dimension; import java.awt.event.ActionListener; +import java.awt.event.KeyAdapter; +import java.awt.event.KeyEvent; import java.awt.geom.Ellipse2D; import java.awt.geom.RoundRectangle2D; @@ -12,7 +14,7 @@ import javax.swing.JList; import javax.swing.JPanel; import javax.swing.JScrollPane; -import javax.swing.JSlider; +import javax.swing.JTextField; import javax.swing.event.ListSelectionListener; import org.jdesktop.swingx.JXBusyLabel; @@ -34,6 +36,8 @@ private JButton startButton; private JButton stopButton; + private JTextField noiseField; + @SuppressWarnings("unchecked") public LearningPanel() { @@ -81,17 +85,29 @@ resultList = new JList(model); // resultList.setCellRenderer(new ColumnListCellRenderer()); - scroll.setPreferredSize(new Dimension(400, 400)); + scroll.setPreferredSize(new Dimension(900, 400)); scroll.setViewportView(resultList); - JSlider noise = new JSlider(JSlider.HORIZONTAL, 0, 100, 0); - noise.setMajorTickSpacing(50); - noise.setMinorTickSpacing(25); - noise.setPaintTicks(true); - noise.setPaintLabels(true); + noiseField = new JTextField("noise"); + noiseField.setText("0.0"); + + noiseField.addKeyListener(new KeyAdapter() { + @Override + public void keyTyped(KeyEvent e) { + char c = e.getKeyChar(); + if (!((Character.isDigit(c) || + (c == KeyEvent.VK_BACK_SPACE) || + (c == KeyEvent.VK_DELETE)))) { + getToolkit().beep(); + e.consume(); + } + + } + }); + contentPanel1.add(scroll); - contentPanel1.add(noise); + contentPanel1.add(noiseField); @@ -135,6 +151,9 @@ resultList.addListSelectionListener(l); } + public double getNoise(){ + return Double.parseDouble(noiseField.getText()); + } } Modified: trunk/src/dl-learner/org/dllearner/tools/ore/LearningPanelDescriptor.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/ore/LearningPanelDescriptor.java 2008-06-04 12:07:48 UTC (rev 938) +++ trunk/src/dl-learner/org/dllearner/tools/ore/LearningPanelDescriptor.java 2008-06-04 17:02:14 UTC (rev 939) @@ -54,26 +54,35 @@ class ResultSwingWorker extends SwingWorker<List<Description>, List<Description>> { LearningAlgorithm la; + @Override public List<Description> doInBackground() { panel4.getResultList().setCellRenderer(new ColumnListCellRenderer(getWizardModel().getOre())); panel4.getLoadingLabel().setBusy(true); panel4.getStatusLabel().setText("Learning"); - la = getWizardModel().getOre().start(); + + getWizardModel().getOre().setNoise(panel4.getNoise()); + + la = getWizardModel().getOre().start(); + + + + timer = new Timer(); timer.schedule(new TimerTask() { @SuppressWarnings("unchecked") @Override public void run() { + publish(getWizardModel().getOre().getLearningResults(10)); + } }, 0, 1000); - List<Description> result = getWizardModel().getOre() - .getLearningResults(5); + List<Description> result = getWizardModel().getOre().getLearningResults(10); return result; } @@ -103,8 +112,6 @@ protected void process(List<List<Description>> resultLists) { panel4.getModel().clear(); for (List<Description> list : resultLists) { - for( Description d : list) - System.out.println(d); updateList(list); } } @@ -115,8 +122,6 @@ public void run() { panel4.getModel().clear(); for (Description d : result) { - System.err.println(d+"=="+getWizardModel().getOre().getCorrectness(d)); - panel4.getModel().addElement(d); } @@ -176,6 +181,7 @@ getWizardModel().getOre().getLa().stop(); panel4.getStartButton().setEnabled(true); panel4.getStatusLabel().setText("Algorithm aborted"); + panel4.getLoadingLabel().setBusy(false); } @@ -186,7 +192,7 @@ setNextButtonAccordingToConceptSelected(); if (!e.getValueIsAdjusting()) getWizardModel().getOre().setConceptToAdd((Description)(panel4.getResultList().getSelectedValue())); - System.out.println(panel4.getResultList().getSelectedValue()); + } Deleted: trunk/src/dl-learner/org/dllearner/tools/ore/MoveDialog.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/ore/MoveDialog.java 2008-06-04 12:07:48 UTC (rev 938) +++ trunk/src/dl-learner/org/dllearner/tools/ore/MoveDialog.java 2008-06-04 17:02:14 UTC (rev 939) @@ -1,106 +0,0 @@ -package org.dllearner.tools.ore; - -import java.awt.BorderLayout; -import java.awt.Dimension; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; -import java.util.Set; - -import javax.swing.Box; -import javax.swing.BoxLayout; -import javax.swing.DefaultListModel; -import javax.swing.JButton; -import javax.swing.JDialog; -import javax.swing.JList; -import javax.swing.JPanel; -import javax.swing.JScrollPane; - -import org.dllearner.core.owl.NamedClass; - -public class MoveDialog extends JDialog{ - - /** - * - */ - private static final long serialVersionUID = 1L; - - Box buttonBox; - JButton okButton; - JButton cancelButton; - JPanel buttonPanel; - JPanel listPanel; - JScrollPane scroll; - JList conceptList; - Set<NamedClass> allConcepts; - NamedClass selectedValue;; - - - public MoveDialog(Set<NamedClass> allConcepts, JDialog dialog){ - super(dialog, "Auswahl", true); - this.allConcepts = allConcepts; - - } - - public void init(){ - setSize(500, 500); - buttonBox = new Box(BoxLayout.X_AXIS); - - okButton = new JButton("Ok"); - okButton.addActionListener(new ActionListener(){ - - public void actionPerformed(ActionEvent e) { - if(e.getActionCommand().equals("Ok")){ - - selectedValue = (NamedClass)conceptList.getSelectedValue(); - - dispose(); - } - - } - }); - cancelButton = new JButton("Cancel"); - cancelButton.addActionListener(new ActionListener(){ - - public void actionPerformed(ActionEvent e) { - if(e.getActionCommand().equals("Cancel")){ - - - dispose(); - } - - } - }); - - buttonBox.add(okButton); - buttonBox.add(Box.createHorizontalStrut(30)); - buttonBox.add(cancelButton); - - buttonPanel = new JPanel(); - buttonPanel.setLayout(new BorderLayout()); - buttonPanel.add(buttonBox, java.awt.BorderLayout.EAST); - - listPanel = new JPanel(); - DefaultListModel model = new DefaultListModel(); - for (NamedClass cl : allConcepts) { - model.addElement(cl); - - } - - scroll = new JScrollPane(); - conceptList = new JList(model); - scroll.setPreferredSize(new Dimension(400, 400)); - scroll.setViewportView(conceptList); - listPanel.add(scroll); - - getContentPane().add(buttonPanel, java.awt.BorderLayout.SOUTH); - getContentPane().add(listPanel, java.awt.BorderLayout.CENTER); - - setVisible(true); - - } - - public NamedClass getSelectedValue(){ - return selectedValue; - } - -} Copied: trunk/src/dl-learner/org/dllearner/tools/ore/NegExampleRepairDialog.java (from rev 928, trunk/src/dl-learner/org/dllearner/tools/ore/MoveDialog.java) =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/ore/NegExampleRepairDialog.java (rev 0) +++ trunk/src/dl-learner/org/dllearner/tools/ore/NegExampleRepairDialog.java 2008-06-04 17:02:14 UTC (rev 939) @@ -0,0 +1,223 @@ +package org.dllearner.tools.ore; + +import java.awt.BorderLayout; +import java.awt.Dimension; +import java.awt.GridBagConstraints; +import java.awt.GridBagLayout; +import java.awt.GridLayout; +import java.awt.Insets; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.util.Set; + +import javax.swing.BorderFactory; +import javax.swing.Box; +import javax.swing.BoxLayout; +import javax.swing.JButton; +import javax.swing.JDialog; +import javax.swing.JLabel; +import javax.swing.JPanel; +import javax.swing.JScrollPane; +import javax.swing.JSeparator; +import javax.swing.JTextArea; +import javax.swing.UIManager; +import javax.swing.border.EmptyBorder; +import javax.swing.border.TitledBorder; + +import org.dllearner.core.owl.Individual; +import org.dllearner.core.owl.NamedClass; +import org.dllearner.reasoning.OWLAPIReasoner; + +public class NegExampleRepairDialog extends JDialog implements ActionListener{ + + /** + * + */ + private static final long serialVersionUID = 1L; + + + private JPanel statsPanel; + private JPanel actionsPanel; + private JPanel ok_cancelPanel; + + private JButton okButton; + private JButton cancelButton; + + + private JTextArea classesField; + private JScrollPane scrollPane; + + private ORE ore; + private Individual ind; + private OWLAPIReasoner reasoner; + + public NegExampleRepairDialog(Individual ind, JDialog dialog, ORE ore){ + super(dialog, "Auswahl", true); + this.ind = ind; + this.ore = ore; + this.reasoner = ore.reasoner; + init(); + } + + public void init(){ + setSize(700, 700); + setLayout(new GridLayout(3, 0)); + + statsPanel = new JPanel(); + statsPanel.setBorder(new TitledBorder("stats")); + + getContentPane().add(statsPanel); + + GridBagLayout gbl = new GridBagLayout(); + statsPanel.setLayout(gbl); + + + GridBagConstraints gbc = new GridBagConstraints(); + JLabel descLb = new JLabel("Description:"); + JLabel indLb = new JLabel("Individual:"); + JLabel classLb = new JLabel("Classes:"); + + + JLabel descLb1 = new JLabel(ore.conceptToAdd.toString()); + JLabel indLb1 = new JLabel(ind.getName()); + Set<NamedClass> t = reasoner.getConcepts(ind); + classesField = new JTextArea(); + String classes = new String(); + for(NamedClass nc : t) + classes += nc.getName() +"\n"; + classesField.setText(classes); + + scrollPane = new JScrollPane(); + scrollPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); + scrollPane.setViewportBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); + scrollPane.setPreferredSize(new Dimension(150,100)); + classesField.setBackground(UIManager.getDefaults().getColor("control")); + classesField.setColumns(20); + classesField.setEditable(false); + classesField.setLineWrap(true); + classesField.setRows(5); + classesField.setWrapStyleWord(true); + scrollPane.setViewportView(classesField); + + gbc.gridx = 0; // first column + gbc.gridy = 0; // first row + gbc.gridwidth = 1; // occupies only one column + gbc.gridheight = 1; // occupies only one row + gbc.weightx = 20; // relative horizontal size - first column + gbc.weighty = 10; // relative vertical size - first row + gbc.fill = GridBagConstraints.NONE; // stay as small as possible + // suite for labels + gbc.anchor = GridBagConstraints.CENTER; // center aligning + //inform the layout about the control to be added and its constraints: + gbl.setConstraints(descLb, gbc); + statsPanel.add(descLb); //add the JLabel to the JPanel object + + gbc.gridx = 0; // first column + gbc.gridy = 1; // second row + gbc.gridwidth = 1; // occupies only one column + gbc.gridheight = 1; // occupies only one row + gbc.weightx = 0; // !!! horizontal size for the column is defined already! + gbc.weighty = 10; // relative vertical size - second row + gbc.fill = GridBagConstraints.NONE; // stay as small as possible, suites for labels + gbc.anchor = GridBagConstraints.CENTER; // center aligning + //inform the layout about the control to be added and its constraints: + gbl.setConstraints(indLb, gbc); + statsPanel.add(indLb); + + gbc.gridx = 0; // first column + gbc.gridy = 2; // third row + gbc.gridwidth = 1; // occupies only one column + gbc.gridheight = 1; // occupies only one row + gbc.weightx = 0; // !!! horizontal size for the column is defined already! + gbc.weighty = 10; // relative vertical size - second row + gbc.fill = GridBagConstraints.NONE; // stay as small as possible, suites for labels + gbc.anchor = GridBagConstraints.CENTER; // center aligning + //inform the layout about the control to be added and its constraints: + gbl.setConstraints(classLb, gbc); + statsPanel.add(classLb); + + gbc.gridx = 1; // second column + gbc.gridy = 0; // first row + gbc.gridwidth = 1; // occupies only one column + gbc.gridheight = 1; // occupies only one row + gbc.weightx = 100; // horizontal size - second column + gbc.weighty = 0; // !!! vertical size for the row is defined already! + gbc.fill = GridBagConstraints.HORIZONTAL; // fill horizontally entire cell + gbc.anchor = GridBagConstraints.CENTER; // center aligning + + gbl.setConstraints(descLb1, gbc); + statsPanel.add(descLb1); + + gbc.gridx = 1; // second column + gbc.gridy = 1; // second row + gbc.gridwidth = 1; // occupies only one column + gbc.gridheight = 1; // occupies only one row + gbc.weightx = 0; // horizontal size for the column is defined already! + gbc.weighty = 0; // vertical size for the row is defined already! + gbc.fill = GridBagConstraints.HORIZONTAL; // fill horizontally entire cell + gbc.anchor = GridBagConstraints.CENTER; // center aligning + + gbl.setConstraints(indLb1, gbc); + statsPanel.add(indLb1); + + gbc.gridx = 2; // third column + gbc.gridy = 2; // third row + gbc.gridwidth = 1; // occupies only one column + gbc.gridheight = 1; // occupies only one row + gbc.weightx = 0; // horizontal size for the column is defined already! + gbc.weighty = 0; // vertical size for the row is defined already! + gbc.fill = GridBagConstraints.HORIZONTAL; // fill horizontally entire cell + gbc.anchor = GridBagConstraints.WEST; // west aligning + + gbl.setConstraints(scrollPane, gbc); + statsPanel.add(scrollPane); + + actionsPanel = new JPanel(); + actionsPanel.setBorder(new TitledBorder("actions")); + JButton delete = new JButton("delete instance"); + delete.addActionListener(this); + actionsPanel.add(delete); + JButton save = new JButton("save"); + save.addActionListener(this); + actionsPanel.add(save); + getContentPane().add(actionsPanel, java.awt.BorderLayout.EAST); + + JSeparator separator = new JSeparator(); + Box buttonBox = new Box(BoxLayout.X_AXIS); + ok_cancelPanel = new JPanel(); + ok_cancelPanel.setLayout(new BorderLayout()); + ok_cancelPanel.add(separator, BorderLayout.NORTH); + okButton = new JButton("Ok"); + cancelButton = new JButton("Cancel"); + + buttonBox.setBorder(new EmptyBorder(new Insets(5, 10, 5, 10))); + buttonBox.add(okButton); + buttonBox.add(Box.createHorizontalStrut(10)); + buttonBox.add(cancelButton); + ok_cancelPanel.add(buttonBox, BorderLayout.EAST); + + getContentPane().add(ok_cancelPanel); + + + setModal(true); + setVisible(true); + + } + + @Override + public void actionPerformed(ActionEvent e) { + System.out.println(e.getActionCommand()); + if(e.getActionCommand().equals("delete instance")){ + ore.modi.deleteIndividual(ind); + + } + if(e.getActionCommand().equals("save")){ + ore.modi.saveOntology(); + } + + + } + + + +} Modified: trunk/src/dl-learner/org/dllearner/tools/ore/ORE.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/ore/ORE.java 2008-06-04 12:07:48 UTC (rev 938) +++ trunk/src/dl-learner/org/dllearner/tools/ore/ORE.java 2008-06-04 17:02:14 UTC (rev 939) @@ -2,6 +2,7 @@ import java.io.File; import java.math.BigDecimal; +import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Set; @@ -17,11 +18,16 @@ import org.dllearner.core.ReasoningService; import org.dllearner.core.owl.Description; import org.dllearner.core.owl.Individual; +import org.dllearner.core.owl.Intersection; import org.dllearner.core.owl.NamedClass; +import org.dllearner.core.owl.Union; import org.dllearner.kb.OWLFile; import org.dllearner.learningproblems.PosNegDefinitionLP; +import org.dllearner.reasoning.FastInstanceChecker; import org.dllearner.reasoning.OWLAPIReasoner; + + public class ORE { private LearningAlgorithm la; @@ -29,6 +35,7 @@ private KnowledgeSource ks; private PosNegDefinitionLP lp; private ComponentManager cm; + OWLAPIReasoner reasoner; SortedSet<Individual> posExamples; SortedSet<Individual> negExamples; @@ -36,12 +43,13 @@ Description conceptToAdd; OntologyModifierOWLAPI modi; Set<NamedClass> allAtomicConcepts; + private double noise; public ORE() { cm = ComponentManager.getInstance(); - + } // step 1: detect knowledge sources @@ -98,6 +106,11 @@ lp.init(); } + public void setNoise(double noise){ + + this.noise = noise; + } + public void setLearningAlgorithm(){ try { la = cm.learningAlgorithm(ExampleBasedROLComponent.class, lp, rs); @@ -110,6 +123,7 @@ Set<String> t = new TreeSet<String>(); t.add(concept.getName()); cm.applyConfigEntry(la, "ignoredConcepts", t ); + cm.applyConfigEntry(la, "noisePercentage", noise); try { la.init(); } catch (ComponentInitException e) { @@ -125,11 +139,13 @@ public LearningAlgorithm start(){ + this.setPosNegExamples(); this.setLearningProblem(); this.setLearningAlgorithm(); + la.start(); - + return la; } @@ -138,6 +154,10 @@ return la.getBestSolution(); } + public List<Description> getSolutions(){ + return la.getGoodSolutions(); + } + public List<Description> getLearningResults(int anzahl){ return la.getBestSolutions(anzahl); } @@ -165,10 +185,20 @@ } public HashSet<Individual> getNegFailureExamples(){ + FastInstanceChecker instanceReasoner = cm.reasoner(FastInstanceChecker.class, ks); + try { + instanceReasoner.init(); + } catch (ComponentInitException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + + ReasoningService instanceRs = cm.reasoningService(instanceReasoner); + HashSet<Individual> negFailureExamples = new HashSet<Individual>() ; for(Individual ind : negExamples){ - if(rs.instanceCheck(conceptToAdd, ind)) + if(instanceRs.instanceCheck(conceptToAdd, ind)) negFailureExamples.add(ind); } @@ -176,13 +206,56 @@ return negFailureExamples; } - public SortedSet<Individual> getPosFailureExamples(){ + public List<HashSet<Individual>> getFailureExamples(){ + List<HashSet<Individual>> list = new ArrayList<HashSet<Individual>>(); - SortedSet<Individual> posFailureExamples = null ; + FastInstanceChecker instanceReasoner = cm.reasoner(FastInstanceChecker.class, ks); + try { + instanceReasoner.init(); + } catch (ComponentInitException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + + ReasoningService instanceRs = cm.reasoningService(instanceReasoner); + HashSet<Individual> posFailureExamples = new HashSet<Individual>() ; for(Individual ind : posExamples){ - if(!rs.instanceCheck(conceptToAdd, ind)) + if(!instanceRs.instanceCheck(conceptToAdd, ind)) posFailureExamples.add(ind); + } + + HashSet<Individual> negFailureExamples = new HashSet<Individual>() ; + for(Individual ind : negExamples){ + if(instanceRs.instanceCheck(conceptToAdd, ind)) + negFailureExamples.add(ind); + } + + list.add(posFailureExamples); + list.add(negFailureExamples); + + + + return list; + + } + public HashSet<Individual> getPosFailureExamples(){ + FastInstanceChecker instanceReasoner = cm.reasoner(FastInstanceChecker.class, ks); + try { + instanceReasoner.init(); + } catch (ComponentInitException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + + ReasoningService instanceRs = cm.reasoningService(instanceReasoner); + + HashSet<Individual> posFailureExamples = new HashSet<Individual>() ; + + + for(Individual ind : posExamples){ + if(!instanceRs.instanceCheck(conceptToAdd, ind)) + posFailureExamples.add(ind); } @@ -218,26 +291,51 @@ this.allAtomicConcepts = allAtomicConcepts; } + public void getAllChildren(Description desc){ + + if(desc.getNumberOfNodes() >= 2) + for(Description d: desc.getChildren()) + getAllChildren(d); + System.out.println(desc); + } + + public Set<Description> getCriticalDescriptions(Individual ind, Description desc){ + + Set<Description> criticals = new HashSet<Description>(); + List<Description> children = desc.getChildren(); + + if(desc instanceof Intersection){ + criticals.addAll(children); + } + if(desc instanceof Union){ + for(Description d: children) + if(reasoner.instanceCheck(d, ind)) + criticals.add(d); + } + + + return criticals; + } + public static void main(String[] args){ -// ORE test = new ORE(); -// -// File owlFile = new File("src/dl-learner/org/dllearner/tools/ore/father.owl"); -// -// test.setKnowledgeSource(owlFile); -// -// test.detectReasoner(); -// ReasoningService rs = test.getReasoningService(); -// System.err.println("Concepts :" + rs.getAtomicConcepts()); -// -// -// test.setConcept(new NamedClass("http://example.com/father#father")); -// test.setPosNegExamples(); -// System.out.println(test.posExamples); -// System.out.println(test.negExamples); -// test.setLearningProblem(); -// test.setLearningAlgorithm(); -// test.start(); + ORE test = new ORE(); + + File owlFile = new File("src/dl-learner/org/dllearner/tools/ore/father.owl"); + + test.setKnowledgeSource(owlFile); + + test.detectReasoner(); + ReasoningService rs = test.getReasoningService(); + System.err.println("Concepts :" + rs.getAtomicConcepts()); + + + test.setConcept(new NamedClass("http://example.com/father#father")); + test.setPosNegExamples(); + System.out.println(test.posExamples); + System.out.println(test.negExamples); + test.start(); + test.la.start();//Bug? } Modified: trunk/src/dl-learner/org/dllearner/tools/ore/OntologyModifierOWLAPI.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/ore/OntologyModifierOWLAPI.java 2008-06-04 12:07:48 UTC (rev 938) +++ trunk/src/dl-learner/org/dllearner/tools/ore/OntologyModifierOWLAPI.java 2008-06-04 17:02:14 UTC (rev 939) @@ -14,6 +14,7 @@ import org.semanticweb.owl.io.RDFXMLOntologyFormat; import org.semanticweb.owl.model.AddAxiom; import org.semanticweb.owl.model.OWLAxiom; +import org.semanticweb.owl.model.OWLClassAssertionAxiom; import org.semanticweb.owl.model.OWLDataFactory; import org.semanticweb.owl.model.OWLDescription; import org.semanticweb.owl.model.OWLIndividual; @@ -21,6 +22,7 @@ import org.semanticweb.owl.model.OWLOntologyChangeException; import org.semanticweb.owl.model.OWLOntologyManager; import org.semanticweb.owl.model.OWLOntologyStorageException; +import org.semanticweb.owl.model.RemoveAxiom; import org.semanticweb.owl.model.UnknownOWLOntologyException; import org.semanticweb.owl.util.OWLEntityRemover; @@ -50,7 +52,7 @@ OWLAxiom axiomOWLAPI = factory.getOWLEquivalentClassesAxiom(ds); - + AddAxiom axiom = new AddAxiom(ontology, axiomOWLAPI); try { manager.applyChange(axiom); @@ -103,12 +105,11 @@ } - public void moveIndividual(Individual ind, Description oldConcept, Description newConcept){ + public void removeClassAssertion(Individual ind, Description desc){ - OWLIndividual individualOWLAPI = null; + OWLDescription owlDesc = OWLAPIDescriptionConvertVisitor.getOWLDescription(desc); - try { individualOWLAPI = factory.getOWLIndividual( new URI(ind.getName())); } catch (URISyntaxException e) { @@ -116,18 +117,40 @@ e.printStackTrace(); } - //Loeschen - OWLEntityRemover remover = new OWLEntityRemover(manager, Collections.singleton(ontology)); - individualOWLAPI.accept(remover); + OWLClassAssertionAxiom owlCl = factory.getOWLClassAssertionAxiom(individualOWLAPI, owlDesc); + + + RemoveAxiom rm = new RemoveAxiom(ontology, owlCl); + + + try { - manager.applyChanges(remover.getChanges()); + manager.applyChange(rm); } catch (OWLOntologyChangeException e) { // TODO Auto-generated catch block e.printStackTrace(); } - remover.reset(); + } + + public void moveIndividual(Individual ind, Description oldConcept, Description newConcept){ + + + OWLIndividual individualOWLAPI = null; + + + try { + individualOWLAPI = factory.getOWLIndividual( new URI(ind.getName())); + } catch (URISyntaxException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + + //Loeschen + removeClassAssertion(ind, oldConcept); + + //Hinzufuegen OWLDescription newConceptOWLAPI = OWLAPIDescriptionConvertVisitor.getOWLDescription(newConcept); Modified: trunk/src/dl-learner/org/dllearner/tools/ore/RepairPanel.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/ore/RepairPanel.java 2008-06-04 12:07:48 UTC (rev 938) +++ trunk/src/dl-learner/org/dllearner/tools/ore/RepairPanel.java 2008-06-04 17:02:14 UTC (rev 939) @@ -131,12 +131,13 @@ return negFailureList; } - public void addSelectionListener(ListSelectionListener l){ + public void addSelectionListeners(ListSelectionListener l){ posFailureList.addListSelectionListener(l); negFailureList.addListSelectionListener(l); } - public void addMouseListener(MouseListener m){ + + public void addMouseListeners(MouseListener m){ posFailureList.addMouseListener(m); negFailureList.addMouseListener(m); } Modified: trunk/src/dl-learner/org/dllearner/tools/ore/RepairPanelDescriptor.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/ore/RepairPanelDescriptor.java 2008-06-04 12:07:48 UTC (rev 938) +++ trunk/src/dl-learner/org/dllearner/tools/ore/RepairPanelDescriptor.java 2008-06-04 17:02:14 UTC (rev 939) @@ -25,8 +25,8 @@ panel4 = new RepairPanel(); panel4.addSaveButtonListener(this); - panel4.addSelectionListener(this); - panel4.addMouseListener(this); + panel4.addSelectionListeners(this); + panel4.addMouseListeners(this); setPanelDescriptorIdentifier(IDENTIFIER); setPanelComponent(panel4); @@ -67,7 +67,7 @@ public void mouseClicked(MouseEvent e) { if(e.getClickCount() == 2 && e.getSource() == panel4.getNegFailureList() ){ - System.out.println(panel4.getNegFailureList().getSelectedValue()); + new NegExampleRepairDialog((Individual)panel4.getNegFailureList().getSelectedValue(), getWizard().getDialog(), getWizardModel().getOre() ); } } Modified: trunk/src/dl-learner/org/dllearner/tools/ore/WizardController.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/ore/WizardController.java 2008-06-04 12:07:48 UTC (rev 938) +++ trunk/src/dl-learner/org/dllearner/tools/ore/WizardController.java 2008-06-04 17:02:14 UTC (rev 939) @@ -3,8 +3,8 @@ import java.awt.event.ActionListener; import java.util.HashSet; +import java.util.List; import java.util.Set; -import java.util.SortedSet; import java.util.concurrent.ExecutionException; import javax.swing.DefaultListModel; @@ -75,8 +75,15 @@ if( nextPanelDescriptor.equals("REPAIR_PANEL")){ ((RepairPanelDescriptor)wizard.getModel().getPanelHashMap().get(nextPanelDescriptor)).panel4.getNegFailureModel().clear(); - wizard.getModel().getOre().getModi().addAxiomToOWL(wizard.getModel().getOre().getConceptToAdd(), wizard.getModel().getOre().getConcept()); + ((RepairPanelDescriptor)wizard.getModel().getPanelHashMap().get(nextPanelDescriptor)).panel4.getPosFailureModel().clear(); +// wizard.getModel().getOre().getModi().addAxiomToOWL(wizard.getModel().getOre().getConceptToAdd(), wizard.getModel().getOre().getConcept()); new FailInstancesRetriever(nextPanelDescriptor).execute(); + +// for(Description desc : wizard.getModel().getOre().getConceptToAdd().getChildren()) +// System.out.println(desc); + + + } if (nextPanelDescriptor instanceof WizardPanelDescriptor.FinishIdentifier) { @@ -93,7 +100,8 @@ } - + + private void backButtonPressed() { WizardModel model = wizard.getModel(); @@ -219,7 +227,7 @@ dm.addElement(cl); //nextPanel.panel3.getModel().addElement(cl); - System.out.println(cl.getName()); + } wizard.getModel().getOre().setAllAtomicConcepts(ind); nextPanel.panel3.getList().setModel(dm); @@ -231,7 +239,7 @@ } } - class FailInstancesRetriever extends SwingWorker<HashSet<Individual>, Individual> { + class FailInstancesRetriever extends SwingWorker<List<HashSet<Individual>>, HashSet<Individual>> { Object nextPanelID; public FailInstancesRetriever(Object nextPanelDescriptor) { @@ -240,7 +248,7 @@ } @Override - public HashSet<Individual> doInBackground() { + public List<HashSet<Individual>> doInBackground() { ((RepairPanelDescriptor) wizard.getModel().getPanelHashMap().get( nextPanelID)).panel4.getStatusLabel().setText( @@ -250,17 +258,17 @@ - HashSet<Individual> ind = wizard.getModel().getOre() - .getNegFailureExamples(); + List<HashSet<Individual>> indList = wizard.getModel().getOre() + .getFailureExamples(); - return ind; + return indList; } @Override public void done() { - HashSet<Individual> ind = null; + List<HashSet<Individual>> indList = null; try { - ind = get(); + indList = get(); } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); @@ -270,12 +278,17 @@ } RepairPanelDescriptor nextPanel = (RepairPanelDescriptor) wizard .getModel().getPanelHashMap().get(nextPanelID); - DefaultListModel dm = nextPanel.panel4.getNegFailureModel(); - - for (Individual cl : ind) { - dm.addElement(cl); - System.out.println(cl.getName()); + DefaultListModel posDm = nextPanel.panel4.getPosFailureModel(); + DefaultListModel negDm = nextPanel.panel4.getNegFailureModel(); + + for (Individual posInd : indList.get(0)) { + posDm.addElement(posInd); + System.out.println(posInd.getName()); } + for (Individual negInd : indList.get(1)) { + negDm.addElement(negInd); + System.out.println(negInd.getName()); + } nextPanel.panel4.getStatusLabel().setText( "Instances loaded"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jen...@us...> - 2008-06-04 12:07:51
|
Revision: 938 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=938&view=rev Author: jenslehmann Date: 2008-06-04 05:07:48 -0700 (Wed, 04 Jun 2008) Log Message: ----------- removed black hole for exceptions in SparqlQuery Modified Paths: -------------- trunk/src/dl-learner/org/dllearner/algorithms/refexamples/ExampleBasedROLComponent.java trunk/src/dl-learner/org/dllearner/cli/Start.java trunk/src/dl-learner/org/dllearner/kb/extraction/TypedSparqlQuery.java trunk/src/dl-learner/org/dllearner/kb/extraction/TypedSparqlQueryClasses.java trunk/src/dl-learner/org/dllearner/kb/sparql/SPARQLTasks.java trunk/src/dl-learner/org/dllearner/kb/sparql/SparqlQuery.java trunk/src/dl-learner/org/dllearner/scripts/PaperStatistics.java trunk/src/dl-learner/org/dllearner/server/DLLearnerWS.java Modified: trunk/src/dl-learner/org/dllearner/algorithms/refexamples/ExampleBasedROLComponent.java =================================================================== --- trunk/src/dl-learner/org/dllearner/algorithms/refexamples/ExampleBasedROLComponent.java 2008-06-04 11:50:54 UTC (rev 937) +++ trunk/src/dl-learner/org/dllearner/algorithms/refexamples/ExampleBasedROLComponent.java 2008-06-04 12:07:48 UTC (rev 938) @@ -30,7 +30,6 @@ import org.apache.log4j.Logger; import org.dllearner.core.LearningAlgorithm; import org.dllearner.core.LearningProblem; -import org.dllearner.core.ReasoningMethodUnsupportedException; import org.dllearner.core.ReasoningService; import org.dllearner.core.Score; import org.dllearner.core.config.BooleanConfigOption; Modified: trunk/src/dl-learner/org/dllearner/cli/Start.java =================================================================== --- trunk/src/dl-learner/org/dllearner/cli/Start.java 2008-06-04 11:50:54 UTC (rev 937) +++ trunk/src/dl-learner/org/dllearner/cli/Start.java 2008-06-04 12:07:48 UTC (rev 938) @@ -70,7 +70,6 @@ import org.dllearner.core.owl.ObjectProperty; import org.dllearner.kb.KBFile; import org.dllearner.kb.OWLFile; -import org.dllearner.kb.extraction.TypedSparqlQuery; import org.dllearner.kb.sparql.SparqlKnowledgeSource; import org.dllearner.learningproblems.PosNegDefinitionLP; import org.dllearner.learningproblems.PosNegInclusionLP; @@ -85,7 +84,6 @@ import org.dllearner.reasoning.OWLAPIReasoner; import org.dllearner.utilities.Files; import org.dllearner.utilities.Helper; -import org.dllearner.utilities.JamonMonitorLogger; import org.dllearner.utilities.datastructures.Datastructures; import org.dllearner.utilities.datastructures.StringTuple; import org.dllearner.utilities.owl.ConceptComparator; Modified: trunk/src/dl-learner/org/dllearner/kb/extraction/TypedSparqlQuery.java =================================================================== --- trunk/src/dl-learner/org/dllearner/kb/extraction/TypedSparqlQuery.java 2008-06-04 11:50:54 UTC (rev 937) +++ trunk/src/dl-learner/org/dllearner/kb/extraction/TypedSparqlQuery.java 2008-06-04 12:07:48 UTC (rev 938) @@ -96,7 +96,7 @@ // .getSparqlEndpoint(), cache, uri.toString(), sparqlQueryString); SparqlQuery query = new SparqlQuery(sparqlQueryString, configuration.getSparqlEndpoint()); - query.extraDebugInfo=uri.toString(); +// query.extraDebugInfo=uri.toString(); String JSON = cache.executeSparqlQuery(query); ResultSet rs = SparqlQuery.JSONtoResultSet(JSON); Modified: trunk/src/dl-learner/org/dllearner/kb/extraction/TypedSparqlQueryClasses.java =================================================================== --- trunk/src/dl-learner/org/dllearner/kb/extraction/TypedSparqlQueryClasses.java 2008-06-04 11:50:54 UTC (rev 937) +++ trunk/src/dl-learner/org/dllearner/kb/extraction/TypedSparqlQueryClasses.java 2008-06-04 12:07:48 UTC (rev 938) @@ -64,7 +64,7 @@ + "}"; SparqlQuery query = new SparqlQuery(sparqlQueryString, configuration.getSparqlEndpoint()); - query.extraDebugInfo=uri.toString(); +// query.extraDebugInfo=uri.toString(); ResultSet rs = SparqlQuery.JSONtoResultSet(cache.executeSparqlQuery(query)); List<ResultBinding> l = ResultSetFormatter.toList(rs); Modified: trunk/src/dl-learner/org/dllearner/kb/sparql/SPARQLTasks.java =================================================================== --- trunk/src/dl-learner/org/dllearner/kb/sparql/SPARQLTasks.java 2008-06-04 11:50:54 UTC (rev 937) +++ trunk/src/dl-learner/org/dllearner/kb/sparql/SPARQLTasks.java 2008-06-04 12:07:48 UTC (rev 938) @@ -353,7 +353,7 @@ public String query(String SPARQLquery){ if(c==null){ SparqlQuery sq = new SparqlQuery(SPARQLquery,se); - sq.extraDebugInfo+=se.getURL(); +// sq.extraDebugInfo+=se.getURL(); sq.send(); String JSON = sq.getResult(); return JSON; Modified: trunk/src/dl-learner/org/dllearner/kb/sparql/SparqlQuery.java =================================================================== --- trunk/src/dl-learner/org/dllearner/kb/sparql/SparqlQuery.java 2008-06-04 11:50:54 UTC (rev 937) +++ trunk/src/dl-learner/org/dllearner/kb/sparql/SparqlQuery.java 2008-06-04 12:07:48 UTC (rev 938) @@ -21,6 +21,7 @@ import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; +import java.io.UnsupportedEncodingException; import java.nio.charset.Charset; import org.apache.log4j.Logger; @@ -44,13 +45,12 @@ private static Logger logger = Logger.getLogger(KnowledgeSource.class); - public String extraDebugInfo = ""; private boolean isRunning = false; private String queryString; private QueryEngineHTTP queryExecution; private SparqlEndpoint endpoint; private String json = null; - private SparqlQueryException sendException=null; +// private SparqlQueryException sendException=null; /** * Standard constructor. @@ -83,25 +83,24 @@ queryExecution.addNamedGraph(ngu); } - try{ - //TODO remove after overnext Jena release - HttpQuery.urlLimit = 3*1024 ; + //TODO remove after overnext Jena release + HttpQuery.urlLimit = 3*1024 ; - JamonMonitorLogger.getTimeMonitor(SparqlQuery.class, "httpTime").start(); - rs = queryExecution.execSelect(); - JamonMonitorLogger.getTimeMonitor(SparqlQuery.class, "httpTime").stop(); + JamonMonitorLogger.getTimeMonitor(SparqlQuery.class, "httpTime").start(); + rs = queryExecution.execSelect(); + JamonMonitorLogger.getTimeMonitor(SparqlQuery.class, "httpTime").stop(); - logger.debug("query SPARQL server ["+extraDebugInfo+"], retrieved: "+rs.getResultVars()); - json=SparqlQuery.getAsJSON(rs); + logger.debug("query SPARQL server, retrieved: "+rs.getResultVars()); + json=SparqlQuery.getAsJSON(rs); - logger.trace(rs.getResultVars().toString()); - } catch (Exception e){ - sendException=new SparqlQueryException(e.getMessage()); - logger.debug(e.getMessage()); - //e.printStackTrace(); - logger.debug("Exception when querying Sparql Endpoint in " + this.getClass()); - logger.debug(queryString); - } + logger.trace(rs.getResultVars().toString()); +// } catch (Exception e){ +// sendException=new SparqlQueryException(e.getMessage()); +// logger.debug(e.getMessage()); +// //e.printStackTrace(); +// logger.debug("Exception when querying Sparql Endpoint in " + this.getClass()); +// logger.debug(queryString); +// } isRunning = false; return rs; } @@ -130,9 +129,9 @@ return queryExecution; } - public SparqlQueryException getException(){ - return sendException; - } +// public SparqlQueryException getException(){ +// return sendException; +// } public boolean hasCompleted() { return (json != null); @@ -163,10 +162,11 @@ // possible Jena bug: Jena modifies the result set during // JSON transformation, so we need to get it back resultSet = JSONtoResultSet(baos.toString()); - try{ + try { return baos.toString("UTF-8"); - }catch (Exception e){ - return baos.toString(); + } catch (UnsupportedEncodingException e) { + // should never happen as UTF-8 is supported + throw new Error(e); } } Modified: trunk/src/dl-learner/org/dllearner/scripts/PaperStatistics.java =================================================================== --- trunk/src/dl-learner/org/dllearner/scripts/PaperStatistics.java 2008-06-04 11:50:54 UTC (rev 937) +++ trunk/src/dl-learner/org/dllearner/scripts/PaperStatistics.java 2008-06-04 12:07:48 UTC (rev 938) @@ -29,7 +29,6 @@ import org.dllearner.algorithms.gp.GP; import org.dllearner.core.ComponentManager; import org.dllearner.core.KnowledgeSource; -import org.dllearner.core.LearningAlgorithm; import org.dllearner.core.OntologyFormat; import org.dllearner.core.ReasonerComponent; import org.dllearner.core.ReasoningService; Modified: trunk/src/dl-learner/org/dllearner/server/DLLearnerWS.java =================================================================== --- trunk/src/dl-learner/org/dllearner/server/DLLearnerWS.java 2008-06-04 11:50:54 UTC (rev 937) +++ trunk/src/dl-learner/org/dllearner/server/DLLearnerWS.java 2008-06-04 12:07:48 UTC (rev 938) @@ -302,25 +302,17 @@ * method will block until learning is completed. * * @param id Session ID. + * @param format The format of the result string: "manchester", "kb", "dl". * @return The best solution found. * @throws ClientNotKnownException - */ + */ @WebMethod - public String learn(int id) throws ClientNotKnownException { - ClientState state = getState(id); - state.getLearningAlgorithm().start(); - return state.getLearningAlgorithm().getBestSolution().toString(); - } - - @WebMethod public String learn(int id, String format) throws ClientNotKnownException { ClientState state = getState(id); state.getLearningAlgorithm().start(); - // ResultSet resultSet=SparqlQuery.JSONtoResultSet(state.getQuery(id).getResult()); Description solution = state.getLearningAlgorithm().getBestSolution(); if(format == "manchester") - return solution.toManchesterSyntaxString(state.getReasoningService().getBaseURI(), new HashMap<String,String>()). - replace("\"", ""); + return solution.toManchesterSyntaxString(state.getReasoningService().getBaseURI(), new HashMap<String,String>()); else if(format == "kb") return solution.toKBSyntaxString(); else @@ -528,8 +520,6 @@ public String getAsJSON(int sessionID, int queryID) throws ClientNotKnownException, SparqlQueryException { ClientState state = getState(sessionID); - SparqlQueryException exception=null; - if ((exception=state.getQuery(queryID).getSparqlQuery().getException())!=null) throw exception; return state.getQuery(queryID).getResult(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jen...@us...> - 2008-06-04 11:50:57
|
Revision: 937 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=937&view=rev Author: jenslehmann Date: 2008-06-04 04:50:54 -0700 (Wed, 04 Jun 2008) Log Message: ----------- music recommender started Added Paths: ----------- trunk/src/music-recommender/ trunk/src/music-recommender/ajax.php trunk/src/music-recommender/def0.xsd trunk/src/music-recommender/def1.xsd trunk/src/music-recommender/index.php trunk/src/music-recommender/main.wsdl Added: trunk/src/music-recommender/ajax.php =================================================================== --- trunk/src/music-recommender/ajax.php (rev 0) +++ trunk/src/music-recommender/ajax.php 2008-06-04 11:50:54 UTC (rev 937) @@ -0,0 +1,50 @@ +<?php +/** + * Copyright (C) 2007-2008, Jens Lehmann + * + * This file is part of DL-Learner. + * + * DL-Learner is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * DL-Learner is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ + + /** + * Music recommender index page. + * + * @author Jens Lehmann + * @author Anita Janassary + */ + +require_once '../dbpedia-navigator/xajax/xajax_core/xajax.inc.php'; + +$xajax = new xajax(); + +// register functions +$xajax->registerFunction("doSearch"); + + +$xajax->processRequest(); + +// search for songs matching the search string +function doSearch($searchString) +{ + $newContent = 'searching for '.$searchString.' ... not implemented'; + // ToDo: execute a SPARQL query (find labels matching search string) by contacting DL-Learner web service + + $objResponse = new xajaxResponse(); + $objResponse->assign("searchElement","innerHTML", $newContent); + return $objResponse; +} + +?> \ No newline at end of file Added: trunk/src/music-recommender/def0.xsd =================================================================== --- trunk/src/music-recommender/def0.xsd (rev 0) +++ trunk/src/music-recommender/def0.xsd 2008-06-04 11:50:54 UTC (rev 937) @@ -0,0 +1,58 @@ +<?xml version="1.0" encoding="UTF-8"?><xs:schema xmlns:tns="http://server.dllearner.org/" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://server.dllearner.org/" version="1.0"> + + <xs:element name="ClientNotKnownException" type="tns:ClientNotKnownException"></xs:element> + + <xs:element name="ComponentInitException" type="tns:ComponentInitException"></xs:element> + + <xs:element name="ConfigOptionTypeException" type="tns:ConfigOptionTypeException"></xs:element> + + <xs:element name="LearningProblemUnsupportedException" type="tns:LearningProblemUnsupportedException"></xs:element> + + <xs:element name="ParseException" type="tns:ParseException"></xs:element> + + <xs:element name="SparqlQueryException" type="tns:SparqlQueryException"></xs:element> + + <xs:element name="UnknownComponentException" type="tns:UnknownComponentException"></xs:element> + + <xs:complexType name="ParseException"> + <xs:sequence> + <xs:element name="message" type="xs:string" minOccurs="0"></xs:element> + </xs:sequence> + </xs:complexType> + + <xs:complexType name="ClientNotKnownException"> + <xs:sequence> + <xs:element name="message" type="xs:string" minOccurs="0"></xs:element> + </xs:sequence> + </xs:complexType> + + <xs:complexType name="SparqlQueryException"> + <xs:sequence> + <xs:element name="message" type="xs:string" minOccurs="0"></xs:element> + </xs:sequence> + </xs:complexType> + + <xs:complexType name="UnknownComponentException"> + <xs:sequence> + <xs:element name="message" type="xs:string" minOccurs="0"></xs:element> + </xs:sequence> + </xs:complexType> + + <xs:complexType name="ConfigOptionTypeException"> + <xs:sequence> + <xs:element name="message" type="xs:string" minOccurs="0"></xs:element> + </xs:sequence> + </xs:complexType> + + <xs:complexType name="ComponentInitException"> + <xs:sequence> + <xs:element name="message" type="xs:string" minOccurs="0"></xs:element> + </xs:sequence> + </xs:complexType> + + <xs:complexType name="LearningProblemUnsupportedException"> + <xs:sequence> + <xs:element name="message" type="xs:string" minOccurs="0"></xs:element> + </xs:sequence> + </xs:complexType> +</xs:schema> \ No newline at end of file Added: trunk/src/music-recommender/def1.xsd =================================================================== --- trunk/src/music-recommender/def1.xsd (rev 0) +++ trunk/src/music-recommender/def1.xsd 2008-06-04 11:50:54 UTC (rev 937) @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?><xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://jaxb.dev.java.net/array" version="1.0"> + + <xs:complexType final="#all" name="stringArray"> + <xs:sequence> + <xs:element nillable="true" maxOccurs="unbounded" name="item" type="xs:string" minOccurs="0"></xs:element> + </xs:sequence> + </xs:complexType> + + <xs:complexType final="#all" name="intArray"> + <xs:sequence> + <xs:element nillable="true" maxOccurs="unbounded" name="item" type="xs:int" minOccurs="0"></xs:element> + </xs:sequence> + </xs:complexType> +</xs:schema> \ No newline at end of file Added: trunk/src/music-recommender/index.php =================================================================== --- trunk/src/music-recommender/index.php (rev 0) +++ trunk/src/music-recommender/index.php 2008-06-04 11:50:54 UTC (rev 937) @@ -0,0 +1,77 @@ +<?php +/** + * Copyright (C) 2007-2008, Jens Lehmann + * + * This file is part of DL-Learner. + * + * DL-Learner is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * DL-Learner is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ + + /** + * Music recommender index page. + * + * @author Jens Lehmann + * @author Anita Janassary + */ + +// NOTE: We use the xajax-Framework already included in DBpedia-Navigator, so we assume that +// the "dbpedia-navigator" is in the same directory as "music-recommender". + +ini_set("soap.wsdl_cache_enabled","0"); +// due to bugs in Java _and_ PHP, we have to download the WSDL and XSD +// files locally (if even this does not work you have to do it by hand); +// whenever the web service changes, you have to delete those files +if(!file_exists('main.wsdl')) { + include('../php-examples/Utilities.php'); + $wsdluri="http://localhost:8181/services?wsdl"; + Utilities::loadWSDLfiles($wsdluri); +} + +// $client = new SoapClient('main.wsdl'); +// $build = $client->getBuild(); +// echo $build; + +require_once 'ajax.php'; + +echo '<?xml version="1.0" encoding="UTF-8"?>'; +?> +<!DOCTYPE html + PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> + <head> + <title>DL-Learner Music Recommender</title> + <meta http-equiv="content-type" content="text/html; charset=UTF-8"/> + <?php $xajax->printJavascript('../dbpedia-navigator/xajax/'); ?> + <script type="text/javascript" src="http://mediaplayer.yahoo.com/js"></script> + </head> + <body> + <h1>Music Recommender</h1> + + <h2>Search</h2> + <!-- search form --> + <input type="text" id="label" /> + <button onclick="xajax_doSearch(document.getElementById('label').value);">search</button> + + <!-- search result display --> + <div id="searchElement"></div> + + <h2>Song List</h2> + <a href="http://mediaplayer.yahoo.com/example1.mp3">song 1</a> <br /> + <a href="http://mediaplayer.yahoo.com/example2.mp3">song 2</a> <br /> + <a href="http://mediaplayer.yahoo.com/example3.mp3">song 3</a> + + </body> +</html> Added: trunk/src/music-recommender/main.wsdl =================================================================== --- trunk/src/music-recommender/main.wsdl (rev 0) +++ trunk/src/music-recommender/main.wsdl 2008-06-04 11:50:54 UTC (rev 937) @@ -0,0 +1,1238 @@ +<?xml version="1.0" encoding="UTF-8"?><definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://server.dllearner.org/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" targetNamespace="http://server.dllearner.org/" name="DLLearnerWSService"> + <types> + <xsd:schema> + <xsd:import schemaLocation="def0.xsd" namespace="http://server.dllearner.org/"></xsd:import> + </xsd:schema> + <xsd:schema> + <xsd:import schemaLocation="def1.xsd" namespace="http://jaxb.dev.java.net/array"></xsd:import> + </xsd:schema> + </types> + <message name="init"> + <part name="arg0" type="xsd:int"></part> + <part name="arg1" type="xsd:int"></part> + </message> + <message name="initResponse"></message> + <message name="ClientNotKnownException"> + <part element="tns:ClientNotKnownException" name="fault"></part> + </message> + <message name="UnknownComponentException"> + <part element="tns:UnknownComponentException" name="fault"></part> + </message> + <message name="ComponentInitException"> + <part element="tns:ComponentInitException" name="fault"></part> + </message> + <message name="debug"> + <part name="arg0" type="xsd:string"></part> + </message> + <message name="debugResponse"></message> + <message name="stop"> + <part name="arg0" type="xsd:int"></part> + </message> + <message name="stopResponse"></message> + <message name="getBuild"></message> + <message name="getBuildResponse"> + <part name="return" type="xsd:string"></part> + </message> + <message name="generateID"></message> + <message name="generateIDResponse"> + <part name="return" type="xsd:int"></part> + </message> + <message name="getComponents"></message> + <message name="getComponentsResponse"> + <part xmlns:ns1="http://jaxb.dev.java.net/array" name="return" type="ns1:stringArray"></part> + </message> + <message name="getKnowledgeSources"></message> + <message name="getKnowledgeSourcesResponse"> + <part xmlns:ns2="http://jaxb.dev.java.net/array" name="return" type="ns2:stringArray"></part> + </message> + <message name="getReasoners"></message> + <message name="getReasonersResponse"> + <part xmlns:ns3="http://jaxb.dev.java.net/array" name="return" type="ns3:stringArray"></part> + </message> + <message name="getLearningProblems"></message> + <message name="getLearningProblemsResponse"> + <part xmlns:ns4="http://jaxb.dev.java.net/array" name="return" type="ns4:stringArray"></part> + </message> + <message name="getLearningAlgorithms"></message> + <message name="getLearningAlgorithmsResponse"> + <part xmlns:ns5="http://jaxb.dev.java.net/array" name="return" type="ns5:stringArray"></part> + </message> + <message name="getConfigOptions"> + <part name="arg0" type="xsd:string"></part> + <part name="arg1" type="xsd:boolean"></part> + </message> + <message name="getConfigOptionsResponse"> + <part xmlns:ns6="http://jaxb.dev.java.net/array" name="return" type="ns6:stringArray"></part> + </message> + <message name="addKnowledgeSource"> + <part name="arg0" type="xsd:int"></part> + <part name="arg1" type="xsd:string"></part> + <part name="arg2" type="xsd:string"></part> + </message> + <message name="addKnowledgeSourceResponse"> + <part name="return" type="xsd:int"></part> + </message> + <message name="removeKnowledgeSource"> + <part name="arg0" type="xsd:int"></part> + <part name="arg1" type="xsd:int"></part> + </message> + <message name="removeKnowledgeSourceResponse"></message> + <message name="setReasoner"> + <part name="arg0" type="xsd:int"></part> + <part name="arg1" type="xsd:string"></part> + </message> + <message name="setReasonerResponse"> + <part name="return" type="xsd:int"></part> + </message> + <message name="setLearningProblem"> + <part name="arg0" type="xsd:int"></part> + <part name="arg1" type="xsd:string"></part> + </message> + <message name="setLearningProblemResponse"> + <part name="return" type="xsd:int"></part> + </message> + <message name="setLearningAlgorithm"> + <part name="arg0" type="xsd:int"></part> + <part name="arg1" type="xsd:string"></part> + </message> + <message name="setLearningAlgorithmResponse"> + <part name="return" type="xsd:int"></part> + </message> + <message name="LearningProblemUnsupportedException"> + <part element="tns:LearningProblemUnsupportedException" name="fault"></part> + </message> + <message name="initAll"> + <part name="arg0" type="xsd:int"></part> + </message> + <message name="initAllResponse"></message> + <message name="learn"> + <part name="arg0" type="xsd:int"></part> + <part name="arg1" type="xsd:string"></part> + </message> + <message name="learnResponse"> + <part name="return" type="xsd:string"></part> + </message> + <message name="learnThreaded"> + <part name="arg0" type="xsd:int"></part> + </message> + <message name="learnThreadedResponse"></message> + <message name="getCurrentlyBestConcept"> + <part name="arg0" type="xsd:int"></part> + </message> + <message name="getCurrentlyBestConceptResponse"> + <part name="return" type="xsd:string"></part> + </message> + <message name="getCurrentlyBestConcepts"> + <part name="arg0" type="xsd:int"></part> + <part name="arg1" type="xsd:int"></part> + </message> + <message name="getCurrentlyBestConceptsResponse"> + <part xmlns:ns7="http://jaxb.dev.java.net/array" name="return" type="ns7:stringArray"></part> + </message> + <message name="isAlgorithmRunning"> + <part name="arg0" type="xsd:int"></part> + </message> + <message name="isAlgorithmRunningResponse"> + <part name="return" type="xsd:boolean"></part> + </message> + <message name="setPositiveExamples"> + <part name="arg0" type="xsd:int"></part> + <part xmlns:ns8="http://jaxb.dev.java.net/array" name="arg1" type="ns8:stringArray"></part> + </message> + <message name="setPositiveExamplesResponse"></message> + <message name="setNegativeExamples"> + <part name="arg0" type="xsd:int"></part> + <part xmlns:ns9="http://jaxb.dev.java.net/array" name="arg1" type="ns9:stringArray"></part> + </message> + <message name="setNegativeExamplesResponse"></message> + <message name="applyConfigEntryInt"> + <part name="arg0" type="xsd:int"></part> + <part name="arg1" type="xsd:int"></part> + <part name="arg2" type="xsd:string"></part> + <part name="arg3" type="xsd:int"></part> + </message> + <message name="applyConfigEntryIntResponse"></message> + <message name="applyConfigEntryString"> + <part name="arg0" type="xsd:int"></part> + <part name="arg1" type="xsd:int"></part> + <part name="arg2" type="xsd:string"></part> + <part name="arg3" type="xsd:string"></part> + </message> + <message name="applyConfigEntryStringResponse"></message> + <message name="applyConfigEntryStringArray"> + <part name="arg0" type="xsd:int"></part> + <part name="arg1" type="xsd:int"></part> + <part name="arg2" type="xsd:string"></part> + <part xmlns:ns10="http://jaxb.dev.java.net/array" name="arg3" type="ns10:stringArray"></part> + </message> + <message name="applyConfigEntryStringArrayResponse"></message> + <message name="applyConfigEntryBoolean"> + <part name="arg0" type="xsd:int"></part> + <part name="arg1" type="xsd:int"></part> + <part name="arg2" type="xsd:string"></part> + <part name="arg3" type="xsd:boolean"></part> + </message> + <message name="applyConfigEntryBooleanResponse"></message> + <message name="getConfigOptionValueStringArray"> + <part name="arg0" type="xsd:int"></part> + <part name="arg1" type="xsd:int"></part> + <part name="arg2" type="xsd:string"></part> + </message> + <message name="getConfigOptionValueStringArrayResponse"> + <part xmlns:ns11="http://jaxb.dev.java.net/array" name="return" type="ns11:stringArray"></part> + </message> + <message name="ConfigOptionTypeException"> + <part element="tns:ConfigOptionTypeException" name="fault"></part> + </message> + <message name="getConfigOptionValueString"> + <part name="arg0" type="xsd:int"></part> + <part name="arg1" type="xsd:int"></part> + <part name="arg2" type="xsd:string"></part> + </message> + <message name="getConfigOptionValueStringResponse"> + <part name="return" type="xsd:string"></part> + </message> + <message name="getConfigOptionValueDouble"> + <part name="arg0" type="xsd:int"></part> + <part name="arg1" type="xsd:int"></part> + <part name="arg2" type="xsd:string"></part> + </message> + <message name="getConfigOptionValueDoubleResponse"> + <part name="return" type="xsd:double"></part> + </message> + <message name="getConfigOptionValueBoolean"> + <part name="arg0" type="xsd:int"></part> + <part name="arg1" type="xsd:int"></part> + <part name="arg2" type="xsd:string"></part> + </message> + <message name="getConfigOptionValueBooleanResponse"> + <part name="return" type="xsd:boolean"></part> + </message> + <message name="getConfigOptionValueInt"> + <part name="arg0" type="xsd:int"></part> + <part name="arg1" type="xsd:int"></part> + <part name="arg2" type="xsd:string"></part> + </message> + <message name="getConfigOptionValueIntResponse"> + <part name="return" type="xsd:int"></part> + </message> + <message name="getAtomicConcepts"> + <part name="arg0" type="xsd:int"></part> + </message> + <message name="getAtomicConceptsResponse"> + <part xmlns:ns12="http://jaxb.dev.java.net/array" name="return" type="ns12:stringArray"></part> + </message> + <message name="getSubsumptionHierarchy"> + <part name="arg0" type="xsd:int"></part> + </message> + <message name="getSubsumptionHierarchyResponse"> + <part name="return" type="xsd:string"></part> + </message> + <message name="retrieval"> + <part name="arg0" type="xsd:int"></part> + <part name="arg1" type="xsd:string"></part> + </message> + <message name="retrievalResponse"> + <part xmlns:ns13="http://jaxb.dev.java.net/array" name="return" type="ns13:stringArray"></part> + </message> + <message name="ParseException"> + <part element="tns:ParseException" name="fault"></part> + </message> + <message name="getConceptLength"> + <part name="arg0" type="xsd:string"></part> + </message> + <message name="getConceptLengthResponse"> + <part name="return" type="xsd:int"></part> + </message> + <message name="getAtomicRoles"> + <part name="arg0" type="xsd:int"></part> + </message> + <message name="getAtomicRolesResponse"> + <part xmlns:ns14="http://jaxb.dev.java.net/array" name="return" type="ns14:stringArray"></part> + </message> + <message name="getInstances"> + <part name="arg0" type="xsd:int"></part> + </message> + <message name="getInstancesResponse"> + <part xmlns:ns15="http://jaxb.dev.java.net/array" name="return" type="ns15:stringArray"></part> + </message> + <message name="getIndividualsForARole"> + <part name="arg0" type="xsd:int"></part> + <part name="arg1" type="xsd:string"></part> + </message> + <message name="getIndividualsForARoleResponse"> + <part xmlns:ns16="http://jaxb.dev.java.net/array" name="return" type="ns16:stringArray"></part> + </message> + <message name="getAsJSON"> + <part name="arg0" type="xsd:int"></part> + <part name="arg1" type="xsd:int"></part> + </message> + <message name="getAsJSONResponse"> + <part name="return" type="xsd:string"></part> + </message> + <message name="SparqlQueryException"> + <part element="tns:SparqlQueryException" name="fault"></part> + </message> + <message name="getAsXMLString"> + <part name="arg0" type="xsd:int"></part> + <part name="arg1" type="xsd:int"></part> + </message> + <message name="getAsXMLStringResponse"> + <part name="return" type="xsd:string"></part> + </message> + <message name="sparqlQueryThreaded"> + <part name="arg0" type="xsd:int"></part> + <part name="arg1" type="xsd:int"></part> + <part name="arg2" type="xsd:string"></part> + </message> + <message name="sparqlQueryThreadedResponse"> + <part name="return" type="xsd:int"></part> + </message> + <message name="sparqlQuery"> + <part name="arg0" type="xsd:int"></part> + <part name="arg1" type="xsd:int"></part> + <part name="arg2" type="xsd:string"></part> + </message> + <message name="sparqlQueryResponse"> + <part name="return" type="xsd:string"></part> + </message> + <message name="isSparqlQueryRunning"> + <part name="arg0" type="xsd:int"></part> + <part name="arg1" type="xsd:int"></part> + </message> + <message name="isSparqlQueryRunningResponse"> + <part name="return" type="xsd:boolean"></part> + </message> + <message name="stopSparqlThread"> + <part name="arg0" type="xsd:int"></part> + <part name="arg1" type="xsd:int"></part> + </message> + <message name="stopSparqlThreadResponse"></message> + <message name="getConceptDepth"> + <part name="arg0" type="xsd:int"></part> + <part name="arg1" type="xsd:int"></part> + </message> + <message name="getConceptDepthResponse"> + <part xmlns:ns17="http://jaxb.dev.java.net/array" name="return" type="ns17:intArray"></part> + </message> + <message name="getConceptArity"> + <part name="arg0" type="xsd:int"></part> + <part name="arg1" type="xsd:int"></part> + </message> + <message name="getConceptArityResponse"> + <part xmlns:ns18="http://jaxb.dev.java.net/array" name="return" type="ns18:intArray"></part> + </message> + <message name="SparqlRetrieval"> + <part name="arg0" type="xsd:string"></part> + </message> + <message name="SparqlRetrievalResponse"> + <part name="return" type="xsd:string"></part> + </message> + <portType name="DLLearnerWebService"> + <operation name="init" parameterOrder="arg0 arg1"> + <input message="tns:init"></input> + <output message="tns:initResponse"></output> + <fault message="tns:ClientNotKnownException" name="ClientNotKnownException"></fault> + <fault message="tns:UnknownComponentException" name="UnknownComponentException"></fault> + <fault message="tns:ComponentInitException" name="ComponentInitException"></fault> + </operation> + <operation name="debug" parameterOrder="arg0"> + <input message="tns:debug"></input> + <output message="tns:debugResponse"></output> + </operation> + <operation name="stop" parameterOrder="arg0"> + <input message="tns:stop"></input> + <output message="tns:stopResponse"></output> + <fault message="tns:ClientNotKnownException" name="ClientNotKnownException"></fault> + </operation> + <operation name="getBuild" parameterOrder=""> + <input message="tns:getBuild"></input> + <output message="tns:getBuildResponse"></output> + </operation> + <operation name="generateID" parameterOrder=""> + <input message="tns:generateID"></input> + <output message="tns:generateIDResponse"></output> + </operation> + <operation name="getComponents" parameterOrder=""> + <input message="tns:getComponents"></input> + <output message="tns:getComponentsResponse"></output> + </operation> + <operation name="getKnowledgeSources" parameterOrder=""> + <input message="tns:getKnowledgeSources"></input> + <output message="tns:getKnowledgeSourcesResponse"></output> + </operation> + <operation name="getReasoners" parameterOrder=""> + <input message="tns:getReasoners"></input> + <output message="tns:getReasonersResponse"></output> + </operation> + <operation name="getLearningProblems" parameterOrder=""> + <input message="tns:getLearningProblems"></input> + <output message="tns:getLearningProblemsResponse"></output> + </operation> + <operation name="getLearningAlgorithms" parameterOrder=""> + <input message="tns:getLearningAlgorithms"></input> + <output message="tns:getLearningAlgorithmsResponse"></output> + </operation> + <operation name="getConfigOptions" parameterOrder="arg0 arg1"> + <input message="tns:getConfigOptions"></input> + <output message="tns:getConfigOptionsResponse"></output> + <fault message="tns:UnknownComponentException" name="UnknownComponentException"></fault> + </operation> + <operation name="addKnowledgeSource" parameterOrder="arg0 arg1 arg2"> + <input message="tns:addKnowledgeSource"></input> + <output message="tns:addKnowledgeSourceResponse"></output> + <fault message="tns:ClientNotKnownException" name="ClientNotKnownException"></fault> + <fault message="tns:UnknownComponentException" name="UnknownComponentException"></fault> + </operation> + <operation name="removeKnowledgeSource" parameterOrder="arg0 arg1"> + <input message="tns:removeKnowledgeSource"></input> + <output message="tns:removeKnowledgeSourceResponse"></output> + <fault message="tns:ClientNotKnownException" name="ClientNotKnownException"></fault> + </operation> + <operation name="setReasoner" parameterOrder="arg0 arg1"> + <input message="tns:setReasoner"></input> + <output message="tns:setReasonerResponse"></output> + <fault message="tns:ClientNotKnownException" name="ClientNotKnownException"></fault> + <fault message="tns:UnknownComponentException" name="UnknownComponentException"></fault> + </operation> + <operation name="setLearningProblem" parameterOrder="arg0 arg1"> + <input message="tns:setLearningProblem"></input> + <output message="tns:setLearningProblemResponse"></output> + <fault message="tns:ClientNotKnownException" name="ClientNotKnownException"></fault> + <fault message="tns:UnknownComponentException" name="UnknownComponentException"></fault> + </operation> + <operation name="setLearningAlgorithm" parameterOrder="arg0 arg1"> + <input message="tns:setLearningAlgorithm"></input> + <output message="tns:setLearningAlgorithmResponse"></output> + <fault message="tns:ClientNotKnownException" name="ClientNotKnownException"></fault> + <fault message="tns:UnknownComponentException" name="UnknownComponentException"></fault> + <fault message="tns:LearningProblemUnsupportedException" name="LearningProblemUnsupportedException"></fault> + </operation> + <operation name="initAll" parameterOrder="arg0"> + <input message="tns:initAll"></input> + <output message="tns:initAllResponse"></output> + <fault message="tns:ClientNotKnownException" name="ClientNotKnownException"></fault> + <fault message="tns:ComponentInitException" name="ComponentInitException"></fault> + </operation> + <operation name="learn" parameterOrder="arg0 arg1"> + <input message="tns:learn"></input> + <output message="tns:learnResponse"></output> + <fault message="tns:ClientNotKnownException" name="ClientNotKnownException"></fault> + </operation> + <operation name="learnThreaded" parameterOrder="arg0"> + <input message="tns:learnThreaded"></input> + <output message="tns:learnThreadedResponse"></output> + <fault message="tns:ClientNotKnownException" name="ClientNotKnownException"></fault> + </operation> + <operation name="getCurrentlyBestConcept" parameterOrder="arg0"> + <input message="tns:getCurrentlyBestConcept"></input> + <output message="tns:getCurrentlyBestConceptResponse"></output> + <fault message="tns:ClientNotKnownException" name="ClientNotKnownException"></fault> + </operation> + <operation name="getCurrentlyBestConcepts" parameterOrder="arg0 arg1"> + <input message="tns:getCurrentlyBestConcepts"></input> + <output message="tns:getCurrentlyBestConceptsResponse"></output> + <fault message="tns:ClientNotKnownException" name="ClientNotKnownException"></fault> + </operation> + <operation name="isAlgorithmRunning" parameterOrder="arg0"> + <input message="tns:isAlgorithmRunning"></input> + <output message="tns:isAlgorithmRunningResponse"></output> + <fault message="tns:ClientNotKnownException" name="ClientNotKnownException"></fault> + </operation> + <operation name="setPositiveExamples" parameterOrder="arg0 arg1"> + <input message="tns:setPositiveExamples"></input> + <output message="tns:setPositiveExamplesResponse"></output> + <fault message="tns:ClientNotKnownException" name="ClientNotKnownException"></fault> + </operation> + <operation name="setNegativeExamples" parameterOrder="arg0 arg1"> + <input message="tns:setNegativeExamples"></input> + <output message="tns:setNegativeExamplesResponse"></output> + <fault message="tns:ClientNotKnownException" name="ClientNotKnownException"></fault> + </operation> + <operation name="applyConfigEntryInt" parameterOrder="arg0 arg1 arg2 arg3"> + <input message="tns:applyConfigEntryInt"></input> + <output message="tns:applyConfigEntryIntResponse"></output> + <fault message="tns:ClientNotKnownException" name="ClientNotKnownException"></fault> + <fault message="tns:UnknownComponentException" name="UnknownComponentException"></fault> + </operation> + <operation name="applyConfigEntryString" parameterOrder="arg0 arg1 arg2 arg3"> + <input message="tns:applyConfigEntryString"></input> + <output message="tns:applyConfigEntryStringResponse"></output> + <fault message="tns:ClientNotKnownException" name="ClientNotKnownException"></fault> + <fault message="tns:UnknownComponentException" name="UnknownComponentException"></fault> + </operation> + <operation name="applyConfigEntryStringArray" parameterOrder="arg0 arg1 arg2 arg3"> + <input message="tns:applyConfigEntryStringArray"></input> + <output message="tns:applyConfigEntryStringArrayResponse"></output> + <fault message="tns:ClientNotKnownException" name="ClientNotKnownException"></fault> + <fault message="tns:UnknownComponentException" name="UnknownComponentException"></fault> + </operation> + <operation name="applyConfigEntryBoolean" parameterOrder="arg0 arg1 arg2 arg3"> + <input message="tns:applyConfigEntryBoolean"></input> + <output message="tns:applyConfigEntryBooleanResponse"></output> + <fault message="tns:ClientNotKnownException" name="ClientNotKnownException"></fault> + <fault message="tns:UnknownComponentException" name="UnknownComponentException"></fault> + </operation> + <operation name="getConfigOptionValueStringArray" parameterOrder="arg0 arg1 arg2"> + <input message="tns:getConfigOptionValueStringArray"></input> + <output message="tns:getConfigOptionValueStringArrayResponse"></output> + <fault message="tns:ClientNotKnownException" name="ClientNotKnownException"></fault> + <fault message="tns:UnknownComponentException" name="UnknownComponentException"></fault> + <fault message="tns:ConfigOptionTypeException" name="ConfigOptionTypeException"></fault> + </operation> + <operation name="getConfigOptionValueString" parameterOrder="arg0 arg1 arg2"> + <input message="tns:getConfigOptionValueString"></input> + <output message="tns:getConfigOptionValueStringResponse"></output> + <fault message="tns:ClientNotKnownException" name="ClientNotKnownException"></fault> + <fault message="tns:UnknownComponentException" name="UnknownComponentException"></fault> + <fault message="tns:ConfigOptionTypeException" name="ConfigOptionTypeException"></fault> + </operation> + <operation name="getConfigOptionValueDouble" parameterOrder="arg0 arg1 arg2"> + <input message="tns:getConfigOptionValueDouble"></input> + <output message="tns:getConfigOptionValueDoubleResponse"></output> + <fault message="tns:ClientNotKnownException" name="ClientNotKnownException"></fault> + <fault message="tns:UnknownComponentException" name="UnknownComponentException"></fault> + <fault message="tns:ConfigOptionTypeException" name="ConfigOptionTypeException"></fault> + </operation> + <operation name="getConfigOptionValueBoolean" parameterOrder="arg0 arg1 arg2"> + <input message="tns:getConfigOptionValueBoolean"></input> + <output message="tns:getConfigOptionValueBooleanResponse"></output> + <fault message="tns:ClientNotKnownException" name="ClientNotKnownException"></fault> + <fault message="tns:UnknownComponentException" name="UnknownComponentException"></fault> + <fault message="tns:ConfigOptionTypeException" name="ConfigOptionTypeException"></fault> + </operation> + <operation name="getConfigOptionValueInt" parameterOrder="arg0 arg1 arg2"> + <input message="tns:getConfigOptionValueInt"></input> + <output message="tns:getConfigOptionValueIntResponse"></output> + <fault message="tns:ClientNotKnownException" name="ClientNotKnownException"></fault> + <fault message="tns:UnknownComponentException" name="UnknownComponentException"></fault> + <fault message="tns:ConfigOptionTypeException" name="ConfigOptionTypeException"></fault> + </operation> + <operation name="getAtomicConcepts" parameterOrder="arg0"> + <input message="tns:getAtomicConcepts"></input> + <output message="tns:getAtomicConceptsResponse"></output> + <fault message="tns:ClientNotKnownException" name="ClientNotKnownException"></fault> + </operation> + <operation name="getSubsumptionHierarchy" parameterOrder="arg0"> + <input message="tns:getSubsumptionHierarchy"></input> + <output message="tns:getSubsumptionHierarchyResponse"></output> + <fault message="tns:ClientNotKnownException" name="ClientNotKnownException"></fault> + </operation> + <operation name="retrieval" parameterOrder="arg0 arg1"> + <input message="tns:retrieval"></input> + <output message="tns:retrievalResponse"></output> + <fault message="tns:ClientNotKnownException" name="ClientNotKnownException"></fault> + <fault message="tns:ParseException" name="ParseException"></fault> + </operation> + <operation name="getConceptLength" parameterOrder="arg0"> + <input message="tns:getConceptLength"></input> + <output message="tns:getConceptLengthResponse"></output> + <fault message="tns:ParseException" name="ParseException"></fault> + </operation> + <operation name="getAtomicRoles" parameterOrder="arg0"> + <input message="tns:getAtomicRoles"></input> + <output message="tns:getAtomicRolesResponse"></output> + <fault message="tns:ClientNotKnownException" name="ClientNotKnownException"></fault> + </operation> + <operation name="getInstances" parameterOrder="arg0"> + <input message="tns:getInstances"></input> + <output message="tns:getInstancesResponse"></output> + <fault message="tns:ClientNotKnownException" name="ClientNotKnownException"></fault> + </operation> + <operation name="getIndividualsForARole" parameterOrder="arg0 arg1"> + <input message="tns:getIndividualsForARole"></input> + <output message="tns:getIndividualsForARoleResponse"></output> + <fault message="tns:ClientNotKnownException" name="ClientNotKnownException"></fault> + </operation> + <operation name="getAsJSON" parameterOrder="arg0 arg1"> + <input message="tns:getAsJSON"></input> + <output message="tns:getAsJSONResponse"></output> + <fault message="tns:ClientNotKnownException" name="ClientNotKnownException"></fault> + <fault message="tns:SparqlQueryException" name="SparqlQueryException"></fault> + </operation> + <operation name="getAsXMLString" parameterOrder="arg0 arg1"> + <input message="tns:getAsXMLString"></input> + <output message="tns:getAsXMLStringResponse"></output> + <fault message="tns:ClientNotKnownException" name="ClientNotKnownException"></fault> + </operation> + <operation name="sparqlQueryThreaded" parameterOrder="arg0 arg1 arg2"> + <input message="tns:sparqlQueryThreaded"></input> + <output message="tns:sparqlQueryThreadedResponse"></output> + <fault message="tns:ClientNotKnownException" name="ClientNotKnownException"></fault> + </operation> + <operation name="sparqlQuery" parameterOrder="arg0 arg1 arg2"> + <input message="tns:sparqlQuery"></input> + <output message="tns:sparqlQueryResponse"></output> + <fault message="tns:ClientNotKnownException" name="ClientNotKnownException"></fault> + </operation> + <operation name="isSparqlQueryRunning" parameterOrder="arg0 arg1"> + <input message="tns:isSparqlQueryRunning"></input> + <output message="tns:isSparqlQueryRunningResponse"></output> + <fault message="tns:ClientNotKnownException" name="ClientNotKnownException"></fault> + </operation> + <operation name="stopSparqlThread" parameterOrder="arg0 arg1"> + <input message="tns:stopSparqlThread"></input> + <output message="tns:stopSparqlThreadResponse"></output> + <fault message="tns:ClientNotKnownException" name="ClientNotKnownException"></fault> + </operation> + <operation name="getConceptDepth" parameterOrder="arg0 arg1"> + <input message="tns:getConceptDepth"></input> + <output message="tns:getConceptDepthResponse"></output> + <fault message="tns:ClientNotKnownException" name="ClientNotKnownException"></fault> + </operation> + <operation name="getConceptArity" parameterOrder="arg0 arg1"> + <input message="tns:getConceptArity"></input> + <output message="tns:getConceptArityResponse"></output> + <fault message="tns:ClientNotKnownException" name="ClientNotKnownException"></fault> + </operation> + <operation name="SparqlRetrieval" parameterOrder="arg0"> + <input message="tns:SparqlRetrieval"></input> + <output message="tns:SparqlRetrievalResponse"></output> + <fault message="tns:ParseException" name="ParseException"></fault> + </operation> + </portType> + <binding name="DLLearnerWebServicePortBinding" type="tns:DLLearnerWebService"> + <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"></soap:binding> + <operation name="init"> + <soap:operation soapAction=""></soap:operation> + <input> + <soap:body use="literal" namespace="http://server.dllearner.org/"></soap:body> + </input> + <output> + <soap:body use="literal" namespace="http://server.dllearner.org/"></soap:body> + </output> + <fault name="ClientNotKnownException"> + <soap:fault name="ClientNotKnownException" use="literal"></soap:fault> + </fault> + <fault name="UnknownComponentException"> + <soap:fault name="UnknownComponentException" use="literal"></soap:fault> + </fault> + <fault name="ComponentInitException"> + <soap:fault name="ComponentInitException" use="literal"></soap:fault> + </fault> + </operation> + <operation name="debug"> + <soap:operation soapAction=""></soap:operation> + <input> + <soap:body use="literal" namespace="http://server.dllearner.org/"></soap:body> + </input> + <output> + <soap:body use="literal" namespace="http://server.dllearner.org/"></soap:body> + </output> + </operation> + <operation name="stop"> + <soap:operation soapAction=""></soap:operation> + <input> + <soap:body use="literal" namespace="http://server.dllearner.org/"></soap:body> + </input> + <output> + <soap:body use="literal" namespace="http://server.dllearner.org/"></soap:body> + </output> + <fault name="ClientNotKnownException"> + <soap:fault name="ClientNotKnownException" use="literal"></soap:fault> + </fault> + </operation> + <operation name="getBuild"> + <soap:operation soapAction=""></soap:operation> + <input> + <soap:body use="literal" namespace="http://server.dllearner.org/"></soap:body> + </input> + <output> + <soap:body use="literal" namespace="http://server.dllearner.org/"></soap:body> + </output> + </operation> + <operation name="generateID"> + <soap:operation soapAction=""></soap:operation> + <input> + <soap:body use="literal" namespace="http://server.dllearner.org/"></soap:body> + </input> + <output> + <soap:body use="literal" namespace="http://server.dllearner.org/"></soap:body> + </output> + </operation> + <operation name="getComponents"> + <soap:operation soapAction=""></soap:operation> + <input> + <soap:body use="literal" namespace="http://server.dllearner.org/"></soap:body> + </input> + <output> + <soap:body use="literal" namespace="http://server.dllearner.org/"></soap:body> + </output> + </operation> + <operation name="getKnowledgeSources"> + <soap:operation soapAction=""></soap:operation> + <input> + <soap:body use="literal" namespace="http://server.dllearner.org/"></soap:body> + </input> + <output> + <soap:body use="literal" namespace="http://server.dllearner.org/"></soap:body> + </output> + </operation> + <operation name="getReasoners"> + <soap:operation soapAction=""></soap:operation> + <input> + <soap:body use="literal" namespace="http://server.dllearner.org/"></soap:body> + </input> + <output> + <soap:body use="literal" namespace="http://server.dllearner.org/"></soap:body> + </output> + </operation> + <operation name="getLearningProblems"> + <soap:operation soapAction=""></soap:operation> + <input> + <soap:body use="literal" namespace="http://server.dllearner.org/"></soap:body> + </input> + <output> + <soap:body use="literal" namespace="http://server.dllearner.org/"></soap:body> + </output> + </operation> + <operation name="getLearningAlgorithms"> + <soap:operation soapAction=""></soap:operation> + <input> + <soap:body use="literal" namespace="http://server.dllearner.org/"></soap:body> + </input> + <output> + <soap:body use="literal" namespace="http://server.dllearner.org/"></soap:body> + </output> + </operation> + <operation name="getConfigOptions"> + <soap:operation soapAction=""></soap:operation> + <input> + <soap:body use="literal" namespace="http://server.dllearner.org/"></soap:body> + </input> + <output> + <soap:body use="literal" namespace="http://server.dllearner.org/"></soap:body> + </output> + <fault name="UnknownComponentException"> + <soap:fault name="UnknownComponentException" use="literal"></soap:fault> + </fault> + </operation> + <operation name="addKnowledgeSource"> + <soap:operation soapAction=""></soap:operation> + <input> + <soap:body use="literal" namespace="http://server.dllearner.org/"></soap:body> + </input> + <output> + <soap:body use="literal" namespace="http://server.dllearner.org/"></soap:body> + </output> + <fault name="ClientNotKnownException"> + <soap:fault name="ClientNotKnownException" use="literal"></soap:fault> + </fault> + <fault name="UnknownComponentException"> + <soap:fault name="UnknownComponentException" use="literal"></soap:fault> + </fault> + </operation> + <operation name="removeKnowledgeSource"> + <soap:operation soapAction=""></soap:operation> + <input> + <soap:body use="literal" namespace="http://server.dllearner.org/"></soap:body> + </input> + <output> + <soap:body use="literal" namespace="http://server.dllearner.org/"></soap:body> + </output> + <fault name="ClientNotKnownException"> + <soap:fault name="ClientNotKnownException" use="literal"></soap:fault> + </fault> + </operation> + <operation name="setReasoner"> + <soap:operation soapAction=""></soap:operation> + <input> + <soap:body use="literal" namespace="http://server.dllearner.org/"></soap:body> + </input> + <output> + <soap:body use="literal" namespace="http://server.dllearner.org/"></soap:body> + </output> + <fault name="ClientNotKnownException"> + <soap:fault name="ClientNotKnownException" use="literal"></soap:fault> + </fault> + <fault name="UnknownComponentException"> + <soap:fault name="UnknownComponentException" use="literal"></soap:fault> + </fault> + </operation> + <operation name="setLearningProblem"> + <soap:operation soapAction=""></soap:operation> + <input> + <soap:body use="literal" namespace="http://server.dllearner.org/"></soap:body> + </input> + <output> + <soap:body use="literal" namespace="http://server.dllearner.org/"></soap:body> + </output> + <fault name="ClientNotKnownException"> + <soap:fault name="ClientNotKnownException" use="literal"></soap:fault> + </fault> + <fault name="UnknownComponentException"> + <soap:fault name="UnknownComponentException" use="literal"></soap:fault> + </fault> + </operation> + <operation name="setLearningAlgorithm"> + <soap:operation soapAction=""></soap:operation> + <input> + <soap:body use="literal" namespace="http://server.dllearner.org/"></soap:body> + </input> + <output> + <soap:body use="literal" namespace="http://server.dllearner.org/"></soap:body> + </output> + <fault name="ClientNotKnownException"> + <soap:fault name="ClientNotKnownException" use="literal"></soap:fault> + </fault> + <fault name="UnknownComponentException"> + <soap:fault name="UnknownComponentException" use="literal"></soap:fault> + </fault> + <fault name="LearningProblemUnsupportedException"> + <soap:fault name="LearningProblemUnsupportedException" use="literal"></soap:fault> + </fault> + </operation> + <operation name="initAll"> + <soap:operation soapAction=""></soap:operation> + <input> + <soap:body use="literal" namespace="http://server.dllearner.org/"></soap:body> + </input> + <output> + <soap:body use="literal" namespace="http://server.dllearner.org/"></soap:body> + </output> + <fault name="ClientNotKnownException"> + <soap:fault name="ClientNotKnownException" use="literal"></soap:fault> + </fault> + <fault name="ComponentInitException"> + <soap:fault name="ComponentInitException" use="literal"></soap:fault> + </fault> + </operation> + <operation name="learn"> + <soap:operation soapAction=""></soap:operation> + <input> + <soap:body use="literal" namespace="http://server.dllearner.org/"></soap:body> + </input> + <output> + <soap:body use="literal" namespace="http://server.dllearner.org/"></soap:body> + </output> + <fault name="ClientNotKnownException"> + <soap:fault name="ClientNotKnownException" use="literal"></soap:fault> + </fault> + </operation> + <operation name="learnThreaded"> + <soap:operation soapAction=""></soap:operation> + <input> + <soap:body use="literal" namespace="http://server.dllearner.org/"></soap:body> + </input> + <output> + <soap:body use="literal" namespace="http://server.dllearner.org/"></soap:body> + </output> + <fault name="ClientNotKnownException"> + <soap:fault name="ClientNotKnownException" use="literal"></soap:fault> + </fault> + </operation> + <operation name="getCurrentlyBestConcept"> + <soap:operation soapAction=""></soap:operation> + <input> + <soap:body use="literal" namespace="http://server.dllearner.org/"></soap:body> + </input> + <output> + <soap:body use="literal" namespace="http://server.dllearner.org/"></soap:body> + </output> + <fault name="ClientNotKnownException"> + <soap:fault name="ClientNotKnownException" use="literal"></soap:fault> + </fault> + </operation> + <operation name="getCurrentlyBestConcepts"> + <soap:operation soapAction=""></soap:operation> + <input> + <soap:body use="literal" namespace="http://server.dllearner.org/"></soap:body> + </input> + <output> + <soap:body use="literal" namespace="http://server.dllearner.org/"></soap:body> + </output> + <fault name="ClientNotKnownException"> + <soap:fault name="ClientNotKnownException" use="literal"></soap:fault> + </fault> + </operation> + <operation name="isAlgorithmRunning"> + <soap:operation soapAction=""></soap:operation> + <input> + <soap:body use="literal" namespace="http://server.dllearner.org/"></soap:body> + </input> + <output> + <soap:body use="literal" namespace="http://server.dllearner.org/"></soap:body> + </output> + <fault name="ClientNotKnownException"> + <soap:fault name="ClientNotKnownException" use="literal"></soap:fault> + </fault> + </operation> + <operation name="setPositiveExamples"> + <soap:operation soapAction=""></soap:operation> + <input> + <soap:body use="literal" namespace="http://server.dllearner.org/"></soap:body> + </input> + <output> + <soap:body use="literal" namespace="http://server.dllearner.org/"></soap:body> + </output> + <fault name="ClientNotKnownException"> + <soap:fault name="ClientNotKnownException" use="literal"></soap:fault> + </fault> + </operation> + <operation name="setNegativeExamples"> + <soap:operation soapAction=""></soap:operation> + <input> + <soap:body use="literal" namespace="http://server.dllearner.org/"></soap:body> + </input> + <output> + <soap:body use="literal" namespace="http://server.dllearner.org/"></soap:body> + </output> + <fault name="ClientNotKnownException"> + <soap:fault name="ClientNotKnownException" use="literal"></soap:fault> + </fault> + </operation> + <operation name="applyConfigEntryInt"> + <soap:operation soapAction=""></soap:operation> + <input> + <soap:body use="literal" namespace="http://server.dllearner.org/"></soap:body> + </input> + <output> + <soap:body use="literal" namespace="http://server.dllearner.org/"></soap:body> + </output> + <fault name="ClientNotKnownException"> + <soap:fault name="ClientNotKnownException" use="literal"></soap:fault> + </fault> + <fault name="UnknownComponentException"> + <soap:fault name="UnknownComponentException" use="literal"></soap:fault> + </fault> + </operation> + <operation name="applyConfigEntryString"> + <soap:operation soapAction=""></soap:operation> + <input> + <soap:body use="literal" namespace="http://server.dllearner.org/"></soap:body> + </input> + <output> + <soap:body use="literal" namespace="http://server.dllearner.org/"></soap:body> + </output> + <fault name="ClientNotKnownException"> + <soap:fault name="ClientNotKnownException" use="literal"></soap:fault> + </fault> + <fault name="UnknownComponentException"> + <soap:fault name="UnknownComponentException" use="literal"></soap:fault> + </fault> + </operation> + <operation name="applyConfigEntryStringArray"> + <soap:operation soapAction=""></soap:operation> + <input> + <soap:body use="literal" namespace="http://server.dllearner.org/"></soap:body> + </input> + <output> + <soap:body use="literal" namespace="http://server.dllearner.org/"></soap:body> + </output> + <fault name="ClientNotKnownException"> + <soap:fault name="ClientNotKnownException" use="literal"></soap:fault> + </fault> + <fault name="UnknownComponentException"> + <soap:fault name="UnknownComponentException" use="literal"></soap:fault> + </fault> + </operation> + <operation name="applyConfigEntryBoolean"> + <soap:operation soapAction=""></soap:operation> + <input> + <soap:body use="literal" namespace="http://server.dllearner.org/"></soap:body> + </input> + <output> + <soap:body use="literal" namespace="http://server.dllearner.org/"></soap:body> + </output> + <fault name="ClientNotKnownException"> + <soap:fault name="ClientNotKnownException" use="literal"></soap:fault> + </fault> + <fault name="UnknownComponentException"> + <soap:fault name="UnknownComponentException" use="literal"></soap:fault> + </fault> + </operation> + <operation name="getConfigOptionValueStringArray"> + <soap:operation soapAction=""></soap:operation> + <input> + <soap:body use="literal" namespace="http://server.dllearner.org/"></soap:body> + </input> + <output> + <soap:body use="literal" namespace="http://server.dllearner.org/"></soap:body> + </output> + <fault name="ClientNotKnownException"> + <soap:fault name="ClientNotKnownException" use="literal"></soap:fault> + </fault> + <fault name="UnknownComponentException"> + <soap:fault name="UnknownComponentException" use="literal"></soap:fault> + </fault> + <fault name="ConfigOptionTypeException"> + <soap:fault name="ConfigOptionTypeException" use="literal"></soap:fault> + </fault> + </operation> + <operation name="getConfigOptionValueString"> + <soap:operation soapAction=""></soap:operation> + <input> + <soap:body use="literal" namespace="http://server.dllearner.org/"></soap:body> + </input> + <output> + <soap:body use="literal" namespace="http://server.dllearner.org/"></soap:body> + </output> + <fault name="ClientNotKnownException"> + <soap:fault name="ClientNotKnownException" use="literal"></soap:fault> + </fault> + <fault name="UnknownComponentException"> + <soap:fault name="UnknownComponentException" use="literal"></soap:fault> + </fault> + <fault name="ConfigOptionTypeException"> + <soap:fault name="ConfigOptionTypeException" use="literal"></soap:fault> + </fault> + </operation> + <operation name="getConfigOptionValueDouble"> + <soap:operation soapAction=""></soap:operation> + <input> + <soap:body use="literal" namespace="http://server.dllearner.org/"></soap:body> + </input> + <output> + <soap:body use="literal" namespace="http://server.dllearner.org/"></soap:body> + </output> + <fault name="ClientNotKnownException"> + <soap:fault name="ClientNotKnownException" use="literal"></soap:fault> + </fault> + <fault name="UnknownComponentException"> + <soap:fault name="UnknownComponentException" use="literal"></soap:fault> + </fault> + <fault name="ConfigOptionTypeException"> + <soap:fault name="ConfigOptionTypeException" use="literal"></soap:fault> + </fault> + </operation> + <operation name="getConfigOptionValueBoolean"> + <soap:operation soapAction=""></soap:operation> + <input> + <soap:body use="literal" namespace="http://server.dllearner.org/"></soap:body> + </input> + <output> + <soap:body use="literal" namespace="http://server.dllearner.org/"></soap:body> + </output> + <fault name="ClientNotKnownException"> + <soap:fault name="ClientNotKnownException" use="literal"></soap:fault> + </fault> + <fault name="UnknownComponentException"> + <soap:fault name="UnknownComponentException" use="literal"></soap:fault> + </fault> + <fault name="ConfigOptionTypeException"> + <soap:fault name="ConfigOptionTypeException" use="literal"></soap:fault> + </fault> + </operation> + <operation name="getConfigOptionValueInt"> + <soap:operation soapAction=""></soap:operation> + <input> + <soap:body use="literal" namespace="http://server.dllearner.org/"></soap:body> + </input> + <output> + <soap:body use="literal" namespace="http://server.dllearner.org/"></soap:body> + </output> + <fault name="ClientNotKnownException"> + <soap:fault name="ClientNotKnownException" use="literal"></soap:fault> + </fault> + <fault name="UnknownComponentException"> + <soap:fault name="UnknownComponentException" use="literal"></soap:fault> + </fault> + <fault name="ConfigOptionTypeException"> + <soap:fault name="ConfigOptionTypeException" use="literal"></soap:fault> + </fault> + </operation> + <operation name="getAtomicConcepts"> + <soap:operation soapAction=""></soap:operation> + <input> + <soap:body use="literal" namespace="http://server.dllearner.org/"></soap:body> + </input> + <output> + <soap:body use="literal" namespace="http://server.dllearner.org/"></soap:body> + </output> + <fault name="ClientNotKnownException"> + <soap:fault name="ClientNotKnownException" use="literal"></soap:fault> + </fault> + </operation> + <operation name="getSubsumptionHierarchy"> + <soap:operation soapAction=""></soap:operation> + <input> + <soap:body use="literal" namespace="http://server.dllearner.org/"></soap:body> + </input> + <output> + <soap:body use="literal" namespace="http://server.dllearner.org/"></soap:body> + </output> + <fault name="ClientNotKnownException"> + <soap:fault name="ClientNotKnownException" use="literal"></soap:fault> + </fault> + </operation> + <operation name="retrieval"> + <soap:operation soapAction=""></soap:operation> + <input> + <soap:body use="literal" namespace="http://server.dllearner.org/"></soap:body> + </input> + <output> + <soap:body use="literal" namespace="http://server.dllearner.org/"></soap:body> + </output> + <fault name="ClientNotKnownException"> + <soap:fault name="ClientNotKnownException" use="literal"></soap:fault> + </fault> + <fault name="ParseException"> + <soap:fault name="ParseException" use="literal"></soap:fault> + </fault> + </operation> + <operation name="getConceptLength"> + <soap:operation soapAction=""></soap:operation> + <input> + <soap:body use="literal" namespace="http://server.dllearner.org/"></soap:body> + </input> + <output> + <soap:body use="literal" namespace="http://server.dllearner.org/"></soap:body> + </output> + <fault name="ParseException"> + <soap:fault name="ParseException" use="literal"></soap:fault> + </fault> + </operation> + <operation name="getAtomicRoles"> + <soap:operation soapAction=""></soap:operation> + <input> + <soap:body use="literal" namespace="http://server.dllearner.org/"></soap:body> + </input> + <output> + <soap:body use="literal" namespace="http://server.dllearner.org/"></soap:body> + </output> + <fault name="ClientNotKnownException"> + <soap:fault name="ClientNotKnownException" use="literal"></soap:fault> + </fault> + </operation> + <operation name="getInstances"> + <soap:operation soapAction=""></soap:operation> + <input> + <soap:body use="literal" namespace="http://server.dllearner.org/"></soap:body> + </input> + <output> + <soap:body use="literal" namespace="http://server.dllearner.org/"></soap:body> + </output> + <fault name="ClientNotKnownException"> + <soap:fault name="ClientNotKnownException" use="literal"></soap:fault> + </fault> + </operation> + <operation name="getIndividualsForARole"> + <soap:operation soapAction=""></soap:operation> + <input> + <soap:body use="literal" ... [truncated message content] |
From: <jen...@us...> - 2008-06-04 07:16:43
|
Revision: 936 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=936&view=rev Author: jenslehmann Date: 2008-06-04 00:16:37 -0700 (Wed, 04 Jun 2008) Log Message: ----------- - changed log file from the_log.txt to log/log.txt - changed JAMon output from console to an HTML table in log/jamon.html Modified Paths: -------------- trunk/src/dl-learner/org/dllearner/cli/Start.java Modified: trunk/src/dl-learner/org/dllearner/cli/Start.java =================================================================== --- trunk/src/dl-learner/org/dllearner/cli/Start.java 2008-06-04 06:58:00 UTC (rev 935) +++ trunk/src/dl-learner/org/dllearner/cli/Start.java 2008-06-04 07:16:37 UTC (rev 936) @@ -83,6 +83,7 @@ import org.dllearner.reasoning.FastInstanceChecker; import org.dllearner.reasoning.FastRetrievalReasoner; import org.dllearner.reasoning.OWLAPIReasoner; +import org.dllearner.utilities.Files; import org.dllearner.utilities.Helper; import org.dllearner.utilities.JamonMonitorLogger; import org.dllearner.utilities.datastructures.Datastructures; @@ -90,6 +91,8 @@ import org.dllearner.utilities.owl.ConceptComparator; import org.dllearner.utilities.owl.RoleComparator; +import com.jamonapi.MonitorFactory; + /** * Startup file for Command Line Interface. * @@ -117,25 +120,27 @@ inQueryMode = true; // create logger (a simple logger which outputs - // its messages to the console) + // its messages to the console and a log file) SimpleLayout layout = new SimpleLayout(); ConsoleAppender consoleAppender = new ConsoleAppender(layout); - FileAppender fileAppender =null; ; - try{ - fileAppender = new FileAppender(layout,"the_log.txt",false); - }catch (Exception e) {e.printStackTrace();} - logger.removeAllAppenders(); + FileAppender fileAppender = null; + try { + fileAppender = new FileAppender(layout, "log/log.txt", false); + } catch (IOException e) { + e.printStackTrace(); + } + logger.removeAllAppenders(); logger.addAppender(consoleAppender); logger.addAppender(fileAppender); - logger.setLevel(Level.TRACE); - Logger.getLogger(KnowledgeSource.class).setLevel(Level.WARN); - Logger.getLogger(SparqlKnowledgeSource.class).setLevel(Level.WARN); - Logger.getLogger(TypedSparqlQuery.class).setLevel(Level.WARN); + logger.setLevel(Level.DEBUG); +// Logger.getLogger(KnowledgeSource.class).setLevel(Level.WARN); +// Logger.getLogger(SparqlKnowledgeSource.class).setLevel(Level.WARN); +// Logger.getLogger(TypedSparqlQuery.class).setLevel(Level.WARN); - Start start = null; - start = new Start(file); + Start start = new Start(file); start.start(inQueryMode); - JamonMonitorLogger.printAllSortedByLabel(); + // write JaMON report in HTML file + Files.createFile(new File("log/jamon.html"), MonitorFactory.getReport()); } /** @@ -239,22 +244,19 @@ componentPrefixMapping.put(FastInstanceChecker.class, "fastInstanceChecker"); componentPrefixMapping.put(OWLAPIReasoner.class, "owlAPIReasoner"); componentPrefixMapping.put(FastRetrievalReasoner.class, "fastRetrieval"); - - + // learning problems - configured via + and - flags for examples componentPrefixMapping.put(PosNegDefinitionLP.class, "posNegDefinitionLP"); componentPrefixMapping.put(PosNegInclusionLP.class, "posNegInclusionLP"); componentPrefixMapping.put(PosOnlyDefinitionLP.class, "posOnlyDefinitionLP"); - - + // learning algorithms componentPrefixMapping.put(ROLearner.class, "refinement"); componentPrefixMapping.put(ExampleBasedROLComponent.class, "refexamples"); componentPrefixMapping.put(GP.class, "gp"); componentPrefixMapping.put(BruteForceLearner.class, "bruteForce"); componentPrefixMapping.put(RandomGuesser.class, "random"); - - + return componentPrefixMapping; } @@ -656,7 +658,7 @@ e.printStackTrace(); } - if (!(queryStr.equalsIgnoreCase("q") ||queryStr.equalsIgnoreCase("quit"))) { + if (!(queryStr.equalsIgnoreCase("q") || queryStr.equalsIgnoreCase("quit"))) { // parse concept Description concept = null; @@ -701,7 +703,8 @@ boolean nonExistingConstructs = false; if (occurringConcepts.size() != 0 || occurringRoles.size() != 0) { - logger.debug("You used non-existing atomic concepts or roles. Please correct your query."); + logger + .debug("You used non-existing atomic concepts or roles. Please correct your query."); if (occurringConcepts.size() > 0) logger.debug("non-existing concepts: " + occurringConcepts); if (occurringRoles.size() > 0) @@ -722,16 +725,16 @@ Set<Individual> result = null; result = rs.retrieval(concept); - logger.info("retrieval result ("+result.size()+"): " + result); + logger.info("retrieval result (" + result.size() + "): " + result); Score score = lp.computeScore(concept); logger.info(score); } } - }//end if + }// end if - } while (!(queryStr.equalsIgnoreCase("q")||queryStr.equalsIgnoreCase("quit"))); + } while (!(queryStr.equalsIgnoreCase("q") || queryStr.equalsIgnoreCase("quit"))); } @@ -776,7 +779,7 @@ else if (reasonerOption.getStringValue().equals("fastRetrieval")) reasonerClass = FastRetrievalReasoner.class; else if (reasonerOption.getStringValue().equals("fastInstanceChecker")) - reasonerClass = FastInstanceChecker.class; + reasonerClass = FastInstanceChecker.class; else { handleError("Unknown value " + reasonerOption.getStringValue() + " for option \"reasoner\"."); @@ -791,7 +794,8 @@ * from config file * @return lpClass learning problem class */ - public static Class<? extends LearningProblem> getLearningProblemClass(ConfFileOption problemOption) { + public static Class<? extends LearningProblem> getLearningProblemClass( + ConfFileOption problemOption) { Class<? extends LearningProblem> lpClass = null; if (problemOption == null || problemOption.getStringValue().equals("posNegDefinitionLP")) lpClass = PosNegDefinitionLP.class; @@ -812,7 +816,8 @@ * from config file * @return laClass learning algorithm class */ - public static Class<? extends LearningAlgorithm> getLearningAlgorithm(ConfFileOption algorithmOption) { + public static Class<? extends LearningAlgorithm> getLearningAlgorithm( + ConfFileOption algorithmOption) { Class<? extends LearningAlgorithm> laClass = null; if (algorithmOption == null || algorithmOption.getStringValue().equals("refinement")) laClass = ROLearner.class; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jen...@us...> - 2008-06-04 06:58:02
|
Revision: 935 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=935&view=rev Author: jenslehmann Date: 2008-06-03 23:58:00 -0700 (Tue, 03 Jun 2008) Log Message: ----------- removed ToDo-Taglet as it requires tools.jar which apparently is not always included in the Eclipse JRE configuration Removed Paths: ------------- trunk/src/dl-learner/org/dllearner/utilities/ToDoTaglet.java Deleted: trunk/src/dl-learner/org/dllearner/utilities/ToDoTaglet.java =================================================================== --- trunk/src/dl-learner/org/dllearner/utilities/ToDoTaglet.java 2008-06-03 14:29:22 UTC (rev 934) +++ trunk/src/dl-learner/org/dllearner/utilities/ToDoTaglet.java 2008-06-04 06:58:00 UTC (rev 935) @@ -1,155 +0,0 @@ -package org.dllearner.utilities; - -import java.util.Map; - -import com.sun.javadoc.Tag; -import com.sun.tools.doclets.Taglet; - -/** - * Small taglet for showing todo-markers in Javadoc-runs. You can insert - * the following in comments: - * - * @.todo task - * - * (Note the dot, which avoids conflicts with a possible future @todo - * standard tag.) Parts of the code are taken from the JDK Javadoc. - * - * @author Jens Lehmann - * - */ -public class ToDoTaglet implements Taglet { - - private static final String NAME = ".todo"; - private static final String HEADER = "To Do:"; - - /** - * Return the name of this custom tag. - */ - public String getName() { - return NAME; - } - - /** - * Will return true since <code>@.todo</code> - * can be used in field documentation. - * @return true since <code>@.todo</code> - * can be used in field documentation and false - * otherwise. - */ - public boolean inField() { - return true; - } - - /** - * Will return true since <code>@todo</code> - * can be used in constructor documentation. - * @return true since <code>@todo</code> - * can be used in constructor documentation and false - * otherwise. - */ - public boolean inConstructor() { - return true; - } - - /** - * Will return true since <code>@todo</code> - * can be used in method documentation. - * @return true since <code>@todo</code> - * can be used in method documentation and false - * otherwise. - */ - public boolean inMethod() { - return true; - } - - /** - * Will return true since <code>@todo</code> - * can be used in method documentation. - * @return true since <code>@todo</code> - * can be used in overview documentation and false - * otherwise. - */ - public boolean inOverview() { - return true; - } - - /** - * Will return true since <code>@todo</code> - * can be used in package documentation. - * @return true since <code>@todo</code> - * can be used in package documentation and false - * otherwise. - */ - public boolean inPackage() { - return true; - } - - /** - * Will return true since <code>@todo</code> - * can be used in type documentation (classes or interfaces). - * @return true since <code>@todo</code> - * can be used in type documentation and false - * otherwise. - */ - public boolean inType() { - return true; - } - - /** - * Will return false since <code>@todo</code> - * is not an inline tag. - * @return false since <code>@todo</code> - * is not an inline tag. - */ - - public boolean isInlineTag() { - return false; - } - - /** - * Register this Taglet. - * @param tagletMap the map to register this tag to. - */ - @SuppressWarnings({"unchecked"}) - public static void register(Map tagletMap) { - ToDoTaglet tag = new ToDoTaglet(); - Taglet t = (Taglet) tagletMap.get(tag.getName()); - if (t != null) { - tagletMap.remove(tag.getName()); - } - tagletMap.put(tag.getName(), tag); - } - - /** - * Given the <code>Tag</code> representation of this custom - * tag, return its string representation. - * @param tag the <code>Tag</code> representation of this custom tag. - */ - public String toString(Tag tag) { - return "<DT><B>" + HEADER + "</B><DD>" - + "<table cellpadding=2 cellspacing=0><tr><td bgcolor=\"#DC8080\">" - + tag.text() - + "</td></tr></table></DD>\n"; - } - - /** - * Given an array of <code>Tag</code>s representing this custom - * tag, return its string representation. - * @param tags the array of <code>Tag</code>s representing of this custom tag. - */ - public String toString(Tag[] tags) { - if (tags.length == 0) { - return null; - } - String result = "\n<DT><B>" + HEADER + "</B><DD>"; - result += "<table cellpadding=2 cellspacing=0><tr><td bgcolor=\"#DC8080\">"; - for (int i = 0; i < tags.length; i++) { - if (i > 0) { - result += ", "; - } - result += tags[i].text(); - } - return result + "</td></tr></table></DD>\n"; - } - -} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Jen...@us...> - 2008-06-03 14:29:32
|
Revision: 934 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=934&view=rev Author: JensLehmann Date: 2008-06-03 07:29:22 -0700 (Tue, 03 Jun 2008) Log Message: ----------- intermediate commit (evaluation script) Modified Paths: -------------- trunk/src/dl-learner/org/dllearner/algorithms/refexamples/ExampleBasedROLComponent.java trunk/src/dl-learner/org/dllearner/core/ReasonerComponent.java trunk/src/dl-learner/org/dllearner/core/ReasoningService.java trunk/src/dl-learner/org/dllearner/core/config/CommonConfigOptions.java trunk/src/dl-learner/org/dllearner/reasoning/DIGReasoner.java trunk/src/dl-learner/org/dllearner/reasoning/FastInstanceChecker.java trunk/src/dl-learner/org/dllearner/reasoning/FastRetrievalReasoner.java trunk/src/dl-learner/org/dllearner/reasoning/OWLAPIReasoner.java trunk/src/dl-learner/org/dllearner/refinementoperators/RhoDRDown.java trunk/src/dl-learner/org/dllearner/scripts/CrossValidation.java trunk/src/dl-learner/org/dllearner/scripts/PaperStatistics.java trunk/src/php-examples/LearningSimple.php Modified: trunk/src/dl-learner/org/dllearner/algorithms/refexamples/ExampleBasedROLComponent.java =================================================================== --- trunk/src/dl-learner/org/dllearner/algorithms/refexamples/ExampleBasedROLComponent.java 2008-06-02 12:36:06 UTC (rev 933) +++ trunk/src/dl-learner/org/dllearner/algorithms/refexamples/ExampleBasedROLComponent.java 2008-06-03 14:29:22 UTC (rev 934) @@ -30,6 +30,7 @@ import org.apache.log4j.Logger; import org.dllearner.core.LearningAlgorithm; import org.dllearner.core.LearningProblem; +import org.dllearner.core.ReasoningMethodUnsupportedException; import org.dllearner.core.ReasoningService; import org.dllearner.core.Score; import org.dllearner.core.config.BooleanConfigOption; @@ -111,6 +112,7 @@ private boolean useCardinalityRestrictions = CommonConfigOptions.useCardinalityRestrictionsDefault; private boolean useNegation = CommonConfigOptions.useNegationDefault; private boolean useBooleanDatatypes = CommonConfigOptions.useBooleanDatatypesDefault; + private boolean useDoubleDatatypes = CommonConfigOptions.useDoubleDatatypesDefault; private double noisePercentage = 0.0; private NamedClass startClass = null; private boolean usePropernessChecks = false; @@ -178,6 +180,7 @@ options.add(CommonConfigOptions.useCardinalityRestrictions()); options.add(CommonConfigOptions.useNegation()); options.add(CommonConfigOptions.useBooleanDatatypes()); + options.add(CommonConfigOptions.useDoubleDatatypes()); options.add(CommonConfigOptions.maxExecutionTimeInSeconds()); options.add(CommonConfigOptions.minExecutionTimeInSeconds()); options.add(CommonConfigOptions.guaranteeXgoodDescriptions()); @@ -244,6 +247,8 @@ noisePercentage = (Double) entry.getValue(); } else if(name.equals("useBooleanDatatypes")) { useBooleanDatatypes = (Boolean) entry.getValue(); + } else if(name.equals("useDoubleDatatypes")) { + useDoubleDatatypes = (Boolean) entry.getValue(); } else if(name.equals("usePropernessChecks")) { usePropernessChecks = (Boolean) entry.getValue(); } else if(name.equals("maxPosOnlyExpansion")) { @@ -321,7 +326,9 @@ if(improveSubsumptionHierarchy) rs.getSubsumptionHierarchy().improveSubsumptionHierarchy(); rs.prepareRoleHierarchy(usedRoles); - rs.prepareDatatypePropertyHierarchy(); + // prepare datatype hierarchy only if necessary + if(rs.hasDatatypeSupport()) + rs.prepareDatatypePropertyHierarchy(); // create a refinement operator and pass all configuration // variables to it @@ -334,6 +341,7 @@ useCardinalityRestrictions, useNegation, useBooleanDatatypes, + useDoubleDatatypes, startClass ); Modified: trunk/src/dl-learner/org/dllearner/core/ReasonerComponent.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/ReasonerComponent.java 2008-06-02 12:36:06 UTC (rev 933) +++ trunk/src/dl-learner/org/dllearner/core/ReasonerComponent.java 2008-06-03 14:29:22 UTC (rev 934) @@ -45,6 +45,8 @@ */ public abstract class ReasonerComponent extends Component implements Reasoner { + public abstract boolean hasDatatypeSupport(); + public boolean subsumes(Description superConcept, Description subConcept) throws ReasoningMethodUnsupportedException { throw new ReasoningMethodUnsupportedException(); Modified: trunk/src/dl-learner/org/dllearner/core/ReasoningService.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/ReasoningService.java 2008-06-02 12:36:06 UTC (rev 933) +++ trunk/src/dl-learner/org/dllearner/core/ReasoningService.java 2008-06-03 14:29:22 UTC (rev 934) @@ -80,7 +80,7 @@ // private SortedSet<Concept> retrievalsSet = new TreeSet<Concept>(new ConceptComparator()); - private Reasoner reasoner; + private ReasonerComponent reasoner; /** * Constructs a reasoning service object. Note that you must not @@ -459,6 +459,10 @@ return result; } + public boolean hasDatatypeSupport() { + return reasoner.hasDatatypeSupport(); + } + public Map<Individual, SortedSet<Double>> getDoubleDatatypeMembers(DatatypeProperty datatypeProperty) { try { return reasoner.getDoubleDatatypeMembers(datatypeProperty); Modified: trunk/src/dl-learner/org/dllearner/core/config/CommonConfigOptions.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/config/CommonConfigOptions.java 2008-06-02 12:36:06 UTC (rev 933) +++ trunk/src/dl-learner/org/dllearner/core/config/CommonConfigOptions.java 2008-06-03 14:29:22 UTC (rev 934) @@ -29,6 +29,8 @@ */ public final class CommonConfigOptions { + // some default values + //public static boolean applyAllFilterDefault = true; //public static boolean applyExistsFilterDefault = true; //public static boolean useTooWeakListDefault = true; @@ -40,14 +42,13 @@ public static boolean useCardinalityRestrictionsDefault = true; public static boolean useNegationDefault = true; public static boolean useBooleanDatatypesDefault = true; + public static boolean useDoubleDatatypesDefault = true; public static int maxExecutionTimeInSecondsDefault = 0; public static int minExecutionTimeInSecondsDefault = 0; public static int guaranteeXgoodDescriptionsDefault = 1; public static String logLevelDefault = "DEBUG"; //public static double noisePercentageDefault = 0.0; - - public static StringConfigOption getVerbosityOption() { StringConfigOption verbosityOption = new StringConfigOption("verbosity", "control verbosity of output for this component", "warning"); String[] allowedValues = new String[] {"quiet", "error", "warning", "notice", "info", "debug"}; @@ -110,6 +111,10 @@ return new BooleanConfigOption("useBooleanDatatypes", "specifies whether boolean datatypes are used in the learning algorothm",useBooleanDatatypesDefault); } + public static BooleanConfigOption useDoubleDatatypes() { + return new BooleanConfigOption("useBooleanDatatypes", "specifies whether boolean datatypes are used in the learning algorothm",useDoubleDatatypesDefault); + } + public static IntegerConfigOption maxExecutionTimeInSeconds() { return new IntegerConfigOption("maxExecutionTimeInSeconds", "algorithm will stop after specified seconds",maxExecutionTimeInSecondsDefault); } Modified: trunk/src/dl-learner/org/dllearner/reasoning/DIGReasoner.java =================================================================== --- trunk/src/dl-learner/org/dllearner/reasoning/DIGReasoner.java 2008-06-02 12:36:06 UTC (rev 933) +++ trunk/src/dl-learner/org/dllearner/reasoning/DIGReasoner.java 2008-06-03 14:29:22 UTC (rev 934) @@ -795,4 +795,9 @@ return null; } + @Override + public boolean hasDatatypeSupport() { + return false; + } + } Modified: trunk/src/dl-learner/org/dllearner/reasoning/FastInstanceChecker.java =================================================================== --- trunk/src/dl-learner/org/dllearner/reasoning/FastInstanceChecker.java 2008-06-02 12:36:06 UTC (rev 933) +++ trunk/src/dl-learner/org/dllearner/reasoning/FastInstanceChecker.java 2008-06-03 14:29:22 UTC (rev 934) @@ -630,5 +630,11 @@ public void setReasonerType(String type){ reasonerType=type; } + + + @Override + public boolean hasDatatypeSupport() { + return true; + } } Modified: trunk/src/dl-learner/org/dllearner/reasoning/FastRetrievalReasoner.java =================================================================== --- trunk/src/dl-learner/org/dllearner/reasoning/FastRetrievalReasoner.java 2008-06-02 12:36:06 UTC (rev 933) +++ trunk/src/dl-learner/org/dllearner/reasoning/FastRetrievalReasoner.java 2008-06-03 14:29:22 UTC (rev 934) @@ -193,4 +193,9 @@ public void releaseKB() { rc.releaseKB(); } + + @Override + public boolean hasDatatypeSupport() { + return true; + } } Modified: trunk/src/dl-learner/org/dllearner/reasoning/OWLAPIReasoner.java =================================================================== --- trunk/src/dl-learner/org/dllearner/reasoning/OWLAPIReasoner.java 2008-06-02 12:36:06 UTC (rev 933) +++ trunk/src/dl-learner/org/dllearner/reasoning/OWLAPIReasoner.java 2008-06-03 14:29:22 UTC (rev 934) @@ -904,4 +904,9 @@ reasonerType=type; } + @Override + public boolean hasDatatypeSupport() { + return true; + } + } Modified: trunk/src/dl-learner/org/dllearner/refinementoperators/RhoDRDown.java =================================================================== --- trunk/src/dl-learner/org/dllearner/refinementoperators/RhoDRDown.java 2008-06-02 12:36:06 UTC (rev 933) +++ trunk/src/dl-learner/org/dllearner/refinementoperators/RhoDRDown.java 2008-06-03 14:29:22 UTC (rev 934) @@ -167,11 +167,11 @@ // private Map<NamedClass,Map<NamedClass,Boolean>> notABMeaningful = new TreeMap<NamedClass,Map<NamedClass,Boolean>>(); public RhoDRDown(ReasoningService reasoningService) { - this(reasoningService, true, true, true, true, true, true, true, null); + this(reasoningService, true, true, true, true, true, true, true, true, null); } public RhoDRDown(ReasoningService reasoningService, boolean applyAllFilter, boolean applyExistsFilter, boolean useAllConstructor, - boolean useExistsConstructor,boolean useCardinalityRestrictions,boolean useNegation, boolean useBooleanDatatypes, NamedClass startClass) { + boolean useExistsConstructor,boolean useCardinalityRestrictions,boolean useNegation, boolean useBooleanDatatypes, boolean useDoubleDatatypes, NamedClass startClass) { this.rs = reasoningService; this.applyAllFilter = applyAllFilter; this.applyExistsFilter = applyExistsFilter; @@ -180,6 +180,7 @@ this.useCardinalityRestrictions = useCardinalityRestrictions; this.useNegation = useNegation; this.useBooleanDatatypes = useBooleanDatatypes; + this.useDoubleDatatypes = useDoubleDatatypes; subHierarchy = rs.getSubsumptionHierarchy(); Modified: trunk/src/dl-learner/org/dllearner/scripts/CrossValidation.java =================================================================== --- trunk/src/dl-learner/org/dllearner/scripts/CrossValidation.java 2008-06-02 12:36:06 UTC (rev 933) +++ trunk/src/dl-learner/org/dllearner/scripts/CrossValidation.java 2008-06-03 14:29:22 UTC (rev 934) @@ -57,6 +57,11 @@ private static Logger logger = Logger.getRootLogger(); + // statistical values + private Stat runtime = new Stat(); + private Stat accuracy = new Stat(); + private Stat length = new Stat(); + public static void main(String[] args) { File file = new File(args[0]); @@ -90,7 +95,11 @@ } public CrossValidation(File file, int folds, boolean leaveOneOut) { + this(file, folds, leaveOneOut, null); + } + public CrossValidation(File file, int folds, boolean leaveOneOut, LearningAlgorithm la) { + DecimalFormat df = new DecimalFormat(); ComponentManager cm = ComponentManager.getInstance(); @@ -178,11 +187,6 @@ System.exit(0); } - // statistical values - Stat runtime = new Stat(); - Stat accuracy = new Stat(); - Stat length = new Stat(); - // run the algorithm for(int currFold=0; currFold<folds; currFold++) { // we always perform a full initialisation to make sure that @@ -204,7 +208,8 @@ // es fehlt init zwischendurch - LearningAlgorithm la = start.getLearningAlgorithm(); + if(la == null) + la = start.getLearningAlgorithm(); // init again, because examples have changed try { la.init(); @@ -315,4 +320,16 @@ return str; } + public Stat getAccuracy() { + return accuracy; + } + + public Stat getLength() { + return length; + } + + public Stat getRuntime() { + return runtime; + } + } Modified: trunk/src/dl-learner/org/dllearner/scripts/PaperStatistics.java =================================================================== --- trunk/src/dl-learner/org/dllearner/scripts/PaperStatistics.java 2008-06-02 12:36:06 UTC (rev 933) +++ trunk/src/dl-learner/org/dllearner/scripts/PaperStatistics.java 2008-06-03 14:29:22 UTC (rev 934) @@ -25,21 +25,16 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import java.util.SortedSet; import org.dllearner.algorithms.gp.GP; import org.dllearner.core.ComponentManager; import org.dllearner.core.KnowledgeSource; import org.dllearner.core.LearningAlgorithm; -import org.dllearner.core.LearningProblem; -import org.dllearner.core.LearningProblemUnsupportedException; import org.dllearner.core.OntologyFormat; import org.dllearner.core.ReasonerComponent; import org.dllearner.core.ReasoningService; -import org.dllearner.core.Score; import org.dllearner.kb.OWLFile; import org.dllearner.learningproblems.PosNegDefinitionLP; -import org.dllearner.parser.ConfParser; import org.dllearner.reasoning.DIGReasoner; import org.dllearner.utilities.Files; import org.dllearner.utilities.Helper; @@ -69,6 +64,7 @@ // experimental setup: + // 5 fold cross validation // algorithms: refinement, GP, hybrid GP (YinYang) // settings GP: // - average over 10 runs @@ -95,18 +91,18 @@ // - uncle (FORTE) // - more? - String exampleBaseDir = "examples/"; + String exampleBaseDir = "examples/cross-benchmark/"; String gnuplotBaseDir = "log/gnuplot/"; String statBaseDir = "log/stat/"; - File[] confFiles = new File[7]; - confFiles[0] = new File(exampleBaseDir + "trains", "trains_owl.conf"); - confFiles[1] = new File(exampleBaseDir + "arch", "arch_owl.conf"); - confFiles[2] = new File(exampleBaseDir + "moral_reasoner", "moral_43examples_owl.conf"); - confFiles[3] = new File(exampleBaseDir + "moral_reasoner", "moral_43examples_complex_owl.conf"); - confFiles[4] = new File(exampleBaseDir + "poker", "pair_owl.conf"); - confFiles[5] = new File(exampleBaseDir + "poker", "straight_owl.conf"); - confFiles[6] = new File(exampleBaseDir + "forte", "forte_uncle_owl.conf"); + File[] confFiles = new File[1]; +// confFiles[0] = new File(exampleBaseDir + "trains", "trains_owl"); + confFiles[0] = new File(exampleBaseDir + "arch", "arch"); +// confFiles[2] = new File(exampleBaseDir + "moral_reasoner", "moral_43examples_owl"); +// confFiles[3] = new File(exampleBaseDir + "moral_reasoner", "moral_43examples_complex_owl"); +// confFiles[4] = new File(exampleBaseDir + "poker", "pair_owl"); +// confFiles[5] = new File(exampleBaseDir + "poker", "straight_owl"); +// confFiles[6] = new File(exampleBaseDir + "forte", "forte_uncle_owl"); String[] examples = new String[7]; examples[0] = "trains"; @@ -118,192 +114,31 @@ examples[6] = "uncle (FORTE data set)"; int startExampleNr = 0; - String[] algorithms = new String[3]; - algorithms[0] = "refinement"; - algorithms[1] = "gp"; - algorithms[2] = "hybrid"; - - int[] algorithmRuns = {1,10,10}; + // for any example, we create conf files for each configuration to be tested + String[] algorithmPostfix = new String[4]; + algorithmPostfix[0] = "_refexamples"; + algorithmPostfix[1] = "_refexamples_fast"; + algorithmPostfix[2] = "_gp"; + algorithmPostfix[3] = "_hybrid"; int startAlgorithmNr = 0; - // Config.GP.maxConceptLength = 30; - // Config.writeDIGProtocol = true; - // Config.digProtocolFile = new File(statBaseDir, "dig.log"); - - // do not plot anything - // File[][][] gnuplotFiles = new File[examples.length][algorithms.length][3]; - // for(int i=0; i<examples.length; i++) { - // for(int j=0; j<algorithms.length; j++) { - // gnuplotFiles[i][j][0] = new File(gnuplotBaseDir, examples[i] + "_classification_" + algorithms[j] + ".data"); - // gnuplotFiles[i][j][1] = new File(gnuplotBaseDir, examples[i] + "_length_" + algorithms[j] + ".data"); - // gnuplotFiles[i][j][2] = new File(gnuplotBaseDir, examples[i] + "_runtime_" + algorithms[j] + ".data"); - // } - //} - File statFile = new File(statBaseDir, "statistics.txt"); - File statDetailsFile = new File(statBaseDir, "statistics_details.txt"); String statString = "**automatically generated statistics**\n\n"; - String statDetailsString = statString; - ComponentManager cm = ComponentManager.getInstance(); - - // just set default options -// ConfigurationManager confMgr = new ConfigurationManager(); -// confMgr.applyOptions(); - for(int exampleNr=startExampleNr; exampleNr < examples.length; exampleNr++) { - // parse current conf file - ConfParser learner = ConfParser.parseFile(confFiles[exampleNr]); - - String baseDir = confFiles[exampleNr].getParent(); - - // read which files were imported (internal KB is ignored) and initialise reasoner - Map<URL, OntologyFormat> imports = getImports(learner.getFunctionCalls(), confFiles[exampleNr]); - //Map<URL, Class<? extends KnowledgeSource>> imports = Start.getImportedFiles(learner, baseDir); - - // detect specified positive and negative examples - SortedSet<String> positiveExamples = learner.getPositiveExamples(); - SortedSet<String> negativeExamples = learner.getNegativeExamples(); - int nrOfExamples = positiveExamples.size() + negativeExamples.size(); - - statString += "example: " + examples[exampleNr] + "\n\n"; - - for(int algorithmNr=startAlgorithmNr; algorithmNr < algorithms.length; algorithmNr++) { + for(int algorithmNr=startAlgorithmNr; algorithmNr < algorithmPostfix.length; algorithmNr++) { // reset algorithm number (next example starts with first algorithm) startAlgorithmNr = 0; + File confFile = new File(confFiles[exampleNr] + algorithmPostfix[algorithmNr] + ".conf"); + + CrossValidation cv = new CrossValidation(confFile, 5, false); Stat classification = new Stat(); Stat length = new Stat(); Stat runtime = new Stat(); - for(int runNr=0; runNr < algorithmRuns[algorithmNr]; runNr++) { - - // create reasoner (this has to be done in this inner loop to - // ensure that none of the algorithm benefits from e.g. caching - // of previous reasoning requests - // Reasoner reasoner = Main.createReasoner(new KB(), imports); - // TODO: needs fixing - KnowledgeSource ks = cm.knowledgeSource(OWLFile.class); - ReasonerComponent reasoner = cm.reasoner(DIGReasoner.class, ks); - ReasoningService rs = new ReasoningService(reasoner); - - // System.out.println(positiveExamples); - // System.out.println(negativeExamples); - // System.exit(0); - - // create learning problem - // LearningProblem learningProblem = new LearningProblem(rs, positiveExamples, negativeExamples); - LearningProblem learningProblem = cm.learningProblem(PosNegDefinitionLP.class, rs); - - // prepare reasoner for using subsumption and role hierarchy - // TODO: currently, it is a small unfairness that each algorithm - // uses the same reasoning object (e.g. the second algorithm may - // have a small advantage if the reasoner cached reasoning requests - // of the first algorithm) -// Helper.autoDetectConceptsAndRoles(rs); -// try { -// reasoner.prepareSubsumptionHierarchy(); -// reasoner.prepareRoleHierarchy(); -// // improving the subsumption hierarchy makes only sense -// // for the refinement based algorithm -// if(algorithmNr==0) -// reasoner.getSubsumptionHierarchy().improveSubsumptionHierarchy(); -// } catch (ReasoningMethodUnsupportedException e) { -// e.printStackTrace(); -// } - - LearningAlgorithm learningAlgorithm = null; - if(algorithmNr==0) { - // Config.algorithm = Algorithm.REFINEMENT; - // Config.Refinement.heuristic = Config.Refinement.Heuristic.FLEXIBLE; -// Config.Refinement.horizontalExpansionFactor = 0.6; -// Config.Refinement.quiet = true; - // Config.percentPerLengthUnit = 0.05; - // learningAlgorithm = new ROLearner(learningProblem); - // learningAlgorithm = cm.learningAlgorithm(ROLearner.class, learningProblem); - } else if(algorithmNr==1) { - // Config.algorithm = Algorithm.GP; -// Config.GP.algorithmType = GP.AlgorithmType.GENERATIONAL; -//// Config.GP.selectionType = GP.SelectionType.RANK_SELECTION; -// Config.GP.generations = 50; -// Config.GP.useFixedNumberOfGenerations = true; -// Config.GP.numberOfIndividuals = 201; - // if(exampleNr == 3 || exampleNr == 4) - // Config.GP.numberOfIndividuals = 51; -// Config.GP.refinementProbability = 0; -// Config.GP.mutationProbability = 0.02; -// Config.GP.crossoverProbability = 0.8; -// Config.GP.hillClimbingProbability = 0; - // Config.percentPerLengthUnit = 0.005; - // give GP a chance to find the long solution of the - // uncle problem - // if(exampleNr==3 || exampleNr==5 || exampleNr == 6) - // Config.percentPerLengthUnit = 0.002; - // learningAlgorithm = new GP(learningProblem); - try { - learningAlgorithm = cm.learningAlgorithm(GP.class, learningProblem, rs); - } catch (LearningProblemUnsupportedException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } else if(algorithmNr==2) { - // Config.algorithm = Algorithm.HYBRID_GP; -// Config.GP.algorithmType = GP.AlgorithmType.GENERATIONAL; -// Config.GP.selectionType = GP.SelectionType.RANK_SELECTION; -// Config.GP.generations = 50; -// Config.GP.useFixedNumberOfGenerations = true; -// Config.GP.numberOfIndividuals = 201; - //if(exampleNr == 3 || exampleNr == 4) - // Config.GP.numberOfIndividuals = 51; -// Config.GP.refinementProbability = 0.65; -// Config.GP.mutationProbability = 0.02; -// Config.GP.crossoverProbability = 0.2; -// Config.GP.hillClimbingProbability = 0; - // Config.percentPerLengthUnit = 0.005; - // if(exampleNr == 3 || exampleNr==5 || exampleNr==6) -// Config.percentPerLengthUnit = 0.002; - // learningAlgorithm = new GP(learningProblem); - try { - learningAlgorithm = cm.learningAlgorithm(GP.class, learningProblem, rs); - } catch (LearningProblemUnsupportedException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - - // rs.resetStatistics(); - - long algorithmStartTime = System.nanoTime(); - learningAlgorithm.start(); - long algorithmTime = System.nanoTime() - algorithmStartTime; - // long algorithmTimeSeconds = algorithmTime / 1000000000; - - int conceptLength = learningAlgorithm.getBestSolution().getLength(); - Score bestScore = learningAlgorithm.getSolutionScore(); - int misClassifications = bestScore.getCoveredNegatives().size() - + bestScore.getNotCoveredPositives().size(); - double classificationRatePercent = 100 * ((nrOfExamples - misClassifications) / (double) nrOfExamples); - - classification.addNumber(classificationRatePercent); - length.addNumber(conceptLength); - runtime.addNumber(algorithmTime); - - // free knowledge base to avoid memory leaks - ((DIGReasoner) reasoner).releaseKB(); - - statDetailsString += "example: " + examples[exampleNr] + "\n"; - statDetailsString += "algorithm: " + algorithms[algorithmNr] + "\n"; - statDetailsString += "learned concept: " + learningAlgorithm.getBestSolution() + "\n"; - statDetailsString += "classification: " + classificationRatePercent + "%\n"; - statDetailsString += "concept length: " + conceptLength + "\n"; - statDetailsString += "runtime: " + Helper.prettyPrintNanoSeconds(algorithmTime) + "\n\n"; - - Files.createFile(statDetailsFile, statDetailsString); - - } // end run loop - - statString += "algorithm: " + algorithms[algorithmNr] + " (runs: " + algorithmRuns[algorithmNr] + ")\n"; + statString += "conf file: " + confFile + "\n"; statString += "classification: " + classification.getMean() + "% (standard deviation: " + classification.getStandardDeviation() + "%)\n"; statString += "concept length: " + length.getMean() + " (standard deviation: " + length.getStandardDeviation() + ")\n"; statString += "runtime: " + Helper.prettyPrintNanoSeconds(Math.round(runtime.getMean())) + " (standard deviation: " + Helper.prettyPrintNanoSeconds(Math.round(runtime.getStandardDeviation())) + ")\n\n"; @@ -316,6 +151,7 @@ } + @SuppressWarnings({"unused"}) private static Map<URL, OntologyFormat> getImports(Map<String,List<List<String>>> functionCalls, File confFile) { Map<URL, OntologyFormat> importedFiles = new HashMap<URL, OntologyFormat>(); @@ -358,9 +194,6 @@ return importedFiles; } - // erzeugt Statistiken für MLDM-Paper zur Verarbeitung mit GnuPlot - // Vorsicht: Laufzeit von mehreren Stunden - /** * Has been used to create the statistics for the MLDM 2007 paper. * Warning: this method runs for several hours Modified: trunk/src/php-examples/LearningSimple.php =================================================================== --- trunk/src/php-examples/LearningSimple.php 2008-06-02 12:36:06 UTC (rev 933) +++ trunk/src/php-examples/LearningSimple.php 2008-06-03 14:29:22 UTC (rev 934) @@ -30,7 +30,7 @@ // load WSDL files (has to be done due to a Java web service bug) ini_set("soap.wsdl_cache_enabled","0"); $wsdluri="http://localhost:8181/services?wsdl"; -// Utilities::loadWSDLfiles($wsdluri); +Utilities::loadWSDLfiles($wsdluri); // specifiy ontology $ontology = 'file:'.realpath("../../examples/family/father.owl"); @@ -42,7 +42,7 @@ // load owl file in DIG reasoner (you need a running DIG reasoner) $id = $client->generateID(); $ksID = $client->addKnowledgeSource($id, "owlfile", $ontology); -$rID = $client->setReasoner($id, "dig"); +$rID = $client->setReasoner($id, "owlapi"); // create a learning problem $posExamples = array('http://example.com/father#stefan', This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <min...@us...> - 2008-06-02 12:36:10
|
Revision: 933 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=933&view=rev Author: minime219 Date: 2008-06-02 05:36:06 -0700 (Mon, 02 Jun 2008) Log Message: ----------- added possibility to return Manchester syntax string Modified Paths: -------------- trunk/src/dl-learner/org/dllearner/server/DLLearnerWS.java Modified: trunk/src/dl-learner/org/dllearner/server/DLLearnerWS.java =================================================================== --- trunk/src/dl-learner/org/dllearner/server/DLLearnerWS.java 2008-05-29 10:27:04 UTC (rev 932) +++ trunk/src/dl-learner/org/dllearner/server/DLLearnerWS.java 2008-06-02 12:36:06 UTC (rev 933) @@ -20,6 +20,7 @@ package org.dllearner.server; import java.util.Arrays; +import java.util.HashMap; import java.util.Iterator; import java.util.LinkedList; import java.util.List; @@ -315,9 +316,11 @@ public String learn(int id, String format) throws ClientNotKnownException { ClientState state = getState(id); state.getLearningAlgorithm().start(); + // ResultSet resultSet=SparqlQuery.JSONtoResultSet(state.getQuery(id).getResult()); Description solution = state.getLearningAlgorithm().getBestSolution(); if(format == "manchester") - return solution.toManchesterSyntaxString(null, null); + return solution.toManchesterSyntaxString(state.getReasoningService().getBaseURI(), new HashMap<String,String>()). + replace("\"", ""); else if(format == "kb") return solution.toKBSyntaxString(); else This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: Ibrahim O. <uni...@go...> - 2008-05-29 13:48:00
|
From: <Jen...@us...> - 2008-05-29 10:27:09
|
Revision: 932 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=932&view=rev Author: JensLehmann Date: 2008-05-29 03:27:04 -0700 (Thu, 29 May 2008) Log Message: ----------- added possibility to return Manchester syntax string Modified Paths: -------------- trunk/src/dl-learner/org/dllearner/server/DLLearnerWS.java Modified: trunk/src/dl-learner/org/dllearner/server/DLLearnerWS.java =================================================================== --- trunk/src/dl-learner/org/dllearner/server/DLLearnerWS.java 2008-05-28 08:38:15 UTC (rev 931) +++ trunk/src/dl-learner/org/dllearner/server/DLLearnerWS.java 2008-05-29 10:27:04 UTC (rev 932) @@ -311,6 +311,19 @@ return state.getLearningAlgorithm().getBestSolution().toString(); } + @WebMethod + public String learn(int id, String format) throws ClientNotKnownException { + ClientState state = getState(id); + state.getLearningAlgorithm().start(); + Description solution = state.getLearningAlgorithm().getBestSolution(); + if(format == "manchester") + return solution.toManchesterSyntaxString(null, null); + else if(format == "kb") + return solution.toKBSyntaxString(); + else + return solution.toString(); + } + /** * Starts the learning algorithm and returns immediately. The learning * algorithm is executed in its own thread and can be queried and This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jen...@us...> - 2008-05-28 08:38:31
|
Revision: 931 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=931&view=rev Author: jenslehmann Date: 2008-05-28 01:38:15 -0700 (Wed, 28 May 2008) Log Message: ----------- - set DBpedia Navigator learning algorithm to DBpediaNavigationSuggestor and reasoner to fast instance checker - fixed Lorenz' @Override errors Modified Paths: -------------- trunk/lib/components.ini trunk/src/dbpedia-navigator/DLLearnerConnection.php trunk/src/dl-learner/org/dllearner/server/DLLearnerWS.java trunk/src/dl-learner/org/dllearner/tools/ore/RepairPanelDescriptor.java Modified: trunk/lib/components.ini =================================================================== --- trunk/lib/components.ini 2008-05-26 17:00:14 UTC (rev 930) +++ trunk/lib/components.ini 2008-05-28 08:38:15 UTC (rev 931) @@ -18,4 +18,5 @@ org.dllearner.algorithms.BruteForceLearner org.dllearner.algorithms.refinement.ROLearner org.dllearner.algorithms.refexamples.ExampleBasedROLComponent -org.dllearner.algorithms.gp.GP \ No newline at end of file +org.dllearner.algorithms.gp.GP +org.dllearner.algorithms.DBpediaNavigationSuggestor \ No newline at end of file Modified: trunk/src/dbpedia-navigator/DLLearnerConnection.php =================================================================== --- trunk/src/dbpedia-navigator/DLLearnerConnection.php 2008-05-26 17:00:14 UTC (rev 930) +++ trunk/src/dbpedia-navigator/DLLearnerConnection.php 2008-05-28 08:38:15 UTC (rev 931) @@ -47,7 +47,7 @@ $this->client->applyConfigEntryString($this->id, $this->ksID, "predefinedFilter", "YAGO"); $this->client->applyConfigEntryString($this->id, $this->ksID, "predefinedEndpoint", "DBPEDIA"); - $this->client->setReasoner($this->id, "dig"); + $this->client->setReasoner($this->id, "fastInstanceChecker"); if(empty($negExamples)) $this->client->setLearningProblem($this->id, "posOnlyDefinition"); else @@ -55,7 +55,7 @@ $this->client->setPositiveExamples($this->id, $posExamples); if(!empty($negExamples)) $this->client->setNegativeExamples($this->id, $negExamples); - $this->client->setLearningAlgorithm($this->id, "refinement"); + $this->client->setLearningAlgorithm($this->id, "dbpediaNavigationSuggestor"); $start = microtime(true); Modified: trunk/src/dl-learner/org/dllearner/server/DLLearnerWS.java =================================================================== --- trunk/src/dl-learner/org/dllearner/server/DLLearnerWS.java 2008-05-26 17:00:14 UTC (rev 930) +++ trunk/src/dl-learner/org/dllearner/server/DLLearnerWS.java 2008-05-28 08:38:15 UTC (rev 931) @@ -66,6 +66,7 @@ import org.dllearner.parser.KBParser; import org.dllearner.parser.ParseException; import org.dllearner.reasoning.DIGReasoner; +import org.dllearner.reasoning.FastInstanceChecker; import org.dllearner.reasoning.OWLAPIReasoner; import org.dllearner.utilities.Helper; import org.dllearner.utilities.datastructures.Datastructures; @@ -98,6 +99,7 @@ knowledgeSourceMapping.put("sparql", SparqlKnowledgeSource.class); reasonerMapping.put("dig", DIGReasoner.class); reasonerMapping.put("owlapi", OWLAPIReasoner.class); + reasonerMapping.put("fastInstanceChecker", FastInstanceChecker.class); learningProblemMapping.put("posNegDefinition", PosNegDefinitionLP.class); learningProblemMapping.put("posNegInclusion", PosNegInclusionLP.class); learningProblemMapping.put("posOnlyDefinition", PosOnlyDefinitionLP.class); Modified: trunk/src/dl-learner/org/dllearner/tools/ore/RepairPanelDescriptor.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/ore/RepairPanelDescriptor.java 2008-05-26 17:00:14 UTC (rev 930) +++ trunk/src/dl-learner/org/dllearner/tools/ore/RepairPanelDescriptor.java 2008-05-28 08:38:15 UTC (rev 931) @@ -64,7 +64,6 @@ } - @Override public void mouseClicked(MouseEvent e) { if(e.getClickCount() == 2 && e.getSource() == panel4.getNegFailureList() ){ @@ -73,25 +72,21 @@ } - @Override public void mouseEntered(MouseEvent e) { // TODO Auto-generated method stub } - @Override public void mouseExited(MouseEvent e) { // TODO Auto-generated method stub } - @Override public void mousePressed(MouseEvent e) { // TODO Auto-generated method stub } - @Override public void mouseReleased(MouseEvent e) { // TODO Auto-generated method stub This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lor...@us...> - 2008-05-26 17:00:20
|
Revision: 930 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=930&view=rev Author: lorenz_b Date: 2008-05-26 10:00:14 -0700 (Mon, 26 May 2008) Log Message: ----------- added second list for repair panel Modified Paths: -------------- trunk/src/dl-learner/org/dllearner/tools/ore/LearningPanel.java trunk/src/dl-learner/org/dllearner/tools/ore/Main.java trunk/src/dl-learner/org/dllearner/tools/ore/ORE.java trunk/src/dl-learner/org/dllearner/tools/ore/OntologyModifierOWLAPI.java trunk/src/dl-learner/org/dllearner/tools/ore/RepairPanel.java trunk/src/dl-learner/org/dllearner/tools/ore/RepairPanelDescriptor.java trunk/src/dl-learner/org/dllearner/tools/ore/WizardController.java Modified: trunk/src/dl-learner/org/dllearner/tools/ore/LearningPanel.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/ore/LearningPanel.java 2008-05-26 14:48:00 UTC (rev 929) +++ trunk/src/dl-learner/org/dllearner/tools/ore/LearningPanel.java 2008-05-26 17:00:14 UTC (rev 930) @@ -12,13 +12,10 @@ import javax.swing.JList; import javax.swing.JPanel; import javax.swing.JScrollPane; -import javax.swing.ListSelectionModel; +import javax.swing.JSlider; import javax.swing.event.ListSelectionListener; -import javax.swing.table.DefaultTableModel; import org.jdesktop.swingx.JXBusyLabel; -import org.jdesktop.swingx.JXTable; -import org.jdesktop.swingx.decorator.HighlighterFactory; import org.jdesktop.swingx.icon.EmptyIcon; import org.jdesktop.swingx.painter.BusyPainter; @@ -31,9 +28,6 @@ private javax.swing.JList resultList; private DefaultListModel model; - private JXTable resultTable; - private DefaultTableModel model1; - private JLabel statusLabel; private JXBusyLabel loadingLabel; @@ -46,11 +40,7 @@ super(); model = new DefaultListModel(); - model1 = new DefaultTableModel(); - model1.addColumn("Description"); - model1.addColumn("Correctness"); - - + JPanel buttonPanel = new JPanel(); startButton = new JButton("Start"); stopButton = new JButton("Stop"); @@ -88,21 +78,23 @@ JPanel contentPanel1 = new JPanel(); JScrollPane scroll = new JScrollPane(); - resultTable = new JXTable(model1 ); - resultTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); - resultTable.setHighlighters(HighlighterFactory.createSimpleStriping()); - - resultList = new JList(model); // resultList.setCellRenderer(new ColumnListCellRenderer()); scroll.setPreferredSize(new Dimension(400, 400)); - scroll.setViewportView(resultList); + JSlider noise = new JSlider(JSlider.HORIZONTAL, 0, 100, 0); + noise.setMajorTickSpacing(50); + noise.setMinorTickSpacing(25); + noise.setPaintTicks(true); + noise.setPaintLabels(true); + contentPanel1.add(scroll); + contentPanel1.add(noise); + return contentPanel1; } @@ -135,10 +127,6 @@ return model; } -// public DefaultTableModel getModel() { -// return model1; -// } - public javax.swing.JList getResultList() { return resultList; } Modified: trunk/src/dl-learner/org/dllearner/tools/ore/Main.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/ore/Main.java 2008-05-26 14:48:00 UTC (rev 929) +++ trunk/src/dl-learner/org/dllearner/tools/ore/Main.java 2008-05-26 17:00:14 UTC (rev 930) @@ -26,7 +26,7 @@ } Wizard wizard = new Wizard(); wizard.getDialog().setTitle("DL-Learner ORE-Tool"); - wizard.getDialog().setSize(800, 500); + wizard.getDialog().setSize(1300, 600); WizardPanelDescriptor descriptor1 = new IntroductionPanelDescriptor(); wizard.registerWizardPanel(IntroductionPanelDescriptor.IDENTIFIER, descriptor1); Modified: trunk/src/dl-learner/org/dllearner/tools/ore/ORE.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/ore/ORE.java 2008-05-26 14:48:00 UTC (rev 929) +++ trunk/src/dl-learner/org/dllearner/tools/ore/ORE.java 2008-05-26 17:00:14 UTC (rev 930) @@ -2,12 +2,13 @@ import java.io.File; import java.math.BigDecimal; +import java.util.HashSet; import java.util.List; import java.util.Set; import java.util.SortedSet; import java.util.TreeSet; -import org.dllearner.algorithms.refinement.ROLearner; +import org.dllearner.algorithms.refexamples.ExampleBasedROLComponent; import org.dllearner.core.ComponentInitException; import org.dllearner.core.ComponentManager; import org.dllearner.core.KnowledgeSource; @@ -99,7 +100,7 @@ public void setLearningAlgorithm(){ try { - la = cm.learningAlgorithm(ROLearner.class, lp, rs); + la = cm.learningAlgorithm(ExampleBasedROLComponent.class, lp, rs); } catch (LearningProblemUnsupportedException e1) { // TODO Auto-generated catch block e1.printStackTrace(); @@ -147,12 +148,10 @@ double result_tmp = 0.0f; for(Individual ind : posExamples){ - rs.instanceCheck(d, ind); if(rs.instanceCheck(d, ind)) numberPosExamples++; } for(Individual ind : negExamples){ - rs.instanceCheck(d, ind); if(!rs.instanceCheck(d, ind)) numberNegExamples++; } @@ -164,6 +163,31 @@ } + + public HashSet<Individual> getNegFailureExamples(){ + HashSet<Individual> negFailureExamples = new HashSet<Individual>() ; + + for(Individual ind : negExamples){ + if(rs.instanceCheck(conceptToAdd, ind)) + negFailureExamples.add(ind); + + } + + return negFailureExamples; + } + + public SortedSet<Individual> getPosFailureExamples(){ + + SortedSet<Individual> posFailureExamples = null ; + + for(Individual ind : posExamples){ + if(!rs.instanceCheck(conceptToAdd, ind)) + posFailureExamples.add(ind); + + } + + return posFailureExamples; + } @@ -196,24 +220,24 @@ public static void main(String[] args){ - ORE test = new ORE(); - //File owlFile = new File("examples/family/father.owl"); - File owlFile = new File("src/dl-learner/org/dllearner/tools/ore/father.owl"); - - test.setKnowledgeSource(owlFile); - - test.detectReasoner(); - ReasoningService rs = test.getReasoningService(); - System.err.println("Concepts :" + rs.getAtomicConcepts()); - - - test.setConcept(new NamedClass("http://example.com/father#father")); - test.setPosNegExamples(); - System.out.println(test.posExamples); - System.out.println(test.negExamples); - test.setLearningProblem(); - test.setLearningAlgorithm(); - test.start(); +// ORE test = new ORE(); +// +// File owlFile = new File("src/dl-learner/org/dllearner/tools/ore/father.owl"); +// +// test.setKnowledgeSource(owlFile); +// +// test.detectReasoner(); +// ReasoningService rs = test.getReasoningService(); +// System.err.println("Concepts :" + rs.getAtomicConcepts()); +// +// +// test.setConcept(new NamedClass("http://example.com/father#father")); +// test.setPosNegExamples(); +// System.out.println(test.posExamples); +// System.out.println(test.negExamples); +// test.setLearningProblem(); +// test.setLearningAlgorithm(); +// test.start(); } Modified: trunk/src/dl-learner/org/dllearner/tools/ore/OntologyModifierOWLAPI.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/ore/OntologyModifierOWLAPI.java 2008-05-26 14:48:00 UTC (rev 929) +++ trunk/src/dl-learner/org/dllearner/tools/ore/OntologyModifierOWLAPI.java 2008-05-26 17:00:14 UTC (rev 930) @@ -131,7 +131,7 @@ //Hinzufuegen OWLDescription newConceptOWLAPI = OWLAPIDescriptionConvertVisitor.getOWLDescription(newConcept); - + OWLAxiom axiomOWLAPI = factory.getOWLClassAssertionAxiom(individualOWLAPI, newConceptOWLAPI); AddAxiom axiom = new AddAxiom(ontology, axiomOWLAPI); Modified: trunk/src/dl-learner/org/dllearner/tools/ore/RepairPanel.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/ore/RepairPanel.java 2008-05-26 14:48:00 UTC (rev 929) +++ trunk/src/dl-learner/org/dllearner/tools/ore/RepairPanel.java 2008-05-26 17:00:14 UTC (rev 930) @@ -4,6 +4,7 @@ import java.awt.Dimension; import java.awt.GridLayout; import java.awt.event.ActionListener; +import java.awt.event.MouseListener; import java.awt.geom.Ellipse2D; import java.awt.geom.RoundRectangle2D; @@ -25,17 +26,16 @@ private JPanel contentPanel; - private javax.swing.JList resultList; - private DefaultListModel model; + private JList posFailureList; + private JList negFailureList; + private DefaultListModel posFailureModel; + private DefaultListModel negFailureModel; private JLabel statusLabel; private JXBusyLabel loadingLabel; - private JButton deleteButton; - private JButton moveButton; - private JButton addButton; private JButton saveButton; @@ -43,18 +43,14 @@ public RepairPanel() { super(); - model = new DefaultListModel(); - + posFailureModel = new DefaultListModel(); + negFailureModel = new DefaultListModel(); JPanel buttonPanel = new JPanel(); - deleteButton = new JButton("delete"); - moveButton = new JButton("move"); - addButton = new JButton("add property"); + saveButton = new JButton("save"); - buttonPanel.add(deleteButton); - buttonPanel.add(moveButton); - buttonPanel.add(addButton); + buttonPanel.add(saveButton); buttonPanel.setLayout(new GridLayout(5,1,0,10)); @@ -86,36 +82,27 @@ private JPanel getContentPanel() { JPanel contentPanel1 = new JPanel(); - JScrollPane scroll = new JScrollPane(); + JScrollPane posScroll = new JScrollPane(); + posFailureList = new JList(posFailureModel); + posScroll.setPreferredSize(new Dimension(400, 400)); + posScroll.setViewportView(posFailureList); + JScrollPane negScroll = new JScrollPane(); + negFailureList = new JList(negFailureModel); + negScroll.setPreferredSize(new Dimension(400, 400)); + negScroll.setViewportView(negFailureList); - resultList = new JList(model); - - scroll.setPreferredSize(new Dimension(400, 400)); + contentPanel1.add(posScroll); + contentPanel1.add(negScroll); - scroll.setViewportView(resultList); - - contentPanel1.add(scroll); - return contentPanel1; } - public void addDeleteButtonListener(ActionListener a){ - deleteButton.addActionListener(a); - } - - public void addMoveButtonListener(ActionListener a){ - moveButton.addActionListener(a); - } - - public void addAddButtonListener(ActionListener a){ - addButton.addActionListener(a); - } - + public void addSaveButtonListener(ActionListener a){ saveButton.addActionListener(a); } @@ -128,32 +115,34 @@ return loadingLabel; } - public JButton getDeleteButton() { - return deleteButton; + public DefaultListModel getPosFailureModel() { + return posFailureModel; } - - public JButton getMoveButton() { - return moveButton; + + public DefaultListModel getNegFailureModel() { + return negFailureModel; } - public JButton getAddButton() { - return addButton; + public javax.swing.JList getPosFailureList() { + return posFailureList; } - - public DefaultListModel getModel() { - return model; - } - public javax.swing.JList getResultList() { - return resultList; + public javax.swing.JList getNegFailureList() { + return negFailureList; } public void addSelectionListener(ListSelectionListener l){ - resultList.addListSelectionListener(l); + posFailureList.addListSelectionListener(l); + negFailureList.addListSelectionListener(l); } + public void addMouseListener(MouseListener m){ + posFailureList.addMouseListener(m); + negFailureList.addMouseListener(m); + } + } Modified: trunk/src/dl-learner/org/dllearner/tools/ore/RepairPanelDescriptor.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/ore/RepairPanelDescriptor.java 2008-05-26 14:48:00 UTC (rev 929) +++ trunk/src/dl-learner/org/dllearner/tools/ore/RepairPanelDescriptor.java 2008-05-26 17:00:14 UTC (rev 930) @@ -2,6 +2,8 @@ import java.awt.event.ActionEvent; import java.awt.event.ActionListener; +import java.awt.event.MouseEvent; +import java.awt.event.MouseListener; import javax.swing.event.ListSelectionEvent; import javax.swing.event.ListSelectionListener; @@ -11,7 +13,7 @@ -public class RepairPanelDescriptor extends WizardPanelDescriptor implements ActionListener, ListSelectionListener{ +public class RepairPanelDescriptor extends WizardPanelDescriptor implements ActionListener, ListSelectionListener, MouseListener{ public static final String IDENTIFIER = "REPAIR_PANEL"; @@ -21,11 +23,10 @@ public RepairPanelDescriptor() { panel4 = new RepairPanel(); - panel4.addDeleteButtonListener(this); - panel4.addMoveButtonListener(this); - panel4.addAddButtonListener(this); + panel4.addSaveButtonListener(this); panel4.addSelectionListener(this); + panel4.addMouseListener(this); setPanelDescriptorIdentifier(IDENTIFIER); setPanelComponent(panel4); @@ -48,9 +49,10 @@ public void valueChanged(ListSelectionEvent e) { - if (!e.getValueIsAdjusting()) - System.out.println(panel4.getResultList().getSelectedValue()); +// if (!e.getValueIsAdjusting()) +// System.err.println(panel4.getNegFailureList().getSelectedValue()); + } public void actionPerformed(ActionEvent event) { @@ -58,38 +60,40 @@ getWizardModel().getOre().getModi().saveOntology(); } - if(event.getActionCommand().equals("delete")){ - - int idx = panel4.getResultList().getSelectedIndex(); - if (-1 == idx) { - //No item selected - return; - } - System.out.println("Index: " +idx); - - - getWizardModel().getOre().getModi().deleteIndividual((Individual)panel4.getResultList().getSelectedValue()); - panel4.getModel().removeElementAt(idx); - - } - if(event.getActionCommand().equals("move")){ - - int idx = panel4.getResultList().getSelectedIndex(); - if (-1 == idx) { - //No item selected - return; - } - System.out.println(getWizardModel().getOre().allAtomicConcepts); - - MoveDialog dialog = new MoveDialog(getWizardModel().getOre().allAtomicConcepts, getWizard().getDialog()); - dialog.init(); - System.err.println("Verschiebe " +(Individual)panel4.getResultList().getSelectedValue()+ - " von " + "......." + " nach " +dialog.getSelectedValue()); + } + + @Override + public void mouseClicked(MouseEvent e) { - + if(e.getClickCount() == 2 && e.getSource() == panel4.getNegFailureList() ){ + System.out.println(panel4.getNegFailureList().getSelectedValue()); } + } + + @Override + public void mouseEntered(MouseEvent e) { + // TODO Auto-generated method stub + + } + + @Override + public void mouseExited(MouseEvent e) { + // TODO Auto-generated method stub + + } + + @Override + public void mousePressed(MouseEvent e) { + // TODO Auto-generated method stub + + } + + @Override + public void mouseReleased(MouseEvent e) { + // TODO Auto-generated method stub + }} Modified: trunk/src/dl-learner/org/dllearner/tools/ore/WizardController.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/ore/WizardController.java 2008-05-26 14:48:00 UTC (rev 929) +++ trunk/src/dl-learner/org/dllearner/tools/ore/WizardController.java 2008-05-26 17:00:14 UTC (rev 930) @@ -2,6 +2,7 @@ import java.awt.event.ActionListener; +import java.util.HashSet; import java.util.Set; import java.util.SortedSet; import java.util.concurrent.ExecutionException; @@ -73,7 +74,7 @@ } if( nextPanelDescriptor.equals("REPAIR_PANEL")){ - ((RepairPanelDescriptor)wizard.getModel().getPanelHashMap().get(nextPanelDescriptor)).panel4.getModel().clear(); + ((RepairPanelDescriptor)wizard.getModel().getPanelHashMap().get(nextPanelDescriptor)).panel4.getNegFailureModel().clear(); wizard.getModel().getOre().getModi().addAxiomToOWL(wizard.getModel().getOre().getConceptToAdd(), wizard.getModel().getOre().getConcept()); new FailInstancesRetriever(nextPanelDescriptor).execute(); } @@ -230,7 +231,7 @@ } } - class FailInstancesRetriever extends SwingWorker<SortedSet<Individual>, Individual> { + class FailInstancesRetriever extends SwingWorker<HashSet<Individual>, Individual> { Object nextPanelID; public FailInstancesRetriever(Object nextPanelDescriptor) { @@ -239,25 +240,25 @@ } @Override - public SortedSet<Individual> doInBackground() { + public HashSet<Individual> doInBackground() { ((RepairPanelDescriptor) wizard.getModel().getPanelHashMap().get( nextPanelID)).panel4.getStatusLabel().setText( - "Loading instances"); + "Loading conflicting instances"); ((RepairPanelDescriptor) wizard.getModel().getPanelHashMap().get( nextPanelID)).panel4.getLoadingLabel().setBusy(true); - SortedSet<Individual> ind = wizard.getModel().getOre() - .getReasoningService().getIndividuals(); + HashSet<Individual> ind = wizard.getModel().getOre() + .getNegFailureExamples(); return ind; } @Override public void done() { - SortedSet<Individual> ind = null; + HashSet<Individual> ind = null; try { ind = get(); } catch (InterruptedException e) { @@ -269,20 +270,16 @@ } RepairPanelDescriptor nextPanel = (RepairPanelDescriptor) wizard .getModel().getPanelHashMap().get(nextPanelID); - DefaultListModel dm = ((RepairPanelDescriptor) wizard.getModel().getPanelHashMap().get( - nextPanelID)).panel4.getModel(); + DefaultListModel dm = nextPanel.panel4.getNegFailureModel(); for (Individual cl : ind) { dm.addElement(cl); - //nextPanel.panel3.getModel().addElement(cl); System.out.println(cl.getName()); } - nextPanel.panel4.getResultList().setModel(dm); - ((RepairPanelDescriptor) wizard.getModel().getPanelHashMap().get( - nextPanelID)).panel4.getStatusLabel().setText( + + nextPanel.panel4.getStatusLabel().setText( "Instances loaded"); - ((RepairPanelDescriptor) wizard.getModel().getPanelHashMap().get( - nextPanelID)).panel4.getLoadingLabel().setBusy(false); + nextPanel.panel4.getLoadingLabel().setBusy(false); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ku...@us...> - 2008-05-26 14:48:07
|
Revision: 929 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=929&view=rev Author: kurzum Date: 2008-05-26 07:48:00 -0700 (Mon, 26 May 2008) Log Message: ----------- intermediate Modified Paths: -------------- trunk/src/dl-learner/org/dllearner/kb/sparql/SPARQLTasks.java trunk/src/dl-learner/org/dllearner/kb/sparql/SparqlQueryDescriptionConvertRDFS.java trunk/src/dl-learner/org/dllearner/kb/sparql/SparqlQueryDescriptionConvertVisitor.java trunk/src/dl-learner/org/dllearner/scripts/SKOS7030.java trunk/src/dl-learner/org/dllearner/utilities/examples/AutomaticNegativeExampleFinderSPARQL.java trunk/src/dl-learner/org/dllearner/utilities/examples/AutomaticPositiveExampleFinderSPARQL.java Added Paths: ----------- trunk/src/dl-learner/org/dllearner/utilities/datastructures/ResultConceptSorter.java Removed Paths: ------------- trunk/src/dl-learner/org/dllearner/scripts/ResultCompare.java Modified: trunk/src/dl-learner/org/dllearner/kb/sparql/SPARQLTasks.java =================================================================== --- trunk/src/dl-learner/org/dllearner/kb/sparql/SPARQLTasks.java 2008-05-26 12:02:10 UTC (rev 928) +++ trunk/src/dl-learner/org/dllearner/kb/sparql/SPARQLTasks.java 2008-05-26 14:48:00 UTC (rev 929) @@ -1,5 +1,6 @@ package org.dllearner.kb.sparql; +import java.util.LinkedList; import java.util.List; import java.util.SortedSet; import java.util.TreeSet; @@ -12,10 +13,10 @@ public class SPARQLTasks { - //CHECK - @SuppressWarnings("unused") + //@SuppressWarnings("unused") + //LOGGER: SPARQLTasks private static Logger logger = Logger - .getLogger(SPARQLTasks.class); + .getLogger(SPARQLTasks.class); private Cache c; private SparqlEndpoint se; @@ -76,9 +77,95 @@ } - + /** + * gets a SortedSet of all subclasses QUALITY: maybe it is better to have a + * parameter int depth, to choose a depth of subclass interference + * + * @see conceptRewrite(String descriptionKBSyntax, SparqlEndpoint se, Cache + * c, boolean simple ) + * @param description + * @param se + * @param c + * @param simple + * @return + */ + public SortedSet<String> getSubClasses(String description, boolean simple) { + // ResultSet rs = null; + // System.out.println(description); + SortedSet<String> alreadyQueried = new TreeSet<String>(); + try { + + // initialisation get direct Subclasses + LinkedList<String> remainingClasses = new LinkedList<String>(); + + // collect remaining classes + remainingClasses.addAll(getDirectSubClasses(description.replaceAll("\"", ""))); + + // remainingClasses.addAll(alreadyQueried); + + // alreadyQueried = new TreeSet<String>(); + alreadyQueried.add(description.replaceAll("\"", "")); + + if (simple) { + alreadyQueried.addAll(remainingClasses); + return alreadyQueried; + } else { + + logger.warn("Retrieval auf all subclasses via SPARQL is cost intensive and might take a while"); + while (remainingClasses.size() != 0) { + SortedSet<String> tmpSet = new TreeSet<String>(); + String tmp = remainingClasses.removeFirst(); + alreadyQueried.add(tmp); + + tmpSet = getDirectSubClasses(tmp); + for (String string : tmpSet) { + if (!(alreadyQueried.contains(string))) { + remainingClasses.add(string); + }// if + }// for + }// while + }// else + + } catch (Exception e) { + + } + + return alreadyQueried; + } + /** + * QUALITY: workaround for a sparql glitch {?a owl:subclassOf ?b} returns an + * empty set on some entpoints. returns all direct subclasses of String + * concept + * + * @param concept + * @return SortedSet of direct subclasses as String + */ + private SortedSet<String> getDirectSubClasses(String concept) { + String SPARQLquery = "SELECT * \n"; + SPARQLquery += "WHERE {\n"; + SPARQLquery += " ?subject ?predicate <" + concept + "> \n"; + SPARQLquery += "}\n"; + + ResultSet rs = queryAsResultSet(SPARQLquery); + + SortedSet<String> subClasses = new TreeSet<String>(); + @SuppressWarnings("unchecked") + List<ResultBinding> l = ResultSetFormatter.toList(rs); + String p = "", s = ""; + for (ResultBinding resultBinding : l) { + + s = ((resultBinding.get("subject").toString())); + p = ((resultBinding.get("predicate").toString())); + if (p.equalsIgnoreCase("http://www.w3.org/2000/01/rdf-schema#subClassOf")) { + subClasses.add(s); + } + } + return subClasses; + } + + /** * QUALITY: buggy because role doesn't work sometimes * get subject with fixed role and object * @param role @@ -137,9 +224,26 @@ return queryAsSet(SPARQLquery, "subject"); } + /** + * get all instances for a concept including RDFS Reasoning + * @param conceptKBSyntax + * @param sparqlResultLimit + * @return + */ + public SortedSet<String> retrieveInstancesForConceptIncludingSubclasses (String conceptKBSyntax,int sparqlResultLimit) { + + String SPARQLquery = ""; + try{ + SPARQLquery = SparqlQueryDescriptionConvertVisitor + .getSparqlQueryIncludingSubclasses(conceptKBSyntax,sparqlResultLimit,this,true); + }catch (Exception e) {e.printStackTrace();} + return queryAsSet(SPARQLquery, "subject"); + } + + /** * get all direct Classes of an instance * @param instance @@ -232,8 +336,18 @@ /** - * lowlevel, executes query returns JSON + * low level, executes query returns ResultSet * @param SPARQLquery + * @return jena ResultSet + */ + public ResultSet queryAsResultSet(String SPARQLquery){ + return SparqlQuery.JSONtoResultSet(query(SPARQLquery)); + + } + + /** + * low level, executes query returns JSON + * @param SPARQLquery * @return */ public String query(String SPARQLquery){ Modified: trunk/src/dl-learner/org/dllearner/kb/sparql/SparqlQueryDescriptionConvertRDFS.java =================================================================== --- trunk/src/dl-learner/org/dllearner/kb/sparql/SparqlQueryDescriptionConvertRDFS.java 2008-05-26 12:02:10 UTC (rev 928) +++ trunk/src/dl-learner/org/dllearner/kb/sparql/SparqlQueryDescriptionConvertRDFS.java 2008-05-26 14:48:00 UTC (rev 929) @@ -1,7 +1,25 @@ +/** + * Copyright (C) 2007, Sebastian Hellmann + * + * This file is part of DL-Learner. + * + * DL-Learner is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * DL-Learner is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ package org.dllearner.kb.sparql; import java.util.LinkedList; -import java.util.List; import java.util.SortedSet; import java.util.TreeSet; @@ -10,14 +28,17 @@ import org.dllearner.core.owl.NamedClass; import org.dllearner.core.owl.Union; -import com.hp.hpl.jena.query.ResultSet; -import com.hp.hpl.jena.query.ResultSetFormatter; -import com.hp.hpl.jena.sparql.core.ResultBinding; -//COMMENT: header +/** + * @author Sebastian Hellmann + * Enables RDFS reasoning for the DL2SPARQL class + * by concept rewriting + * //QUALITY use SPARQLtasks + */ public class SparqlQueryDescriptionConvertRDFS { - static Logger logger = Logger.getLogger(SparqlQueryDescriptionConvertRDFS.class); + //LOGGER: SparqlQueryDescriptionConvertVisitor + static Logger logger = Logger.getLogger(SparqlQueryDescriptionConvertVisitor.class); /** * @@ -35,7 +56,7 @@ * RECOMMENDED for large hierarchies) * @return the altered String */ - public static String conceptRewrite(String descriptionKBSyntax, SparqlEndpoint se, Cache c, + public static String conceptRewrite(String descriptionKBSyntax, SPARQLTasks st, boolean simple) { String quote = "\""; String returnValue = ""; @@ -58,7 +79,7 @@ // System.out.println(currentconcept); // subclasses are retrieved - subclasses = getSubClasses(currentconcept, se, c, simple); + subclasses = st.getSubClasses(currentconcept, simple); // if only one then keep if (subclasses.size() == 1) @@ -80,100 +101,6 @@ return returnValue; } - /** - * gets a SortedSet of all subclasses QUALITY: maybe it is better to have a - * parameter int depth, to choose a depth of subclass interference - * - * @see conceptRewrite(String descriptionKBSyntax, SparqlEndpoint se, Cache - * c, boolean simple ) - * @param description - * @param se - * @param c - * @param simple - * @return - */ - private static SortedSet<String> getSubClasses(String description, SparqlEndpoint se, Cache c, - boolean simple) { + - // ResultSet rs = null; - // System.out.println(description); - SortedSet<String> alreadyQueried = new TreeSet<String>(); - try { - - // initialisation get direct Subclasses - LinkedList<String> remainingClasses = new LinkedList<String>(); - - // collect remaining classes - remainingClasses.addAll(getDirectSubClasses(description.replaceAll("\"", ""), se, c)); - - // remainingClasses.addAll(alreadyQueried); - - // alreadyQueried = new TreeSet<String>(); - alreadyQueried.add(description.replaceAll("\"", "")); - - if (simple) { - alreadyQueried.addAll(remainingClasses); - return alreadyQueried; - } else { - - logger - .warn("Retrieval auf all subclasses via SPARQL is cost intensive and might take a while"); - while (remainingClasses.size() != 0) { - SortedSet<String> tmpSet = new TreeSet<String>(); - String tmp = remainingClasses.removeFirst(); - alreadyQueried.add(tmp); - - tmpSet = getDirectSubClasses(tmp, se, c); - for (String string : tmpSet) { - if (!(alreadyQueried.contains(string))) { - remainingClasses.add(string); - }// if - }// for - }// while - }// else - - } catch (Exception e) { - - } - - return alreadyQueried; - } - - /** - * QUALITY: workaround for a sparql glitch {?a owl:subclassOf ?b} returns an - * empty set on some entpoints. returns all direct subclasses of String - * concept - * - * @param concept - * @return SortedSet of direct subclasses as String - */ - private static SortedSet<String> getDirectSubClasses(String concept, SparqlEndpoint se, Cache c) { - String query = "SELECT * \n"; - query += "WHERE {\n"; - query += " ?subject ?predicate <" + concept + "> \n"; - query += "}\n"; - - ResultSet rs = null; - if (c == null) { - rs = new SparqlQuery(query, se).send(); - } else { - String JSON = (c.executeSparqlQuery(new SparqlQuery(query, se))); - rs = SparqlQuery.JSONtoResultSet(JSON); - } - - SortedSet<String> subClasses = new TreeSet<String>(); - @SuppressWarnings("unchecked") - List<ResultBinding> l = ResultSetFormatter.toList(rs); - String p = "", s = ""; - for (ResultBinding resultBinding : l) { - - s = ((resultBinding.get("subject").toString())); - p = ((resultBinding.get("predicate").toString())); - if (p.equalsIgnoreCase("http://www.w3.org/2000/01/rdf-schema#subClassOf")) { - subClasses.add(s); - } - } - return subClasses; - } - } Modified: trunk/src/dl-learner/org/dllearner/kb/sparql/SparqlQueryDescriptionConvertVisitor.java =================================================================== --- trunk/src/dl-learner/org/dllearner/kb/sparql/SparqlQueryDescriptionConvertVisitor.java 2008-05-26 12:02:10 UTC (rev 928) +++ trunk/src/dl-learner/org/dllearner/kb/sparql/SparqlQueryDescriptionConvertVisitor.java 2008-05-26 14:48:00 UTC (rev 929) @@ -70,14 +70,13 @@ return getSparqlQuery(defaultLimit); }*/ - private String getSparqlQuery(int limit) + private String getSparqlQuery(int resultLimit) { // for old function see below // it was using the object attribute in a strange way // QUALITY: what if this function is called several times?? should be private maybe? String tmpQuery= "SELECT ?subject \nWHERE {"+query+ - " }\n "; - if(limit>0) tmpQuery+="LIMIT "+limit; + " }\n "+ limit(resultLimit); query = tmpQuery; return query; @@ -112,11 +111,11 @@ return getSparqlQuery(description, defaultLimit); } - public static String getSparqlQuery(Description description, int limit) + public static String getSparqlQuery(Description description, int resultLimit) { SparqlQueryDescriptionConvertVisitor visitor=new SparqlQueryDescriptionConvertVisitor(); description.accept(visitor); - String ret = visitor.getSparqlQuery(limit); + String ret = visitor.getSparqlQuery(resultLimit); //HACK see replace might be a good solution, needs testing while (ret.contains("..")) { ret = ret.replace("..", "."); @@ -142,11 +141,11 @@ * @return * @throws ParseException */ - public static String getSparqlQueryIncludingSubclasses(String descriptionKBSyntax, int limit, SparqlEndpoint se,Cache c, boolean simple) throws ParseException + public static String getSparqlQueryIncludingSubclasses(String descriptionKBSyntax, int resultLimit, SPARQLTasks st, boolean simple) throws ParseException { - String rewritten = SparqlQueryDescriptionConvertRDFS.conceptRewrite(descriptionKBSyntax, se, c, simple); + String rewritten = SparqlQueryDescriptionConvertRDFS.conceptRewrite(descriptionKBSyntax, st, simple); - return getSparqlQuery(rewritten, limit); + return getSparqlQuery(rewritten, resultLimit); } @@ -341,6 +340,10 @@ logger.trace("DatatypeSomeRestriction"); } + private String limit(int resultLimit){ + if(resultLimit>0)return " LIMIT "+resultLimit; + return ""; + } } Deleted: trunk/src/dl-learner/org/dllearner/scripts/ResultCompare.java =================================================================== --- trunk/src/dl-learner/org/dllearner/scripts/ResultCompare.java 2008-05-26 12:02:10 UTC (rev 928) +++ trunk/src/dl-learner/org/dllearner/scripts/ResultCompare.java 2008-05-26 14:48:00 UTC (rev 929) @@ -1,83 +0,0 @@ -package org.dllearner.scripts; - -import java.util.SortedSet; - -public class ResultCompare implements Comparable<ResultCompare> { - String concept; - SortedSet<String> instances; - double accuracy; - double accuracy2; - int nrOfInstances; - SortedSet<String> coveredInRest; - SortedSet<String> possibleNewCandidates; - SortedSet<String> notCoveredInTotal; - - - public ResultCompare(String concept, SortedSet<String> instances, double accuracy, - double accuracy2, int nrOfInstances, SortedSet<String> coveredInRest, - SortedSet<String> possibleNewCandidates, SortedSet<String> notCoveredInTotal) { - super(); - this.concept = concept; - this.instances = instances; - this.accuracy = accuracy; - this.accuracy2 = accuracy2; - this.nrOfInstances = nrOfInstances; - this.coveredInRest = coveredInRest; - this.possibleNewCandidates = possibleNewCandidates; - this.notCoveredInTotal = notCoveredInTotal; - } - - - - - public int compareTo(ResultCompare in) { - ResultCompare obj = in; - if(obj.accuracy > this.accuracy) return 1; - else if(obj.accuracy == this.accuracy){ - - if(obj.nrOfInstances<this.nrOfInstances)return 1; - else if(obj.nrOfInstances>this.nrOfInstances)return -1; - else return 1; - //if(obj.nrOfInstances==this.nrOfInstances)return 0; - } - else {//if(obj.accuracy < this.accuracy){ - return -1; - } - - } - - - - - public String toStringFull(){ - String ret=""; - ret+="concept\t"+concept+"\n"; - ret+="instances\t"+instances+"\n"; - ret+="accuracy\t"+accuracy+"\n"; - ret+="nrOfInstances\t"+nrOfInstances+"\n"; - ret+="accuracy2\t"+accuracy2+"\n"; - ret+="coveredInRest("+coveredInRest.size()+")\t"+coveredInRest+"\n"; - ret+="possibleNewCandidates("+possibleNewCandidates.size()+")\t"+possibleNewCandidates+"\n"; - ret+="notCoveredInTotal("+notCoveredInTotal.size()+")\t"+notCoveredInTotal+"\n"; - - return ret; - - } - - @Override - public String toString(){ - String ret=""; - ret+="concept\t"+concept+"\n"; - //ret+="instances\t"+instances+"\n"; - ret+="accuracy\t"+accuracy+"\n"; - ret+="nrOfInstances\t"+nrOfInstances+"\n"; - ret+="accuracy2\t"+accuracy2+"\n"; - //ret+="coveredInRest("+coveredInRest.size()+")\t"+coveredInRest+"\n"; - //ret+="possibleNewCandidates("+possibleNewCandidates.size()+")\t"+possibleNewCandidates+"\n"; - //ret+="notCoveredInTotal("+notCoveredInTotal.size()+")\t"+notCoveredInTotal+"\n"; - - return ret; - - } - -} Modified: trunk/src/dl-learner/org/dllearner/scripts/SKOS7030.java =================================================================== --- trunk/src/dl-learner/org/dllearner/scripts/SKOS7030.java 2008-05-26 12:02:10 UTC (rev 928) +++ trunk/src/dl-learner/org/dllearner/scripts/SKOS7030.java 2008-05-26 14:48:00 UTC (rev 929) @@ -47,19 +47,14 @@ static int maxExecutionTimeInSeconds = 30; static int guaranteeXgoodDescriptions = 40; - //static int limit=200; - - - - //examples static int sparqlResultSize=2000; static double percentOfSKOSSet=0.2; static double negfactor=1.0; SortedSet<String> posExamples = new TreeSet<String>(); SortedSet<String> fullPositiveSet = new TreeSet<String>(); - SortedSet<String> fullminusposRest = new TreeSet<String>(); + SortedSet<String> fullPosSetWithoutPosExamples = new TreeSet<String>(); SortedSet<String> negExamples = new TreeSet<String>(); @@ -78,13 +73,14 @@ if(local){ url = "http://139.18.2.37:8890/sparql"; - //RBC sparqlTasks = new SPARQLTasks(Cache.getPersistentCache(),SparqlEndpoint.EndpointLOCALDBpedia()); }else{ url = "http://dbpedia.openlinksw.com:8890/sparql"; sparqlTasks = new SPARQLTasks(Cache.getPersistentCache(),SparqlEndpoint.EndpointDBpedia()); } + System.out.println(sparqlTasks.getDomain("http://dbpedia.org/property/predecessor", 1000)); + String prim="http://dbpedia.org/resource/Category:Prime_Ministers_of_the_United_Kingdom"; String award=("http://dbpedia.org/resource/Category:Best_Actor_Academy_Award_winners"); @@ -92,164 +88,93 @@ SKOS7030 s= new SKOS7030(); s.makeExamples(prim, percentOfSKOSSet, negfactor, sparqlResultSize); - //QUALITY s.posExamples - List<Description> conceptresults = s.learn(s.posExamples, s.negExamples); + + List<Description> conceptresults = s.learn(); logger.debug("found nr of concepts: "+conceptresults.size()); + System.out.println(conceptresults); - for (Description oneConcept : conceptresults) { + int x=0; + + SortedSet<ResultMostCoveredInRest> res = new TreeSet<ResultMostCoveredInRest>(); + for (Description concept : conceptresults) { + if(x++==100)break; + res.add(s.evaluate(concept, 1000)); - //s.evaluate(oneConcept, 1000); + } + + x=0; + for (ResultMostCoveredInRest resultMostCoveredInRest : res) { + if(x++==10)break; + System.out.println(resultMostCoveredInRest.concept); + System.out.println(resultMostCoveredInRest.accuracy); + System.out.println(resultMostCoveredInRest.retrievedInstancesSize); + } + s.print(res.first().concept, 1000); System.out.println("Finished"); JamonMonitorLogger.printAllSortedByLabel(); } - void evaluate(Description oneConcept, int sparqlResultLimit){ - logger.debug("oneconcept: "+oneConcept); - SortedSet<String> instances = sparqlTasks.retrieveInstancesForConcept(oneConcept.toKBSyntaxString(), sparqlResultLimit); + void print(Description concept, int sparqlResultLimit){ + logger.debug("evaluating concept: "+concept); +// SortedSet<String> instances = sparqlTasks.retrieveInstancesForConcept(oneConcept.toKBSyntaxString(), sparqlResultLimit); + SortedSet<String> instances = + sparqlTasks.retrieveInstancesForConceptIncludingSubclasses( + concept.toKBSyntaxString(),sparqlResultLimit); - System.out.println(fullminusposRest.size()); - System.out.println(instances.size()); - - SortedSet<String> coveredInRest = new TreeSet<String>(fullminusposRest); + SortedSet<String> coveredInRest = new TreeSet<String>(fullPosSetWithoutPosExamples); coveredInRest.retainAll(instances); + - System.out.println(fullminusposRest.size()); - System.out.println(instances.size()); - System.out.println(coveredInRest.size()); + SortedSet<String> coveredTotal = new TreeSet<String>(fullPositiveSet); + coveredTotal.retainAll(instances); + SortedSet<String> notCoveredInRest = new TreeSet<String>(fullPosSetWithoutPosExamples); + notCoveredInRest.retainAll(coveredInRest); + System.out.println(notCoveredInRest); - //SortedSet<String> possibleNewCandidates = new TreeSet<String>(); - //SortedSet<String> notCoveredInTotal = new TreeSet<String>(); + SortedSet<String> notCoveredTotal = new TreeSet<String>(fullPositiveSet); + notCoveredTotal.retainAll(coveredTotal); + System.out.println(notCoveredTotal); - } - - static void DBpediaSKOS(String SKOSConcept){ + ResultMostCoveredInRest evaluate(Description concept, int sparqlResultLimit){ + logger.debug("evaluating concept: "+concept); +// SortedSet<String> instances = sparqlTasks.retrieveInstancesForConcept(oneConcept.toKBSyntaxString(), sparqlResultLimit); + SortedSet<String> instances = + sparqlTasks.retrieveInstancesForConceptIncludingSubclasses( + concept.toKBSyntaxString(),sparqlResultLimit); + SortedSet<String> coveredInRest = new TreeSet<String>(fullPosSetWithoutPosExamples); + coveredInRest.retainAll(instances); - //concepts.add("http://dbpedia.org/resource/Category:Grammy_Award_winners"); - //concepts.add("EXISTS \"http://dbpedia.org/property/grammyawards\".TOP"); + SortedSet<String> coveredTotal = new TreeSet<String>(fullPositiveSet); + coveredTotal.retainAll(instances); + SortedSet<String> notCoveredInRest = new TreeSet<String>(fullPosSetWithoutPosExamples); + notCoveredInRest.retainAll(coveredInRest); - //HashMap<String, ResultSet> result = new HashMap<String, ResultSet>(); - //HashMap<String, String> result2 = new HashMap<String, String>(); - //System.out.println(concepts.first()); - //logger.setLevel(Level.TRACE); + SortedSet<String> notCoveredTotal = new TreeSet<String>(fullPositiveSet); + notCoveredTotal.retainAll(coveredTotal); + double acc = (double) (coveredInRest.size() / fullPosSetWithoutPosExamples.size()); + System.out.println("Accuracy: "+acc); + return new ResultMostCoveredInRest(concept,acc,instances.size()); - - -// LearnSparql ls = new LearnSparql(); -// -// //igno.add(oneConcept.replaceAll("\"", "")); -// -// List<Description> conceptresults= ls.learnDBpediaSKOS(posExamples, negExamples, url,new TreeSet<String>(),recursiondepth, closeAfterRecursion,randomizeCache,resultsize,noise); -// -// System.out.println("concepts"+conceptresults); -// //System.exit(0); -// -// SortedSet<ResultCompare> res=new TreeSet<ResultCompare>(); -// for (Description oneConcept : conceptresults) { -// try{ -// -// -// int i=0; -// int a=0; -// for (String oneinst : instances) { -// boolean inRest=false; -// boolean inTotal=false; -// for (String onerest : rest) { -// if(onerest.equalsIgnoreCase(oneinst)) -// { i++; inRest=true; break;} -// -// } -// if (inRest){coveredInRest.add(oneinst);}; -// -// for (String onetotal : totalSKOSset) { -// if(onetotal.equalsIgnoreCase(oneinst)) -// { a++; inTotal=true; break;} -// } -// if(!inRest && !inTotal){ -// possibleNewCandidates.add(oneinst); -// } -// } -// -// for (String onetotal : totalSKOSset) { -// boolean mm=false; -// for (String oneinst : instances) { -// if(onetotal.equalsIgnoreCase(oneinst)){ -// mm=true;break; -// } -// -// } -// if(!mm)notCoveredInTotal.add(onetotal); -// -// } -// -// -// -// double accuracy= (double)i/rest.size(); -// double accuracy2= (double)a/totalSKOSset.size(); -// -// logger.debug((new ResultCompare(oneConcept.toKBSyntaxString(),instances,accuracy,accuracy2,instances.size(), -// coveredInRest,possibleNewCandidates,notCoveredInTotal)).toStringFull()); -// -// //if(instances.size()>=0)System.out.println("size of instances "+instances.size()); -// //if(instances.size()>=0 && instances.size()<100) System.out.println("instances"+instances); -// }catch (Exception e) {e.printStackTrace();} -// } - -// System.out.println(res.last()); -// res.remove(res.last()); -// System.out.println(res.last()); -// res.remove(res.last()); -// System.out.println(res.last()); -// res.remove(res.last()); -// - - //double percent=0.80*(double)res.size();; -// double acc=res.first().accuracy; -// logger.debug(res.first().toStringFull()); -// res.remove(res.first()); -// logger.debug(res.first().toStringFull()); -// res.remove(res.first()); -// int i=0; -// while (res.size()>0){ -// logger.debug(res.first()); -// res.remove(res.first()); -// //if(res.size()<=percent)break; -// if(i>50)break; -// i++; -// -// } -// -// return 0.0; - - - //System.out.println("AAAAAAAA"); - //System.exit(0); - //"relearned concept: "; - //cf.writeSPARQL(confname, posExamples, negExamples, url, new TreeSet<String>(),standardSettings,algorithm); - // - - //Statistics.print(); + } - - - public static void initLogger() { SimpleLayout layout = new SimpleLayout(); @@ -302,7 +227,7 @@ AutomaticNegativeExampleFinderSPARQL aneg = new AutomaticNegativeExampleFinderSPARQL(fullPositiveSet,sparqlTasks); aneg.makeNegativeExamplesFromParallelClasses(posExamples, sparqlResultSize); - SortedSet<String> negativeSet = aneg.getNegativeExamples(neglimit); + this.negExamples = aneg.getNegativeExamples(neglimit); logger.debug("POSITIVE EXAMPLES"); for (String pos : posExamples) { @@ -310,27 +235,35 @@ } logger.debug("NEGATIVE EXAMPLES"); - for (String negs : negativeSet) { + for (String negs : this.negExamples) { logger.debug("-"+negs); } - fullminusposRest = fullPositiveSet; - fullminusposRest.removeAll(posExamples); + fullPosSetWithoutPosExamples = fullPositiveSet; + fullPosSetWithoutPosExamples.removeAll(posExamples); logger.debug(fullPositiveSet); - logger.debug(fullminusposRest); + logger.debug(fullPosSetWithoutPosExamples); } - public List<Description> learn(SortedSet<String> posExamples, SortedSet<String> negExamples){ + public List<Description> learn(){ SortedSet<String> instances = new TreeSet<String>(); - instances.addAll(posExamples); - instances.addAll(negExamples); + instances.addAll(this.posExamples); + instances.addAll(this.negExamples); + logger.info("Start Learning with"); + logger.info("positive examples: \t"+posExamples.size()); + logger.info("negative examples: \t"+negExamples.size()); + logger.info("instances \t"+instances.size()); + + + + ComponentManager cm = ComponentManager.getInstance(); LearningAlgorithm la = null; @@ -344,8 +277,8 @@ rs = new ReasoningService(r); //System.out.println("satisfy: "+rs.isSatisfiable()); lp = new PosNegDefinitionLP(rs); - ((PosNegLP) lp).setPositiveExamples(SetManipulation.stringToInd(posExamples)); - ((PosNegLP) lp).setNegativeExamples(SetManipulation.stringToInd(negExamples)); + ((PosNegLP) lp).setPositiveExamples(SetManipulation.stringToInd(this.posExamples)); + ((PosNegLP) lp).setNegativeExamples(SetManipulation.stringToInd(this.negExamples)); la = cm.learningAlgorithm(ExampleBasedROLComponent.class, lp, rs); @@ -454,8 +387,57 @@ System.out.println(Level.INFO);*/ //System.exit(0); + private class ResultCompare implements Comparable<ResultCompare>{ + Description concept ; + double accuracy = 0.0; + int retrievedInstancesSize=0; + + public int compareTo(ResultCompare o2) { + return 0; + } + public boolean equals(ResultCompare o2){ + return this.concept.equals(o2.concept); + } + + + public ResultCompare(Description conceptKBSyntax, double accuracy, int retrievedInstancesSize) { + super(); + this.concept = conceptKBSyntax; + this.accuracy = accuracy; + this.retrievedInstancesSize = retrievedInstancesSize; + } + + + } + + private class ResultMostCoveredInRest extends ResultCompare{ + + public ResultMostCoveredInRest(Description concept, double accuracy, + int retrievedInstancesSize) { + super(concept, accuracy, retrievedInstancesSize); + + } + public int compareTo(ResultMostCoveredInRest o2) { + if(this.equals(o2))return 0; + + if(this.accuracy > o2.accuracy){ + return 1; + } + else if(this.accuracy == o2.accuracy) { + if(this.retrievedInstancesSize < o2.retrievedInstancesSize ) + return 1; + else if(this.retrievedInstancesSize > o2.retrievedInstancesSize){ + return -1; + } + else return this.concept.toKBSyntaxString().compareTo(o2.concept.toKBSyntaxString()); + }else { + return -1; + } + + } + + } - } Added: trunk/src/dl-learner/org/dllearner/utilities/datastructures/ResultConceptSorter.java =================================================================== --- trunk/src/dl-learner/org/dllearner/utilities/datastructures/ResultConceptSorter.java (rev 0) +++ trunk/src/dl-learner/org/dllearner/utilities/datastructures/ResultConceptSorter.java 2008-05-26 14:48:00 UTC (rev 929) @@ -0,0 +1,89 @@ +package org.dllearner.utilities.datastructures; + +import java.util.SortedSet; + +import org.dllearner.core.owl.Description; + +public class ResultConceptSorter implements Comparable<ResultConceptSorter> { + String concept; + SortedSet<String> instances; + double accuracy; + double accuracy2; + int nrOfInstances; + SortedSet<String> coveredInRest; + SortedSet<String> possibleNewCandidates; + SortedSet<String> notCoveredInTotal; + + + public ResultConceptSorter(String concept, SortedSet<String> instances, double accuracy, + double accuracy2, int nrOfInstances, SortedSet<String> coveredInRest, + SortedSet<String> possibleNewCandidates, SortedSet<String> notCoveredInTotal) { + super(); + this.concept = concept; + this.instances = instances; + this.accuracy = accuracy; + this.accuracy2 = accuracy2; + this.nrOfInstances = nrOfInstances; + this.coveredInRest = coveredInRest; + this.possibleNewCandidates = possibleNewCandidates; + this.notCoveredInTotal = notCoveredInTotal; + } + + + + + public int compareTo(ResultConceptSorter in) { + ResultConceptSorter obj = in; + if(obj.accuracy > this.accuracy) return 1; + else if(obj.accuracy == this.accuracy){ + + if(obj.nrOfInstances<this.nrOfInstances)return 1; + else if(obj.nrOfInstances>this.nrOfInstances)return -1; + else return 1; + //if(obj.nrOfInstances==this.nrOfInstances)return 0; + } + else {//if(obj.accuracy < this.accuracy){ + return -1; + } + + } + + + + + public String toStringFull(){ + String ret=""; + ret+="concept\t"+concept+"\n"; + ret+="instances\t"+instances+"\n"; + ret+="accuracy\t"+accuracy+"\n"; + ret+="nrOfInstances\t"+nrOfInstances+"\n"; + ret+="accuracy2\t"+accuracy2+"\n"; + ret+="coveredInRest("+coveredInRest.size()+")\t"+coveredInRest+"\n"; + ret+="possibleNewCandidates("+possibleNewCandidates.size()+")\t"+possibleNewCandidates+"\n"; + ret+="notCoveredInTotal("+notCoveredInTotal.size()+")\t"+notCoveredInTotal+"\n"; + + return ret; + + } + + @Override + public String toString(){ + String ret=""; + ret+="concept\t"+concept+"\n"; + //ret+="instances\t"+instances+"\n"; + ret+="accuracy\t"+accuracy+"\n"; + ret+="nrOfInstances\t"+nrOfInstances+"\n"; + ret+="accuracy2\t"+accuracy2+"\n"; + //ret+="coveredInRest("+coveredInRest.size()+")\t"+coveredInRest+"\n"; + //ret+="possibleNewCandidates("+possibleNewCandidates.size()+")\t"+possibleNewCandidates+"\n"; + //ret+="notCoveredInTotal("+notCoveredInTotal.size()+")\t"+notCoveredInTotal+"\n"; + + return ret; + + } + + + + + +} Modified: trunk/src/dl-learner/org/dllearner/utilities/examples/AutomaticNegativeExampleFinderSPARQL.java =================================================================== --- trunk/src/dl-learner/org/dllearner/utilities/examples/AutomaticNegativeExampleFinderSPARQL.java 2008-05-26 12:02:10 UTC (rev 928) +++ trunk/src/dl-learner/org/dllearner/utilities/examples/AutomaticNegativeExampleFinderSPARQL.java 2008-05-26 14:48:00 UTC (rev 929) @@ -10,7 +10,7 @@ public class AutomaticNegativeExampleFinderSPARQL { - // CHECK + // LOGGER: ComponentManager private static Logger logger = Logger.getLogger(ComponentManager.class); private SPARQLTasks sparqltasks; @@ -26,7 +26,13 @@ static int poslimit = 10; static int neglimit = 20; - // CHECK separate posexamples and fullposset + + /** + * takes as input a full positive set to make sure no negatives are added as positives + * + * @param fullPositiveSet + * @param SPARQLTasks st + */ public AutomaticNegativeExampleFinderSPARQL( SortedSet<String> fullPositiveSet, SPARQLTasks st) { @@ -38,6 +44,11 @@ + /** + * aggregates all collected neg examples + * @param neglimit + * @return + */ public SortedSet<String> getNegativeExamples(int neglimit ) { SortedSet<String> negatives = new TreeSet<String>(); @@ -50,12 +61,18 @@ return negatives; } - // CHECK namespace + + /** + * makes neg ex from related instances, that take part in a role R(pos,neg) + * filters all objects, that don't use the given namespace + * @param instances + * @param objectNamespace + */ public void makeNegativeExamplesFromRelatedInstances(SortedSet<String> instances, - String namespace) { + String objectNamespace) { logger.debug("making examples from related instances"); for (String oneInstance : instances) { - makeNegativeExamplesFromRelatedInstances(oneInstance, namespace); + makeNegativeExamplesFromRelatedInstances(oneInstance, objectNamespace); } logger.debug("|-negExample size from related: " + fromRelated.size()); } @@ -83,11 +100,16 @@ }*/ + /** + * makes neg ex from classes, the pos ex belong to + * @param positiveSet + * @param resultLimit + */ public void makeNegativeExamplesFromParallelClasses(SortedSet<String> positiveSet, int resultLimit){ makeNegativeExamplesFromClassesOfInstances(positiveSet, resultLimit); } - public void makeNegativeExamplesFromClassesOfInstances(SortedSet<String> positiveSet, + private void makeNegativeExamplesFromClassesOfInstances(SortedSet<String> positiveSet, int resultLimit) { logger.debug("making neg Examples from parallel classes"); SortedSet<String> classes = new TreeSet<String>(); @@ -115,6 +137,11 @@ } + /** + * if pos ex derive from one class, then neg ex are taken from a superclass + * @param concept + * @param resultLimit + */ public void makeNegativeExamplesFromSuperClasses(String concept, int resultLimit) { concept = concept.replaceAll("\"", ""); Modified: trunk/src/dl-learner/org/dllearner/utilities/examples/AutomaticPositiveExampleFinderSPARQL.java =================================================================== --- trunk/src/dl-learner/org/dllearner/utilities/examples/AutomaticPositiveExampleFinderSPARQL.java 2008-05-26 12:02:10 UTC (rev 928) +++ trunk/src/dl-learner/org/dllearner/utilities/examples/AutomaticPositiveExampleFinderSPARQL.java 2008-05-26 14:48:00 UTC (rev 929) @@ -9,7 +9,7 @@ public class AutomaticPositiveExampleFinderSPARQL { - //CHECK + // LOGGER: ComponentManager private static Logger logger = Logger .getLogger(ComponentManager.class); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ku...@us...> - 2008-05-26 12:02:42
|
Revision: 928 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=928&view=rev Author: kurzum Date: 2008-05-26 05:02:10 -0700 (Mon, 26 May 2008) Log Message: ----------- moved sparqltasks to sparql Modified Paths: -------------- trunk/src/dl-learner/org/dllearner/scripts/SKOS7030.java trunk/src/dl-learner/org/dllearner/test/SparqlEndpointTest.java trunk/src/dl-learner/org/dllearner/utilities/examples/AutomaticPositiveExampleFinderSPARQL.java Added Paths: ----------- trunk/src/dl-learner/org/dllearner/kb/sparql/SPARQLTasks.java trunk/src/dl-learner/org/dllearner/utilities/examples/AutomaticNegativeExampleFinderSPARQL.java Removed Paths: ------------- trunk/src/dl-learner/org/dllearner/utilities/examples/AutomaticNegativeExampleFinderSPARQL.java trunk/src/dl-learner/org/dllearner/utilities/examples/SPARQLTasks.java Copied: trunk/src/dl-learner/org/dllearner/kb/sparql/SPARQLTasks.java (from rev 927, trunk/src/dl-learner/org/dllearner/utilities/examples/SPARQLTasks.java) =================================================================== --- trunk/src/dl-learner/org/dllearner/kb/sparql/SPARQLTasks.java (rev 0) +++ trunk/src/dl-learner/org/dllearner/kb/sparql/SPARQLTasks.java 2008-05-26 12:02:10 UTC (rev 928) @@ -0,0 +1,273 @@ +package org.dllearner.kb.sparql; + +import java.util.List; +import java.util.SortedSet; +import java.util.TreeSet; + +import org.apache.log4j.Logger; + +import com.hp.hpl.jena.query.ResultSet; +import com.hp.hpl.jena.query.ResultSetFormatter; +import com.hp.hpl.jena.sparql.core.ResultBinding; + +public class SPARQLTasks { + + //CHECK + @SuppressWarnings("unused") + private static Logger logger = Logger + .getLogger(SPARQLTasks.class); + private Cache c; + private SparqlEndpoint se; + + public SPARQLTasks(Cache c, SparqlEndpoint se) { + super(); + this.c = c; + this.se = se; + } + + public SPARQLTasks( SparqlEndpoint se) { + super(); + this.c = null; + this.se = se; + } + + + + + /** + * QUALITY: doesn't seem optimal, check! + * get all superclasses up to a certain depth + * 1 means direct superclasses + * depth + * @param superClasses + * @param depth + * @return + */ + public SortedSet<String> getSuperClasses(String oneClass, int depth) { + SortedSet<String> superClasses = new TreeSet<String>(); + superClasses.add(oneClass); + SortedSet<String> ret = new TreeSet<String>(); + SortedSet<String> tmpset = new TreeSet<String>(); + //ret.addAll(superClasses); + //logger.debug(superClasses); + + + String SPARQLquery = ""; + for (; depth != 0 ; depth--) { + for (String oneSuperClass : superClasses) { + + //tmp = oneSuperClass.replace("\"", ""); + SPARQLquery = "SELECT * WHERE { \n" + "<" + oneSuperClass + "> " + + "<http://www.w3.org/2000/01/rdf-schema#subClassOf> ?superclass. \n" + + "}"; + + tmpset.addAll(queryAsSet(SPARQLquery, "superclass")); + + } + ret.addAll(tmpset); + //logger.debug(ret); + superClasses.clear(); + superClasses.addAll(tmpset); + tmpset.clear(); + } + //logger.debug(concept); + //logger.debug(query); + return ret; + } + + + + + /** + * QUALITY: buggy because role doesn't work sometimes + * get subject with fixed role and object + * @param role + * @param object + * @param resultLimit + * @return + */ + public SortedSet<String> retrieveDISTINCTSubjectsForRoleAndObject(String role, String object,int resultLimit) { + String SPARQLquery = + "SELECT DISTINCT * WHERE { \n " + + "?subject " + + "<"+role+"> " + + "<" + object + "> \n" + + "} "+limit(resultLimit); + + return queryAsSet(SPARQLquery, "subject"); + } + + public SortedSet<String> retrieveObjectsForSubjectAndRole(String subject, String role, int resultLimit) { + String SPARQLquery = + "SELECT DISTINCT * WHERE { \n " + + "<" +subject+ "> "+ + "<"+role+"> " + + " ?object \n" + + "} LIMIT "+resultLimit; + + return queryAsSet(SPARQLquery, "object"); + } + + /** + * all instances for a SKOS concept + * @param SKOSconcept + * @param resultLimit + * @return + */ + public SortedSet<String> retrieveInstancesForSKOSConcept(String SKOSconcept,int resultLimit) { + return queryPatternAsSet("?subject", "?predicate", "<"+SKOSconcept+">", "subject", resultLimit); + //return retrieveDISTINCTSubjectsForRoleAndObject("http://www.w3.org/2004/02/skos/core#subject", + } + + + + /** + * get all instances for a concept + * @param conceptKBSyntax + * @param sparqlResultLimit + * @return + */ + public SortedSet<String> retrieveInstancesForConcept (String conceptKBSyntax,int sparqlResultLimit) { + + String SPARQLquery = ""; + try{ + SPARQLquery = SparqlQueryDescriptionConvertVisitor + .getSparqlQuery(conceptKBSyntax,sparqlResultLimit); + }catch (Exception e) {e.printStackTrace();} + return queryAsSet(SPARQLquery, "subject"); + } + + + + + /** + * get all direct Classes of an instance + * @param instance + * @param resultLimit + * @return + */ + public SortedSet<String> getClassesForInstance(String instance, int resultLimit) { + + String SPARQLquery = "SELECT ?subject WHERE { \n " + + "<" + instance + ">"+ + " a " + + "?subject " + + "\n" + + "} "+limit(resultLimit); + + return queryAsSet(SPARQLquery, "subject"); + } + + + + public SortedSet<String> getDomain(String role,int resultLimit){ + + String SPARQLquery = "" + + "SELECT DISTINCT ?domain " + + "WHERE { \n" + + "?domain <" + role + "> " + " ?o. \n" + + "?domain a []\n." + + "FILTER (!isLiteral(?domain))." + + "}\n" + limit(resultLimit); + + return queryAsSet(SPARQLquery, "domain"); + + + } + + + public SortedSet<String> getRange(String role,int resultLimit){ + + String SPARQLquery = "" + + "SELECT DISTINCT ?range " + + "WHERE { \n" + + "?s <" + role + "> " + " ?range. \n" + + "?range a [].\n" + + "FILTER (!isLiteral(?range))." + + "}\n" + limit(resultLimit); + + return queryAsSet(SPARQLquery, "range"); + + } + + + + /** + * query a pattern with a standard SPARQL query + * usage (?subject, ?predicate, <http:something> , subject ) + * @param subject + * @param predicate + * @param object + * @param var + * @return + */ + public SortedSet<String> queryPatternAsSet(String subject, String predicate, String object, String var, int resultLimit){ + String SPARQLquery = "SELECT ?subject WHERE { \n " + + " " + subject + + " " + predicate + + " " + object + + " \n" + + "} "+limit(resultLimit); + return queryAsSet( SPARQLquery, var); + } + + + /** + * little higher level, executes query ,returns all resources for a variable + * @param SPARQLquery + * @param var + * @return + */ + public SortedSet<String> queryAsSet(String SPARQLquery, String var){ + ResultSet rs = null; + try { + String JSON = query(SPARQLquery); + rs = SparqlQuery.JSONtoResultSet(JSON); + + } catch (Exception e) { + e.printStackTrace(); + } + return getStringListForVariable(rs,var); + } + + + /** + * lowlevel, executes query returns JSON + * @param SPARQLquery + * @return + */ + public String query(String SPARQLquery){ + if(c==null){ + SparqlQuery sq = new SparqlQuery(SPARQLquery,se); + sq.extraDebugInfo+=se.getURL(); + sq.send(); + String JSON = sq.getResult(); + return JSON; + }else{ + return c.executeSparqlQuery(new SparqlQuery(SPARQLquery,se)); + } + + } + + private String limit(int resultLimit){ + if(resultLimit>0)return " LIMIT "+resultLimit; + return ""; + } + + + public static SortedSet<String> getStringListForVariable(ResultSet rs, String var){ + SortedSet<String> result = new TreeSet<String>(); + + //String s=ResultSetFormatter.asXMLString(this.rs); + @SuppressWarnings("unchecked") + List<ResultBinding> l = ResultSetFormatter.toList(rs); + + for (ResultBinding resultBinding : l) { + result.add(resultBinding.get(var).toString()); + } + + return result; + + } + +} Modified: trunk/src/dl-learner/org/dllearner/scripts/SKOS7030.java =================================================================== --- trunk/src/dl-learner/org/dllearner/scripts/SKOS7030.java 2008-05-26 10:37:56 UTC (rev 927) +++ trunk/src/dl-learner/org/dllearner/scripts/SKOS7030.java 2008-05-26 12:02:10 UTC (rev 928) @@ -20,6 +20,7 @@ import org.dllearner.core.ReasoningService; import org.dllearner.core.owl.Description; import org.dllearner.kb.sparql.Cache; +import org.dllearner.kb.sparql.SPARQLTasks; import org.dllearner.kb.sparql.SparqlEndpoint; import org.dllearner.kb.sparql.SparqlKnowledgeSource; import org.dllearner.learningproblems.PosNegDefinitionLP; @@ -29,7 +30,6 @@ import org.dllearner.utilities.datastructures.SetManipulation; import org.dllearner.utilities.examples.AutomaticNegativeExampleFinderSPARQL; import org.dllearner.utilities.examples.AutomaticPositiveExampleFinderSPARQL; -import org.dllearner.utilities.examples.SPARQLTasks; public class SKOS7030 { Modified: trunk/src/dl-learner/org/dllearner/test/SparqlEndpointTest.java =================================================================== --- trunk/src/dl-learner/org/dllearner/test/SparqlEndpointTest.java 2008-05-26 10:37:56 UTC (rev 927) +++ trunk/src/dl-learner/org/dllearner/test/SparqlEndpointTest.java 2008-05-26 12:02:10 UTC (rev 928) @@ -10,10 +10,10 @@ import org.apache.log4j.Level; import org.apache.log4j.Logger; import org.apache.log4j.SimpleLayout; +import org.dllearner.kb.sparql.SPARQLTasks; import org.dllearner.kb.sparql.SparqlEndpoint; import org.dllearner.kb.sparql.SparqlKnowledgeSource; import org.dllearner.utilities.JamonMonitorLogger; -import org.dllearner.utilities.examples.SPARQLTasks; import org.dllearner.utilities.statistics.SimpleClock; public class SparqlEndpointTest { Deleted: trunk/src/dl-learner/org/dllearner/utilities/examples/AutomaticNegativeExampleFinderSPARQL.java =================================================================== --- trunk/src/dl-learner/org/dllearner/utilities/examples/AutomaticNegativeExampleFinderSPARQL.java 2008-05-26 10:37:56 UTC (rev 927) +++ trunk/src/dl-learner/org/dllearner/utilities/examples/AutomaticNegativeExampleFinderSPARQL.java 2008-05-26 12:02:10 UTC (rev 928) @@ -1,152 +0,0 @@ -package org.dllearner.utilities.examples; - -import java.util.SortedSet; -import java.util.TreeSet; - -import org.apache.log4j.Logger; -import org.dllearner.core.ComponentManager; -import org.dllearner.utilities.datastructures.SetManipulation; - -public class AutomaticNegativeExampleFinderSPARQL { - - // CHECK - private static Logger logger = Logger.getLogger(ComponentManager.class); - - private SPARQLTasks sparqltasks; - - private SortedSet<String> fullPositiveSet; - - private SortedSet<String> fromRelated = new TreeSet<String>(); - private SortedSet<String> fromSuperclasses = new TreeSet<String>();; - private SortedSet<String> fromParallelClasses = new TreeSet<String>();; - private SortedSet<String> fromDomain = new TreeSet<String>();; - private SortedSet<String> fromRange = new TreeSet<String>();; - - static int poslimit = 10; - static int neglimit = 20; - - // CHECK separate posexamples and fullposset - public AutomaticNegativeExampleFinderSPARQL( - SortedSet<String> fullPositiveSet, - SPARQLTasks st) { - super(); - this.fullPositiveSet = fullPositiveSet; - this.sparqltasks = st; - - } - - - - public SortedSet<String> getNegativeExamples(int neglimit ) { - - SortedSet<String> negatives = new TreeSet<String>(); - negatives.addAll(fromParallelClasses); - negatives.addAll(fromRelated); - negatives.addAll(fromSuperclasses); - logger.debug("neg Example size before shrinking: " + negatives.size()); - negatives = SetManipulation.fuzzyShrink(negatives,neglimit); - logger.debug("neg Example size after shrinking: " + negatives.size()); - return negatives; - } - - // CHECK namespace - public void makeNegativeExamplesFromRelatedInstances(SortedSet<String> instances, - String namespace) { - logger.debug("making examples from related instances"); - for (String oneInstance : instances) { - makeNegativeExamplesFromRelatedInstances(oneInstance, namespace); - } - logger.debug("|-negExample size from related: " + fromRelated.size()); - } - - private void makeNegativeExamplesFromRelatedInstances(String oneInstance, String objectnamespace) { - // SortedSet<String> result = new TreeSet<String>(); - - String SPARQLquery = "SELECT * WHERE { \n" + "<" + oneInstance + "> " + "?p ?object. \n" - + "FILTER (REGEX(str(?object), '" + objectnamespace + "')).\n" + "}"; - - this.fromRelated.addAll(sparqltasks.queryAsSet(SPARQLquery, "object")); - this.fromRelated.removeAll(this.fullPositiveSet); - - } - - // QUALITY: keep a while may still be needed - /*public void dbpediaMakeNegativeExamplesFromRelatedInstances(String subject) { - // SortedSet<String> result = new TreeSet<String>(); - - String SPARQLquery = "SELECT * WHERE { \n" + "<" + subject + "> " + "?p ?o. \n" - + "FILTER (REGEX(str(?o), 'http://dbpedia.org/resource/')).\n" - + "FILTER (!REGEX(str(?p), 'http://www.w3.org/2004/02/skos'))\n" + "}"; - - this.fromRelated.addAll(sparqltasks.queryAsSet(SPARQLquery, "o")); - - }*/ - - public void makeNegativeExamplesFromParallelClasses(SortedSet<String> positiveSet, int resultLimit){ - makeNegativeExamplesFromClassesOfInstances(positiveSet, resultLimit); - } - - public void makeNegativeExamplesFromClassesOfInstances(SortedSet<String> positiveSet, - int resultLimit) { - logger.debug("making neg Examples from parallel classes"); - SortedSet<String> classes = new TreeSet<String>(); - // superClasses.add(concept.replace("\"", "")); - // logger.debug("before"+superClasses); - // superClasses = dbpediaGetSuperClasses( superClasses, 4); - // logger.debug("getting negExamples from "+superClasses.size()+" - // superclasses"); - - for (String instance : positiveSet) { - classes.addAll(sparqltasks.getClassesForInstance(instance, resultLimit)); - } - logger.debug("getting negExamples from " + classes.size() + " parallel classes"); - for (String oneClass : classes) { - logger.debug(oneClass); - // rsc = new - // JenaResultSetConvenience(queryConcept("\""+oneClass+"\"",limit)); - this.fromParallelClasses.addAll(sparqltasks.retrieveInstancesForConcept("\"" + oneClass - + "\"", resultLimit)); - - } - - this.fromParallelClasses.removeAll(this.fullPositiveSet); - logger.debug("|-neg Example size from parallelclass: " + fromParallelClasses.size()); - - } - - public void makeNegativeExamplesFromSuperClasses(String concept, int resultLimit) { - - concept = concept.replaceAll("\"", ""); - // superClasses.add(concept.replace("\"", "")); - // logger.debug("before"+superClasses); - SortedSet<String> superClasses = sparqltasks.getSuperClasses(concept, 4); - logger.debug("making neg Examples from " + superClasses.size() + " superclasses"); - - for (String oneSuperClass : superClasses) { - logger.debug(oneSuperClass); - this.fromSuperclasses.addAll(sparqltasks.retrieveInstancesForConcept("\"" - + oneSuperClass + "\"", resultLimit)); - - } - this.fromSuperclasses.removeAll(this.fullPositiveSet); - logger.debug("|-neg Example from superclass: " + fromSuperclasses.size()); - } - - @SuppressWarnings("unused") - private void makeNegativeExamplesFromDomain(String role, int resultLimit){ - logger.debug("making Negative Examples from Domain of : "+role); - this.fromDomain.addAll(sparqltasks.getDomain(role, resultLimit)); - this.fromDomain.removeAll(this.fullPositiveSet); - logger.debug("|-neg Example size from Domain: "+this.fromDomain.size()); - } - - @SuppressWarnings("unused") - private void makeNegativeExamplesFromRange(String role, int resultLimit){ - logger.debug("making Negative Examples from Range of : "+role); - this.fromRange.addAll(sparqltasks.getRange(role, resultLimit)); - this.fromRange.removeAll(this.fullPositiveSet); - logger.debug("|-neg Example size from Range: "+this.fromRange.size()); - } - - -} Added: trunk/src/dl-learner/org/dllearner/utilities/examples/AutomaticNegativeExampleFinderSPARQL.java =================================================================== --- trunk/src/dl-learner/org/dllearner/utilities/examples/AutomaticNegativeExampleFinderSPARQL.java (rev 0) +++ trunk/src/dl-learner/org/dllearner/utilities/examples/AutomaticNegativeExampleFinderSPARQL.java 2008-05-26 12:02:10 UTC (rev 928) @@ -0,0 +1,153 @@ +package org.dllearner.utilities.examples; + +import java.util.SortedSet; +import java.util.TreeSet; + +import org.apache.log4j.Logger; +import org.dllearner.core.ComponentManager; +import org.dllearner.kb.sparql.SPARQLTasks; +import org.dllearner.utilities.datastructures.SetManipulation; + +public class AutomaticNegativeExampleFinderSPARQL { + + // CHECK + private static Logger logger = Logger.getLogger(ComponentManager.class); + + private SPARQLTasks sparqltasks; + + private SortedSet<String> fullPositiveSet; + + private SortedSet<String> fromRelated = new TreeSet<String>(); + private SortedSet<String> fromSuperclasses = new TreeSet<String>();; + private SortedSet<String> fromParallelClasses = new TreeSet<String>();; + private SortedSet<String> fromDomain = new TreeSet<String>();; + private SortedSet<String> fromRange = new TreeSet<String>();; + + static int poslimit = 10; + static int neglimit = 20; + + // CHECK separate posexamples and fullposset + public AutomaticNegativeExampleFinderSPARQL( + SortedSet<String> fullPositiveSet, + SPARQLTasks st) { + super(); + this.fullPositiveSet = fullPositiveSet; + this.sparqltasks = st; + + } + + + + public SortedSet<String> getNegativeExamples(int neglimit ) { + + SortedSet<String> negatives = new TreeSet<String>(); + negatives.addAll(fromParallelClasses); + negatives.addAll(fromRelated); + negatives.addAll(fromSuperclasses); + logger.debug("neg Example size before shrinking: " + negatives.size()); + negatives = SetManipulation.fuzzyShrink(negatives,neglimit); + logger.debug("neg Example size after shrinking: " + negatives.size()); + return negatives; + } + + // CHECK namespace + public void makeNegativeExamplesFromRelatedInstances(SortedSet<String> instances, + String namespace) { + logger.debug("making examples from related instances"); + for (String oneInstance : instances) { + makeNegativeExamplesFromRelatedInstances(oneInstance, namespace); + } + logger.debug("|-negExample size from related: " + fromRelated.size()); + } + + private void makeNegativeExamplesFromRelatedInstances(String oneInstance, String objectnamespace) { + // SortedSet<String> result = new TreeSet<String>(); + + String SPARQLquery = "SELECT * WHERE { \n" + "<" + oneInstance + "> " + "?p ?object. \n" + + "FILTER (REGEX(str(?object), '" + objectnamespace + "')).\n" + "}"; + + this.fromRelated.addAll(sparqltasks.queryAsSet(SPARQLquery, "object")); + this.fromRelated.removeAll(this.fullPositiveSet); + + } + + // QUALITY: keep a while may still be needed + /*public void dbpediaMakeNegativeExamplesFromRelatedInstances(String subject) { + // SortedSet<String> result = new TreeSet<String>(); + + String SPARQLquery = "SELECT * WHERE { \n" + "<" + subject + "> " + "?p ?o. \n" + + "FILTER (REGEX(str(?o), 'http://dbpedia.org/resource/')).\n" + + "FILTER (!REGEX(str(?p), 'http://www.w3.org/2004/02/skos'))\n" + "}"; + + this.fromRelated.addAll(sparqltasks.queryAsSet(SPARQLquery, "o")); + + }*/ + + public void makeNegativeExamplesFromParallelClasses(SortedSet<String> positiveSet, int resultLimit){ + makeNegativeExamplesFromClassesOfInstances(positiveSet, resultLimit); + } + + public void makeNegativeExamplesFromClassesOfInstances(SortedSet<String> positiveSet, + int resultLimit) { + logger.debug("making neg Examples from parallel classes"); + SortedSet<String> classes = new TreeSet<String>(); + // superClasses.add(concept.replace("\"", "")); + // logger.debug("before"+superClasses); + // superClasses = dbpediaGetSuperClasses( superClasses, 4); + // logger.debug("getting negExamples from "+superClasses.size()+" + // superclasses"); + + for (String instance : positiveSet) { + classes.addAll(sparqltasks.getClassesForInstance(instance, resultLimit)); + } + logger.debug("getting negExamples from " + classes.size() + " parallel classes"); + for (String oneClass : classes) { + logger.debug(oneClass); + // rsc = new + // JenaResultSetConvenience(queryConcept("\""+oneClass+"\"",limit)); + this.fromParallelClasses.addAll(sparqltasks.retrieveInstancesForConcept("\"" + oneClass + + "\"", resultLimit)); + + } + + this.fromParallelClasses.removeAll(this.fullPositiveSet); + logger.debug("|-neg Example size from parallelclass: " + fromParallelClasses.size()); + + } + + public void makeNegativeExamplesFromSuperClasses(String concept, int resultLimit) { + + concept = concept.replaceAll("\"", ""); + // superClasses.add(concept.replace("\"", "")); + // logger.debug("before"+superClasses); + SortedSet<String> superClasses = sparqltasks.getSuperClasses(concept, 4); + logger.debug("making neg Examples from " + superClasses.size() + " superclasses"); + + for (String oneSuperClass : superClasses) { + logger.debug(oneSuperClass); + this.fromSuperclasses.addAll(sparqltasks.retrieveInstancesForConcept("\"" + + oneSuperClass + "\"", resultLimit)); + + } + this.fromSuperclasses.removeAll(this.fullPositiveSet); + logger.debug("|-neg Example from superclass: " + fromSuperclasses.size()); + } + + @SuppressWarnings("unused") + private void makeNegativeExamplesFromDomain(String role, int resultLimit){ + logger.debug("making Negative Examples from Domain of : "+role); + this.fromDomain.addAll(sparqltasks.getDomain(role, resultLimit)); + this.fromDomain.removeAll(this.fullPositiveSet); + logger.debug("|-neg Example size from Domain: "+this.fromDomain.size()); + } + + @SuppressWarnings("unused") + private void makeNegativeExamplesFromRange(String role, int resultLimit){ + logger.debug("making Negative Examples from Range of : "+role); + this.fromRange.addAll(sparqltasks.getRange(role, resultLimit)); + this.fromRange.removeAll(this.fullPositiveSet); + logger.debug("|-neg Example size from Range: "+this.fromRange.size()); + } + + +} Modified: trunk/src/dl-learner/org/dllearner/utilities/examples/AutomaticPositiveExampleFinderSPARQL.java =================================================================== --- trunk/src/dl-learner/org/dllearner/utilities/examples/AutomaticPositiveExampleFinderSPARQL.java 2008-05-26 10:37:56 UTC (rev 927) +++ trunk/src/dl-learner/org/dllearner/utilities/examples/AutomaticPositiveExampleFinderSPARQL.java 2008-05-26 12:02:10 UTC (rev 928) @@ -5,6 +5,7 @@ import org.apache.log4j.Logger; import org.dllearner.core.ComponentManager; +import org.dllearner.kb.sparql.SPARQLTasks; public class AutomaticPositiveExampleFinderSPARQL { Deleted: trunk/src/dl-learner/org/dllearner/utilities/examples/SPARQLTasks.java =================================================================== --- trunk/src/dl-learner/org/dllearner/utilities/examples/SPARQLTasks.java 2008-05-26 10:37:56 UTC (rev 927) +++ trunk/src/dl-learner/org/dllearner/utilities/examples/SPARQLTasks.java 2008-05-26 12:02:10 UTC (rev 928) @@ -1,277 +0,0 @@ -package org.dllearner.utilities.examples; - -import java.util.List; -import java.util.SortedSet; -import java.util.TreeSet; - -import org.apache.log4j.Logger; -import org.dllearner.kb.sparql.Cache; -import org.dllearner.kb.sparql.SparqlEndpoint; -import org.dllearner.kb.sparql.SparqlQuery; -import org.dllearner.kb.sparql.SparqlQueryDescriptionConvertVisitor; - -import com.hp.hpl.jena.query.ResultSet; -import com.hp.hpl.jena.query.ResultSetFormatter; -import com.hp.hpl.jena.sparql.core.ResultBinding; - -public class SPARQLTasks { - - //CHECK - @SuppressWarnings("unused") - private static Logger logger = Logger - .getLogger(SPARQLTasks.class); - private Cache c; - private SparqlEndpoint se; - - public SPARQLTasks(Cache c, SparqlEndpoint se) { - super(); - this.c = c; - this.se = se; - } - - public SPARQLTasks( SparqlEndpoint se) { - super(); - this.c = null; - this.se = se; - } - - - - - /** - * QUALITY: doesn't seem optimal, check! - * get all superclasses up to a certain depth - * 1 means direct superclasses - * depth - * @param superClasses - * @param depth - * @return - */ - public SortedSet<String> getSuperClasses(String oneClass, int depth) { - SortedSet<String> superClasses = new TreeSet<String>(); - superClasses.add(oneClass); - SortedSet<String> ret = new TreeSet<String>(); - SortedSet<String> tmpset = new TreeSet<String>(); - //ret.addAll(superClasses); - //logger.debug(superClasses); - - - String SPARQLquery = ""; - for (; depth != 0 ; depth--) { - for (String oneSuperClass : superClasses) { - - //tmp = oneSuperClass.replace("\"", ""); - SPARQLquery = "SELECT * WHERE { \n" + "<" + oneSuperClass + "> " - + "<http://www.w3.org/2000/01/rdf-schema#subClassOf> ?superclass. \n" - + "}"; - - tmpset.addAll(queryAsSet(SPARQLquery, "superclass")); - - } - ret.addAll(tmpset); - //logger.debug(ret); - superClasses.clear(); - superClasses.addAll(tmpset); - tmpset.clear(); - } - //logger.debug(concept); - //logger.debug(query); - return ret; - } - - - - - /** - * QUALITY: buggy because role doesn't work sometimes - * get subject with fixed role and object - * @param role - * @param object - * @param resultLimit - * @return - */ - public SortedSet<String> retrieveDISTINCTSubjectsForRoleAndObject(String role, String object,int resultLimit) { - String SPARQLquery = - "SELECT DISTINCT * WHERE { \n " + - "?subject " + - "<"+role+"> " + - "<" + object + "> \n" + - "} "+limit(resultLimit); - - return queryAsSet(SPARQLquery, "subject"); - } - - public SortedSet<String> retrieveObjectsForSubjectAndRole(String subject, String role, int resultLimit) { - String SPARQLquery = - "SELECT DISTINCT * WHERE { \n " + - "<" +subject+ "> "+ - "<"+role+"> " + - " ?object \n" + - "} LIMIT "+resultLimit; - - return queryAsSet(SPARQLquery, "object"); - } - - /** - * all instances for a SKOS concept - * @param SKOSconcept - * @param resultLimit - * @return - */ - public SortedSet<String> retrieveInstancesForSKOSConcept(String SKOSconcept,int resultLimit) { - return queryPatternAsSet("?subject", "?predicate", "<"+SKOSconcept+">", "subject", resultLimit); - //return retrieveDISTINCTSubjectsForRoleAndObject("http://www.w3.org/2004/02/skos/core#subject", - } - - - - /** - * get all instances for a concept - * @param conceptKBSyntax - * @param sparqlResultLimit - * @return - */ - public SortedSet<String> retrieveInstancesForConcept (String conceptKBSyntax,int sparqlResultLimit) { - - String SPARQLquery = ""; - try{ - SPARQLquery = SparqlQueryDescriptionConvertVisitor - .getSparqlQuery(conceptKBSyntax,sparqlResultLimit); - }catch (Exception e) {e.printStackTrace();} - return queryAsSet(SPARQLquery, "subject"); - } - - - - - /** - * get all direct Classes of an instance - * @param instance - * @param resultLimit - * @return - */ - public SortedSet<String> getClassesForInstance(String instance, int resultLimit) { - - String SPARQLquery = "SELECT ?subject WHERE { \n " + - "<" + instance + ">"+ - " a " + - "?subject " + - "\n" + - "} "+limit(resultLimit); - - return queryAsSet(SPARQLquery, "subject"); - } - - - - public SortedSet<String> getDomain(String role,int resultLimit){ - - String SPARQLquery = "" + - "SELECT DISTINCT ?domain " + - "WHERE { \n" + - "?domain <" + role + "> " + " ?o. \n" + - "?domain a []\n." + - "FILTER (!isLiteral(?domain))." + - "}\n" + limit(resultLimit); - - return queryAsSet(SPARQLquery, "domain"); - - - } - - - public SortedSet<String> getRange(String role,int resultLimit){ - - String SPARQLquery = "" + - "SELECT DISTINCT ?range " + - "WHERE { \n" + - "?s <" + role + "> " + " ?range. \n" + - "?range a [].\n" + - "FILTER (!isLiteral(?range))." + - "}\n" + limit(resultLimit); - - return queryAsSet(SPARQLquery, "range"); - - } - - - - /** - * query a pattern with a standard SPARQL query - * usage (?subject, ?predicate, <http:something> , subject ) - * @param subject - * @param predicate - * @param object - * @param var - * @return - */ - public SortedSet<String> queryPatternAsSet(String subject, String predicate, String object, String var, int resultLimit){ - String SPARQLquery = "SELECT ?subject WHERE { \n " + - " " + subject + - " " + predicate + - " " + object + - " \n" + - "} "+limit(resultLimit); - return queryAsSet( SPARQLquery, var); - } - - - /** - * little higher level, executes query ,returns all resources for a variable - * @param SPARQLquery - * @param var - * @return - */ - public SortedSet<String> queryAsSet(String SPARQLquery, String var){ - ResultSet rs = null; - try { - String JSON = query(SPARQLquery); - rs = SparqlQuery.JSONtoResultSet(JSON); - - } catch (Exception e) { - e.printStackTrace(); - } - return getStringListForVariable(rs,var); - } - - - /** - * lowlevel, executes query returns JSON - * @param SPARQLquery - * @return - */ - public String query(String SPARQLquery){ - if(c==null){ - SparqlQuery sq = new SparqlQuery(SPARQLquery,se); - sq.extraDebugInfo+=se.getURL(); - sq.send(); - String JSON = sq.getResult(); - return JSON; - }else{ - return c.executeSparqlQuery(new SparqlQuery(SPARQLquery,se)); - } - - } - - private String limit(int resultLimit){ - if(resultLimit>0)return " LIMIT "+resultLimit; - return ""; - } - - - public static SortedSet<String> getStringListForVariable(ResultSet rs, String var){ - SortedSet<String> result = new TreeSet<String>(); - - //String s=ResultSetFormatter.asXMLString(this.rs); - @SuppressWarnings("unchecked") - List<ResultBinding> l = ResultSetFormatter.toList(rs); - - for (ResultBinding resultBinding : l) { - result.add(resultBinding.get(var).toString()); - } - - return result; - - } - -} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |