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: <ku...@us...> - 2008-04-21 14:33:26
|
Revision: 802 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=802&view=rev Author: kurzum Date: 2008-04-21 07:33:06 -0700 (Mon, 21 Apr 2008) Log Message: ----------- added more test cases, added printflag Modified Paths: -------------- trunk/src/dl-learner/org/dllearner/kb/sparql/SparqlQueryDescriptionConvertVisitor.java Modified: trunk/src/dl-learner/org/dllearner/kb/sparql/SparqlQueryDescriptionConvertVisitor.java =================================================================== --- trunk/src/dl-learner/org/dllearner/kb/sparql/SparqlQueryDescriptionConvertVisitor.java 2008-04-21 07:06:53 UTC (rev 801) +++ trunk/src/dl-learner/org/dllearner/kb/sparql/SparqlQueryDescriptionConvertVisitor.java 2008-04-21 14:33:06 UTC (rev 802) @@ -1,7 +1,10 @@ package org.dllearner.kb.sparql; +import java.util.HashMap; +import java.util.SortedSet; import java.util.Stack; +import java.util.TreeSet; import org.dllearner.algorithms.gp.ADC; import org.dllearner.core.owl.DatatypeExactCardinalityRestriction; @@ -34,6 +37,8 @@ */ public class SparqlQueryDescriptionConvertVisitor implements DescriptionVisitor{ + public boolean debug_flag=false; + private Stack<String> stack = new Stack<String>(); private String query=""; @@ -75,10 +80,31 @@ */ public static void main(String[] args) { try { - String d = "EXISTS \"http://dbpedia.org/property/disambiguates\".TOP"; - String query = SparqlQueryDescriptionConvertVisitor.getSparqlQuery(d); - System.out.println(d); - System.out.println(query); + SortedSet<String> s = new TreeSet<String>(); + HashMap<String,String> result = new HashMap<String,String>(); + String conj="(\"http://dbpedia.org/class/yago/Person100007846\" AND \"http://dbpedia.org/class/yago/Head110162991\")"; + + + s.add("EXISTS \"http://dbpedia.org/property/disambiguates\".TOP"); + s.add("EXISTS \"http://dbpedia.org/property/successor\".\"http://dbpedia.org/class/yago/Person100007846\""); + s.add("EXISTS \"http://dbpedia.org/property/successor\"."+conj); + s.add("ALL \"http://dbpedia.org/property/disambiguates\".TOP"); + s.add("ALL \"http://dbpedia.org/property/successor\".\"http://dbpedia.org/class/yago/Person100007846\""); + s.add("\"http://dbpedia.org/class/yago/Person100007846\""); + s.add(conj); + s.add("(\"http://dbpedia.org/class/yago/Person100007846\" OR \"http://dbpedia.org/class/yago/Head110162991\")"); + s.add("NOT \"http://dbpedia.org/class/yago/Person100007846\""); + + for (String kbsyntax : s) { + result.put(kbsyntax,SparqlQueryDescriptionConvertVisitor.getSparqlQuery(kbsyntax)); + } + System.out.println("************************"); + for (String string : result.keySet()) { + System.out.println("KBSyntayString: "+string); + System.out.println("Query:\n"+result.get(string)); + System.out.println("************************"); + } + System.out.println("Finished"); } catch (ParseException e) { // TODO Auto-generated catch block e.printStackTrace(); @@ -89,42 +115,42 @@ * @see org.dllearner.core.owl.DescriptionVisitor#visit(org.dllearner.core.owl.Negation) */ public void visit(Negation description) { - System.out.println("Negation"); + print("Negation"); } /* (non-Javadoc) * @see org.dllearner.core.owl.DescriptionVisitor#visit(org.dllearner.core.owl.ObjectAllRestriction) */ public void visit(ObjectAllRestriction description) { - System.out.println("ObjectAllRestriction"); + print("ObjectAllRestriction"); } /* (non-Javadoc) * @see org.dllearner.core.owl.DescriptionVisitor#visit(org.dllearner.core.owl.ObjectSomeRestriction) */ public void visit(ObjectSomeRestriction description) { - System.out.println("ObjectSomeRestriction"); + print("ObjectSomeRestriction"); query+="?"+stack.peek()+" <"+description.getRole()+"> ?object"+currentObject+"."; stack.push("object"+currentObject); currentObject++; description.getChild(0).accept(this); stack.pop(); - System.out.println(description.getRole()); - System.out.println(description.getChild(0)); + print(description.getRole().toString()); + print(description.getChild(0).toString()); } /* (non-Javadoc) * @see org.dllearner.core.owl.DescriptionVisitor#visit(org.dllearner.core.owl.Nothing) */ public void visit(Nothing description) { - System.out.println("Nothing"); + print("Nothing"); } /* (non-Javadoc) * @see org.dllearner.core.owl.DescriptionVisitor#visit(org.dllearner.core.owl.Thing) */ public void visit(Thing description) { - System.out.println("Thing"); + print("Thing"); } @@ -132,7 +158,7 @@ * @see org.dllearner.core.owl.DescriptionVisitor#visit(org.dllearner.core.owl.Intersection) */ public void visit(Intersection description) { - System.out.println("Intersection"); + print("Intersection"); description.getChild(0).accept(this); query+="."; description.getChild(1).accept(this); @@ -143,7 +169,7 @@ * @see org.dllearner.core.owl.DescriptionVisitor#visit(org.dllearner.core.owl.Union) */ public void visit(Union description) { - System.out.println("Union"); + print("Union"); query+="{"; description.getChild(0).accept(this); query+="} UNION {"; @@ -155,42 +181,42 @@ * @see org.dllearner.core.owl.DescriptionVisitor#visit(org.dllearner.core.owl.ObjectMinCardinalityRestriction) */ public void visit(ObjectMinCardinalityRestriction description) { - System.out.println("ObjectMinCardinalityRestriction"); + print("ObjectMinCardinalityRestriction"); } /* (non-Javadoc) * @see org.dllearner.core.owl.DescriptionVisitor#visit(org.dllearner.core.owl.ObjectExactCardinalityRestriction) */ public void visit(ObjectExactCardinalityRestriction description) { - System.out.println("ObjectExactCardinalityRestriction"); + print("ObjectExactCardinalityRestriction"); } /* (non-Javadoc) * @see org.dllearner.core.owl.DescriptionVisitor#visit(org.dllearner.core.owl.ObjectMaxCardinalityRestriction) */ public void visit(ObjectMaxCardinalityRestriction description) { - System.out.println("ObjectMaxCardinalityRestriction"); + print("ObjectMaxCardinalityRestriction"); } /* (non-Javadoc) * @see org.dllearner.core.owl.DescriptionVisitor#visit(org.dllearner.core.owl.ObjectValueRestriction) */ public void visit(ObjectValueRestriction description) { - System.out.println("ObjectValueRestriction"); + print("ObjectValueRestriction"); } /* (non-Javadoc) * @see org.dllearner.core.owl.DescriptionVisitor#visit(org.dllearner.core.owl.DatatypeValueRestriction) */ public void visit(DatatypeValueRestriction description) { - System.out.println("DatatypeValueRestriction"); + print("DatatypeValueRestriction"); } /* (non-Javadoc) * @see org.dllearner.core.owl.DescriptionVisitor#visit(org.dllearner.core.owl.NamedClass) */ public void visit(NamedClass description) { - System.out.println("NamedClass"); + print("NamedClass"); query+="?"+stack.peek()+" a <"+description.getName()+">"; } @@ -198,34 +224,44 @@ * @see org.dllearner.core.owl.DescriptionVisitor#visit(org.dllearner.algorithms.gp.ADC) */ public void visit(ADC description) { - System.out.println("ADC"); + print("ADC"); } /* (non-Javadoc) * @see org.dllearner.core.owl.DescriptionVisitor#visit(org.dllearner.core.owl.DatatypeMinCardinalityRestriction) */ public void visit(DatatypeMinCardinalityRestriction description) { - System.out.println("DatatypeMinCardinalityRestriction"); + print("DatatypeMinCardinalityRestriction"); } /* (non-Javadoc) * @see org.dllearner.core.owl.DescriptionVisitor#visit(org.dllearner.core.owl.DatatypeExactCardinalityRestriction) */ public void visit(DatatypeExactCardinalityRestriction description) { - System.out.println("DatatypeExactCardinalityRestriction"); + print("DatatypeExactCardinalityRestriction"); } /* (non-Javadoc) * @see org.dllearner.core.owl.DescriptionVisitor#visit(org.dllearner.core.owl.DatatypeMaxCardinalityRestriction) */ public void visit(DatatypeMaxCardinalityRestriction description) { - System.out.println("DatatypeMaxCardinalityRestriction"); + print("DatatypeMaxCardinalityRestriction"); } /* (non-Javadoc) * @see org.dllearner.core.owl.DescriptionVisitor#visit(org.dllearner.core.owl.DatatypeSomeRestriction) */ public void visit(DatatypeSomeRestriction description) { - System.out.println("DatatypeSomeRestriction"); + print("DatatypeSomeRestriction"); } + + /** + * TODO should be replaced by logger.debug or sth like that + * @param str + */ + public void print(String str){ + if(debug_flag)System.out.println(str); + } + + } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jen...@us...> - 2008-04-21 07:07:20
|
Revision: 801 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=801&view=rev Author: jenslehmann Date: 2008-04-21 00:06:53 -0700 (Mon, 21 Apr 2008) Log Message: ----------- - added Manchester OWL syntax parser based on OWL API 2.2.0 - fixed all warnings Modified Paths: -------------- trunk/src/dl-learner/org/dllearner/examples/KRK.java trunk/src/dl-learner/org/dllearner/server/DLLearnerWS.java trunk/src/dl-learner/org/dllearner/tools/ore/ColorListCellRenderer.java trunk/src/dl-learner/org/dllearner/tools/ore/ColumnListCellRenderer.java trunk/src/dl-learner/org/dllearner/tools/ore/ConceptPanel.java trunk/src/dl-learner/org/dllearner/tools/ore/IntroductionPanel.java trunk/src/dl-learner/org/dllearner/tools/ore/KnowledgeSourcePanel.java trunk/src/dl-learner/org/dllearner/tools/ore/LearningPanel.java trunk/src/dl-learner/org/dllearner/tools/ore/LeftPanel.java trunk/src/dl-learner/org/dllearner/tools/ore/WizardPanelNotFoundException.java trunk/src/dl-learner/org/dllearner/tools/protege/ProtegePlugin.java trunk/src/dl-learner/org/dllearner/tools/protege/SuggestEquivalentClassButton.java trunk/src/dl-learner/org/dllearner/tools/protege/SuggestEquivalentClassView.java trunk/src/dl-learner/org/dllearner/utilities/OntologyCloserOWLAPI.java Added Paths: ----------- trunk/src/dl-learner/org/dllearner/utilities/ManchesterOWLSyntaxParser.java Modified: trunk/src/dl-learner/org/dllearner/examples/KRK.java =================================================================== --- trunk/src/dl-learner/org/dllearner/examples/KRK.java 2008-04-21 06:44:04 UTC (rev 800) +++ trunk/src/dl-learner/org/dllearner/examples/KRK.java 2008-04-21 07:06:53 UTC (rev 801) @@ -130,7 +130,7 @@ + "."); } - // Datei \xF6ffnen + // Datei �ffnen BufferedReader in = null; try { in = new BufferedReader(new FileReader(fileIn)); @@ -155,7 +155,7 @@ try { String line = ""; String[] ar = new String[6]; - String currentclass=""; +// String currentclass=""; int x = 0; while ((line = in.readLine()) != null) { @@ -164,7 +164,7 @@ System.out.println("Currently at line" + x); ar = tokenize(line); - currentclass = ar[6]; +// currentclass = ar[6]; gameind = getIndividual("game" + x); wkingind = getIndividual("wking_" + ar[0] + ar[1] + "_" + x); Modified: trunk/src/dl-learner/org/dllearner/server/DLLearnerWS.java =================================================================== --- trunk/src/dl-learner/org/dllearner/server/DLLearnerWS.java 2008-04-21 06:44:04 UTC (rev 800) +++ trunk/src/dl-learner/org/dllearner/server/DLLearnerWS.java 2008-04-21 07:06:53 UTC (rev 801) @@ -592,7 +592,7 @@ @WebMethod public void SparqlRetrievalThreaded(int id, int componentID, String conceptString) throws ClientNotKnownException, ParseException { - ClientState state = getState(id); +// ClientState state = getState(id); // call parser to parse concept String sparqlQuery = SparqlQueryDescriptionConvertVisitor.getSparqlQuery(conceptString); sparqlQueryThreaded(id, componentID,sparqlQuery); Modified: trunk/src/dl-learner/org/dllearner/tools/ore/ColorListCellRenderer.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/ore/ColorListCellRenderer.java 2008-04-21 06:44:04 UTC (rev 800) +++ trunk/src/dl-learner/org/dllearner/tools/ore/ColorListCellRenderer.java 2008-04-21 07:06:53 UTC (rev 801) @@ -9,6 +9,8 @@ public class ColorListCellRenderer extends JLabel implements ListCellRenderer { + private static final long serialVersionUID = -7592805113197759247L; + public ColorListCellRenderer() { setOpaque(true); } Modified: trunk/src/dl-learner/org/dllearner/tools/ore/ColumnListCellRenderer.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/ore/ColumnListCellRenderer.java 2008-04-21 06:44:04 UTC (rev 800) +++ trunk/src/dl-learner/org/dllearner/tools/ore/ColumnListCellRenderer.java 2008-04-21 07:06:53 UTC (rev 801) @@ -13,6 +13,7 @@ public class ColumnListCellRenderer extends JPanel implements ListCellRenderer { + private static final long serialVersionUID = 3024913291199515567L; private ORE ore; Modified: trunk/src/dl-learner/org/dllearner/tools/ore/ConceptPanel.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/ore/ConceptPanel.java 2008-04-21 06:44:04 UTC (rev 800) +++ trunk/src/dl-learner/org/dllearner/tools/ore/ConceptPanel.java 2008-04-21 07:06:53 UTC (rev 801) @@ -19,8 +19,8 @@ public class ConceptPanel extends JPanel{ + private static final long serialVersionUID = 3026319637264844550L; - private javax.swing.JList conceptList; private JPanel contentPanel; Modified: trunk/src/dl-learner/org/dllearner/tools/ore/IntroductionPanel.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/ore/IntroductionPanel.java 2008-04-21 06:44:04 UTC (rev 800) +++ trunk/src/dl-learner/org/dllearner/tools/ore/IntroductionPanel.java 2008-04-21 07:06:53 UTC (rev 801) @@ -15,6 +15,7 @@ public class IntroductionPanel extends JPanel { + private static final long serialVersionUID = 7184544803724152044L; private JTextArea instructionsField; private JScrollPane jScrollPane1; Modified: trunk/src/dl-learner/org/dllearner/tools/ore/KnowledgeSourcePanel.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/ore/KnowledgeSourcePanel.java 2008-04-21 06:44:04 UTC (rev 800) +++ trunk/src/dl-learner/org/dllearner/tools/ore/KnowledgeSourcePanel.java 2008-04-21 07:06:53 UTC (rev 801) @@ -12,7 +12,7 @@ public class KnowledgeSourcePanel extends JPanel{ - + private static final long serialVersionUID = -3997200565180270088L; private javax.swing.JTextField fileURL; private javax.swing.JButton browseButton; Modified: trunk/src/dl-learner/org/dllearner/tools/ore/LearningPanel.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/ore/LearningPanel.java 2008-04-21 06:44:04 UTC (rev 800) +++ trunk/src/dl-learner/org/dllearner/tools/ore/LearningPanel.java 2008-04-21 07:06:53 UTC (rev 801) @@ -24,6 +24,7 @@ public class LearningPanel extends JPanel{ + private static final long serialVersionUID = -7411197973240429632L; private JPanel contentPanel; Modified: trunk/src/dl-learner/org/dllearner/tools/ore/LeftPanel.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/ore/LeftPanel.java 2008-04-21 06:44:04 UTC (rev 800) +++ trunk/src/dl-learner/org/dllearner/tools/ore/LeftPanel.java 2008-04-21 07:06:53 UTC (rev 801) @@ -10,6 +10,7 @@ public class LeftPanel extends JPanel{ + private static final long serialVersionUID = -1205252523136710091L; private JLabel[] jLabel; public LeftPanel(int i){ Modified: trunk/src/dl-learner/org/dllearner/tools/ore/WizardPanelNotFoundException.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/ore/WizardPanelNotFoundException.java 2008-04-21 06:44:04 UTC (rev 800) +++ trunk/src/dl-learner/org/dllearner/tools/ore/WizardPanelNotFoundException.java 2008-04-21 07:06:53 UTC (rev 801) @@ -4,7 +4,9 @@ public class WizardPanelNotFoundException extends RuntimeException { - public WizardPanelNotFoundException() { + private static final long serialVersionUID = -5211930098094599993L; + + public WizardPanelNotFoundException() { super(); } Modified: trunk/src/dl-learner/org/dllearner/tools/protege/ProtegePlugin.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/protege/ProtegePlugin.java 2008-04-21 06:44:04 UTC (rev 800) +++ trunk/src/dl-learner/org/dllearner/tools/protege/ProtegePlugin.java 2008-04-21 07:06:53 UTC (rev 801) @@ -11,7 +11,8 @@ { private static final long serialVersionUID = 728362819273927L; private OWLFrameList2<OWLClass> list; - + + @Override public void initialiseClassView() throws Exception { list = new OWLFrameList2<OWLClass>(getOWLEditorKit(), new ButtonList(getOWLEditorKit())); setLayout(new BorderLayout()); @@ -21,13 +22,13 @@ } - + @Override protected OWLClass updateView(OWLClass selectedClass) { list.setRootObject(selectedClass); return selectedClass; } - + @Override public void disposeView() { list.dispose(); } Modified: trunk/src/dl-learner/org/dllearner/tools/protege/SuggestEquivalentClassButton.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/protege/SuggestEquivalentClassButton.java 2008-04-21 06:44:04 UTC (rev 800) +++ trunk/src/dl-learner/org/dllearner/tools/protege/SuggestEquivalentClassButton.java 2008-04-21 07:06:53 UTC (rev 801) @@ -25,17 +25,18 @@ this.frame = frame; } + @Override protected void clear() { } - + @Override protected void refill(OWLOntology ontology) { } - + @Override protected void refillInferred() { } @@ -46,12 +47,12 @@ } - + @Override protected OWLEquivalentClassesAxiom createAxiom(OWLDescription object) { return getOWLDataFactory().getOWLEquivalentClassesAxiom(CollectionFactory.createSet(getRootObject(), object)); } - + @Override public OWLFrameSectionRowObjectEditor<OWLDescription> getObjectEditor() { view = new SuggestEquivalentClassView(getOWLEditorKit(), null, frame); view.setView(view); Modified: trunk/src/dl-learner/org/dllearner/tools/protege/SuggestEquivalentClassView.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/protege/SuggestEquivalentClassView.java 2008-04-21 06:44:04 UTC (rev 800) +++ trunk/src/dl-learner/org/dllearner/tools/protege/SuggestEquivalentClassView.java 2008-04-21 07:06:53 UTC (rev 801) @@ -207,7 +207,7 @@ - + @Override public Set<OWLDescription> getEditedObjects() { return super.getEditedObjects(); Added: trunk/src/dl-learner/org/dllearner/utilities/ManchesterOWLSyntaxParser.java =================================================================== --- trunk/src/dl-learner/org/dllearner/utilities/ManchesterOWLSyntaxParser.java (rev 0) +++ trunk/src/dl-learner/org/dllearner/utilities/ManchesterOWLSyntaxParser.java 2008-04-21 07:06:53 UTC (rev 801) @@ -0,0 +1,48 @@ +/** + * Copyright (C) 2007-2008, Jens Lehmann + * + * This file is part of DL-Learner. + * + * DL-Learner is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * DL-Learner is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ +package org.dllearner.utilities; + +import org.coode.manchesterowlsyntax.ManchesterOWLSyntaxEditorParser; +import org.semanticweb.owl.apibinding.OWLManager; +import org.semanticweb.owl.expression.ParserException; +import org.semanticweb.owl.model.OWLDescription; +import org.semanticweb.owl.model.OWLOntologyManager; + +/** + * Parser for Manchester Syntax strings (interface to OWL API parser). + * TODO: Currently, this outputs an OWL API OWLDescription, but there + * is no converter from OWL API descriptions to DL-Learner descriptions + * at the moment. + * + * @author Jens Lehmann + * + */ +public class ManchesterOWLSyntaxParser { + + public OWLDescription getDescription(String manchesterSyntaxDescription) throws ParserException { + OWLOntologyManager manager = OWLManager.createOWLOntologyManager(); + + ManchesterOWLSyntaxEditorParser parser = new + ManchesterOWLSyntaxEditorParser(manager.getOWLDataFactory(), manchesterSyntaxDescription); + + return parser.parseDescription(); + } + +} Modified: trunk/src/dl-learner/org/dllearner/utilities/OntologyCloserOWLAPI.java =================================================================== --- trunk/src/dl-learner/org/dllearner/utilities/OntologyCloserOWLAPI.java 2008-04-21 06:44:04 UTC (rev 800) +++ trunk/src/dl-learner/org/dllearner/utilities/OntologyCloserOWLAPI.java 2008-04-21 07:06:53 UTC (rev 801) @@ -15,7 +15,6 @@ import org.dllearner.parser.KBParser; import org.dllearner.reasoning.OWLAPIReasoner; import org.semanticweb.owl.apibinding.OWLManager; -import org.semanticweb.owl.io.OWLXMLOntologyFormat; import org.semanticweb.owl.io.RDFXMLOntologyFormat; import org.semanticweb.owl.model.AddAxiom; import org.semanticweb.owl.model.OWLAxiom; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jen...@us...> - 2008-04-21 06:44:22
|
Revision: 800 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=800&view=rev Author: jenslehmann Date: 2008-04-20 23:44:04 -0700 (Sun, 20 Apr 2008) Log Message: ----------- upgraded to OWL API 2.2.0 (update your classpath) Added Paths: ----------- trunk/lib/owlapi/owlapi-bin.jar Removed Paths: ------------- trunk/lib/owlapi/antlr-runtime-3.0.jar trunk/lib/owlapi/commons-lang-2.2.jar trunk/lib/owlapi/owlapi-api.jar trunk/lib/owlapi/owlapi-apibinding.jar trunk/lib/owlapi/owlapi-change.jar trunk/lib/owlapi/owlapi-debugging.jar trunk/lib/owlapi/owlapi-dig1_1.jar trunk/lib/owlapi/owlapi-functionalparser.jar trunk/lib/owlapi/owlapi-functionalrenderer.jar trunk/lib/owlapi/owlapi-impl.jar trunk/lib/owlapi/owlapi-krssparser.jar trunk/lib/owlapi/owlapi-mansyntaxparser.jar trunk/lib/owlapi/owlapi-mansyntaxrenderer.jar trunk/lib/owlapi/owlapi-metrics.jar trunk/lib/owlapi/owlapi-oboparser.jar trunk/lib/owlapi/owlapi-owlxmlparser.jar trunk/lib/owlapi/owlapi-owlxmlrenderer.jar trunk/lib/owlapi/owlapi-rdfapi.jar trunk/lib/owlapi/owlapi-rdfxmlparser.jar trunk/lib/owlapi/owlapi-rdfxmlrenderer.jar trunk/lib/owlapi/owlapi-util.jar Deleted: trunk/lib/owlapi/antlr-runtime-3.0.jar =================================================================== (Binary files differ) Deleted: trunk/lib/owlapi/commons-lang-2.2.jar =================================================================== (Binary files differ) Deleted: trunk/lib/owlapi/owlapi-api.jar =================================================================== (Binary files differ) Deleted: trunk/lib/owlapi/owlapi-apibinding.jar =================================================================== (Binary files differ) Added: trunk/lib/owlapi/owlapi-bin.jar =================================================================== (Binary files differ) Property changes on: trunk/lib/owlapi/owlapi-bin.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Deleted: trunk/lib/owlapi/owlapi-change.jar =================================================================== (Binary files differ) Deleted: trunk/lib/owlapi/owlapi-debugging.jar =================================================================== (Binary files differ) Deleted: trunk/lib/owlapi/owlapi-dig1_1.jar =================================================================== (Binary files differ) Deleted: trunk/lib/owlapi/owlapi-functionalparser.jar =================================================================== (Binary files differ) Deleted: trunk/lib/owlapi/owlapi-functionalrenderer.jar =================================================================== (Binary files differ) Deleted: trunk/lib/owlapi/owlapi-impl.jar =================================================================== (Binary files differ) Deleted: trunk/lib/owlapi/owlapi-krssparser.jar =================================================================== (Binary files differ) Deleted: trunk/lib/owlapi/owlapi-mansyntaxparser.jar =================================================================== (Binary files differ) Deleted: trunk/lib/owlapi/owlapi-mansyntaxrenderer.jar =================================================================== (Binary files differ) Deleted: trunk/lib/owlapi/owlapi-metrics.jar =================================================================== (Binary files differ) Deleted: trunk/lib/owlapi/owlapi-oboparser.jar =================================================================== (Binary files differ) Deleted: trunk/lib/owlapi/owlapi-owlxmlparser.jar =================================================================== (Binary files differ) Deleted: trunk/lib/owlapi/owlapi-owlxmlrenderer.jar =================================================================== (Binary files differ) Deleted: trunk/lib/owlapi/owlapi-rdfapi.jar =================================================================== (Binary files differ) Deleted: trunk/lib/owlapi/owlapi-rdfxmlparser.jar =================================================================== (Binary files differ) Deleted: trunk/lib/owlapi/owlapi-rdfxmlrenderer.jar =================================================================== (Binary files differ) Deleted: trunk/lib/owlapi/owlapi-util.jar =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hee...@us...> - 2008-04-18 11:42:35
|
Revision: 799 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=799&view=rev Author: heeroyuy Date: 2008-04-18 04:42:30 -0700 (Fri, 18 Apr 2008) Log Message: ----------- -reduced libfiles to copy into the protege-plugin Modified Paths: -------------- trunk/build.xml Modified: trunk/build.xml =================================================================== --- trunk/build.xml 2008-04-18 11:15:47 UTC (rev 798) +++ trunk/build.xml 2008-04-18 11:42:30 UTC (rev 799) @@ -224,12 +224,20 @@ <mkdir dir="${temp}" /> <mkdir dir="${temp}/META-INF" /> <mkdir dir="${temp}/lib" /> + <mkdir dir="${temp}/lib/pellet" /> + <mkdir dir="${temp}/lib/jena" /> <copy toDir="${temp}/META-INF" > <fileset dir="${source}/META-INF" includes="MANIFEST.MF," /> </copy> <copy toDir="${temp}/lib" > - <fileset dir="${lib_dir}" /> + <fileset dir="${lib_dir}" includes="junit-4.4.jar" /> </copy> + <copy toDir="${temp}/lib/pellet" > + <fileset dir="${lib_dir}/pellet" includes="pellet.jar,aterm-java-1.6.jar,relaxngDatatype.jar,xsdlib.jar" /> + </copy> + <copy toDir="${temp}/lib/jena" > + <fileset dir="${lib_dir}/jena" includes="commons-logging-1.1.jar" /> + </copy> <copy toDir="${temp}" > <fileset dir="${class_dir}" /> </copy> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hee...@us...> - 2008-04-18 11:15:58
|
Revision: 798 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=798&view=rev Author: heeroyuy Date: 2008-04-18 04:15:47 -0700 (Fri, 18 Apr 2008) Log Message: ----------- -small design change -add thread to rum learning algorithm Modified Paths: -------------- trunk/src/dl-learner/org/dllearner/tools/protege/ActionHandler.java trunk/src/dl-learner/org/dllearner/tools/protege/ButtonList.java trunk/src/dl-learner/org/dllearner/tools/protege/DLLearnerModel.java trunk/src/dl-learner/org/dllearner/tools/protege/META-INF/MANIFEST.MF trunk/src/dl-learner/org/dllearner/tools/protege/SuggestEquivalentClassButton.java trunk/src/dl-learner/org/dllearner/tools/protege/SuggestEquivalentClassView.java Modified: trunk/src/dl-learner/org/dllearner/tools/protege/ActionHandler.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/protege/ActionHandler.java 2008-04-17 13:02:17 UTC (rev 797) +++ trunk/src/dl-learner/org/dllearner/tools/protege/ActionHandler.java 2008-04-18 11:15:47 UTC (rev 798) @@ -1,24 +1,49 @@ package org.dllearner.tools.protege; + + import java.awt.event.*; -public class ActionHandler implements ActionListener, ItemListener{ +import java.util.Observable; +public class ActionHandler extends Observable implements ActionListener, ItemListener { private DLLearnerModel model; - - public ActionHandler(ActionHandler a,DLLearnerModel m) + private SuggestEquivalentClassView view; + private Thread dlLearner; + public ActionHandler(ActionHandler a,DLLearnerModel m, SuggestEquivalentClassView s) { + view = s; model = m; } public void actionPerformed(ActionEvent z){ + if(z.getActionCommand().equals("RUN")) { - model.configDLLearner(); - model.DLLearnerStart(); - //setChanged(); - //notifyObservers(model.getSolutions()); - System.out.println(model.getSolutions()); - //config.setDescriptionList(model.getSolutions()); + dlLearner = new Thread(model); + System.out.println("test"); + view.getStartButton().setEnabled(false); + view.getStopButton().setEnabled(true); + dlLearner.start(); } - } + + if(z.getActionCommand().equals("Cancel")) + { + System.out.println(dlLearner.isInterrupted()); + model.getLearningAlgorithm().stop(); + view.destroyListener(); + view.getStartButton().setEnabled(true); + view.getStopButton().setEnabled(false); + System.out.println(dlLearner.isInterrupted()); + String error = "Learning aborted"; + dlLearner.interrupt(); + System.out.println(dlLearner.isInterrupted()); + view.renderErrorMessage(error); + } + + if(z.getActionCommand().equals("ADD")) + { + String message ="Ausgezeichnet *Mr.Burns*"; + view.renderErrorMessage(message); + } + } public void itemStateChanged(ItemEvent i) @@ -26,5 +51,15 @@ } - + public void textValueChanged(TextEvent t) + { + + + } + + public void destroyThread() + { + view.getStartButton().setEnabled(true); + view.getStopButton().setEnabled(false); + } } Modified: trunk/src/dl-learner/org/dllearner/tools/protege/ButtonList.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/protege/ButtonList.java 2008-04-17 13:02:17 UTC (rev 797) +++ trunk/src/dl-learner/org/dllearner/tools/protege/ButtonList.java 2008-04-18 11:15:47 UTC (rev 798) @@ -17,7 +17,6 @@ addSection(new OWLEquivalentClassesAxiomFrameSection(editorKit, this)); addSection(new SuggestEquivalentClassButton(editorKit, this)); addSection(new OWLSubClassAxiomFrameSection(editorKit, this)); - //addSection(new SuggestClassButton(editorKit, this)); addSection(new InheritedAnonymousClassesFrameSection(editorKit, this)); addSection(new OWLClassAssertionAxiomIndividualSection(editorKit, this)); addSection(new OWLDisjointClassesAxiomFrameSection(editorKit, this)); Modified: trunk/src/dl-learner/org/dllearner/tools/protege/DLLearnerModel.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/protege/DLLearnerModel.java 2008-04-17 13:02:17 UTC (rev 797) +++ trunk/src/dl-learner/org/dllearner/tools/protege/DLLearnerModel.java 2008-04-18 11:15:47 UTC (rev 798) @@ -14,7 +14,7 @@ import org.dllearner.reasoning.*; import org.dllearner.learningproblems.*; -public class DLLearnerModel extends Observable{ +public class DLLearnerModel extends Observable implements Runnable{ 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"}; @@ -26,7 +26,8 @@ private ReasoningService rs; private static final int anzahl = 10; private String[] description = new String[anzahl]; - + private LearningProblem lp; + private LearningAlgorithm la = null; public DLLearnerModel() { @@ -43,8 +44,14 @@ negativ=neg; uri=s; } - public void configDLLearner() + + + public void startPosNegDefinitionReasoning() { + + } + public void run() + { ComponentManager.setComponentClasses(componenten); // get singleton instance of component manager cm = ComponentManager.getInstance(); @@ -67,16 +74,9 @@ } rs = cm.reasoningService(reasoner); - } - - public void startPosNegDefinitionReasoning() - { - - } - public void DLLearnerStart() - { + lp = cm.learningProblem(PosNegDefinitionLP.class, rs); // create a learning problem and set positive and negative examples - LearningProblem lp = cm.learningProblem(PosNegDefinitionLP.class, rs); + Set<String> positiveExamples = new TreeSet<String>(); for(int i=0;i<positiv.size();i++) { @@ -103,9 +103,8 @@ } // create the learning algorithm - LearningAlgorithm la = null; try { - la = cm.learningAlgorithm(ROLearner.class, lp, rs); + this.la = cm.learningAlgorithm(ROLearner.class, lp, rs); } catch (LearningProblemUnsupportedException e) { // TODO Auto-generated catch block e.printStackTrace(); @@ -121,6 +120,7 @@ // start the algorithm and print the best concept found la.start(); + System.out.println(la.getSolutionScore()); description[0]=la.getBestSolution().toString(); setChanged(); notifyObservers(description); @@ -181,5 +181,10 @@ return description; } + public LearningAlgorithm getLearningAlgorithm() + { + return la; + } + } Modified: trunk/src/dl-learner/org/dllearner/tools/protege/META-INF/MANIFEST.MF =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/protege/META-INF/MANIFEST.MF 2008-04-17 13:02:17 UTC (rev 797) +++ trunk/src/dl-learner/org/dllearner/tools/protege/META-INF/MANIFEST.MF 2008-04-18 11:15:47 UTC (rev 798) @@ -6,7 +6,7 @@ Bundle-Description: blablabla Bundle-Vendor: blablabla Bundle-DocURL: blablabla -Bundle-ClassPath: .,lib/xbean.jar,lib/dig1.1-xmlbeans.jar,lib/junit-4.4.jar,log4j.jar,lib/components.ini,lib/pellet/pellet.jar,lib/pellet/aterm-java-1.6.jar,lib/pellet/relaxngDatatype.jar,lib/pellet/xsdlib.jar,lib/jena/commons-logging-1.1.jar +Bundle-ClassPath: .,lib/junit-4.4.jar,log4j.jar,lib/pellet/pellet.jar,lib/pellet/aterm-java-1.6.jar,lib/pellet/relaxngDatatype.jar,lib/pellet/xsdlib.jar,lib/jena/commons-logging-1.1.jar Import-Package: org.osgi.framework,org.apache.log4j Export-Package: lib Bundle-Version: 1.0.0 Modified: trunk/src/dl-learner/org/dllearner/tools/protege/SuggestEquivalentClassButton.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/protege/SuggestEquivalentClassButton.java 2008-04-17 13:02:17 UTC (rev 797) +++ trunk/src/dl-learner/org/dllearner/tools/protege/SuggestEquivalentClassButton.java 2008-04-18 11:15:47 UTC (rev 798) @@ -18,6 +18,7 @@ private static final String LABEL = "Suggest a equivalent Class"; private OWLFrame<OWLClass> frame; + private SuggestEquivalentClassView view; public SuggestEquivalentClassButton(OWLEditorKit editorKit, OWLFrame<OWLClass> frame) { super(editorKit, LABEL, frame); @@ -52,7 +53,9 @@ public OWLFrameSectionRowObjectEditor<OWLDescription> getObjectEditor() { - return new SuggestEquivalentClassView(getOWLEditorKit(), null, frame); + view = new SuggestEquivalentClassView(getOWLEditorKit(), null, frame); + view.setView(view); + return view; } Modified: trunk/src/dl-learner/org/dllearner/tools/protege/SuggestEquivalentClassView.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/protege/SuggestEquivalentClassView.java 2008-04-17 13:02:17 UTC (rev 797) +++ trunk/src/dl-learner/org/dllearner/tools/protege/SuggestEquivalentClassView.java 2008-04-18 11:15:47 UTC (rev 798) @@ -6,18 +6,15 @@ import java.util.*; import org.semanticweb.owl.model.OWLClass; -import org.dllearner.core.owl.Description; import org.protege.editor.owl.ui.frame.OWLFrame; import javax.swing.JButton; import javax.swing.JCheckBox; +import java.awt.*; import javax.swing.JComponent; import javax.swing.JLabel; import javax.swing.JPanel; -import javax.swing.JScrollPane; import javax.swing.JList; -import javax.swing.JSplitPane; - import org.protege.editor.owl.OWLEditorKit; import org.protege.editor.owl.ui.frame.AbstractOWLFrameSectionRowObjectEditor; import org.semanticweb.owl.model.OWLDescription; @@ -30,56 +27,58 @@ private Vector<JCheckBox> positive = new Vector<JCheckBox>(); private Vector<JCheckBox> negative = new Vector<JCheckBox>(); private JComponent learner; - private JSplitPane split; private JButton accept; private JButton run; private OWLEditorKit editor; private JPanel option; - private JPanel listPanel; - private JScrollPane test; private JList suggest; - private JPanel vorschlag; - private Object[] blub; + private Object[] instances; private JLabel neg; + private final static Color Color_RED = Color.red; + private JButton cancel; + private JLabel errorMessage; private ActionHandler action; private DLLearnerModel model; - private OWLFrame<OWLClass> aktuell; - private JPanel panel; - + private String[] descriptions = new String[10]; + //private OWLFrame<OWLClass> aktuell; + private SuggestEquivalentClassView view; + public void update(Observable m,Object c) { if( model != m) return; draw(); } - //TODO: Layout selber festlegen denn die standartlayouts sind scheisse + //TODO: MVC Achitektur erstellen //TODO: herrausfinden wie das mit dem scrollen geht public SuggestEquivalentClassView(OWLEditorKit editorKit, OWLDescription description, OWLFrame<OWLClass> h) { editor = editorKit; - aktuell = h; - split = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT,false); + //aktuell = h; model = new DLLearnerModel(); - model.addObserver( this); - vorschlag = new JPanel(); - panel = new JPanel(new GridLayout(0,1)); - panel.setPreferredSize(new Dimension(290,490)); - suggest = new JList(); - //positiv.setPreferredSize(new Dimension(190,200)); - //negativ.setPreferredSize(new Dimension(190,200)); + errorMessage = new JLabel(); + errorMessage.setForeground(Color_RED); + suggest = new JList(descriptions); learner = new JPanel(); - listPanel = new JPanel(); - learner.setPreferredSize(new Dimension(600, 500)); - split.setResizeWeight(0.5); + learner.setLayout(null); + learner.setPreferredSize(new Dimension(600, 480)); pos = new JLabel("Positive Examples"); neg = new JLabel("Negative Examples"); run = new JButton("RUN"); + cancel = new JButton("Cancel"); accept = new JButton("ADD"); - //accept.setSize(190, 20); accept.setPreferredSize(new Dimension(290,50)); - action = new ActionHandler(this.action, model); + option = new JPanel(new GridLayout(0,2)); + cancel.setEnabled(false); + option.setPreferredSize(new Dimension(290,0)); + model.addObserver(this); + } - + public void setView(SuggestEquivalentClassView v) + { + view = v; + action = new ActionHandler(this.action, model,view); + } public OWLDescription getEditedObject() { String expression = "JUHU"; @@ -94,38 +93,38 @@ public void makeView() { - test= new JScrollPane(); - option = new JPanel(new GridLayout(0,1)); - option.setPreferredSize(new Dimension(290,0)); + suggest = new JList(descriptions); option.add(pos); - blub=editor.getOWLModelManager().getActiveOntology().getReferencedIndividuals().toArray(); - for(int j = 0; j<blub.length;j++) + option.add(neg); + instances=editor.getOWLModelManager().getActiveOntology().getReferencedIndividuals().toArray(); + for(int j = 0; j<instances.length;j++) { - positive.add(new JCheckBox(editor.getOWLModelManager().getActiveOntology().getURI().toString()+"#"+blub[j].toString())); + positive.add(new JCheckBox(editor.getOWLModelManager().getActiveOntology().getURI().toString()+"#"+instances[j].toString())); } + for(int j = 0; j<instances.length;j++) + { + negative.add(new JCheckBox(editor.getOWLModelManager().getActiveOntology().getURI().toString()+"#"+instances[j].toString())); + } for(int j=0; j<positive.size();j++) { option.add(positive.get(j)); + option.add(negative.get(j)); } - option.add(neg); - for(int j = 0; j<blub.length;j++) - { - negative.add(new JCheckBox(editor.getOWLModelManager().getActiveOntology().getURI().toString()+"#"+blub[j].toString())); - } - for(int i=0;i<negative.size();i++) - { - option.add(negative.get(i)); - } - //individuals.add(negative); - option.add(run); - panel.add(suggest); - panel.add(accept); - test.add(option); - split.setLeftComponent(option); - split.setRightComponent(panel); - learner.add(split); - System.out.println(aktuell.getRootObject()); + //test.add(option); + option.setBounds(0, 0, 490, 250); + run.setBounds(0,260,200,30); + cancel.setBounds(210,260,200,30); + suggest.setBounds(0,300,490,110); + accept.setBounds(0,420,200,30); + errorMessage.setBounds(210,420,300,30); + System.out.println("blub2"); + learner.add(option); + learner.add(run); + learner.add(cancel); + learner.add(suggest); + learner.add(accept); + learner.add(errorMessage); addListener(); model.setDLLearnerModel(positive,negative,getUri()); } @@ -140,18 +139,18 @@ */ public void clear() { - if(split!=null) - { - split.removeAll(); - panel.removeAll(); + if(option!=null) { option.removeAll(); } suggest.removeAll(); - vorschlag.removeAll(); positive.removeAllElements(); negative.removeAllElements(); + errorMessage.setText(""); + for(int i=0; i<descriptions.length;i++) + { + descriptions[i]=""; } } /** @@ -161,7 +160,7 @@ { run.addActionListener(this.action); accept.addActionListener(this.action); - + cancel.addActionListener(this.action); for(int i=0;i<positive.size();i++) { positive.get(i).addItemListener(action); @@ -171,8 +170,28 @@ { negative.get(i).addItemListener(action); } - } - + } + public void destroyListener() + { + run.removeActionListener(this.action); + accept.removeActionListener(this.action); + System.out.println("hihihihi"); + cancel.removeActionListener(this.action); + for(int i=0;i<positive.size();i++) + { + positive.get(i).removeItemListener(action); + } + + for(int i=0;i<negative.size();i++) + { + negative.get(i).removeItemListener(action); + } + } + public void setSuggestedClass() + { + //TODO: Description umwandeln und in ontologie einfuegen + //editor.getOWLModelManager().getActiveOntology().getClassAxioms().add(e); + } public void dispose(){ } public String getUri() @@ -186,22 +205,8 @@ return uri; } - public void setSuggestionList(java.util.List<Description> list) - { - System.out.println(list.isEmpty()); - if(list.isEmpty()) - { - listPanel.add(new JLabel("No Suggestions")); - } - else - { - for(int i = 0; i<list.size();i++) - { - listPanel.add(new JLabel(list.get(i).toString())); - } - } - } + public Set<OWLDescription> getEditedObjects() { @@ -210,10 +215,12 @@ private void resetPanel() { option.removeAll(); + System.out.println("blub1"); positive.removeAllElements(); negative.removeAllElements(); - panel.removeAll(); + learner.removeAll(); } + public void release() { model.deleteObserver( this); @@ -222,12 +229,35 @@ protected void draw() { if (model != null) { - String desc[] = ((DLLearnerModel)model).getSolutions(); - - suggest = new JList(desc); - System.out.println("Hallo Welt"); + run.setEnabled(true); + cancel.setEnabled(false); + System.out.println("blub"); + descriptions = ((DLLearnerModel)model).getSolutions(); resetPanel(); makeView(); } } + + public void disableRunButtons() + { + run.setEnabled(false); + cancel.setEnabled(true); + resetPanel(); + makeView(); + } + + public void renderErrorMessage(String s) + { + errorMessage.setText(s); + } + + public JButton getStartButton() + { + return run; + } + + public JButton getStopButton() + { + return cancel; + } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ku...@us...> - 2008-04-17 13:02:40
|
Revision: 797 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=797&view=rev Author: kurzum Date: 2008-04-17 06:02:17 -0700 (Thu, 17 Apr 2008) Log Message: ----------- script for generating all ontologies 0 to 16 Modified Paths: -------------- trunk/src/dl-learner/org/dllearner/examples/KRK.java trunk/src/dl-learner/org/dllearner/examples/KRKModular.java Modified: trunk/src/dl-learner/org/dllearner/examples/KRK.java =================================================================== --- trunk/src/dl-learner/org/dllearner/examples/KRK.java 2008-04-17 06:24:07 UTC (rev 796) +++ trunk/src/dl-learner/org/dllearner/examples/KRK.java 2008-04-17 13:02:17 UTC (rev 797) @@ -70,8 +70,8 @@ static String workingDir = "examples/krk"; - static String fileIn = workingDir+"/krkopt_no_draw.data"; - //static String fileIn = workingDir+"/krkopt.data"; + //static String fileIn = workingDir+"/krkopt_no_draw.data"; + static String fileIn = workingDir+"/krkopt.data"; static String owlfilename = "complete_nodraw.owl"; Modified: trunk/src/dl-learner/org/dllearner/examples/KRKModular.java =================================================================== --- trunk/src/dl-learner/org/dllearner/examples/KRKModular.java 2008-04-17 06:24:07 UTC (rev 796) +++ trunk/src/dl-learner/org/dllearner/examples/KRKModular.java 2008-04-17 13:02:17 UTC (rev 797) @@ -9,6 +9,7 @@ import java.net.URI; import java.util.HashMap; import java.util.HashSet; +import java.util.LinkedList; import java.util.Random; import java.util.Set; import java.util.SortedSet; @@ -70,7 +71,7 @@ //static boolean useTripleSubProps = useInverse && false; - static String workingDir = "examples/krk/"; + static String workingDir = "examples/krkrecognizer/"; static String allData = workingDir+"krkopt_no_draw.data"; //static String allData = workingDir+"krkopt_original_dataset.data"; @@ -102,15 +103,111 @@ " : " + new File(workingDir).mkdir()+ "."); } } + + public static void main(String[] args) { + main1(args); + //main2(args); + + } + + + public static void main1(String[] args) { + init(); + initAllInstancesWithoutReasoners(); + System.out.println("initializing finished"); + //String currentClass = "ZERO"; + LinkedList<String> ll=new LinkedList<String>(); + + ll.add("DRAW"); + ll.add("ZERO"); + ll.add("ONE"); + ll.add("TWO"); + ll.add("THREE"); + ll.add("FOUR"); + ll.add("FIVE"); + ll.add("SIX"); + ll.add("SEVEN"); + ll.add("EIGHT"); + ll.add("NINE"); + ll.add("TEN"); + ll.add("ELEVEN"); + ll.add("TWELVE"); + ll.add("THIRTEEN"); + ll.add("FOURTEEN"); + ll.add("FIFTEEN"); + ll.add("SIXTEEN"); + + String skript=""; + + for (int i = 0; i < ll.size(); i++) { + System.out.println("progress "+i+" of "+ll.size()); + String currentClass=ll.get(i); + SortedSet<Individual> allPos = classToInd.get(currentClass); + if(classToInd.get(currentClass)==null)continue; + if(currentClass.equals("SIXTEEN"))continue; + classToInd.remove(currentClass); + SortedSet<Individual> neg = new TreeSet<Individual>(); + for (SortedSet<Individual> set : classToInd.values()) { + neg.addAll(set); + } + SortedSet<Integer> lines = getLines(allPos, neg); + KB kb = getKB(lines); + KRKModular km=new KRKModular(kb); + //starting reasone + //km.initReasonerFact(); + String filename=""; + if(i==0) filename="KRK_recognizerDRAW"; + else filename="KRK_recognizer"+(i-1); + km.writeOWLFile(filename+".owl"); + + StringBuffer buf= new StringBuffer(); + buf.append("\nimport(\""+filename+".owl"+"\");\n\n"); + + buf.append("refexamples.ignoredConcepts={\n"); + buf.append("\""+ontologyURI+"#"+currentClass+"\""); + for (String str : classToInd.keySet()) { + buf.append(",\n"); + buf.append("\""+ontologyURI+"#"+str+"\""); + } + + buf.append("};\n\n"); + buf.append("algorithm = refexamples;\n"+ + "reasoner=fastInstanceChecker;\n"+ + "refexamples.useAllConstructor = false;\n"+ + "refexamples.useExistsConstructor = true;\n"+ + "refexamples.useCardinalityRestrictions = false;\n"+ + "refexamples.useNegation = false;\n\n\n"); + + for (Individual ind : allPos) { + buf.append("+\""+ind+"\"\n"); + } + buf.append("\n\n\n"); + for (Individual ind : neg) { + buf.append("-\""+ind+"\"\n"); + } + + writeToFile(workingDir+filename+".conf", buf.toString()); + skript+= "./dllearner "+workingDir+filename+".conf >> "+workingDir+filename+"result.txt\n"; + } + System.out.println(skript); + writeToFile(workingDir+"skript.sh", skript); + + + + } + + /** * @param args */ - public static void main(String[] args) { + public static void main2(String[] args) { init(); initAllInstancesAndReasoners(); System.out.println("initializing finished"); String currentClass = "ZERO"; SortedSet<Individual> allPos = classToInd.get(currentClass); + + //if(allPos.size()<400)negativeExamplesAdded = allPos.size(); //else negativeExamplesAdded = 400; SortedSet<Individual> tmp = new TreeSet<Individual>(); @@ -121,19 +218,18 @@ SortedSet<Individual> neg = getNegativeExamples(currentClass, tmp, negativeExamplesAdded); SortedSet<Integer> lines = getLines(allPos, neg); KB kb = getKB(lines); + Description d=null; + try{ + d = KBParser.parseConcept("EXISTS \"http://dl-learner.org/krk#hasPiece\".(EXISTS \"http://dl-learner.org/krk#hasLowerRankThan\".(EXISTS \"http://dl-learner.org/krk#fileDistanceLessThan1\".(\"http://dl-learner.org/krk#BKing\" AND EXISTS \"http://dl-learner.org/krk#rankDistanceLessThan2\".(\"http://dl-learner.org/krk#WKing\" OR EXISTS \"http://dl-learner.org/krk#rankDistanceLessThan1\".EXISTS \"http://dl-learner.org/krk#rankDistanceLessThan3\".\"http://dl-learner.org/krk#WKing\")) AND (\"http://dl-learner.org/krk#FileA\" OR \"http://dl-learner.org/krk#WKing\")) AND (\"http://dl-learner.org/krk#FileC\" OR (\"http://dl-learner.org/krk#BKing\" AND \"http://dl-learner.org/krk#FileD\")))"); + }catch (Exception e) {e.printStackTrace();} + while (true){ - /*for (String set : classToInd.keySet()) { - for (Individual individual : classToInd.get(set)) { - if(indToClass.get(individual)==null)System.out.println(indToClass.get(individual)); - }}*/ - - - - Description d= learn(kb, allPos, neg); - SortedSet<Individual> result = retrieveAll(d); + + SortedSet<Individual> result = retrieveAll(d); + System.out.println(result); System.out.println("still left: " + (result.size()-allPos.size())); if(verify(currentClass, result)) { System.out.println("Correct solution: "+ d.toKBSyntaxString(ontologyURI+"#", null)); @@ -141,36 +237,11 @@ neg.addAll(getNegativeExamples(currentClass, result, negativeExamplesAdded)); lines = getLines(allPos, neg); kb = getKB(lines); + d= learn(kb, allPos, neg); - } - //System.out.println(allPos); - //System.out.println(neg); - - //cm. - - - /*Map<Class<? extends Component>, String> componentPrefixMapping = Start.createComponentPrefixMapping(); - ComponentManager cm = ComponentManager.getInstance(); - - Set<KnowledgeSource> sources = new HashSet<KnowledgeSource>(); - KnowledgeSource ks = cm.knowledgeSource(KBFile.class); - sources.add(ks); - cm.applyConfigEntry(ks, "url", null); - ks.init(); - */ - - - - - //verifyConcept("EXISTS hasPiece.EXISTS fileDistance0.TOP"); - //verifyConcept("(EXISTS \"http://dl-learner.org/krk#hasPiece\".EXISTS \"http://dl-learner.org/krk#rankDistanceLessThan2\".(\"http://dl-learner.org/krk#BKing\" AND EXISTS \"http://dl-learner.org/krk#fileDistanceLessThan1\".(\"http://dl-learner.org/krk#A\" OR \"http://dl-learner.org/krk#F3\")) AND EXISTS \"http://dl-learner.org/krk#hasPiece\".(\"http://dl-learner.org/krk#WKing\" AND ((\"http://dl-learner.org/krk#C\" AND EXISTS \"http://dl-learner.org/krk#hasLowerRankThan\".\"http://dl-learner.org/krk#A\") OR (\"http://dl-learner.org/krk#F3\" AND EXISTS \"http://dl-learner.org/krk#rankDistance2\".\"http://dl-learner.org/krk#WRook\"))))"); - //verifyConcept("EXISTS hasPiece.TOP"); - - //.writeOWLFile("test.owl"); - } static Description learn(KB kb, SortedSet<Individual> pos,SortedSet<Individual> neg){ @@ -282,6 +353,9 @@ public KRKModular() { this.kb = makeOntologyTBox(); } + public KRKModular(KB kb) { + this.kb = kb; + } public KRKModular(String concept) { this.kb = makeOntologyTBox(concept); @@ -346,8 +420,41 @@ } + public static void initAllInstancesWithoutReasoners(){ + // Datei \xF6ffnen + BufferedReader in = null; + try { + in = new BufferedReader(new FileReader(allData)); + } catch (FileNotFoundException e) { + e.printStackTrace(); + } + SimpleClock sc= new SimpleClock(); + KRKModular km =null; + km = new KRKModular(); + try { + String line = ""; + int x = 0; + while ((line = in.readLine()) != null) { + if (x % 1000 == 0) + {sc.print("Currently at line " + x+" : ");} + km.addOneLineToKBinit(x, line); + + //if(x==200)break; + x++; + }// endWhile + km = null; + sc.printAndSet("initialization finished"); + + + } catch (Exception e) { + e.printStackTrace(); + } + + } + + public static SortedSet<Individual> retrieveAll(String concept){ Description d = null; try{ @@ -774,4 +881,5 @@ return null; }*/ + } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ku...@us...> - 2008-04-17 06:24:14
|
Revision: 796 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=796&view=rev Author: kurzum Date: 2008-04-16 23:24:07 -0700 (Wed, 16 Apr 2008) Log Message: ----------- small fix changed: new OWLXMLOntologyFormat() to new RDFXMLOntologyFormat() submitted bug to owlapi: http://sourceforge.net/tracker/index.php?func=detail&aid=1944634&group_id=90989&atid=595534 Modified Paths: -------------- trunk/src/dl-learner/org/dllearner/utilities/CloseOntology.java trunk/src/dl-learner/org/dllearner/utilities/OntologyCloserOWLAPI.java Modified: trunk/src/dl-learner/org/dllearner/utilities/CloseOntology.java =================================================================== --- trunk/src/dl-learner/org/dllearner/utilities/CloseOntology.java 2008-04-17 06:19:33 UTC (rev 795) +++ trunk/src/dl-learner/org/dllearner/utilities/CloseOntology.java 2008-04-17 06:24:07 UTC (rev 796) @@ -25,9 +25,10 @@ * simply the path to the owl ontology "examples/test.owl" */ public static void main(String[] args) { - // String ontopath="examples/krkworking/test.owl"; + String ontopath=""; + //ontopath="examples/carcinogenesis/carcinogenesis.owl"; // inputURI - String ontopath = args[0]; + //ontopath = args[0]; File file = new File(ontopath); URI inputURI = file.toURI(); Modified: trunk/src/dl-learner/org/dllearner/utilities/OntologyCloserOWLAPI.java =================================================================== --- trunk/src/dl-learner/org/dllearner/utilities/OntologyCloserOWLAPI.java 2008-04-17 06:19:33 UTC (rev 795) +++ trunk/src/dl-learner/org/dllearner/utilities/OntologyCloserOWLAPI.java 2008-04-17 06:24:07 UTC (rev 796) @@ -16,6 +16,7 @@ import org.dllearner.reasoning.OWLAPIReasoner; import org.semanticweb.owl.apibinding.OWLManager; import org.semanticweb.owl.io.OWLXMLOntologyFormat; +import org.semanticweb.owl.io.RDFXMLOntologyFormat; import org.semanticweb.owl.model.AddAxiom; import org.semanticweb.owl.model.OWLAxiom; import org.semanticweb.owl.model.OWLDataFactory; @@ -210,7 +211,7 @@ public void writeOWLFile(URI filename) { try { - manager.saveOntology(this.onto, new OWLXMLOntologyFormat(), + manager.saveOntology(this.onto, new RDFXMLOntologyFormat(), filename); } catch (Exception e) { e.printStackTrace(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ku...@us...> - 2008-04-17 06:19:36
|
Revision: 795 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=795&view=rev Author: kurzum Date: 2008-04-16 23:19:33 -0700 (Wed, 16 Apr 2008) Log Message: ----------- added arch_refexamples_fastInstance_fact.conf as a test conf for bug #1944647 Modified Paths: -------------- trunk/examples/conflict/arch.owl trunk/examples/conflict/arch_refexamples_fastInstance.conf Added Paths: ----------- trunk/examples/conflict/arch_refexamples_fastInstance_fact.conf Modified: trunk/examples/conflict/arch.owl =================================================================== --- trunk/examples/conflict/arch.owl 2008-04-16 19:22:08 UTC (rev 794) +++ trunk/examples/conflict/arch.owl 2008-04-17 06:19:33 UTC (rev 795) @@ -1,362 +1,210 @@ <?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#" > + <!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://example.com#" - xml:base="http://example.com" - 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=""/> - - - - <!-- +<rdf:RDF xml:base="http://localhost/foo" xmlns="http://localhost/foo#" xmlns:foo="http://localhost/foo#" xmlns:owl="http://www.w3.org/2002/07/owl#" xmlns:owl11="http://www.w3.org/2006/12/owl11#" xmlns:owl11xml="http://www.w3.org/2006/12/owl11-xml#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:xsd="http://www.w3.org/2001/XMLSchema#"> + <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> - - - - <!-- + <!-- 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"/> - - - - <!-- + <!-- 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> + <!-- 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> Modified: trunk/examples/conflict/arch_refexamples_fastInstance.conf =================================================================== --- trunk/examples/conflict/arch_refexamples_fastInstance.conf 2008-04-16 19:22:08 UTC (rev 794) +++ trunk/examples/conflict/arch_refexamples_fastInstance.conf 2008-04-17 06:19:33 UTC (rev 795) @@ -18,8 +18,9 @@ algorithm = refexamples; reasoner=fastInstanceChecker; +//refexamples.useAllConstructor = false; +//refexamples.useNegation = false; - /** background knowledge **/ import("arch.owl"); @@ -29,3 +30,6 @@ -c2 -c3 -c5 + + + Added: trunk/examples/conflict/arch_refexamples_fastInstance_fact.conf =================================================================== --- trunk/examples/conflict/arch_refexamples_fastInstance_fact.conf (rev 0) +++ trunk/examples/conflict/arch_refexamples_fastInstance_fact.conf 2008-04-17 06:19:33 UTC (rev 795) @@ -0,0 +1,36 @@ +/** + * Arches Example + * + * Originally published in Winston, P.H. (1975). Learning structural descriptions + * from examples. In P.H. Winstons (Ed.), The psychology of computer vision. New + * York: Mc Graw- Hill. + * + * See the pictures for an illustration of the input data. + * + * The example is a converted, modified and extended version of the original + * learning problem. + * + * possible solution: + * EXISTS hasPillar.(freeStandingPillar AND EXISTS leftof.EXISTS supports.TOP) + * + * Copyright (C) 2007, Sebastian Hellmann + */ + +algorithm = refexamples; +reasoner=fastInstanceChecker; +fastInstanceChecker.reasonerType=fact; +//refexamples.useAllConstructor = false; +//refexamples.useNegation = false; + +/** background knowledge **/ +import("arch.owl"); + +/** examples **/ ++c1 ++c4 +-c2 +-c3 +-c5 + + + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lor...@us...> - 2008-04-16 19:22:45
|
Revision: 794 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=794&view=rev Author: lorenz_b Date: 2008-04-16 12:22:08 -0700 (Wed, 16 Apr 2008) Log Message: ----------- method addAxiomToOWL added to class ORE Modified Paths: -------------- trunk/src/dl-learner/org/dllearner/tools/ore/ORE.java Modified: trunk/src/dl-learner/org/dllearner/tools/ore/ORE.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/ore/ORE.java 2008-04-16 13:03:37 UTC (rev 793) +++ trunk/src/dl-learner/org/dllearner/tools/ore/ORE.java 2008-04-16 19:22:08 UTC (rev 794) @@ -2,6 +2,7 @@ import java.io.File; import java.math.BigDecimal; +import java.util.HashSet; import java.util.List; import java.util.Set; import java.util.SortedSet; @@ -13,14 +14,24 @@ import org.dllearner.core.KnowledgeSource; import org.dllearner.core.LearningAlgorithm; import org.dllearner.core.LearningProblemUnsupportedException; -import org.dllearner.core.ReasonerComponent; import org.dllearner.core.ReasoningService; import org.dllearner.core.owl.Description; import org.dllearner.core.owl.Individual; import org.dllearner.core.owl.NamedClass; import org.dllearner.kb.OWLFile; import org.dllearner.learningproblems.PosNegDefinitionLP; +import org.dllearner.reasoning.OWLAPIDescriptionConvertVisitor; import org.dllearner.reasoning.OWLAPIReasoner; +import org.semanticweb.owl.apibinding.OWLManager; +import org.semanticweb.owl.model.AddAxiom; +import org.semanticweb.owl.model.OWLAxiom; +import org.semanticweb.owl.model.OWLDataFactory; +import org.semanticweb.owl.model.OWLDescription; +import org.semanticweb.owl.model.OWLOntology; +import org.semanticweb.owl.model.OWLOntologyChangeException; +import org.semanticweb.owl.model.OWLOntologyManager; +import org.semanticweb.owl.model.OWLOntologyStorageException; +import org.semanticweb.owl.model.UnknownOWLOntologyException; public class ORE { @@ -29,6 +40,7 @@ private KnowledgeSource ks; private PosNegDefinitionLP lp; private ComponentManager cm; + OWLAPIReasoner reasoner; SortedSet<Individual> posExamples; SortedSet<Individual> negExamples; NamedClass concept; @@ -61,14 +73,9 @@ public void detectReasoner(){ - ReasonerComponent reasoner = cm.reasoner( - OWLAPIReasoner.class, ks); - try { - reasoner.init(); - } catch (ComponentInitException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } + reasoner = cm.reasoner(OWLAPIReasoner.class, ks); + reasoner.init(); + rs = cm.reasoningService(reasoner); } @@ -165,10 +172,39 @@ } public void addAxiomToOWL(Description desc){ -// OWLDescription newConceptOWLAPI = OWLAPIDescriptionConvertVisitor.getOWLDescription(desc); + OWLDescription newConceptOWLAPI = OWLAPIDescriptionConvertVisitor.getOWLDescription(desc); + OWLDescription oldConceptOWLAPI = OWLAPIDescriptionConvertVisitor.getOWLDescription(concept); + OWLOntology ontology = reasoner.getOWLAPIOntologies().get(0); + OWLOntologyManager manager = OWLManager.createOWLOntologyManager(); + OWLDataFactory factory = manager.getOWLDataFactory(); + + Set<OWLDescription> ds = new HashSet<OWLDescription>(); + ds.add(newConceptOWLAPI); + ds.add(oldConceptOWLAPI); + + OWLAxiom axiomOWLAPI = factory.getOWLEquivalentClassesAxiom(ds); + + + + AddAxiom axiom = new AddAxiom(ontology, axiomOWLAPI); + try { + manager.applyChange(axiom); + } catch (OWLOntologyChangeException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + try { + manager.saveOntology(ontology); + } catch (UnknownOWLOntologyException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (OWLOntologyStorageException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } } public static void main(String[] args){ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ku...@us...> - 2008-04-16 07:51:48
|
Revision: 791 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=791&view=rev Author: kurzum Date: 2008-04-16 00:51:44 -0700 (Wed, 16 Apr 2008) Log Message: ----------- small fix Modified Paths: -------------- trunk/src/dl-learner/org/dllearner/examples/KRKModular.java trunk/src/dl-learner/org/dllearner/examples/KRKOntologyTBox.java Modified: trunk/src/dl-learner/org/dllearner/examples/KRKModular.java =================================================================== --- trunk/src/dl-learner/org/dllearner/examples/KRKModular.java 2008-04-16 06:07:17 UTC (rev 790) +++ trunk/src/dl-learner/org/dllearner/examples/KRKModular.java 2008-04-16 07:51:44 UTC (rev 791) @@ -72,6 +72,7 @@ static String workingDir = "examples/krk/"; static String allData = workingDir+"krkopt_no_draw.data"; + //static String allData = workingDir+"krkopt_original_dataset.data"; static URI ontologyURI = KRKOntologyTBox.ontologyURI; @@ -84,7 +85,7 @@ static HashMap<Individual, String> indToClass = new HashMap<Individual, String>(); static Set<ReasonerComponent> allReasoners = new HashSet<ReasonerComponent>(); - static int negativeExamplesAdded = 300; + static int negativeExamplesAdded = 200; // static LinkedList<String> words; public KB kb; @@ -301,7 +302,7 @@ String line = ""; int x = 0; while ((line = in.readLine()) != null) { - if (x % 10000 == 0) + if (x % 1000 == 0) {sc.print("Currently at line " + x+" : ");} km.addOneLineToKBinit(x, line); if(x%1000==0 && x!=0){ @@ -309,12 +310,13 @@ allReasoners.add(km.reasoner); km = new KRKModular(); } - if(x==26000)break; + //if(x==200)break; x++; }// endWhile km.initReasonerFact(); allReasoners.add(km.reasoner); + km.writeOWLFile(); km = null; @@ -466,16 +468,16 @@ // RANKS are numbers //WKing - kb.addABoxAxiom(new ClassAssertionAxiom(getAtomicConcept(ar[0].toUpperCase()), wkingind)); - kb.addABoxAxiom(new ClassAssertionAxiom(getAtomicConcept("F"+ar[1]) , wkingind)); + kb.addABoxAxiom(new ClassAssertionAxiom(getAtomicConcept("File"+ar[0].toUpperCase()), wkingind)); + kb.addABoxAxiom(new ClassAssertionAxiom(getAtomicConcept("Rank"+ar[1]) , wkingind)); //WRook - kb.addABoxAxiom(new ClassAssertionAxiom(getAtomicConcept(ar[2].toUpperCase()), wrookind)); - kb.addABoxAxiom(new ClassAssertionAxiom(getAtomicConcept("F"+ar[3]) , wrookind)); + kb.addABoxAxiom(new ClassAssertionAxiom(getAtomicConcept("File"+ar[2].toUpperCase()), wrookind)); + kb.addABoxAxiom(new ClassAssertionAxiom(getAtomicConcept("Rank"+ar[3]) , wrookind)); //BKing - kb.addABoxAxiom(new ClassAssertionAxiom(getAtomicConcept(ar[4].toUpperCase()), bkingind)); - kb.addABoxAxiom(new ClassAssertionAxiom(getAtomicConcept("F"+ar[5]), bkingind)); + kb.addABoxAxiom(new ClassAssertionAxiom(getAtomicConcept("File"+ar[4].toUpperCase()), bkingind)); + kb.addABoxAxiom(new ClassAssertionAxiom(getAtomicConcept("Rank"+ar[5]), bkingind)); Modified: trunk/src/dl-learner/org/dllearner/examples/KRKOntologyTBox.java =================================================================== --- trunk/src/dl-learner/org/dllearner/examples/KRKOntologyTBox.java 2008-04-16 06:07:17 UTC (rev 790) +++ trunk/src/dl-learner/org/dllearner/examples/KRKOntologyTBox.java 2008-04-16 07:51:44 UTC (rev 791) @@ -101,10 +101,10 @@ kb.addTBoxAxiom(new SubClassAxiom(WRook, Piece)); kb.addTBoxAxiom(new SubClassAxiom(BKing, Piece)); - String[] letters=new String[]{"A","B","C","D","E","F","G","H"}; + String[] letters=new String[]{"FileA","FileB","FileC","FileD","FileE","FileF","FileG","FileH"}; String[] numbers=new String[8]; for (int i = 0; i < numbers.length; i++) { - numbers[i]="F"+(i+1); + numbers[i]="Rank"+(i+1); } //System.out.println(numbers); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jen...@us...> - 2008-04-16 06:07:34
|
Revision: 790 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=790&view=rev Author: jenslehmann Date: 2008-04-15 23:07:17 -0700 (Tue, 15 Apr 2008) Log Message: ----------- removed ore/ore/ directory and small error fix Modified Paths: -------------- trunk/src/dl-learner/org/dllearner/tools/ore/LearningPanelDescriptor.java Removed Paths: ------------- trunk/src/dl-learner/org/dllearner/tools/ore/ore/ Modified: trunk/src/dl-learner/org/dllearner/tools/ore/LearningPanelDescriptor.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/ore/LearningPanelDescriptor.java 2008-04-15 10:21:10 UTC (rev 789) +++ trunk/src/dl-learner/org/dllearner/tools/ore/LearningPanelDescriptor.java 2008-04-16 06:07:17 UTC (rev 790) @@ -182,7 +182,6 @@ } - @Override public void valueChanged(ListSelectionEvent e) { if (!e.getValueIsAdjusting()) System.out.println(panel4.getResultList().getSelectedValue()); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ku...@us...> - 2008-04-15 10:21:22
|
Revision: 789 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=789&view=rev Author: kurzum Date: 2008-04-15 03:21:10 -0700 (Tue, 15 Apr 2008) Log Message: ----------- dataset with no draws Added Paths: ----------- trunk/examples/krk/krkopt_no_draw.data Added: trunk/examples/krk/krkopt_no_draw.data =================================================================== --- trunk/examples/krk/krkopt_no_draw.data (rev 0) +++ trunk/examples/krk/krkopt_no_draw.data 2008-04-15 10:21:10 UTC (rev 789) @@ -0,0 +1,25260 @@ +c,1,a,3,a,1,zero +c,1,a,4,a,1,zero +c,1,a,5,a,1,zero +c,1,a,6,a,1,zero +c,1,a,7,a,1,zero +c,1,a,8,a,1,zero +c,2,a,3,a,1,zero +c,2,a,4,a,1,zero +c,2,a,4,a,2,zero +c,2,a,5,a,1,zero +c,2,a,5,a,2,zero +c,2,a,6,a,1,zero +c,2,a,6,a,2,zero +c,2,a,7,a,1,zero +c,2,a,7,a,2,zero +c,2,a,8,a,1,zero +c,2,a,8,a,2,zero +c,3,a,1,c,1,zero +c,3,e,1,c,1,zero +c,3,f,1,c,1,zero +c,3,g,1,c,1,zero +c,3,h,1,c,1,zero +d,3,a,1,d,1,zero +d,3,b,1,d,1,zero +d,3,f,1,d,1,zero +d,3,g,1,d,1,zero +d,3,h,1,d,1,zero +c,1,c,3,a,2,one +c,1,d,3,a,2,one +c,1,e,3,a,2,one +c,1,f,3,a,2,one +c,1,g,3,a,2,one +c,1,h,3,a,2,one +c,2,b,3,a,2,one +c,2,b,4,a,1,one +c,2,b,5,a,1,one +c,2,b,6,a,1,one +c,2,b,7,a,1,one +c,2,b,8,a,1,one +c,2,c,3,a,2,one +c,2,c,4,a,1,one +c,2,c,4,a,3,one +c,2,c,5,a,1,one +c,2,c,6,a,1,one +c,2,c,7,a,1,one +c,2,c,8,a,1,one +c,2,d,3,a,2,one +c,2,d,4,a,1,one +c,2,d,4,a,3,one +c,2,d,5,a,1,one +c,2,d,6,a,1,one +c,2,d,7,a,1,one +c,2,d,8,a,1,one +c,2,e,3,a,2,one +c,2,e,4,a,1,one +c,2,e,4,a,3,one +c,2,e,5,a,1,one +c,2,e,6,a,1,one +c,2,e,7,a,1,one +c,2,e,8,a,1,one +c,2,f,3,a,2,one +c,2,f,4,a,1,one +c,2,f,4,a,3,one +c,2,f,5,a,1,one +c,2,f,6,a,1,one +c,2,f,7,a,1,one +c,2,f,8,a,1,one +c,2,g,3,a,2,one +c,2,g,4,a,1,one +c,2,g,4,a,3,one +c,2,g,5,a,1,one +c,2,g,6,a,1,one +c,2,g,7,a,1,one +c,2,g,8,a,1,one +c,2,h,3,a,2,one +c,2,h,4,a,1,one +c,2,h,4,a,3,one +c,2,h,5,a,1,one +c,2,h,6,a,1,one +c,2,h,7,a,1,one +c,2,h,8,a,1,one +c,3,a,3,b,1,one +c,3,a,4,b,1,one +c,3,a,5,b,1,one +c,3,a,6,b,1,one +c,3,a,7,b,1,one +c,3,a,8,b,1,one +c,3,e,3,d,1,one +c,3,e,4,d,1,one +c,3,e,5,d,1,one +c,3,e,6,d,1,one +c,3,e,7,d,1,one +c,3,e,8,d,1,one +d,3,b,3,c,1,one +d,3,b,4,c,1,one +d,3,b,5,c,1,one +d,3,b,6,c,1,one +d,3,b,7,c,1,one +d,3,b,8,c,1,one +d,3,f,3,e,1,one +d,3,f,4,e,1,one +d,3,f,5,e,1,one +d,3,f,6,e,1,one +d,3,f,7,e,1,one +d,3,f,8,e,1,one +c,1,b,3,a,1,two +c,1,c,3,a,1,two +c,1,c,4,a,1,two +c,1,c,5,a,1,two +c,1,c,6,a,1,two +c,1,c,7,a,1,two +c,1,c,8,a,1,two +c,1,d,1,a,1,two +c,1,d,3,a,1,two +c,1,d,4,a,1,two +c,1,d,5,a,1,two +c,1,d,6,a,1,two +c,1,d,7,a,1,two +c,1,d,8,a,1,two +c,1,e,1,a,1,two +c,1,e,3,a,1,two +c,1,e,4,a,1,two +c,1,e,5,a,1,two +c,1,e,6,a,1,two +c,1,e,7,a,1,two +c,1,e,8,a,1,two +c,1,f,1,a,1,two +c,1,f,3,a,1,two +c,1,f,4,a,1,two +c,1,f,5,a,1,two +c,1,f,6,a,1,two +c,1,f,7,a,1,two +c,1,f,8,a,1,two +c,1,g,1,a,1,two +c,1,g,3,a,1,two +c,1,g,4,a,1,two +c,1,g,5,a,1,two +c,1,g,6,a,1,two +c,1,g,7,a,1,two +c,1,g,8,a,1,two +c,1,h,1,a,1,two +c,1,h,3,a,1,two +c,1,h,4,a,1,two +c,1,h,5,a,1,two +c,1,h,6,a,1,two +c,1,h,7,a,1,two +c,1,h,8,a,1,two +c,2,b,1,a,1,two +c,2,b,3,a,1,two +c,2,b,4,a,2,two +c,2,c,1,a,1,two +c,2,c,3,a,1,two +c,2,c,4,a,2,two +c,2,c,5,a,2,two +c,2,c,6,a,2,two +c,2,c,7,a,2,two +c,2,c,8,a,2,two +c,2,d,1,a,1,two +c,2,d,1,a,2,two +c,2,d,2,a,1,two +c,2,d,2,a,2,two +c,2,d,3,a,1,two +c,2,d,4,a,2,two +c,2,d,5,a,2,two +c,2,d,6,a,2,two +c,2,d,7,a,2,two +c,2,d,8,a,2,two +c,2,e,1,a,1,two +c,2,e,1,a,2,two +c,2,e,2,a,1,two +c,2,e,2,a,2,two +c,2,e,3,a,1,two +c,2,e,4,a,2,two +c,2,e,5,a,2,two +c,2,e,6,a,2,two +c,2,e,7,a,2,two +c,2,e,8,a,2,two +c,2,f,1,a,1,two +c,2,f,1,a,2,two +c,2,f,2,a,1,two +c,2,f,2,a,2,two +c,2,f,3,a,1,two +c,2,f,4,a,2,two +c,2,f,5,a,2,two +c,2,f,6,a,2,two +c,2,f,7,a,2,two +c,2,f,8,a,2,two +c,2,g,1,a,1,two +c,2,g,1,a,2,two +c,2,g,2,a,1,two +c,2,g,2,a,2,two +c,2,g,3,a,1,two +c,2,g,4,a,2,two +c,2,g,5,a,2,two +c,2,g,6,a,2,two +c,2,g,7,a,2,two +c,2,g,8,a,2,two +c,2,h,1,a,1,two +c,2,h,1,a,2,two +c,2,h,2,a,1,two +c,2,h,2,a,2,two +c,2,h,3,a,1,two +c,2,h,4,a,2,two +c,2,h,5,a,2,two +c,2,h,6,a,2,two +c,2,h,7,a,2,two +c,2,h,8,a,2,two +c,3,a,4,c,1,two +c,3,a,5,c,1,two +c,3,a,6,c,1,two +c,3,a,7,c,1,two +c,3,a,8,c,1,two +c,3,b,4,c,1,two +c,3,b,5,c,1,two +c,3,b,6,c,1,two +c,3,b,7,c,1,two +c,3,b,8,c,1,two +c,3,c,1,a,1,two +c,3,c,2,a,1,two +c,3,c,4,c,1,two +c,3,c,5,c,1,two +c,3,c,6,c,1,two +c,3,c,7,c,1,two +c,3,c,8,c,1,two +c,3,d,1,a,1,two +c,3,d,1,b,1,two +c,3,d,3,b,1,two +c,3,d,4,a,1,two +c,3,d,4,b,1,two +c,3,d,4,c,1,two +c,3,d,5,b,1,two +c,3,d,5,c,1,two +c,3,d,6,b,1,two +c,3,d,6,c,1,two +c,3,d,7,b,1,two +c,3,d,7,c,1,two +c,3,d,8,b,1,two +c,3,d,8,c,1,two +c,3,e,1,a,1,two +c,3,e,1,b,1,two +c,3,e,2,b,1,two +c,3,e,3,b,1,two +c,3,e,4,a,1,two +c,3,e,4,b,1,two +c,3,e,4,c,1,two +c,3,e,5,a,1,two +c,3,e,5,b,1,two +c,3,e,5,c,1,two +c,3,e,6,b,1,two +c,3,e,6,c,1,two +c,3,e,7,b,1,two +c,3,e,7,c,1,two +c,3,e,8,b,1,two +c,3,e,8,c,1,two +c,3,f,1,a,1,two +c,3,f,1,b,1,two +c,3,f,2,b,1,two +c,3,f,3,b,1,two +c,3,f,4,a,1,two +c,3,f,4,b,1,two +c,3,f,4,c,1,two +c,3,f,5,a,1,two +c,3,f,5,b,1,two +c,3,f,5,c,1,two +c,3,f,6,a,1,two +c,3,f,6,b,1,two +c,3,f,6,c,1,two +c,3,f,7,b,1,two +c,3,f,7,c,1,two +c,3,f,8,b,1,two +c,3,f,8,c,1,two +c,3,g,1,a,1,two +c,3,g,1,b,1,two +c,3,g,2,b,1,two +c,3,g,3,b,1,two +c,3,g,4,a,1,two +c,3,g,4,b,1,two +c,3,g,4,c,1,two +c,3,g,5,a,1,two +c,3,g,5,b,1,two +c,3,g,5,c,1,two +c,3,g,6,a,1,two +c,3,g,6,b,1,two +c,3,g,6,c,1,two +c,3,g,7,a,1,two +c,3,g,7,b,1,two +c,3,g,7,c,1,two +c,3,g,8,b,1,two +c,3,g,8,c,1,two +c,3,h,1,a,1,two +c,3,h,1,b,1,two +c,3,h,2,b,1,two +c,3,h,3,b,1,two +c,3,h,4,a,1,two +c,3,h,4,b,1,two +c,3,h,4,c,1,two +c,3,h,5,a,1,two +c,3,h,5,b,1,two +c,3,h,5,c,1,two +c,3,h,6,a,1,two +c,3,h,6,b,1,two +c,3,h,6,c,1,two +c,3,h,7,a,1,two +c,3,h,7,b,1,two +c,3,h,7,c,1,two +c,3,h,8,a,1,two +c,3,h,8,b,1,two +c,3,h,8,c,1,two +d,1,b,3,a,1,two +d,2,b,3,a,1,two +d,3,a,4,d,1,two +d,3,a,5,d,1,two +d,3,a,6,d,1,two +d,3,a,7,d,1,two +d,3,a,8,d,1,two +d,3,b,3,a,1,two +d,3,b,4,d,1,two +d,3,b,5,d,1,two +d,3,b,6,d,1,two +d,3,b,7,d,1,two +d,3,b,8,d,1,two +d,3,c,4,d,1,two +d,3,c,5,d,1,two +d,3,c,6,d,1,two +d,3,c,7,d,1,two +d,3,c,8,d,1,two +d,3,d,4,d,1,two +d,3,d,5,d,1,two +d,3,d,6,d,1,two +d,3,d,7,d,1,two +d,3,d,8,d,1,two +d,3,e,4,d,1,two +d,3,e,5,d,1,two +d,3,e,6,d,1,two +d,3,e,7,d,1,two +d,3,e,8,d,1,two +d,3,f,4,d,1,two +d,3,f,5,d,1,two +d,3,f,6,d,1,two +d,3,f,7,d,1,two +d,3,f,8,d,1,two +d,3,g,4,d,1,two +d,3,g,5,d,1,two +d,3,g,6,d,1,two +d,3,g,7,d,1,two +d,3,g,8,d,1,two +d,3,h,4,d,1,two +d,3,h,5,d,1,two +d,3,h,6,d,1,two +d,3,h,7,d,1,two +d,3,h,8,d,1,two +c,1,b,4,a,1,three +c,3,b,2,b,1,three +c,3,b,3,b,1,three +c,3,b,4,b,1,three +c,3,b,5,b,1,three +c,3,b,6,b,1,three +c,3,b,7,b,1,three +c,3,b,8,b,1,three +c,3,c,2,b,1,three +c,3,c,4,b,1,three +c,3,c,5,b,1,three +c,3,c,6,b,1,three +c,3,c,7,b,1,three +c,3,c,8,b,1,three +c,3,d,2,a,1,three +c,3,d,2,b,1,three +c,3,d,2,c,1,three +c,3,d,3,a,1,three +c,3,d,3,c,1,three +c,3,e,2,a,1,three +c,3,e,2,c,1,three +c,3,e,3,a,1,three +c,3,e,3,c,1,three +c,3,f,2,a,1,three +c,3,f,3,a,1,three +c,3,f,3,c,1,three +c,3,g,2,a,1,three +c,3,g,3,a,1,three +c,3,g,3,c,1,three +c,3,h,2,a,1,three +c,3,h,3,a,1,three +c,3,h,3,c,1,three +d,1,b,3,b,1,three +d,1,b,4,a,1,three +d,1,b,4,b,1,three +d,1,d,2,b,1,three +d,1,e,2,b,1,three +d,1,f,2,b,1,three +d,1,g,2,b,1,three +d,1,h,2,b,1,three +d,2,b,3,b,1,three +d,2,b,4,a,1,three +d,2,b,4,b,1,three +d,2,b,5,a,1,three +d,2,b,5,b,1,three +d,2,b,6,a,1,three +d,2,b,6,b,1,three +d,2,b,7,a,1,three +d,2,b,7,b,1,three +d,2,b,8,a,1,three +d,2,b,8,b,1,three +d,2,c,2,b,1,three +d,2,d,3,b,2,three +d,2,e,3,b,2,three +d,2,f,3,b,2,three +d,2,g,3,b,2,three +d,2,h,3,b,2,three +d,3,b,3,b,1,three +d,3,b,4,a,1,three +d,3,b,4,b,1,three +d,3,b,5,a,1,three +d,3,b,5,b,1,three +d,3,b,6,a,1,three +d,3,b,6,b,1,three +d,3,b,7,a,1,three +d,3,b,7,b,1,three +d,3,b,8,a,1,three +d,3,b,8,b,1,three +d,3,c,2,b,1,three +d,3,e,2,a,1,three +d,3,e,2,c,1,three +d,3,f,2,a,1,three +d,3,f,2,c,1,three +d,3,g,2,a,1,three +d,3,g,2,c,1,three +d,3,h,2,a,1,three +d,3,h,2,c,1,three +d,4,e,2,a,1,three +d,4,f,2,a,1,three +d,4,g,2,a,1,three +d,4,h,2,a,1,three +c,2,b,5,a,2,four +d,1,a,2,f,1,four +d,1,a,2,h,1,four +d,1,b,2,f,1,four +d,1,b,2,h,1,four +d,1,c,2,a,1,four +d,1,c,2,f,1,four +d,1,c,2,h,1,four +d,1,d,2,a,1,four +d,1,d,2,f,1,four +d,1,d,2,h,1,four +d,1,d,3,a,1,four +d,1,d,3,a,2,four +d,1,d,3,b,1,four +d,1,d,3,b,2,four +d,1,e,2,a,1,four +d,1,e,2,f,1,four +d,1,e,2,h,1,four +d,1,e,3,a,1,four +d,1,e,3,a,2,four +d,1,e,3,b,1,four +d,1,e,3,b,2,four +d,1,f,2,a,1,four +d,1,f,2,h,1,four +d,1,f,3,a,1,four +d,1,f,3,a,2,four +d,1,f,3,b,1,four +d,1,f,3,b,2,four +d,1,g,2,a,1,four +d,1,g,3,a,1,four +d,1,g,3,a,2,four +d,1,g,3,b,1,four +d,1,g,3,b,2,four +d,1,h,2,a,1,four +d,1,h,3,a,1,four +d,1,h,3,a,2,four +d,1,h,3,b,1,four +d,1,h,3,b,2,four +d,2,a,3,a,1,four +d,2,a,3,b,1,four +d,2,b,4,a,2,four +d,2,b,4,b,2,four +d,2,b,5,a,2,four +d,2,b,5,b,2,four +d,2,c,2,a,1,four +d,2,c,3,a,1,four +d,2,c,3,a,2,four +d,2,c,3,b,1,four +d,2,c,3,b,2,four +d,2,d,3,a,1,four +d,2,d,3,a,2,four +d,2,d,3,b,1,four +d,2,d,4,a,1,four +d,2,d,4,b,1,four +d,2,d,4,b,3,four +d,2,d,5,a,1,four +d,2,d,5,b,1,four +d,2,d,6,a,1,four +d,2,d,6,b,1,four +d,2,d,7,a,1,four +d,2,d,7,b,1,four +d,2,d,8,a,1,four +d,2,d,8,b,1,four +d,2,e,1,a,1,four +d,2,e,1,b,1,four +d,2,e,2,a,1,four +d,2,e,2,b,1,four +d,2,e,2,f,1,four +d,2,e,2,h,1,four +d,2,e,3,a,1,four +d,2,e,3,a,2,four +d,2,e,3,b,1,four +d,2,e,4,a,1,four +d,2,e,4,b,1,four +d,2,e,4,b,3,four +d,2,e,5,a,1,four +d,2,e,5,b,1,four +d,2,e,6,a,1,four +d,2,e,6,b,1,four +d,2,e,7,a,1,four +d,2,e,7,b,1,four +d,2,e,8,a,1,four +d,2,e,8,b,1,four +d,2,f,1,a,1,four +d,2,f,1,b,1,four +d,2,f,2,a,1,four +d,2,f,2,b,1,four +d,2,f,2,h,1,four +d,2,f,3,a,1,four +d,2,f,3,a,2,four +d,2,f,3,b,1,four +d,2,f,4,a,1,four +d,2,f,4,b,1,four +d,2,f,4,b,3,four +d,2,f,5,a,1,four +d,2,f,5,b,1,four +d,2,f,6,a,1,four +d,2,f,6,b,1,four +d,2,f,7,a,1,four +d,2,f,7,b,1,four +d,2,f,8,a,1,four +d,2,f,8,b,1,four +d,2,g,1,a,1,four +d,2,g,1,b,1,four +d,2,g,2,a,1,four +d,2,g,2,b,1,four +d,2,g,3,a,1,four +d,2,g,3,a,2,four +d,2,g,3,b,1,four +d,2,g,4,a,1,four +d,2,g,4,b,1,four +d,2,g,4,b,3,four +d,2,g,5,a,1,four +d,2,g,5,b,1,four +d,2,g,6,a,1,four +d,2,g,6,b,1,four +d,2,g,7,a,1,four +d,2,g,7,b,1,four +d,2,g,8,a,1,four +d,2,g,8,b,1,four +d,2,h,1,a,1,four +d,2,h,1,b,1,four +d,2,h,2,a,1,four +d,2,h,2,b,1,four +d,2,h,3,a,1,four +d,2,h,3,a,2,four +d,2,h,3,b,1,four +d,2,h,4,a,1,four +d,2,h,4,b,1,four +d,2,h,4,b,3,four +d,2,h,5,a,1,four +d,2,h,5,b,1,four +d,2,h,6,a,1,four +d,2,h,6,b,1,four +d,2,h,7,a,1,four +d,2,h,7,b,1,four +d,2,h,8,a,1,four +d,2,h,8,b,1,four +d,3,a,2,c,1,four +d,3,a,2,e,1,four +d,3,a,2,g,1,four +d,3,b,2,e,1,four +d,3,b,2,g,1,four +d,3,b,4,a,2,four +d,3,b,4,b,2,four +d,3,b,5,a,2,four +d,3,b,5,b,2,four +d,3,b,6,a,2,four +d,3,b,6,b,2,four +d,3,b,7,a,2,four +d,3,b,7,b,2,four +d,3,b,8,a,2,four +d,3,b,8,b,2,four +d,3,c,2,a,1,four +d,3,c,2,c,1,four +d,3,c,2,e,1,four +d,3,c,2,g,1,four +d,3,c,3,b,2,four +d,3,d,2,a,1,four +d,3,d,2,b,1,four +d,3,d,2,c,1,four +d,3,d,2,e,1,four +d,3,d,2,g,1,four +d,3,e,2,b,1,four +d,3,e,2,d,1,four +d,3,e,3,a,1,four +d,3,e,3,b,1,four +d,3,e,3,c,1,four +d,3,e,3,d,1,four +d,3,f,2,b,1,four +d,3,f,2,d,1,four +d,3,f,2,h,1,four +d,3,f,3,a,1,four +d,3,f,3,b,1,four +d,3,f,3,c,1,four +d,3,f,3,d,1,four +d,3,g,2,b,1,four +d,3,g,3,a,1,four +d,3,g,3,b,1,four +d,3,g,3,c,1,four +d,3,g,3,d,1,four +d,3,h,2,b,1,four +d,3,h,3,a,1,four +d,3,h,3,b,1,four +d,3,h,3,c,1,four +d,3,h,3,d,1,four +d,4,a,2,g,1,four +d,4,b,2,g,1,four +d,4,c,2,a,1,four +d,4,c,2,g,1,four +d,4,d,2,a,1,four +d,4,d,2,b,1,four +d,4,d,2,g,1,four +d,4,e,2,b,1,four +d,4,f,2,b,1,four +d,4,f,2,h,1,four +d,4,g,2,b,1,four +d,4,h,2,b,1,four +c,1,a,2,e,1,five +c,1,a,2,g,1,five +c,1,b,2,e,1,five +c,1,b,2,g,1,five +c,1,b,5,a,1,five +c,1,c,2,e,1,five +c,1,c,2,g,1,five +c,1,d,2,e,1,five +c,1,d,2,g,1,five +c,1,d,4,a,2,five +c,1,d,4,a,3,five +c,1,e,2,g,1,five +c,1,e,4,a,2,five +c,1,e,4,a,3,five +c,1,f,4,a,2,five +c,1,f,4,a,3,five +c,1,g,4,a,2,five +c,1,g,4,a,3,five +c,1,h,4,a,2,five +c,1,h,4,a,3,five +c,2,d,2,e,1,five +c,2,d,2,f,1,five +c,2,d,2,g,1,five +c,2,d,2,h,1,five +c,2,e,2,g,1,five +c,3,a,2,d,1,five +c,3,a,2,f,1,five +c,3,a,2,h,1,five +c,3,b,2,d,1,five +c,3,b,2,f,1,five +c,3,b,2,h,1,five +c,3,c,2,d,1,five +c,3,c,2,f,1,five +c,3,c,2,h,1,five +c,3,d,2,d,1,five +c,3,d,2,f,1,five +c,3,d,2,h,1,five +c,3,e,2,g,1,five +c,3,f,2,c,1,five +d,1,a,2,g,1,five +d,1,a,3,a,1,five +d,1,a,3,b,1,five +d,1,a,3,f,2,five +d,1,a,3,h,1,five +d,1,a,3,h,2,five +d,1,b,2,g,1,five +d,1,b,3,f,2,five +d,1,b,3,h,1,five +d,1,b,3,h,2,five +d,1,b,5,a,1,five +d,1,b,5,b,1,five +d,1,c,2,b,1,five +d,1,c,2,g,1,five +d,1,c,3,a,1,five +d,1,c,3,a,2,five +d,1,c,3,b,1,five +d,1,c,3,f,2,five +d,1,c,3,h,1,five +d,1,c,3,h,2,five +d,1,d,2,g,1,five +d,1,d,3,f,2,five +d,1,d,3,h,1,five +d,1,d,3,h,2,five +d,1,d,4,a,1,five +d,1,d,4,a,2,five +d,1,d,4,a,3,five +d,1,d,4,b,1,five +d,1,d,5,a,1,five +d,1,d,5,b,1,five +d,1,d,6,a,1,five +d,1,d,6,b,1,five +d,1,d,7,a,1,five +d,1,d,7,b,1,five +d,1,d,8,a,1,five +d,1,d,8,b,1,five +d,1,e,1,a,1,five +d,1,e,1,b,1,five +d,1,e,2,g,1,five +d,1,e,3,h,1,five +d,1,e,3,h,2,five +d,1,e,4,a,1,five +d,1,e,4,a,2,five +d,1,e,4,a,3,five +d,1,e,4,b,1,five +d,1,e,5,a,1,five +d,1,e,5,b,1,five +d,1,e,6,a,1,five +d,1,e,6,b,1,five +d,1,e,7,a,1,five +d,1,e,7,b,1,five +d,1,e,8,a,1,five +d,1,e,8,b,1,five +d,1,f,1,a,1,five +d,1,f,1,b,1,five +d,1,f,3,f,1,five +d,1,f,3,g,1,five +d,1,f,3,h,1,five +d,1,f,3,h,2,five +d,1,f,4,a,1,five +d,1,f,4,a,2,five +d,1,f,4,a,3,five +d,1,f,4,b,1,five +d,1,f,5,a,1,five +d,1,f,5,b,1,five +d,1,f,6,a,1,five +d,1,f,6,b,1,five +d,1,f,7,a,1,five +d,1,f,7,b,1,five +d,1,f,8,a,1,five +d,1,f,8,b,1,five +d,1,g,1,a,1,five +d,1,g,1,b,1,five +d,1,g,4,a,1,five +d,1,g,4,a,2,five +d,1,g,4,a,3,five +d,1,g,4,b,1,five +d,1,g,4,h,1,five +d,1,g,5,a,1,five +d,1,g,5,b,1,five +d,1,g,5,h,1,five +d,1,g,6,a,1,five +d,1,g,6,b,1,five +d,1,g,7,a,1,five +d,1,g,7,b,1,five +d,1,g,8,a,1,five +d,1,g,8,b,1,five +d,1,h,1,a,1,five +d,1,h,1,b,1,five +d,1,h,4,a,1,five +d,1,h,4,a,2,five +d,1,h,4,a,3,five +d,1,h,4,b,1,five +d,1,h,5,a,1,five +d,1,h,5,b,1,five +d,1,h,6,a,1,five +d,1,h,6,b,1,five +d,1,h,7,a,1,five +d,1,h,7,b,1,five +d,1,h,8,a,1,five +d,1,h,8,b,1,five +d,2,a,3,f,2,five +d,2,a,3,h,1,five +d,2,a,3,h,2,five +d,2,a,4,a,1,five +d,2,a,4,a,2,five +d,2,a,4,b,1,five +d,2,a,4,b,2,five +d,2,a,5,a,1,five +d,2,a,5,b,1,five +d,2,b,3,f,2,five +d,2,b,3,h,1,five +d,2,b,3,h,2,five +d,2,c,1,a,1,five +d,2,c,1,b,1,five +d,2,c,3,f,2,five +d,2,c,3,h,1,five +d,2,c,3,h,2,five +d,2,c,4,a,1,five +d,2,c,4,a,2,five +d,2,c,4,a,3,five +d,2,c,4,b,1,five +d,2,c,4,b,2,five +d,2,c,5,a,1,five +d,2,c,5,b,1,five +d,2,c,6,a,1,five +d,2,c,6,b,1,five +d,2,c,7,a,1,five +d,2,c,7,b,1,five +d,2,c,8,a,1,five +d,2,c,8,b,1,five +d,2,d,3,f,2,five +d,2,d,3,h,1,five +d,2,d,3,h,2,five +d,2,d,4,a,2,five +d,2,d,4,a,3,five +d,2,d,4,b,2,five +d,2,d,5,a,2,five +d,2,d,5,b,2,five +d,2,d,6,a,2,five +d,2,d,6,b,2,five +d,2,d,7,a,2,five +d,2,d,7,b,2,five +d,2,d,8,a,2,five +d,2,d,8,b,2,five +d,2,e,1,a,2,five +d,2,e,1,b,2,five +d,2,e,2,a,2,five +d,2,e,2,b,2,five +d,2,e,2,g,1,five +d,2,e,3,f,2,five +d,2,e,3,h,1,five +d,2,e,3,h,2,five +d,2,e,4,a,2,five +d,2,e,4,a,3,five +d,2,e,4,b,2,five +d,2,e,5,a,2,five +d,2,e,5,b,2,five +d,2,e,6,a,2,five +d,2,e,6,b,2,five +d,2,e,7,a,2,five +d,2,e,7,b,2,five +d,2,e,8,a,2,five +d,2,e,8,b,2,five +d,2,f,1,a,2,five +d,2,f,1,b,2,five +d,2,f,2,a,2,five +d,2,f,2,b,2,five +d,2,f,3,f,1,five +d,2,f,3,g,1,five +d,2,f,3,h,1,five +d,2,f,3,h,2,five +d,2,f,4,a,2,five +d,2,f,4,a,3,five +d,2,f,4,b,2,five +d,2,f,5,a,2,five +d,2,f,5,b,2,five +d,2,f,6,a,2,five +d,2,f,6,b,2,five +d,2,f,7,a,2,five +d,2,f,7,b,2,five +d,2,f,8,a,2,five +d,2,f,8,b,2,five +d,2,g,1,a,2,five +d,2,g,1,b,2,five +d,2,g,2,a,2,five +d,2,g,2,b,2,five +d,2,g,4,a,2,five +d,2,g,4,a,3,five +d,2,g,4,b,2,five +d,2,g,4,h,1,five +d,2,g,5,a,2,five +d,2,g,5,b,2,five +d,2,g,5,h,1,five +d,2,g,6,a,2,five +d,2,g,6,b,2,five +d,2,g,6,h,1,five +d,2,g,7,a,2,five +d,2,g,7,b,2,five +d,2,g,7,h,1,five +d,2,g,8,a,2,five +d,2,g,8,b,2,five +d,2,g,8,h,1,five +d,2,h,1,a,2,five +d,2,h,1,b,2,five +d,2,h,2,a,2,five +d,2,h,2,b,2,five +d,2,h,4,a,2,five +d,2,h,4,a,3,five +d,2,h,4,b,2,five +d,2,h,5,a,2,five +d,2,h,5,b,2,five +d,2,h,6,a,2,five +d,2,h,6,b,2,five +d,2,h,7,a,2,five +d,2,h,7,b,2,five +d,2,h,8,a,2,five +d,2,h,8,b,2,five +d,3,a,2,d,1,five +d,3,a,2,f,1,five +d,3,a,2,h,1,five +d,3,a,3,a,1,five +d,3,a,3,b,1,five +d,3,a,3,c,1,five +d,3,a,3,d,1,five +d,3,a,3,h,1,five +d,3,a,4,a,1,five +d,3,a,4,b,1,five +d,3,a,4,c,1,five +d,3,a,5,a,1,five +d,3,a,5,b,1,five +d,3,a,5,c,1,five +d,3,a,6,a,1,five +d,3,a,6,b,1,five +d,3,a,6,c,1,five +d,3,a,7,a,1,five +d,3,a,7,b,1,five +d,3,a,7,c,1,five +d,3,a,8,a,1,five +d,3,a,8,b,1,five +d,3,a,8,c,1,five +d,3,b,1,a,4,five +d,3,b,1,a,6,five +d,3,b,1,a,8,five +d,3,b,2,a,6,five +d,3,b,2,a,8,five +d,3,b,2,d,1,five +d,3,b,2,f,1,five +d,3,b,2,h,1,five +d,3,b,3,a,6,five +d,3,b,3,a,8,five +d,3,b,3,d,1,five +d,3,b,3,h,1,five +d,3,b,4,a,6,five +d,3,b,4,a,8,five +d,3,b,5,a,3,five +d,3,b,5,b,3,five +d,3,b,6,a,3,five +d,3,b,6,b,3,five +d,3,c,1,a,1,five +d,3,c,2,d,1,five +d,3,c,2,f,1,five +d,3,c,2,h,1,five +d,3,c,3,a,1,five +d,3,c,3,a,2,five +d,3,c,3,b,1,five +d,3,c,3,c,1,five +d,3,c,3,d,1,five +d,3,c,3,h,1,five +d,3,c,4,a,1,five +d,3,c,4,b,1,five +d,3,c,4,b,3,five +d,3,c,4,c,1,five +d,3,c,5,a,1,five +d,3,c,5,b,1,five +d,3,c,5,c,1,five +d,3,c,6,a,1,five +d,3,c,6,b,1,five +d,3,c,6,c,1,five +d,3,c,7,a,1,five +d,3,c,7,b,1,five +d,3,c,7,c,1,five +d,3,c,8,a,1,five +d,3,c,8,b,1,five +d,3,c,8,c,1,five +d,3,d,2,d,1,five +d,3,d,2,f,1,five +d,3,d,2,h,1,five +d,3,d,4,a,1,five +d,3,d,4,a,2,five +d,3,d,4,a,3,five +d,3,d,4,b,1,five +d,3,d,4,b,2,five +d,3,d,4,b,3,five +d,3,d,4,c,1,five +d,3,d,5,a,1,five +d,3,d,5,b,1,five +d,3,d,5,c,1,five +d,3,d,6,a,1,five +d,3,d,6,b,1,five +d,3,d,6,c,1,five +d,3,d,7,a,1,five +d,3,d,7,b,1,five +d,3,d,7,c,1,five +d,3,d,8,a,1,five +d,3,d,8,b,1,five +d,3,d,8,c,1,five +d,3,e,2,e,1,five +d,3,e,2,f,1,five +d,3,e,2,g,1,five +d,3,e,2,h,1,five +d,3,e,3,h,1,five +d,3,e,3,h,2,five +d,3,e,4,a,1,five +d,3,e,4,a,2,five +d,3,e,4,a,3,five +d,3,e,4,b,1,five +d,3,e,4,b,2,five +d,3,e,4,b,3,five +d,3,e,4,c,1,five +d,3,e,5,a,1,five +d,3,e,5,b,1,five +d,3,e,5,c,1,five +d,3,e,6,a,1,five +d,3,e,6,b,1,five +d,3,e,6,c,1,five +d,3,e,7,a,1,five +d,3,e,7,b,1,five +d,3,e,7,c,1,five +d,3,e,8,a,1,five +d,3,e,8,b,1,five +d,3,e,8,c,1,five +d,3,f,3,f,1,five +d,3,f,3,g,1,five +d,3,f,3,h,1,five +d,3,f,3,h,2,five +d,3,f,4,a,1,five +d,3,f,4,a,2,five +d,3,f,4,a,3,five +d,3,f,4,b,1,five +d,3,f,4,b,2,five +d,3,f,4,b,3,five +d,3,f,4,c,1,five +d,3,f,5,a,1,five +d,3,f,5,b,1,five +d,3,f,5,c,1,five +d,3,f,6,a,1,five +d,3,f,6,b,1,five +d,3,f,6,c,1,five +d,3,f,7,a,1,five +d,3,f,7,b,1,five +d,3,f,7,c,1,five +d,3,f,8,a,1,five +d,3,f,8,b,1,five +d,3,f,8,c,1,five +d,3,g,1,h,8,five +d,3,g,2,d,1,five +d,3,g,2,h,8,five +d,3,g,3,h,8,five +d,3,g,4,a,1,five +d,3,g,4,a,2,five +d,3,g,4,a,3,five +d,3,g,4,b,1,five +d,3,g,4,b,2,five +d,3,g,4,b,3,five +d,3,g,4,c,1,five +d,3,g,4,h,1,five +d,3,g,4,h,8,five +d,3,g,5,a,1,five +d,3,g,5,b,1,five +d,3,g,5,c,1,five +d,3,g,5,h,1,five +d,3,g,6,a,1,five +d,3,g,6,b,1,five +d,3,g,6,c,1,five +d,3,g,6,h,1,five +d,3,g,7,a,1,five +d,3,g,7,b,1,five +d,3,g,7,c,1,five +d,3,g,7,h,1,five +d,3,g,8,a,1,five +d,3,g,8,b,1,five +d,3,g,8,c,1,five +d,3,g,8,h,1,five +d,3,h,2,d,1,five +d,3,h,2,e,1,five +d,3,h,2,f,1,five +d,3,h,4,a,1,five +d,3,h,4,a,2,five +d,3,h,4,a,3,five +d,3,h,4,b,1,five +d,3,h,4,b,2,five +d,3,h,4,b,3,five +d,3,h,4,c,1,five +d,3,h,5,a,1,five +d,3,h,5,b,1,five +d,3,h,5,c,1,five +d,3,h,6,a,1,five +d,3,h,6,b,1,five +d,3,h,6,c,1,five +d,3,h,7,a,1,five +d,3,h,7,b,1,five +d,3,h,7,c,1,five +d,3,h,8,a,1,five +d,3,h,8,b,1,five +d,3,h,8,c,1,five +d,4,a,2,d,1,five +d,4,a,2,f,1,five +d,4,a,2,h,1,five +d,4,b,2,f,1,five +d,4,b,2,h,1,five +d,4,c,2,f,1,five +d,4,c,2,h,1,five +d,4,d,2,f,1,five +d,4,d,2,h,1,five +d,4,e,2,c,1,five +d,4,e,2,g,1,five +d,4,e,2,h,1,five +d,4,f,2,c,1,five +d,4,g,1,h,8,five +d,4,g,2,c,1,five +d,4,g,2,h,8,five +d,4,g,3,h,8,five +d,4,g,4,h,1,five +d,4,g,4,h,8,five +d,4,g,5,h,1,five +d,4,g,5,h,8,five +d,4,g,6,h,1,five +d,4,g,7,h,1,five +d,4,g,8,h,1,five +d,4,h,2,c,1,five +d,4,h,2,e,1,five +b,1,a,2,d,1,six +b,1,a,2,f,1,six +b,1,a,2,h,1,six +b,1,b,2,d,1,six +b,1,b,2,f,1,six +b,1,b,2,h,1,six +b,1,c,2,d,1,six +b,1,c,2,f,1,six +b,1,c,2,h,1,six +b,1,d,2,f,1,six +b,1,d,2,g,1,six +b,1,d,2,h,1,six +b,1,e,2,h,1,six +b,2,c,2,d,1,six +b,2,c,2,e,1,six +b,2,c,2,f,1,six +b,2,c,2,g,1,six +b,2,c,2,h,1,six +b,2,d,2,f,1,six +b,2,d,2,g,1,six +b,2,d,2,h,1,six +b,2,e,2,h,1,six +c,1,a,2,f,1,six +c,1,a,2,h,1,six +c,1,b,2,f,1,six +c,1,b,2,h,1,six +c,1,b,4,a,2,six +c,1,c,2,f,1,six +c,1,c,2,h,1,six +c,1,d,2,f,1,six +c,1,d,2,h,1,six +c,1,e,2,h,1,six +c,1,f,2,h,1,six +c,1,h,2,f,1,six +c,2,b,1,a,3,six +c,2,b,1,a,5,six +c,2,b,1,a,7,six +c,2,b,2,a,3,six +c,2,b,2,a,5,six +c,2,b,2,a,7,six +c,2,b,3,a,3,six +c,2,b,3,a,5,six +c,2,b,3,a,7,six +c,2,b,4,a,6,six +c,2,b,4,a,7,six +c,2,b,4,a,8,six +c,2,b,5,a,8,six +c,2,b,6,a,2,six +c,2,d,3,e,2,six +c,2,d,3,g,2,six +c,2,e,2,h,1,six +c,2,f,2,h,1,six +c,2,g,2,e,1,six +c,2,h,2,e,1,six +c,2,h,2,f,1,six +c,3,a,2,c,1,six +c,3,a,2,e,1,six +c,3,a,2,g,1,six +c,3,a,3,c,1,six +c,3,b,2,c,1,six +c,3,b,2,e,1,six +c,3,b,2,g,1,six +c,3,b,3,c,1,six +c,3,c,2,c,1,six +c,3,c,2,e,1,six +c,3,c,2,g,1,six +c,3,d,2,e,1,six +c,3,d,2,g,1,six +c,3,e,2,h,1,six +c,3,f,2,h,1,six +c,3,g,2,c,1,six +c,3,g,2,e,1,six +c,3,h,2,c,1,six +c,3,h,2,d,1,six +c,3,h,2,e,1,six +c,3,h,2,f,1,six +d,1,a,1,f,1,six +d,1,a,1,g,1,six +d,1,a,1,h,1,six +d,1,a,3,f,1,six +d,1,a,3,g,1,six +d,1,a,3,g,2,six +d,1,a,4,a,1,six +d,1,a,4,b,1,six +d,1,a,4,f,1,six +d,1,a,4,g,1,six +d,1,a,4,h,1,six +d,1,a,4,h,2,six +d,1,a,4,h,3,six +d,1,a,5,f,1,six +d,1,a,5,g,1,six +d,1,a,5,h,1,six +d,1,a,6,f,1,six +d,1,a,6,g,1,six +d,1,a,6,h,1,six +d,1,a,7,f,1,six +d,1,a,7,g,1,six +d,1,a,7,h,1,six +d,1,a,8,f,1,six +d,1,a,8,g,1,six +d,1,a,8,h,1,six +d,1,b,1,f,1,six +d,1,b,1,g,1,six +d,1,b,1,h,1,six +d,1,b,3,f,1,six +d,1,b,3,g,1,six +d,1,b,3,g,2,six +d,1,b,4,a,2,six +d,1,b,4,f,1,six +d,1,b,4,g,1,six +d,1,b,4,h,1,six +d,1,b,4,h,2,six +d,1,b,4,h,3,six +d,1,b,5,f,1,six +d,1,b,5,g,1,six +d,1,b,5,h,1,six +d,1,b,6,f,1,six +d,1,b,6,g,1,six +d,1,b,6,h,1,six +d,1,b,7,f,1,six +d,1,b,7,g,1,six +d,1,b,7,h,1,six +d,1,b,8,f,1,six +d,1,b,8,g,1,six +d,1,b,8,h,1,six +d,1,c,1,f,1,six +d,1,c,1,g,1,six +d,1,c,1,h,1,six +d,1,c,3,f,1,six +d,1,c,3,g,1,six +d,1,c,3,g,2,six +d,1,c,4,a,1,six +d,1,c,4,b,1,six +d,1,c,4,f,1,six +d,1,c,4,g,1,six +d,1,c,4,h,1,six +d,1,c,4,h,2,six +d,1,c,4,h,3,six +d,1,c,5,f,1,six +d,1,c,5,g,1,six +d,1,c,5,h,1,six +d,1,c,6,f,1,six +d,1,c,6,g,1,six +d,1,c,6,h,1,six +d,1,c,7,f,1,six +d,1,c,7,g,1,six +d,1,c,7,h,1,six +d,1,c,8,f,1,six +d,1,c,8,g,1,six +d,1,c,8,h,1,six +d,1,d,3,f,1,six +d,1,d,3,g,1,six +d,1,d,3,g,2,six +d,1,d,4,f,1,six +d,1,d,4,g,1,six +d,1,d,4,h,1,six +d,1,d,4,h,2,six +d,1,d,4,h,3,six +d,1,d,5,f,1,six +d,1,d,5,g,1,six +d,1,d,5,h,1,six +d,1,d,6,f,1,six +d,1,d,6,g,1,six +d,1,d,6,h,1,six +d,1,d,7,f,1,six +d,1,d,7,g,1,six +d,1,d,7,h,1,six +d,1,d,8,f,1,six +d,1,d,8,g,1,six +d,1,d,8,h,1,six +d,1,e,3,f,1,six +d,1,e,3,g,1,six +d,1,e,3,g,2,six +d,1,e,4,h,1,six +d,1,e,4,h,2,six +d,1,e,4,h,3,six +d,1,e,5,h,1,six +d,1,e,6,h,1,six +d,1,e,7,h,1,six +d,1,e,8,h,1,six +d,1,f,4,f,1,six +d,1,f,4,g,1,six +d,1,f,4,h,1,six +d,1,g,3,f,1,six +d,1,g,3,g,1,six +d,1,g,3,h,1,six +d,1,h,2,f,1,six +d,1,h,4,h,1,six +d,2,a,1,f,1,six +d,2,a,1,g,1,six +d,2,a,1,h,1,six +d,2,a,2,f,1,six +d,2,a,2,g,1,six +d,2,a,2,h,1,six +d,2,a,3,f,1,six +d,2,a,3,g,1,six +d,2,a,3,g,2,six +d,2,a,4,f,1,six +d,2,a,4,f,3,six +d,2,a,4,g,1,six +d,2,a,4,h,1,six +d,2,a,4,h,2,six +d,2,a,4,h,3,six +d,2,a,5,f,1,six +d,2,a,5,g,1,six +d,2,a,5,h,1,six +d,2,a,6,a,1,six +d,2,a,6,b,1,six +d,2,a,6,f,1,six +d,2,a,6,g,1,six +d,2,a,6,h,1,six +d,2,a,7,a,1,six +d,2,a,7,b,1,six +d,2,a,7,f,1,six +d,2,a,7,g,1,six +d,2,a,7,h,1,six +d,2,a,8,a,1,six +d,2,a,8,b,1,six +d,2,a,8,f,1,six +d,2,a,8,g,1,six +d,2,a,8,h,1,six +d,2,b,1,a,3,six +d,2,b,1,a,5,six +d,2,b,1,a,7,six +d,2,b,1,f,1,six +d,2,b,1,g,1,six +d,2,b,1,h,1,six +d,2,b,2,a,5,six +d,2,b,2,a,7,six +d,2,b,2,f,1,six +d,2,b,2,g,1,six +d,2,b,2,h,1,six +d,2,b,3,a,5,six +d,2,b,3,a,7,six +d,2,b,3,f,1,six +d,2,b,3,g,1,six +d,2,b,3,g,2,six +d,2,b,4,a,7,six +d,2,b,4,f,1,six +d,2,b,4,f,3,six +d,2,b,4,g,1,six +d,2,b,4,h,1,six +d,2,b,4,h,2,six +d,2,b,4,h,3,six +d,2,b,5,a,8,six +d,2,b,5,f,1,six +d,2,b,5,g,1,six +d,2,b,5,h,1,six +d,2,b,6,a,2,six +d,2,b,6,b,2,six +d,2,b,6,f,1,six +d,2,b,6,g,1,six +d,2,b,6,h,1,six +d,2,b,7,f,1,six +d,2,b,7,g,1,six +d,2,b,7,h,1,six +d,2,b,8,f,1,six +d,2,b,8,g,1,six +d,2,b,8,h,1,six +d,2,c,1,f,1,six +d,2,c,1,g,1,six +d,2,c,1,h,1,six +d,2,c,2,f,1,six +d,2,c,2,g,1,six +d,2,c,2,h,1,six +d,2,c,3,f,1,six +d,2,c,3,g,1,six +d,2,c,3,g,2,six +d,2,c,4,f,1,six +d,2,c,4,f,3,six +d,2,c,4,g,1,six +d,2,c,4,h,1,six +d,2,c,4,h,2,six +d,2,c,4,h,3,six +d,2,c,5,f,1,six +d,2,c,5,g,1,six +d,2,c,5,h,1,six +d,2,c,6,f,1,six +d,2,c,6,g,1,six +d,2,c,6,h,1,six +d,2,c,7,f,1,six +d,2,c,7,g,1,six +d,2,c,7,h,1,six +d,2,c,8,f,1,six +d,2,c,8,g,1,six +d,2,c,8,h,1,six +d,2,d,1,a,1,six +d,2,d,1,b,1,six +d,2,d,1,h,1,six +d,2,d,3,f,1,six +d,2,d,3,g,1,six +d,2,d,3,g,2,six +d,2,d,4,f,1,six +d,2,d,4,f,3,six +d,2,d,4,g,1,six +d,2,d,4,h,1,six +d,2,d,4,h,2,six +d,2,d,4,h,3,six +d,2,d,5,f,1,six +d,2,d,5,g,1,six +d,2,d,5,h,1,six +d,2,d,6,f,1,six +d,2,d,6,g,1,six +d,2,d,6,h,1,six +d,2,d,7,f,1,six +d,2,d,7,g,1,six +d,2,d,7,h,1,six +d,2,d,8,f,1,six +d,2,d,8,g,1,six +d,2,d,8,h,1,six +d,2,e,3,f,1,six +d,2,e,3,g,1,six +d,2,e,3,g,2,six +d,2,e,4,f,1,six +d,2,e,4,g,1,six +d,2,e,4,h,1,six +d,2,e,4,h,2,six +d,2,e,4,h,3,six +d,2,e,5,f,1,six +d,2,e,5,g,1,six +d,2,e,5,h,1,six +d,2,e,6,f,1,six +d,2,e,6,g,1,six +d,2,e,6,h,1,six +d,2,e,7,f,1,six +d,2,e,7,g,1,six +d,2,e,7,h,1,six +d,2,e,8,f,1,six +d,2,e,8,g,1,six +d,2,e,8,h,1,six +d,2,f,4,f,1,six +d,2,f,4,f,2,six +d,2,f,4,g,1,six +d,2,f,4,g,2,six +d,2,f,4,h,1,six +d,2,f,4,h,2,six +d,2,f,4,h,3,six +d,2,g,1,h,5,six +d,2,g,1,h,7,six +d,2,g,2,h,7,six +d,2,g,3,f,1,six +d,2,g,3,g,1,six +d,2,g,3,h,1,six +d,2,g,3,h,7,six +d,2,g,4,h,7,six +d,2,g,5,h,2,six +d,2,g,6,h,2,six +d,2,h,2,f,1,six +d,2,h,4,h,1,six +d,3,a,1,h,1,six +d,3,a,3,e,1,six +d,3,a,3,f,1,six +d,3,a,3,g,1,six +d,3,a,4,a,2,six +d,3,a,4,b,2,six +d,3,a,4,h,1,six +d,3,a,4,h,2,six +d,3,a,4,h,3,six +d,3,a,5,a,2,six +d,3,a,5,b,2,six +d,3,a,5,h,1,six +d,3,a,6,a,2,six +d,3,a,6,b,2,six +d,3,a,6,h,1,six +d,3,a,7,h,1,six +d,3,a,8,h,1,six +d,3,b,1,a,3,six +d,3,b,1,a,5,six +d,3,b,1,a,7,six +d,3,b,1,b,3,six +d,3,b,1,h,1,six +d,3,b,2,a,4,six +d,3,b,2,a,5,six +d,3,b,2,a,7,six +d,3,b,3,a,5,six +d,3,b,3,a,7,six +d,3,b,3,e,1,six +d,3,b,3,f,1,six +d,3,b,3,g,1,six +d,3,b,4,a,7,six +d,3,b,4,h,1,six +d,3,b,4,h,2,six +d,3,b,4,h,3,six +d,3,b,5,a,7,six +d,3,b,5,a,8,six +d,3,b,5,h,1,six +d,3,b,6,h,1,six +d,3,b,7,a,3,six +d,3,b,7,a,5,six +d,3,b,7,b,3,six +d,3,b,7,h,1,six +d,3,b,8,a,3,six +d,3,b,8,a,4,six +d,3,b,8,a,5,six +d,3,b,8,b,3,six +d,3,b,8,h,1,six +d,3,c,1,a,2,six +d,3,c,1,h,1,six +d,3,c,2,a,2,six +d,3,c,2,b,2,six +d,3,c,3,e,1,six +d,3,c,3,f,1,six +d,3,c,3,g,1,six +d,3,c,4,a,2,six +d,3,c,4,a,3,six +d,3,c,4,b,2,six +d,3,c,4,h,1,six +d,3,c,4,h,2,six +d,3,c,4,h,3,six +d,3,c,5,a,2,six +d,3,c,5,b,2,six +d,3,c,5,h,1,six +d,3,c,6,a,2,six +d,3,c,6,b,2,six +d,3,c,6,h,1,six +d,3,c,7,a,2,six +d,3,c,7,b,2,six +d,3,c,7,h,1,six +d,3,c,8,a,2,six +d,3,c,8,b,2,six +d,3,c,8,h,1,six +d,3,d,1,h,1,six +d,3,d,4,h,1,six +d,3,d,4,h,2,six +d,3,d,4,h,3,six +d,3,d,5,a,2,six +d,3,d,5,b,2,six +d,3,d,5,b,4,six +d,3,d,5,h,1,six +d,3,d,6,a,2,six +d,3,d,6,b,2,six +d,3,d,6,h,1,six +d,3,d,7,a,2,six +d,3,d,7,b,2,six +d,3,d,7,h,1,six +d,3,d,8,a,2,six +d,3,d,8,b,2,six +d,3,d,8,h,1,six +d,3,e,1,a,1,six +d,3,e,1,a,2,six +d,3,e,1,b,1,six +d,3,e,1,b,2,six +d,3,e,1,c,1,six +d,3,e,2,a,2,six +d,3,e,2,b,2,six +d,3,e,3,a,2,six +d,3,e,3,b,2,six +d,3,e,3,e,1,six +d,3,e,3,f,1,six +d,3,e,3,f,2,six +d,3,e,3,g,1,six +d,3,e,3,g,2,six +d,3,e,4,h,1,six +d,3,e,4,h,2,six +d,3,e,4,h,3,six +d,3,e,5,a,2,six +d,3,e,5,b,2,six +d,3,e,5,b,4,six +d,3,e,5,h,1,six +d,3,e,6,a,2,six +d,3,e,6,b,2,six +d,3,e,6,h,1,six +d,3,e,7,a,2,six +d,3,e,7,b,2,six +d,3,e,7,h,1,six +d,3,e,8,a,2,six +d,3,e,8,b,2,six +d,3,e,8,h,1,six +d,3,f,1,a,1,six +d,3,f,1,a,2,six +d,3,f,1,b,1,six +d,3,f,1,b,2,six +d,3,f,1,c,1,six +d,3,f,2,a,2,six +d,3,f,2,b,2,six +d,3,f,3,a,2,six +d,3,f,3,b,2,six +d,3,f,4,f,1,six +d,3,f,4,f,2,six +d,3,f,4,g,1,six +d,3,f,4,g,2,six +d,3,f,4,h,1,six +d,3,f,4,h,2,six +d,3,f,4,h,3,six +d,3,f,5,a,2,six +d,3,f,5,b,2,six +d,3,f,5,b,4,six +d,3,f,6,a,2,six +d,3,f,6,b,2,six +d,3,f,7,a,2,six +d,3,f,7,b,2,six +d,3,f,8,a,2,six +d,3,f,8,b,2,six +d,3,g,1,a,1,six +d,3,g,1,a,2,six +d,3,g,1,b,1,six +d,3,g,1,b,2,six +d,3,g,1,c,1,six +d,3,g,1,h,5,six +d,3,g,1,h,7,six +d,3,g,2,a,2,six +d,3,g,2,b,2,six +d,3,g,2,e,1,six +d,3,g,2,h,7,six +d,3,g,3,a,2,six +d,3,g,3,b,2,six +d,3,g,3,h,1,six +d,3,g,3,h,7,six +d,3,g,4,h,7,six +d,3,g,5,a,2,six +d,3,g,5,b,2,six +d,3,g,5,b,4,six +d,3,g,5,h,2,six +d,3,g,5,h,8,six +d,3,g,6,a,2,six +d,3,g,6,b,2,six +d,3,g,6,h,2,six +d,3,g,7,a,2,six +d,3,g,7,b,2,six +d,3,g,7,h,2,six +d,3,g,8,a,2,six +d,3,g,8,b,2,six +d,3,g,8,h,2,six +d,3,g,8,h,4,six +d,3,h,1,a,1,six +d,3,h,1,a,2,six +d,3,h,1,b,1,six +d,3,h,1,b,2,six +d,3,h,1,c,1,six +d,3,h,2,a,2,six +d,3,h,2,b,2,six +d,3,h,3,a,2,six +d,3,h,3,b,2,six +d,3,h,4,h,1,six +d,3,h,5,a,2,six +d,3,h,5,b,2,six +d,3,h,5,b,4,six +d,3,h,6,a,2,six +d,3,h,6,b,2,six +d,3,h,7,a,2,six +d,3,h,7,b,2,six +d,3,h,8,a,2,six +d,3,h,8,b,2,six +d,4,a,2,c,1,six +d,4,a,2,d,2,six +d,4,a,2,e,1,six +d,4,a,4,h,1,six +d,4,a,4,h,2,six +d,4,b,2,d,1,six +d,4,b,2,d,2,six +d,4,b,2,e,1,six +d,4,b,4,h,1,six +d,4,b,4,h,2,six +d,4,c,2,e,1,six +d,4,c,3,a,1,six +d,4,c,3,b,1,six +d,4,c,3,b,2,six +d,4,c,4,h,1,six +d,4,c,4,h,2,six +d,4,d,3,b,2,six +d,4,d,5,b,1,six +d,4,d,6,b,1,six +d,4,d,7,b,1,six +d,4,d,8,b,1,six +d,4,e,4,a,1,six +d,4,e,4,h,1,six +d,4,e,4,h,2,six +d,4,e,4,h,3,six +d,4,f,2,d,1,six +d,4,f,2,d,2,six +d,4,f,3,g,1,six +d,4,f,3,h,1,six +d,4,f,3,h,2,six +d,4,f,4,a,1,six +d,4,g,1,h,5,six +d,4,g,1,h,7,six +d,4,g,2,d,1,six +d,4,g,2,d,2,six +d,4,g,2,e,1,six +d,4,g,2,h,7,six +d,4,g,3,h,7,six +d,4,g,4,a,1,six +d,4,g,4,h,7,six +d,4,g,5,h,2,six +d,4,g,6,h,2,six +d,4,g,7,h,2,six +d,4,g,8,h,2,six +d,4,g,8,h,4,six +d,4,h,2,d,1,six +d,4,h,2,d,2,six +d,4,h,2,f,1,six +d,4,h,4,a,1,six +a,1,a,2,c,1,seven +a,1,a,2,e,1,seven +a,1,a,2,g,1,seven +a,1,b,2,c,1,seven +a,1,b,2,e,1,seven +a,1,b,2,g,1,seven +a,1,c,2,e,1,seven +a,1,c,2,f,1,seven +a,1,c,2,g,1,seven +a,1,c,2,h,1,seven +a,1,d,2,g,1,seven +a,1,d,2,h,1,seven +b,1,a,2,e,1,seven +b,1,a,2,g,1,seven +b,1,b,2,a,3,seven +b,1,b,2,a,4,seven +b,1,b,2,a,5,seven +b,1,b,2,a,6,seven +b,1,b,2,a,7,seven +b,1,b,2,a,8,seven +b,1,b,2,e,1,seven +b,1,b,2,g,1,seven +b,1,b,3,a,5,seven +b,1,b,3,a,6,seven +b,1,b,3,a,7,seven +b,1,b,3,a,8,seven +b,1,b,4,a,7,seven +b,1,b,4,a,8,seven +b,1,c,2,e,1,seven +b,1,c,2,g,1,seven +b,1,d,3,h,2,seven +b,1,e,2,g,1,seven +b,1,f,2,h,1,seven +b,1,g,2,d,1,seven +b,1,g,2,e,1,seven +b,1,h,2,d,1,seven +b,1,h,2,e,1,seven +b,1,h,2,f,1,seven +b,2,d,3,h,2,seven +b,2,e,2,g,1,seven +b,2,f,2,d,1,seven +b,2,f,2,h,1,seven +b,2,g,2,d,1,seven +b,2,g,2,e,1,seven +b,2,h,2,d,1,seven +b,2,h,2,e,1,seven +b,2,h,2,f,1,seven +c,1,a,3,e,2,seven +c,1,a,3,g,1,seven +c,1,a,3,g,2,seven +c,1,a,3,h,1,seven +c,1,a,3,h,2,seven +c,1,b,1,a,1,seven +c,1,b,1,a,2,seven +c,1,b,1,a,4,seven +c,1,b,1,a,6,seven +c,1,b,1,a,8,seven +c,1,b,2,a,2,seven +c,1,b,2,a,4,seven +c,1,b,2,a,6,seven +c,1,b,2,a,8,seven +c,1,b,3,a,5,seven +c,1,b,3,a,6,seven +c,1,b,3,a,7,seven +c,1,b,3,a,8,seven +c,1,b,3,e,2,seven +c,1,b,3,g,1,seven +c,1,b,3,g,2,seven +c,1,b,3,h,1,seven +c,1,b,3,h,2,seven +c,1,b,4,a,7,seven +c,1,b,4,a,8,seven +c,1,b,6,a,1,seven +c,1,b,7,a,1,seven +c,1,b,8,a,1,seven +c,1,c,3,e,2,seven +c,1,c,3,g,1,seven +c,1,c,3,g,2,seven +c,1,c,3,h,1,seven +c,1,c,3,h,2,seven +c,1,d,3,e,1,seven +c,1,d,3,f,1,seven +c,1,d,3,f,2,seven +c,1,d,3,g,1,seven +c,1,d,3,g,2,seven +c,1,d,3,h,1,seven +c,1,d,3,h,2,seven +c,1,e,3,e,1,seven +c,1,e,3,f,1,seven +c,1,e,3,g,1,seven +c,1,e,3,g,2,seven +c,1,e,3,h,1,seven +c,1,e,3,h,2,seven +c,1,f,4,g,1,seven +c,1,f,4,h,1,seven +c,1,g,1,h,6,seven +c,1,g,1,h,8,seven +c,1,g,2,e,1,seven +c,1,g,2,h,8,seven +c,1,g,3,h,8,seven +c,1,g,4,h,8,seven +c,1,g,5,h,1,seven +c,1,g,6,h,1,seven +c,1,h,2,e,1,seven +c,2,a,3,e,1,seven +c,2,a,3,e,2,seven +c,2,a,3,f,1,seven +c,2,a,3,f,2,seven +c,2,a,3,g,1,seven +c,2,a,3,g,2,seven +c,2,a,3,h,1,seven +c,2,a,3,h,2,seven +c,2,b,1,a,2,seven +c,2,b,1,a,4,seven +c,2,b,1,a,6,seven +c,2,b,1,a,8,seven +c,2,b,2,a,2,seven +c,2,b,2,a,4,seven +c,2,b,2,a,6,seven +c,2,b,2,a,8,seven +c,2,b,3,a,4,seven +c,2,b,3,a,6,seven +c,2,b,3,a,8,seven +c,2,b,3,e,1,seven +c,2,b,3,e,2,seven +c,2,b,3,f,1,seven +c,2,b,3,f,2,seven +c,2,b,3,g,1,seven +c,2,b,3,g,2,seven +c,2,b,3,h,1,seven +c,2,b,3,h,2,seven +c,2,b,5,a,7,seven +c,2,b,6,a,4,seven +c,2,b,6,a,8,seven +c,2,b,7,a,2,seven +c,2,b,7,a,4,seven +c,2,b,8,a,2,seven +c,2,b,8,a,3,seven +c,2,b,8,a,4,seven +c,2,b,8,a,5,seven +c,2,b,8,a,6,seven +c,2,c,1,a,2,seven +c,2,c,3,e,1,seven +c,2,c,3,e,2,seven +c,2,c,3,f,1,seven +c,2,c,3,f,2,seven +c,2,c,3,g,1,seven +c,2,c,3,g,2,seven +c,2,c,3,h,1,seven +c,2,c,3,h,2,seven +c,2,c,4,b,8,seven +c,2,d,3,g,1,seven +c,2,d,3,h,1,seven +c,2,d,3,h,2,seven +c,2,d,4,h,1,seven +c,2,d,5,a,3,seven +c,2,d,5,a,4,seven +c,2,e,3,e,1,seven +c,2,e,3,f,1,seven +c,2,e,3,g,1,seven +c,2,e,3,g,2,seven +c,2,e,3,h,1,seven +c,2,e,3,h,2,seven +c,2,e,5,a,3,seven +c,2,e,5,a,4,seven +c,2,f,3,e,1,seven +c,2,f,3,f,1,seven +c,2,f,3,g,1,seven +c,2,f,3,h,1,seven +c,2,f,3,h,2,seven +c,2,f,4,g,1,seven +c,2,f,4,h,1,seven +c,2,f,5,a,3,seven +c,2,f,5,a,4,seven +c,2,g,1,h,6,seven +c,2,g,1,h,8,seven +c,2,g,2,h,8,seven +c,2,g,3,h,8,seven +c,2,g,4,h,8,seven +c,2,g,5,a,3,seven +c,2,g,5,a,4,seven +c,2,g,5,h,1,seven +c,2,g,6,h,1,seven +c,2,g,7,h,1,seven +c,2,g,8,h,1,seven +c,2,g,8,h,3,seven +c,2,h,5,a,3,seven +c,2,h,5,a,4,seven +c,3,a,3,g,1,seven +c,3,a,3,h,1,seven +c,3,b,3,g,1,seven +c,3,b,3,h,1,seven +c,3,d,3,d,1,seven +c,3,d,3,e,1,seven +c,3,d,3,e,2,seven +c,3,d,3,f,1,seven +c,3,d,3,f,2,seven +c,3,d,3,g,1,seven +c,3,d,3,g,2,seven +c,3,d,3,h,1,seven +c,3,d,3,h,2,seven +c,3,e,3,e,1,seven +c,3,e,3,f,1,seven +c,3,e,3,g,1,seven +c,3,e,3,g,2,seven +c,3,e,3,h,1,seven +c,3,e,3,h,2,seven +c,3,f,2,d,1,seven +c,3,f,4,g,1,seven +c,3,f,4,h,1,seven +c,3,g,1,h,6,seven +c,3,g,1,h,8,seven +c,3,g,2,d,1,seven +c,3,g,2,h,8,seven +c,3,g,3,h,8,seven +c,3,g,4,h,8,seven +c,3,g,5,h,1,seven +c,3,g,6,h,1,seven +c,3,g,7,h,1,seven +c,3,g,8,h,1,seven +c,3,g,8,h,3,seven +d,1,a,4,g,2,seven +d,1,a,4,g,3,seven +d,1,b,1,a,4,seven +d,1,b,1,a,6,seven +d,1,b,1,a,8,seven +d,1,b,2,a,4,seven +d,1,b,2,a,6,seven +d,1,b,2,a,8,seven +d,1,b,3,a,6,seven +d,1,b,3,a,8,seven +d,1,b,4,a,7,seven +d,1,b,4,a,8,seven +d,1,b,4,g,2,seven +d,1,b,4,g,3,seven +d,1,b,6,a,1,seven +d,1,b,6,b,1,seven +d,1,b,7,a,1,seven +d,1,b,7,b,1,seven +d,1,b,8,a,1,seven +d,1,b,8,b,1,seven +d,1,c,4,g,2,seven +d,1,c,4,g,3,seven +d,1,d,4,g,2,seven +d,1,d,4,g,3,seven +d,1,e,1,h,1,seven +d,1,e,4,b,2,seven +d,1,e,4,b,3,seven +d,1,f,4,b,2,seven +d,1,f,4,b,3,seven +d,1,g,1,h,4,seven +d,1,g,1,h,6,seven +d,1,g,1,h,8,seven +d,1,g,2,h,6,seven +d,1,g,2,h,8,seven +d,1,g,3,h,6,seven +d,1,g,3,h,8,seven +d,1,g,4,b,2,seven +d,1,g,4,b,3,seven +d,1,g,4,h,2,seven +d,1,g,4,h,8,seven +d,1,g,6,h,1,seven +d,1,h,3,f,1,seven +d,1,h,3,f,2,seven +d,1,h,3,g,1,seven +d,1,h,3,h,1,seven +d,1,h,4,b,2,seven +d,1,h,4,b,3,seven +d,2,a,4,f,2,seven +d,2,a,4,g,2,seven +d,2,a,4,g,3,seven +d,2,b,1,a,4,seven +d,2,b,1,a,6,seven +d,2,b,1,a,8,seven +d,2,b,2,a,4,seven +d,2,b,2,a,6,seven +d,2,b,2,a,8,seven +d,2,b,3,a,6,seven +d,2,b,3,a,8,seven +d,2,b,4,a,6,seven +d,2,b,4,a,8,seven +d,2,b,4,f,2,seven +d,2,b,4,g,2,seven +d,2,b,4,g,3,seven +d,2,b,6,a,4,seven +d,2,b,6,a,8,seven +d,2,b,7,a,2,seven +d,2,b,7,a,4,seven +d,2,b,7,b,2,seven +d,2,b,8,a,2,seven +d,2,b,8,a,3,seven +d,2,b,8,a,4,seven +d,2,b,8,a,5,seven +d,2,b,8,a,6,seven +d,2,b,8,b,2,seven +d,2,c,4,f,2,seven +d,2,c,4,g,2,seven +d,2,c,4,g,3,seven +d,2,d,4,f,2,seven +d,2,d,4,g,2,seven +d,2,d,4,g,3,seven +d,2,d,5,a,3,seven +d,2,d,5,a,4,seven +d,2,e,1,f,1,seven +d,2,e,1,g,1,seven +d,2,e,1,h,1,seven +d,2,e,4,f,2,seven +d,2,e,4,g,2,seven +d,2,e,4,g,3,seven +d,2,e,5,a,3,seven +d,2,e,5,a,4,seven +d,2,f,1,h,1,seven +d,2,f,5,a,3,seven +d,2,f,5,a,4,seven +d,2,f,5,f,1,seven +d,2,f,5,g,1,seven +d,2,f,5,h,1,seven +d,2,f,6,f,1,seven +d,2,f,6,g,1,seven +d,2,f,6,h,1,seven +d,2,f,7,f,1,seven +d,2,f,7,g,1,seven +d,2,f,7,h,1,seven +d,2,f,8,f,1,seven +d,2,f,8,g,1,seven +d,2,f,8,h,1,seven +d,2,g,1,h,3,seven +d,2,g,1,h,4,seven +d,2,g,1,h,6,seven +d,2,g,1,h,8,seven +d,2,g,2,h,5,seven +d,2,g,2,h,6,seven +d,2,g,2,h,8,seven +d,2,g,3,h,6,seven +d,2,g,3,h,8,seven +d,2,g,4,f,1,seven +d,2,g,4,f,2,seven +d,2,g,4,g,1,seven +d,2,g,4,g,2,seven +d,2,g,4,h,2,seven +d,2,g,4,h,6,seven +d,2,g,4,h,8,seven +d,2,g,5,a,3,seven +d,2,g,5,a,4,seven +d,2,g,5,h,8,seven +d,2,g,6,h,4,seven +d,2,g,6,h,8,seven +d,2,g,7,h,2,seven +d,2,g,7,h,4,seven +d,2,g,8,h,2,seven +d,2,g,8,h,3,seven +d,2,g,8,h,4,seven +d,2,g,8,h,6,seven +d,2,h,3,f,1,seven +d,2,h,3,f,2,seven +d,2,h,3,g,1,seven +d,2,h,3,h,1,seven +d,2,h,4,f,1,seven +d,2,h,4,g,1,seven +d,2,h,5,a,3,seven +d,2,h,5,a,4,seven +d,2,h,5,h,1,seven +d,2,h,6,h,1,seven +d,3,a,1,c,1,seven +d,3,a,4,e,1,seven +d,3,a,4,f,1,seven +d,3,a,4,f,2,seven +d,3,a,4,f,3,seven +d,3,a,4,g,1,seven +d,3,a,4,g,2,seven +d,3,a,4,g,3,seven +d,3,a,5,a,3,seven +d,3,a,5,b,3,seven +d,3,a,7,a,2,seven +d,3,a,7,b,2,seven +d,3,a,7,f,8,seven +d,3,a,7,h,8,seven +d,3,a,8,a,2,seven +d,3,a,8,b,2,seven +d,3,b,4,e,1,seven +d,3,b,4,f,1,seven +d,3,b,4,f,2,seven +d,3,b,4,f,3,seven +d,3,b,4,g,1,seven +d,3,b,4,g,2,seven +d,3,b,4,g,3,seven +d,3,b,6,a,4,seven +d,3,b,6,a,8,seven +d,3,b,7,a,4,seven +d,3,b,7,h,8,seven +d,3,b,8,a,6,seven +d,3,c,4,e,1,seven +d,3,c,4,f,1,seven +d,3,c,4,f,2,seven +d,3,c,4,f,3,seven +d,3,c,4,g,1,seven +d,3,c,4,g,2,seven +d,3,c,4,g,3,seven +d,3,c,5,a,3,seven +d,3,c,5,a,4,seven +d,3,c,5,a,5,seven +d,3,c,5,a,6,seven +d,3,c,5,a,7,seven +d,3,c,5,a,8,seven +d,3,c,5,b,3,seven +d,3,c,5,b,7,seven +d,3,c,5,b,8,seven +d,3,c,7,h,8,seven +d,3,d,1,a,1,seven +d,3,d,1,a,2,seven +d,3,d,1,b,1,seven +d,3,d,1,b,2,seven +d,3,d,4,e,1,seven +d,3,d,4,f,1,seven +d,3,d,4,f,2,seven +d,3,d,4,f,3,seven +d,3,d,4,g,1,seven +d,3,d,4,g,2,seven +d,3,d,4,g,3,seven +d,3,d,5,a,3,seven +d,3,d,5,a,4,seven +d,3,d,5,b,3,seven +d,3,d,6,a,3,seven +d,3,d,6,a,7,seven +d,3,d,6,a,8,seven +d,3,d,6,b,3,seven +d,3,d,7,a,3,seven +d,3,d,7,b,3,seven +d,3,d,7,h,8,seven +d,3,d,8,a,3,seven +d,3,d,8,b,3,seven +d,3,e,1,a,3,seven +d,3,e,1,b,3,seven +d,3,e,1,g,1,seven +d,3,e,1,h,1,seven +d,3,e,2,a,3,seven +d,3,e,2,b,3,seven +d,3,e,3,a,3,seven +d,3,e,3,b,3,seven +d,3,e,4,e,1,seven +d,3,e,4,f,1,seven +d,3,e,4,f,3,seven +d,3,e,4,g,1,seven +d,3,e,5,a,3,seven +d,3,e,5,a,4,seven +d,3,e,5,b,3,seven +d,3,e,5,e,1,seven +d,3,e,5,f,1,seven +d,3,e,5,g,1,seven +d,3,e,6,a,3,seven +d,3,e,6,b,3,seven +d,3,e,6,e,1,seven +d,3,e,6,f,1,seven +d,3,e,6,g,1,seven +d,3,e,7,a,3,seven +d,3,e,7,a,8,seven +d,3,e,7,b,3,seven +d,3,e,7,e,1,seven +d,3,e,7,f,1,seven +d,3,e,7,g,1,seven +d,3,e,8,a,3,seven +d,3,e,8,b,3,seven +d,3,e,8,e,1,seven +d,3,e,8,f,1,seven +d,3,e,8,g,1,seven +d,3,f,1,a,3,seven +d,3,f,1,b,3,seven +d,3,f,1,h,1,seven +d,3,f,2,a,3,seven +d,3,f,2,b,3,seven +d,3,f,3,a,3,seven +d,3,f,3,b,3,seven +d,3,f,5,a,3,seven +d,3,f,5,a,4,seven +d,3,f,5,b,3,seven +d,3,f,5,f,1,seven +d,3,f,5,g,1,seven +d,3,f,5,h,1,seven +d,3,f,6,a,3,seven +d,3,f,6,b,3,seven +d,3,f,6,f,1,seven +d,3,f,6,g,1,seven +d,3,f,6,h,1,seven +d,3,f,7,a,3,seven +d,3,f,7,a,8,seven +d,3,f,7,b,3,seven +d,3,f,7,f,1,seven +d,3,f,7,g,1,seven +d,3,f,7,h,1,seven +d,3,f,8,a,3,seven +d,3,f,8,b,3,seven +d,3,f,8,f,1,seven +d,3,f,8,g,1,seven +d,3,f,8,h,1,seven +d,3,g,1,a,3,seven +d,3,g,1,b,3,seven +d,3,g,1,h,3,seven +d,3,g,1,h,4,seven +d,3,g,1,h,6,seven +d,3,g,2,a,3,seven +d,3,g,2,b,3,seven +d,3,g,2,h,5,seven +d,3,g,2,h,6,seven +d,3,g,3,a,3,seven +d,3,g,3,b,3,seven +d,3,g,3,e,1,seven +d,3,g,3,f,1,seven +d,3,g,3,g,1,seven +d,3,g,3,h,5,seven +d,3,g,3,h,6,seven +d,3,g,4,e,1,seven +d,3,g,4,f,1,seven +d,3,g,4,g,1,seven +d,3,g,4,h,2,seven +d,3,g,4,h,6,seven +d,3,g,5,a,3,seven +d,3,g,5,a,4,seven +d,3,g,5,b,3,seven +d,3,g,5,h,3,seven +d,3,g,6,a,3,seven +d,3,g,6,b,3,seven +d,3,g,6,h,3,seven +d,3,g,6,h,4,seven +d,3,g,6,h,8,seven +d,3,g,7,a,3,seven +d,3,g,7,a,8,seven +d,3,g,7,b,3,seven +d,3,g,7,h,3,seven +d,3,g,7,h,4,seven +d,3,g,8,a,3,seven +d,3,g,8,b,3,seven +d,3,g,8,h,3,seven +d,3,g,8,h,5,seven +d,3,g,8,h,6,seven +d,3,h,1,a,3,seven +d,3,h,1,b,3,seven +d,3,h,2,a,3,seven +d,3,h,2,b,3,seven +d,3,h,3,a,3,seven +d,3,h,3,b,3,seven +d,3,h,3,e,1,seven +d,3,h,3,f,1,seven +d,3,h,3,f,2,seven +d,3,h,3,g,1,seven +d,3,h,3,h,1,seven +d,3,h,4,e,1,seven +d,3,h,4,f,1,seven +d,3,h,4,g,1,seven +d,3,h,5,a,3,seven +d,3,h,5,a,4,seven +d,3,h,5,b,3,seven +d,3,h,5,h,1,seven +d,3,h,6,a,3,seven +d,3,h,6,b,3,seven +d,3,h,6,h,1,seven +d,3,h,7,a,3,seven +d,3,h,7,a,8,seven +d,3,h,7,b,3,seven +d,3,h,7,c,8,seven +d,3,h,8,a,3,seven +d,3,h,8,b,3,seven +d,4,a,1,h,1,seven +d,4,a,3,c,2,seven +d,4,a,3,h,1,seven +d,4,a,3,h,2,seven +d,4,a,5,h,1,seven +d,4,a,6,h,1,seven +d,4,a,7,h,1,seven +d,4,a,8,h,1,seven +d,4,b,1,h,1,seven +d,4,b,3,h,1,seven +d,4,b,3,h,2,seven +d,4,b,4,c,2,seven +d,4,b,5,c,2,seven +d,4,b,5,h,1,seven +d,4,b,6,c,2,seven +d,4,b,6,h,1,seven +d,4,b,7,c,2,seven +d,4,b,7,h,1,seven +d,4,b,8,c,2,seven +d,4,b,8,h,1,seven +d,4,c,1,a,1,seven +d,4,c,1,h,1,seven +d,4,c,3,h,1,seven +d,4,c,3,h,2,seven +d,4,c,4,b,1,seven +d,4,c,5,b,1,seven +d,4,c,5,h,1,seven +d,4,c,6,b,1,seven +d,4,c,6,h,1,seven +d,4,c,7,b,1,seven +d,4,c,7,h,1,seven +d,4,c,8,b,1,seven +d,4,c,8,h,1,seven +d,4,d,1,a,1,seven +d,4,d,1,h,1,seven +d,4,d,3,a,1,seven +d,4,d,3,b,1,seven +d,4,d,3,c,1,seven +d,4,d,3,c,2,seven +d,4,d,3,h,1,seven +d,4,d,3,h,2,seven +d,4,d,5,h,1,seven +d,4,d,6,h,1,seven +d,4,d,7,h,1,seven +d,4,d,8,h,1,seven +d,4,e,1,a,1,seven +d,4,e,3,a,1,seven +d,4,e,3,f,1,seven +d,4,e,3,f,2,seven +d,4,e,3,g,1,seven +d,4,e,3,g,2,seven +d,4,e,3,h,1,seven +d,4,e,3,h,2,seven +d,4,e,4,c,2,seven +d,4,e,5,a,1,seven +d,4,e,5,h,1,seven +d,4,e,6,h,1,seven +d,4,e,7,h,1,seven +d,4,e,8,h,1,seven +d,4,f,1,a,1,seven +d,4,f,3,a,1,seven +d,4,f,3,c,2,seven +d,4,f,4,c,2,seven +d,4,f,4,e,2,seven +d,4,f,4,g,1,seven +d,4,f,4,g,2,seven +d,4,f,4,h,1,seven +d,4,f,4,h,2,seven +d,4,f,4,h,3,seven +d,4,f,5,a,1,seven +d,4,f,5,e,2,seven +d,4,f,5,g,1,seven +d,4,f,5,h,1,seven +d,4,f,6,a,1,seven +d,4,f,6,e,2,seven +d,4,f,6,g,1,seven +d,4,f,6,h,1,seven +d,4,f,6,h,7,seven +d,4,f,6,h,8,seven +d,4,f,7,e,2,seven +d,4,f,7,g,1,seven +d,4,f,7,h,1,seven +d,4,f,8,e,2,seven +d,4,f,8,g,1,seven +d,4,f,8,h,1,seven +d,4,g,1,a,1,seven +d,4,g,1,h,3,seven +d,4,g,1,h,4,seven +d,4,g,1,h,6,seven +d,4,g,2,h,5,seven +d,4,g,2,h,6,seven +d,4,g,3,a,1,seven +d,4,g,3,c,2,seven +d,4,g,3,h,1,seven +d,4,g,3,h,5,seven +d,4,g,3,h,6,seven +d,4,g,4,c,2,seven +d,4,g,4,h,2,seven +d,4,g,4,h,6,seven +d,4,g,5,a,1,seven +d,4,g,5,h,3,seven +d,4,g,6,a,1,seven +d,4,g,6,h,3,seven +d,4,g,6,h,4,seven +d,4,g,6,h,8,seven +d,4,g,7,a,1,seven +d,4,g,7,h,3,seven +d,4,g,7,h,4,seven +d,4,g,8,h,3,seven +d,4,g,8,h,5,seven +d,4,g,8,h,6,seven +d,4,h,1,a,1,seven +d,4,h,3,a,1,seven +d,4,h,3,c,2,seven +d,4,h,4,c,2,seven +d,4,h,4,h,1,seven +d,4,h,5,a,1,seven +d,4,h,5,h,1,seven +d,4,h,6,a,1,seven +d,4,h,6,h,1,seven +d,4,h,7,a,1,seven +d,4,h,8,a,1,seven +a,1,a,2,d,1,eight +a,1,a,2,f,1,eight +a,1,a,2,h,1,eight +a,1,b,2,d,1,eight +a,1,b,2,f,1,eight +a,1,b,2,h,1,eight +a,1,d,2,f,1,eight +a,1,e,2,g,1,eight +a,1,e,2,h,1,eight +a,1,f,2,c,1,eight +a,1,f,2,d,1,eight +a,1,f,2,h,1,eight +a,1,g,2,c,1,eight +a,1,g,2,d,1,eight +a,1,g,2,e,1,eight +a,1,h,2,c,1,eight +a,1,h,2,d,1,eight +a,1,h,2,e,1,eight +a,1,h,2,f,1,eight +b,1,a,3,d,2,eight +b,1,a,3,f,1,eight +b,1,a,3,f,2,eight +b,1,a,3,g,1,eight +b,1,a,3,g,2,eight +b,1,a,3,h,1,eight +b,1,a,3,h,2,eight +b,1,b,3,d,2,eight +b,1,b,3,f,1,eight +b,1,b,3,f,2,eight +b,1,b,3,g,1,eight +b,1,b,3,g,2,eight +b,1,b,3,h,1,eight +b,1,b,3,h,2,eight +b,1,b,4,a,6,eight +b,1,b,5,a,3,eight +b,1,b,5,a,7,eight +b,1,b,5,a,8,eight +b,1,b,6,a,3,eight +b,1,b,6,a,4,eight +b,1,b,6,a,8,eight +b,1,b,7,a,3,eight +b,1,b,7,a,4,eight +b,1,b,7,a,5,eight +b,1,b,8,a,3,eight +b,1,b,8,a,4,eight +b,1,b,8,a,5,eight +b,1,b,8,a,6,eight +b,1,c,3,f,1,eight +b,1,c,3,f,2,eight +b,1,c,3,g,1,eight +b,1,c,3,g,2,eight +b,1,c,3,h,1,eight +b,1,c,3,h,2,eight +b,1,d,3,d,1,eight +b,1,d,3,e,1,eight +b,1,d,3,f,1,eight +b,1,d,3,f,2,eight +b,1,d,3,g,1,eight +b,1,d,3,g,2,eight +b,1,d,3,h,1,eight +b,1,e,3,h,1,eight +b,1,e,3,h,2,eight +b,1,f,2,d,1,eight +b,1,g,1,h,7,eight +b,1,g,3,h,1,eight +b,1,g,8,h,2,eight +b,2,a,3,f,1,eight +b,2,a,3,f,2,eight +b,2,a,3,g,1,eight +b,2,a,3,g,2,eight +b,2,a,3,h,1,eight +b,2,a,3,h,2,eight +b,2,b,3,f,1,eight +b,2,b,3,f,2,eight +b,2,b,3,g,1,eight +b,2,b,3,g,2,eight +b,2,b,3,h,1,eight +b,2,b,3,h,2,eight +b,2,c,3,d,2,eight +b,2,c,3,f,1,eight +b,2,c,3,f,2,eight +b,2,c,3,g,1,eight +b,2,c,3,g,2,eight +b,2,c,3,h,1,eight +b,2,c,3,h,2,eight +b,2,d,3,d,1,eight +b,2,d,3,e,1,eight +b,2,d,3,f,1,eight +b,2,d,3,f,2,eight +b,2,d,3,g,1,eight +b,2,d,3,g,2,eight +b,2,d,3,h,1,eight +b,2,e,3,h,1,eight +b,2,e,3,h,2,eight +b,2,g,1,h,7,eight +b,2,g,3,h,1,eight +b,2,g,8,h,2,eight +c,1,a,1,h,1,eight +c,1,a,3,e,1,eight +c,1,a,3,f,1,eight +c,1,a,3,f,2,eight +c,1,a,4,e,1,eight +c,1,a,4,f,1,eight +c,1,a,4,g,1,eight +c,1,a,4,g,2,eight +c,1,a,4,g,3,eight +c,1,a,4,h,1,eight +c,1,a,4,h,2,eight +c,1,a,4,h,3,eight +c,1,a,5,h,1,eight +c,1,a,6,h,1,eight +c,1,a,7,h,1,eight +c,1,a,8,h,1,eight +c,1,b,1,a,3,eight +c,1,b,1,a,5,eight +c,1,b,1,a,7,eight +c,1,b,1,h,1,eight +c,1,b,2,a,3,eight +c,1,b,2,a,5,eight +c,1,b,2,a,7,eight +c,1,b,3,e,1,eight +c,1,b,3,f,1,eight +c,1,b,3,f,2,eight +c,1,b,4,a,6,eight +c,1,b,4,e,1,eight +c,1,b,4,f,1,eight +c,1,b,4,g,1,eight +c,1,b,4,g,2,eight +c,1,b,4,g,3,eight +c,1,b,4,h,1,eight +c,1,b,4,h,2,eight +c,1,b,4,h,3,eight +c,1,b,5,a,3,eight +c,1,b,5,a,7,eight +c,1,b,5,a,8,eight +c,1,b,5,h,1,eight +c,1,b,6,a,3,eight +c,1,b,6,a,8,eight +c,1,b,6,h,1,eight +c,1,b,7,a,3,eight +c,1,b,7,a,5,eight +c,1,b,7,h,1,eight +c,1,b,8,a,2,eight +c,1,b,8,a,3,eight +c,1,b,8,a,4,eight +c,1,b,8,a,5,eight +c,1,b,8,a,6,eight +c,1,b,8,h,1,eight +c,1,c,3,e,1,eight +c,1,c,3,f,1,eight +c,1,c,3,f,2,eight +c,1,c,4,e,1,eight +c,1,c,4,f,1,eight +c,1,c,4,g,1,eight +c,1,c,4,g,2,eight +c,1,c,4,g,3,eight +c,1,c,4,h,1,eight +c,1,c,4,h,2,eight +c,1,c,4,h,3,eight +c,1,c,5,h,1,eight +c,1,c,6,h,1,eight +c,1,c,7,h,1,eight +c,1,c,8,h,1,eight +c,1,d,1,g,1,eight +c,1,d,1,h,1,eight +c,1,d,4,g,1,eight +c,1,d,4,g,2,eight +c,1,d,4,g,3,eight +c,1,d,4,h,1,eight +c,1,d,4,h,2,eight +c,1,d,4,h,3,eight +c,1,d,5,g,1,eight +c,1,d,5,h,1,eight +c,1,d,6,g,1,eight +c,1,d,6,h,1,eight +c,1,d,7,g,1,eight +c,1,d,7,h,1,eight +c,1,d,8,g,1,eight +c,1,d,8,h,1,eight +c,1,e,1,h,1,eight +c,1,e,4,e,1,eight +c,1,e,4,f,1,eight +c,1,e,4,g,1,eight +c,1,e,4,h,1,eight +c,1,e,4,h,2,eight +c,1,e,4,h,3,eight +c,1,e,5,h,1,eight +c,1,e,6,h,1,eight +c,1,e,7,h,1,eight +c,1,e,8,h,1,eight +c,1,f,3,e,1,eight +c,1,f,3,f,1,eight +c,1,f,3,g,1,eight +c,1,f,3,h,1,eight +c,1,f,3,h,2,eight +c,1,g,1,h,4,eight +c,1,g,1,h,5,eight +c,1,g,1,h,7,eight +c,1,g,2,h,6,eight +c,1,g,2,h,7,eight +c,1,g,3,e,1,eight +c,1,g,3,e,2,eight +c,1,g,3,f,1,eight +c,1,g,3,g,1,eight +c,1,g,3,h,1,eight +c,1,g,3,h,7,eight +c,1,g,4,g,1,eight +c,1,g,4,h,1,eight +c,1,g,4,h,7,eight +c,1,g,5,h,7,eight +c,1,g,6,h,3,eight +c,1,g,7,h,1,eight +c,1,g,7,h,3,eight +c,1,g,7,h,5,eight +c,1,g,8,h,1,eight +c,1,g,8,h,2,eight +c,1,g,8,h,3,eight +c,1,g,8,h,5,eight +c,1,h,3,e,1,eight +c,1,h,3,e,2,eight +c,1,h,3,f,1,eight +c,1,h,3,f,2,eight +c,1,h,3,g,1,eight +c,1,h,3,h,1,eight +c,2,a,1,e,1,eight +c,2,a,1,f,1,eight +c,2,a,1,g,1,eight +c,2,a,1,h,1,eight +c,2,a,2,e,1,eight +c,2,a,2,f,1,eight +c,2,a,2,g,1,eight +c,2,a,2,h,1,eight +c,2,a,4,e,1,eight +c,2,a,4,e,3,eight +c,2,a,4,f,1,eight +c,2,a,4,g,1,eight +c,2,a,4,g,2,eight +c,2,a,4,g,3,eight +c,2,a,4,h,1,eight +c,2,a,4,h,2,eight +c,2,a,4,h,3,eight +c,2,a,5,e,1,eight +c,2,a,5,f,1,eight +c,2,a,5,g,1,eight +c,2,a,5,h,1,eight +c,2,a,6,e,1,eight +c,2,a,6,f,1,eight +c,2,a,6,g,1,eight +c,2,a,6,h,1,eight +c,2,a,7,e,1,eight +c,2,a,7,f,1,eight +c,2,a,7,g,1,eight +c,2,a,7,g,8,eight +c,2,a,7,h,1,eight +c,2,a,8,e,1,eight +c,2,a,8,f,1,eight +c,2,a,8,g,1,eight +c,2,a,8,h,1,eight +c,2,b,1,e,1,eight +c,2,b,1,f,1,eight +c,2,b,1,g,1,eight +c,2,b,1,h,1,eight +c,2,b,2,e,1,eight +c,2,b,2,f,1,eight +c,2,b,2,g,1,eight +c,2,b,2,h,1,eight +c,2,b,4,e,1,eight +c,2,b,4,e,3,eight +c,2,b,4,f,1,eight +c,2,b,4,g,1,eight +c,2,b,4,g,2,eight +c,2,b,4,g,3,eight +c,2,b,4,h,1,eight +c,2,b,4,h,2,eight +c,2,b,4,h,3,eight +c,2,b,5,a,3,eight +c,2,b,5,e,1,eight +c,2,b,5,f,1,eight +c,2,b,5,g,1,eight +c,2,b,5,h,1,eight +c,2,b,6,a,3,eight +c,2,b,6,e,1,eight +c,2,b,6,f,1,eight +c,2,b,6,g,1,eight +c,2,b,6,h,1,eight +c,2,b,7,a,3,eight +c,2,b,7,a,5,eight +c,2,b,7,e,1,eight +c,2,b,7,f,1,eight +c,2,b,7,g,1,eight +c,2,b,7,h,1,eight +c,2,b,8,e,1,eight +c,2,b,8,f,1,eight +c,2,b,8,g,1,eight +c,2,b,8,h,1,eight +c,2,c,1,a,6,eight +c,2,c,1,a,7,eight +c,2,c,1,a,8,eight +c,2,c,3,a,6,eight +c,2,c,3,a,7,eight +c,2,c,3,a,8,eight +c,2,c,3,b,4,eight +c,2,c,3,b,6,eight +c,2,c,3,b,7,eight +c,2,c,3,b,8,eight +c,2,c,4,a,4,eight +c,2,c,4,a,5,eight +c,2,c,4,a,6,eight +c,2,c,4,a,7,eight +c,2,c,4,a,8,eight +c,2,c,4,b,6,eight +c,2,c,4,b,7,eight +c,2,c,4,e,1,eight +c,2,c,4,e,3,eight +c,2,c,4,f,1,eight +c,2,c,4,g,1,eight +c,2,c,4,g,2,eight +c,2,c,4,g,3,eight +c,2,c,4,h,1,eight +c,2,c,4,h,2,eight +c,2,c,4,h,3,eight +c,2,c,5,a,8,eight +c,2,c,5,b,8,eight +c,2,c,5,e,1,eight +c,2,c,5,f,1,eight +c,2,c,5,g,1,eight +c,2,c,5,h,1,eight +c,2,c,6,e,1,eight +c,2,c,6,f,1,eight +c,2,c,6,g,1,eight +c,2,c,6,h,1,eight +c,2,c,7,a,8,eight +c,2,c,7,e,1,eight +c,2,c,7,f,1,eight +c,2,c,7,g,1,eight +c,2,c,7,h,1,eight +c,2,c,8,e,1,eight +c,2,c,8,f,1,eight +c,2,c,8,g,1,eight +c,2,c,8,h,1,eight +c,2,d,1,h,1,eight +c,2,d,3,e,1,eight +c,2,d,3,f,1,eight +c,2,d,3,f,2,eight +c,2,d,4,e,1,eight +c,2,d,4,f,1,eight +c,2,d,4,g,1,eight +c,2,d,4,g,2,eight +c,2,d,4,g,3,eight +c,2,d,4,h,2,eight +c,2,d,4,h,3,eight +c,2,d,5,h,1,eight +c,2,d,6,h,1,eight +c,2,d,7,h,1,eight +c,2,d,8,h,1,eight +c,2,e,1,h,1,eight +c,2,e,4,e,1,eight +c,2,e,4,e,2,eight +c,2,e,4,f,1,eight +c,2,e,4,f,2,eight +c,2,e,4,g,1,eight +c,2,e,4,g,2,eight +c,2,e,4,g,3,eight +c,2,e,4,h,1,eight +c,2,e,4,h,2,eight +c,2,e,4,h,3,eight +c,2,e,5,h,1,eight +c,2,e,6,h,1,eight +c,2,e,7,h,1,eight +c,2,e,8,h,1,eight +c,2,g,1,h,4,eight +c,2,g,1,h,5,eight +c,2,g,1,h,7,eight +c,2,g,2,h,4,eight +c,2,g,2,h,6,eight +c,2,g,2,h,7,eight +c,2,g,3,e,1,eight +c,2,g,3,e,2,eight +c,2,g,3,f,1,eight +c,2,g,3,g,1,eight +c,2,g,3,h,1,eight +c,2,g,3,h,6,eight +c,2,g,3,h,7,eight +c,2,g,4,g,1,eight +c,2,g,4,h,1,eight +c,2,g,4,h,2,eight +c,2,g,4,h,7,eight +c,2,g,5,h,2,eight +c,2,g,5,h,7,eight +c,2,g,6,h,2,eight +c,2,g,6,h,3,eight +c,2,g,7,h,2,eight +c,2,g,7,h,3,eight +c,2,g,7,h,5,eight +c,2,g,8,h,2,eight +c,2,g,8,h,4,eight +c,2,g,8,h,5,eight +c,2,h,3,e,1,eight +c,2,h,3,e,2,eight +c,2,h,3,f,1,eight +c,2,h,3,f,2,eight +c,2,h,3,g,1,eight +c,2,h,3,h,1,eight +c,2,h,7,b,8,eight +c,3,a,3,d,1,eight +c,3,a,3,e,1,eight +c,3,a,3,f,1,eight +c,3,a,4,g,1,eight +c,3,a,4,g,2,eight +c,3,a,4,g,3,eight +c,3,a,4,h,1,eight +c,3,a,4,h,2,eight +c,3,a,4,h,3,eight +c,3,b,3,d,1,eight +c,3,b,3,e,1,eight +c,3,b,3,f,1,eight +c,3,b,4,g,1,eight +c,3,b,4,g,2,eight +c,3,b,4,g,3,eight +c,3,b,4,h,1,eight +c,3,b,4,h,2,eight +c,3,b,4,h,3,eight +c,3,c,4,g,1,eight +c,3,c,4,g,2,eight +c,3,c,4,g,3,eight +c,3,c,4,h,1,eight +c,3,c,4,h,2,eight +c,3,c,4,h,3,eight +c,3,d,1,f,1,eight +c,3,d,1,g,1,eight +c,3,d,1,h,1,eight +c,3,d,4,d,1,eight +c,3,d,4,e,1,eight +c,3,d,4,e,3,eight +c,3,d,4,f,1,eight +c,3,d,4,g,1,eight +c,3,d,4,g,2,eight +c,3,d,4,g,3,eight +c,3,d,4,h,1,eight +c,3,d,4,h,2,eight +c,3,d,4,h,3,eight +c,3,d,5,d,1,eight +c,3,d,5,e,1,eight +c,3,d,5,f,1,eight +c,3,d,5,g,1,eight +c,3,d,5,h,1,eight +c,3,d,6,d,1,eight +c,3,d,6,e,1,eight +c,3,d,6,f,1,eight +c,3,d,6,g,1,eight +c,3,d,6,h,1,eight +c,3,d,7,d,1,eight +c,3,d,7,e,1,eight +c,3,d,7,f,1,eight +c,3,d,7,g,1,eight +c,3,d,7,h,1,eight +c,3,d,8,d,1,eight +c,3,d,8,e,1,eight +c,3,d,8,f,1,eight +c,3,d,8,g,1,eight +c,3,d,8,h,1,eight +c,3,e,1,h,1,eight +c,3,e,4,e,1,eight +c,3,e,4,e,2,eight +c,3,e,4,f,1,eight +c,3,e,4,f,2,eight +c,3,e,4,g,1,eight +c,3,e,4,g,2,eight +c,3,e,4,g,3,eight +c,3,e,4,h,1,eight +c,3,e,4,h,2,eight +c,3,e,4,h,3,eight +c,3,e,5,h,1,eight +c,3,e,6,h,1,eight +c,3,e,7,h,1,eight +c,3,e,8,h,1,eight +c,3,f,3,d,1,eight +c,3,f,3,e,1,eight +c,3,f,3,f,1,eight +c,3,f,3,g,1,eight +c,3,f,3,h,1,eight +c,3,f,3,h,2,eight +c,3,f,4,d,1,eight +c,3,f,4,e,1,eight +c,3,f,4,f,1,eight +c,3,f,5,d,1,eight +c,3,f,5,e,1,eight +c,3,f,6,d,1,eight +c,3,f,6,e,1,eight +c,3,f,7,d,1,eight +c,3,f,7,e,1,eight +c,3,f,8,d,1,eight +c,3,f,8,e,1,eight +c,3,g,1,h,4,eight +c,3,g,1,h,5,eight +c,3,g,1,h,7,eight +c,3,g,2,h,4,eight +c,3,g,2,h,6,eight +c,3,g,2,h,7,eight +c,3,g,3,d,1,eight +c,3,g,3,e,1,eight +c,3,g,3,e,2,eight +c,3,g,3,f,1,eight +c,3,g,3,g,1,eight +c,3,g,3,h,1,eight +c,3,g,3,h,6,eight +c,3,g,3,h,7,eight +c,3,g,4,g,1,eight +c,3,g,4,h,1,eight +c,3,g,4,h,2,eight +c,3,g,4,h,7,eight +c,3,g,5,h,2,eight +c,3,g,5,h,7,eight +c,3,g,6,h,2,eight +c,3,g,6,h,3,eight +c,3,g,7,h,2,eight +c,3,g,7,h,3,eight +c,3,g,7,h,5,eight +c,3,g,8,h,2,eight +c,3,g,8,h,4,eight +c,3,g,8,h,5,eight +c,3,h,3,d,1,eight +c,3,h,3,e,1,eight +c,3,h,3,e,2,eight +c,3,h,3,f,1,eight +c,3,h,3,f,2,eight +c,3,h,3,g,1,eight +c,3,h,3,h,1,eight +d,1,a,1,h,2,eight +d,1,a,2,h,2,eight +d,1,a,4,a,2,eight +d,1,a,5,h,2,eight +d,1,a,6,h,2,eight +d,1,a,7,h,2,eight +d,1,a,8,h,2,eight +d,1,b,1,a,3,eight +d,1,b,1,a,5,eight +d,1,b,1,a,7,eight +d,1,b,1,h,2,eight +d,1,b,2,a,5,eight +d,1,b,2,a,7,eight +d,1,b,2,h,2,eight +d,1,b,3,a,5,eight +d,1,b,3,a,7,eight +d,1,b,5,a,3,eight +d,1,b,5,a,7,eight +d,1,b,5,a,8,eight +d,1,b,5,h,2,eight +d,1,b,6,a,3,eight +d,1,b,6,a,8,eight +d,1,b,6,h,2,eight +d,1,b,7,a,3,eight +d,1,b,7,a,5,eight +d,1,b,7,h,2,eight +d,1,b,8,a,2,eight +d,1,b,8,a,3,eight +d,1,b,8,a,4,eight +d,1,b,8,a,5,eight +d,1,b,8,a,6,eight +d,1,b,8,h,2,eight +d,1,c,1,h,2,eight +d,1,c,2,h,2,eight +d,1,c,4,a,2,eight +d,1,c,4,a,3,eight +d,1,c,4,b,2,eight +d,1,c,5,h,2,eight +d,1,c,6,h,2,eight +d,1,c,7,h,2,eight +d,1,c,8,h,2,eight +d,1,d,2,h,2,eight +d,1,d,5,h,2,eight +d,1,d,6,h,2,eight +d,1,d,7,h,2,eight +d,1,d,8,h,2,eight +d,1,e,1,a,2,eight +d,1,e,2,a,2,eight +d,1,e,4,f,1,eight +d,1,e,4,g,1,eight +d,1,e,5,a,2,eight +d,1,e,6,a,2,eight +d,1,e,7,a,2,eight +d,1,e,8,a,2,eight +d,1,f,1,a,2,eight +d,1,f,2,a,2,eight +d,1,f,4,g,2,eight +d,1,f,4,h,2,eight +d,1,f,4,h,3,eight +d,1,f,5,a,2,eight +d,1,f,6,a,2,eight +d,1,f,7,a,2,eight +d,1,f,8,a,2,eight +d,1,g,1,a,2,eight +d,1,g,1,h,3,eight +d,1,g,1,h,5,eight +d,1,g,1,h,7,eight +d,1,g,2,a,2,eight +d,1,g,2,h,5,eight +d,1,g,2,h,7,eight +d,1,g,3,h,5,eight +d,1,g,3,h,7,eight +d,1,g,4,f,1,eight +d,1,g,4,g,1,eight +d,1,g,4,h,7,eight +d,1,g,5,a,2,eight +d,1,g,5,h,3,eight +d,1,g,5,h,7,eight +d,1,g,6,a,2,eight +d,1,g,6,h,3,eight +d,1,g,7,a,2,eight +d,1,g,7,h,1,eight +d,1,g,7,h,3,eight +d,1,g,7,h,5,eight +d,1,g,8,a,2,eight +d,1,g,8,h,1,eight +d,1,g,8,h,2,eight +d,1,g,8,h,3,eight +d,1,g,8,h,4,eight +d,1,g,8,h,5,eight +d,1,h,1,a,2,eight +d,1,h,2,a,2,eight +d,1,h,4,f,1,eight +d,1,h,4,g,1,eight +d,1,h,4,h,2,eight +d,1,h,5,a,2,eight +d,1,h,6,a,2,eight +d,1,h,7,a,2,eight +d,1,h,8,a,2,eight +d,2,a,1,f,2,eight +d,2,a,1,g,2,eight +d,2,a,1,h,2,eight +d,2,a,2,f,2,eight +d,2,a,2,g,2,eight +d,2,a,2,h,2,eight +d,2,a,5,a,2,eight +d,2,a,5,b,2,eight +d,2,a,5,f,2,eight +d,2,a,5,g,2,eight +d,2,a,5,h,2,eight +d,2,a,5,h,3,eight +d,2,a,5,h,4,eight +d,2,a,6,f,2,eight +d,2,a,6,g,2,eight +d,2,a,6,h,2,eight +d,2,a,7,f,2,eight +d,2,a,7,g,2,eight +d,2,a,7,g,8,eight +d,2,a,7,h,2,eight +d,2,a,8,f,2,eight +d,2,a,8,g,2,eight +d,2,a,8,h,2,eight +d,2,b,1,f,2,eight +d,2,b,1,g,2,eight +d,2,b,1,h,2,eight +d,2,b,2,f,2,eight +d,2,b,2,g,2,eight +d,2,b,2,h,2,eight +d,2,b,5,a,3,eight +d,2,b,5,a,7,eight +d,2,b,5,f,2,eight +d,2,b,5,g,2,eight +d,2,b,5,h,2,eight +d,2,b,5,h,3,eight +d,2,b,5,h,4,eight +d,2,b,6,a,3,eight +d,2,b,6,f,2,eight +d,2,b,6,g,2,eight +d,2,b,6,h,2,eight +d,2,b,7,a,3,eight +d,2,b,7,a,5,eight +d,2,b,7,f,2,eight +d,2,b,7,g,2,eight +d,2,b,7,h,2,eight +d,2,b,8,f,2,eight +d,2,b,8,g,2,eight +d,2,b,8,h,2,eight +d,2,c,1,f,2,eight +d,2,c,1,g,2,eight +d,2,c,1,h,2,eight +d,2,c,2,f,2,eight +d,2,c,2,g,2,eight +d,2,c,2,h,2,eight +d,2,c,4,a,4,eight +d,2,c,4,a,5,eight +d,2,c,4,a,6,eight +d,2,c,4,a,7,eight +d,2,c,4,a,8,eight +d,2,c,4,b,6,eight +d,2,c,4,b,7,eight +d,2,c,4,b,8,eight +d,2,c,5,a,2,eight +d,2,c,5,a,8,eight +d,2,c,5,b,2,eight +d,2,c,5,b,8,eight +d,2,c,5,f,2,eight +d,2,c,5,g,2,eight +d,2,c,5,h,2,eight +d,2,c,5,h,3,eight +d,2,c,5,h,4,eight +d,2,c,6,f,2,eight +d,2,c,6,g,2,eight +d,2,c,6,h,2,eight +d,2,c,7,f,2,eight +d,2,c,7,g,2,eight +d,2,c,7,h,2,eight +d,2,c,8,f,2,eight +d,2,c,8,g,2,eight +d,2,c,8,h,2,eight +d,2,d,1,h,2,eight +d,2,d,5,f,2,eight +d,2,d,5,g,2,eight +d,2,d,5,h,2,eight +d,2,d,5,h,3,eight +d,2,d,5,h,4,eight +d,2,d,6,f,2,eight +d,2,d,6,g,2,eight +d,2,d,6,h,2,eight +d,2,d,7,f,2,eight +d,2,d,7,g,2,eight +d,2,d,7,h,2,eight +d,2,d,8,f,2,eight +d,2,d,8,g,2,eight +d,2,d,8,h,2,eight +d,2,e,1,h,2,eight +d,2,e,2,h,2,eight +d,2,e,5,h,2,eight +d,2,e,5,h,3,eight +d,2,e,5,h,4,eight +d,2,e,6,h,2,eight +d,2,e,7,h,2,eight +d,2,e,8,h,2,eight +d,2,f,5,f,2,eight +d,2,f,5,g,2,eight +d,2,f,5,g,8,eight +d,2,f,5,h,2,eight +d,2,f,5,h,8,eight +d,2,g,2,h,4,eight +d,2,g,3,h,5,eight +d,2,g,5,f,1,eight +d,2,g,5,g,1,eight +d,2,g,5,h,3,eight +d,2,g,5,h,7,eight +d,2,g,6,f,1,eight +d,2,g,6,g,1,eight +d,2,g,6,h,3,eight +d,2,g,7,f,1,eight +d,2,g,7,g,1,eight +d,2,g,7,h,3,eight +d,2,g,7,h,5,eight +d,2,g,8,f,1,eight +d,2,g,8,g,1,eight +d,2,g,8,h,5,eight +d,2,h,4,f,2,eight +d,2,h,4,f,3,eight +d,2,h,4,g,2,eight +d,2,h,4,h,2,eight +d,2,h,5,f,1,eight +d,2,h,5,g,1,eight +d,2,h,5,h,2,eight +d,2,h,6,f,1,eight +d,2,h,6,g,1,eight +d,2,h,7,b,8,eight +d,2,h,7,f,1,eight +d,2,h,7,g,1,eight +d,2,h,7,h,1,eight +d,2,h,8,f,1,eight +d,2,h,8,g,1,eight +d,2,h,8,h,1,eight +d,3,a,1,e,1,eight +d,3,a,1,f,1,eight +d,3,a,1,f,2,eight +d,3,a,1,g,1,eight +d,3,a,1,g,2,eight +d,3,a,1,h,2,eight +d,3,a,2,f,2,eight +d,3,a,2,g,2,eight +d,3,a,2,h,2,eight +d,3,a,3,f,2,eight +d,3,a,3,g,2,eight +d,3,a,3,h,2,eight +d,3,a,5,a,8,eight +d,3,a,5,e,1,eight +d,3,a,5,f,1,eight +d,3,a,5,f,2,eight +d,3,a,5,f,4,eight +d,3,a,5,g,1,eight +d,3,a,5,g,2,eight +d,3,a,5,h,2,eight +d,3,a,5,h,3,eight +d,3,a,5,h,4,eight +d,3,a,6,e,1,eight +d,3,a,6,f,1,eight +d,3,a,6,f,2,eight +d,3,a,6,g,1,eight +d,3,a,6,g,2,eight +d,3,a,6,h,2,eight +d,3,a,7,d,8,eight +d,3,a,7,e,1,eight +d,3,a,7,e,8,eight +d,3,a,7,f,1,eight +d,3,a,7,f,2,eight +d,3,a,7,g,1,eight +d,3,a,7,g,2,eight +d,3,a,7,g,8,eight +d,3,a,7,h,2,eight +d,3,a,8,e,1,eight +d,3,a,8,f,1,eight +d,3,a,8,f,2,eight +d,3,a,8,g,1,eight +d,3,a,8,g,2,eight +d,3,a,8,h,2,eight +d,3,b,1,e,1,eight +d,3,b,1,f,1,eight +d,3,b,1,f,2,eight +d,3,b,1,g,1,eight +d,3,b,1,g,2,eight +d,3,b,1,h,2,eight +d,3,b,2,f,2,eight +d,3,b,2,g,2,eight +d,3,b,2,h,2,eight +d,3,b,3,f,2,eight +d,3,b,3,g,2,eight +d,3,b,3,h,2,eight +d,3,b,5,e,1,eight +d,3,b,5,f,1,eight +d,3,b,5,f,2,eight +d,3,b,5,f,4,eight +d,3,b,5,g,1,eight +d,3,b,5,g,2,eight +d,3,b,5,h,2,eight +d,3,b,5,h,3,eight +d,3,b,5,h,4,eight +d,3,b,6,e,1,eight +d,3,b,6,f,1,eight +d,3,b,6,f,2,eight +d,3,b,6,g,1,eight +d,3,b,6,g,2,eight +d,3,b,6,h,2,eight +d,3,b,7,d,8,eight +d,3,b,7,e,1,eight +d,3,b,7,f,1,eight +d,3,b,7,f,2,eight +d,3,b,7,f,8,eight +d,3,b,7,g,1,eight +d,3,b,7,g,2,eight +d,3,b,7,g,8,eight +d,3,b,7,h,2,eight +d,3,b,8,e,1,eight +d,3,b,8,f,1,eight +d,3,b,8,f,2,eight +d,3,b,8,g,1,eight +d,3,b,8,g,2,eight +d,3,b,8,h,2,eight +d,3,c,1,a,8,eight +d,3,c,1,b,8,eight +d,3,c,1,e,1,eight +d,3,c,1,f,1,eight +d,3,c,1,f,2,eight +d,3,c,1,g,1,eight +d,3,c,1,g,2,eight +d,3,c,1,h,2,eight +d,3,c,2,a,8,eight +d,3,c,2,b,8,eight +d,3,c,2,f,2,eight +d,3,c,2,g,2,eight +d,3,c,2,h,2,eight +d,3,c,3,a,8,eight +d,3,c,3,b,8,eight +d,3,c,3,f,2,eight +d,3,c,3,g,2,eight +d,3,c,3,h,2,eight +d,3,c,4,a,4,eight +d,3,c,4,a,5,eight +d,3,c,4,a,6,eight +d,3,c,4,a,7,eight +d,3,c,4,a,8,eight +d,3,c,4,b,4,eight +d,3,c,4,b,5,eight +d,3,c,4,b,6,eight +d,3,c,4,b,7,eight +d,3,c,4,b,8,eight +d,3,c,5,e,1,eight +d,3,c,5,f,1,eight +d,3,c,5,f,2,eight +d,3,c,5,f,4,eight +d,3,c,5,g,1,eight +d,3,c,5,g,2,eight +d,3,c,5,h,2,eight +d,3,c,5,h,3,eight +d,3,c,5,h,4,eight +d,3,c,6,a,7,eight +d,3,c,6,a,8,eight +d,3,c,6,b,8,eight +d,3,c,6,e,1,eight +d,3,c,6,f,1,eight +d,3,c,6,f,2,eight +d,3,c,6,g,1,eight +d,3,c,6,g,2,eight +d,3,c,6,h,2,eight +d,3,c,7,a,8,eight +d,3,c,7,e,1,eight +d,3,c,7,f,1,eight +d,3,c,7,f,2,eight +d,3,c,7,f,8,eight +d,3,c,7,g,1,eight +d,3,c,7,g,2,eight +d,3,c,7,g,8,eight +d,3,c,7,h,2,eight +d,3,c,8,a,7,eight +d,3,c,8,a,8,eight +d,3,c,8,e,1,eight +d,3,c,8,f,1,eight +d,3,c,8,f,2,eight +d,3,c,8,g,1,eight +d,3,c,8,g,2,eight +d,3,c,8,h,2,eight +d,3,d,1,a,7,eight +d,3,d,1,a,8,eight +d,3,d,1,b,7,eight +d,3,d,1,b,8,eight +d,3,d,1,h,2,eight +d,3,d,2,a,2,eight +d,3,d,2,a,7,eight +d,3,d,2,a,8,eight ... [truncated message content] |
From: <ku...@us...> - 2008-04-15 10:20:25
|
Revision: 788 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=788&view=rev Author: kurzum Date: 2008-04-15 03:20:23 -0700 (Tue, 15 Apr 2008) Log Message: ----------- added some functions at some places nothing big new approach to KRK Modified Paths: -------------- trunk/src/dl-learner/org/dllearner/algorithms/refexamples/ExampleBasedNode.java trunk/src/dl-learner/org/dllearner/algorithms/refexamples/ExampleBasedROLearner.java trunk/src/dl-learner/org/dllearner/examples/KRK.java trunk/src/dl-learner/org/dllearner/learningproblems/PosNegLP.java trunk/src/dl-learner/org/dllearner/parser/KBParser.java trunk/src/dl-learner/org/dllearner/utilities/SimpleClock.java Added Paths: ----------- trunk/src/dl-learner/org/dllearner/examples/KRKModular.java trunk/src/dl-learner/org/dllearner/examples/KRKOntologyTBox.java Modified: trunk/src/dl-learner/org/dllearner/algorithms/refexamples/ExampleBasedNode.java =================================================================== --- trunk/src/dl-learner/org/dllearner/algorithms/refexamples/ExampleBasedNode.java 2008-04-14 22:45:16 UTC (rev 787) +++ trunk/src/dl-learner/org/dllearner/algorithms/refexamples/ExampleBasedNode.java 2008-04-15 10:20:23 UTC (rev 788) @@ -174,6 +174,30 @@ return ret; } + //TODO integrate this method with the one above + public String getStats(int nrOfPositiveExamples, int nrOfNegativeExamples) { + String ret = " ["; + + if(isTooWeak) + ret += "q:tw"; + else { + double accuracy = 100 * (coveredPositives.size() + nrOfNegativeExamples - coveredNegatives.size())/(double)(nrOfPositiveExamples+nrOfNegativeExamples); + ret += "acc:" + df.format(accuracy) + "% "; + + // comment this out to display the heuristic score with default parameters + double heuristicScore = MultiHeuristic.getNodeScore(this, nrOfPositiveExamples, nrOfNegativeExamples); + ret += "h:" +df.format(heuristicScore) + " "; + + int wrongPositives = nrOfPositiveExamples - coveredPositives.size(); + ret += "q:" + wrongPositives + "p-" + coveredNegatives.size() + "n"; + } + + ret += " ("+qualityEvaluationMethod+"), he:" + horizontalExpansion; + ret += " c:" + children.size() + "]"; + + return ret; + } + public double getAccuracy(int nrOfPositiveExamples, int nrOfNegativeExamples) { return (coveredPositives.size() + nrOfNegativeExamples - coveredNegatives.size())/(double)(nrOfPositiveExamples+nrOfNegativeExamples); } Modified: trunk/src/dl-learner/org/dllearner/algorithms/refexamples/ExampleBasedROLearner.java =================================================================== --- trunk/src/dl-learner/org/dllearner/algorithms/refexamples/ExampleBasedROLearner.java 2008-04-14 22:45:16 UTC (rev 787) +++ trunk/src/dl-learner/org/dllearner/algorithms/refexamples/ExampleBasedROLearner.java 2008-04-15 10:20:23 UTC (rev 788) @@ -743,6 +743,7 @@ // searchTree += bestNodeString + "\n"; logger.debug(bestNodeString); + logger.debug(startNode.getStats(nrOfPositiveExamples, nrOfNegativeExamples)); logger.debug(bestNodeStringKBSyntax); String expandedNodeString = "next expanded node: " + candidates.last().getShortDescription(nrOfPositiveExamples, nrOfNegativeExamples, baseURI); // searchTree += expandedNodeString + "\n"; Modified: trunk/src/dl-learner/org/dllearner/examples/KRK.java =================================================================== --- trunk/src/dl-learner/org/dllearner/examples/KRK.java 2008-04-14 22:45:16 UTC (rev 787) +++ trunk/src/dl-learner/org/dllearner/examples/KRK.java 2008-04-15 10:20:23 UTC (rev 788) @@ -5,6 +5,7 @@ import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.FileReader; +import java.io.FileWriter; import java.io.IOException; import java.net.URI; import java.util.ArrayList; @@ -17,7 +18,6 @@ import org.dllearner.core.owl.ClassAssertionAxiom; import org.dllearner.core.owl.DatatypeProperty; import org.dllearner.core.owl.Description; -import org.dllearner.core.owl.DisjointClassesAxiom; import org.dllearner.core.owl.Individual; import org.dllearner.core.owl.InverseObjectPropertyAxiom; import org.dllearner.core.owl.KB; @@ -51,7 +51,9 @@ // // turn off to not write the owl, needs about 30 seconds or more static boolean writeOWL = true; + static boolean writeKB = false; static boolean useTransitivity = false; + static boolean useHigherThan = false; static boolean writeExampleSets = true; static boolean writeConciseOWLAllDifferent = false; @@ -103,6 +105,9 @@ static ObjectProperty rankLessThan = getRole("hasLowerRankThan"); static ObjectProperty fileLessThan = getRole("hasLowerFileThan"); + + static ObjectProperty rankHigherThan = getRole("hasHigherRankThan"); + static ObjectProperty fileHigherThan = getRole("hasHigherFileThan"); // static ObjectProperty lessThan = getRole("strictLessThan"); @@ -142,10 +147,13 @@ + + try { String line = ""; String[] ar = new String[6]; + String currentclass=""; int x = 0; while ((line = in.readLine()) != null) { @@ -154,11 +162,15 @@ System.out.println("Currently at line" + x); ar = tokenize(line); + currentclass = ar[6]; + gameind = getIndividual("game" + x); wkingind = getIndividual("wking_" + ar[0] + ar[1] + "_" + x); wrookind = getIndividual("wrook_" + ar[2] + ar[3] + "_" + x); bkingind = getIndividual("bking_" + ar[4] + ar[5] + "_" + x); + + allInstances.add(gameind+""); allInstances.add(wkingind+""); allInstances.add(wrookind+""); @@ -180,6 +192,34 @@ kb.addABoxAxiom(new ClassAssertionAxiom(WRook, wrookind)); kb.addABoxAxiom(new ClassAssertionAxiom(BKing, bkingind)); + + /**Files and Ranks***/ + // FILES are letters + // RANKS are numbers + + //WKing + NamedClass tmp=getAtomicConcept(ar[0].toUpperCase()); + kb.addABoxAxiom(new ClassAssertionAxiom(tmp, wkingind)); + + tmp=getAtomicConcept("F"+ar[1]); + kb.addABoxAxiom(new ClassAssertionAxiom(tmp , wkingind)); + + //WRook + tmp=getAtomicConcept(ar[2].toUpperCase()); + kb.addABoxAxiom(new ClassAssertionAxiom(tmp, wrookind)); + + tmp=getAtomicConcept("F"+ar[3]); + kb.addABoxAxiom(new ClassAssertionAxiom(tmp , wrookind)); + + //BKing + tmp=getAtomicConcept(ar[4].toUpperCase()); + kb.addABoxAxiom(new ClassAssertionAxiom(tmp, bkingind)); + + tmp=getAtomicConcept("F"+ar[5]); + kb.addABoxAxiom(new ClassAssertionAxiom(tmp, bkingind)); + + + // PROPERTIES kb.addABoxAxiom(new ObjectPropertyAssertion(hasPiece, gameind, wkingind)); @@ -227,11 +267,12 @@ if(writeExampleSets)writeExampleSets(); if(writeConciseOWLAllDifferent)writeConciseOWLAllDifferent(); if (writeOWL)writeOWLFile("test.owl"); - - OntologyCloser oc = new OntologyCloser(kb); + if(writeKB)writeKBFile("test.kb"); + + OntologyCloser oc = null; String kbaddition= "_Closed"; if(closeKB) { - + oc= new OntologyCloser(kb); if(closeConcise) { oc.applyNumberRestrictionsConcise(); kbaddition = "_CloseConcise"; @@ -241,6 +282,7 @@ if (verifySomeConcepts) { + oc.updateReasoner(); verifySomeConcepts(oc); } @@ -252,79 +294,25 @@ System.out.println("Done"); }// end main + + + static void makeOntology(){ + + + + } + + protected static void verifySomeConcepts(OntologyCloser oc) { ArrayList<String> test=new ArrayList<String>(); - //String conceptStr = "ALL \"http://www.test.de/test#hasPiece\".(EXISTS \"http://www.test.de/test#fileDistanceLessThan6\".((NOT \"http://www.test.de/test#WKing\") AND ALL \"http://www.test.de/test#rankDistance1\".(\"http://www.test.de/test#WKing\" AND ALL \"http://www.test.de/test#fileDistanceLessThan2\".\"http://www.test.de/test#BKing\" AND ALL \"http://www.test.de/test#hasLowerFileThan\".\"http://www.test.de/test#WKing\")) AND ALL \"http://www.test.de/test#fileDistance1\".\"http://www.test.de/test#WRook\")"; - //conceptStr = "ALL http://www.test.de/test#hasPiece.(EXISTS http://www.test.de/test#fileDistanceLessThan6.((NOT http://www.test.de/test#WKing) AND ALL http://www.test.de/test#rankDistance1.(http://www.test.de/test#WKing AND ALL http://www.test.de/test#fileDistanceLessThan2.http://www.test.de/test#WKing AND ALL http://www.test.de/test#hasLowerFileThan.http://www.test.de/test#WKing)) AND ALL http://www.test.de/test#fileDistance1.http://www.test.de/test#WRook)"; - //conceptStr = "ALL hasPiece.(EXISTS fileDistanceLessThan6.((NOT WKing) AND ALL rankDistance1.(WKing AND ALL fileDistanceLessThan2.WKing AND ALL hasLowerFileThan.WKing)) AND ALL fileDistance1.WRook)"; - //conceptStr = "ALL \"http://www.test.de/test#hasPiece\".\"http://www.test.de/test#WKing\""; - //conceptStr = "EXISTS \"http://www.test.de/test#hasPiece\".EXISTS \"http://www.test.de/test#hasLowerRankThan\".(\"http://www.test.de/test#WRook\" AND ALL \"http://www.test.de/test#fileDistanceLessThan1\".\"http://www.test.de/test#WKing\")"; - - test.add("\"http://www.test.de/test#WRook\""); - /*test.add("ALL \"http://www.test.de/test#fileDistanceLessThan1\"." + - "\"http://www.test.de/test#WKing\""); - /*test.add("(\"http://www.test.de/test#WRook\" "+ - " AND " + - " ALL \"http://www.test.de/test#fileDistanceLessThan1\"." + - "\"http://www.test.de/test#WKing\") ");*/ - /*test.add("(\"http://www.test.de/test#Piece\" "+ - " AND " + - " ALL \"http://www.test.de/test#fileDistanceLessThan8\"." + - "\"http://www.test.de/test#Piece\") "); - test.add("(\"http://www.test.de/test#Piece\" "+ - " AND ( " + - " ALL \"http://www.test.de/test#fileDistanceLessThan8\"." + - "\"http://www.test.de/test#Piece\" " + - " AND " + - " EXISTS \"http://www.test.de/test#fileDistanceLessThan8\"." + - "\"http://www.test.de/test#Piece\"))") ; - test.add("(\"http://www.test.de/test#Piece\" "+ - " AND ( " + - " ALL \"http://www.test.de/test#fileDistanceLessThan7\"." + - "\"http://www.test.de/test#Piece\" " + - " AND " + - " EXISTS \"http://www.test.de/test#fileDistanceLessThan7\"." + - "\"http://www.test.de/test#Piece\"))") ; - test.add("(\"http://www.test.de/test#Piece\" "+ - " AND ( " + - " ALL \"http://www.test.de/test#fileDistanceLessThan5\"." + - "\"http://www.test.de/test#Piece\" " + - " AND " + - " EXISTS \"http://www.test.de/test#fileDistanceLessThan5\"." + - "\"http://www.test.de/test#Piece\"))") ;*/ - test.add("(\"http://www.test.de/test#Piece\" "+ - " AND ( " + - " ALL \"http://www.test.de/test#fileDistanceLessThan3\"." + - "\"http://www.test.de/test#Piece\" " + - " AND " + - " EXISTS \"http://www.test.de/test#fileDistanceLessThan3\"." + - "\"http://www.test.de/test#Piece\"))") ; - test.add("(\"http://www.test.de/test#BKing\" "+ - " AND ( " + - " ALL \"http://www.test.de/test#fileDistanceLessThan3\"." + - "\"http://www.test.de/test#Piece\" " + - " AND " + - " EXISTS \"http://www.test.de/test#fileDistanceLessThan3\"." + - "\"http://www.test.de/test#Piece\"))") ; - test.add("(\"http://www.test.de/test#BKing\" "+ - " AND ( " + - " ALL \"http://www.test.de/test#fileDistanceLessThan2\"." + - "\"http://www.test.de/test#Piece\" " + - " AND " + - " EXISTS \"http://www.test.de/test#fileDistanceLessThan2\"." + - "\"http://www.test.de/test#Piece\"))") ; + test.add("(EXISTS \"http://www.test.de/test#hasPiece\".EXISTS \"http://www.test.de/test#rankDistanceLessThan2\".(\"http://www.test.de/test#BKing\" AND EXISTS \"http://www.test.de/test#fileDistanceLessThan1\".(\"http://www.test.de/test#A\" OR \"http://www.test.de/test#WKing\")) AND EXISTS \"http://www.test.de/test#hasPiece\".(\"http://www.test.de/test#WKing\" AND ((\"http://www.test.de/test#C\" AND EXISTS \"http://www.test.de/test#hasLowerRankThan\".\"http://www.test.de/test#A\") OR (\"http://www.test.de/test#F3\" AND EXISTS \"http://www.test.de/test#rankDistance2\".\"http://www.test.de/test#WRook\"))))"); - /*test.add("(\"http://www.test.de/test#Piece\" "+ - " AND " + - " ALL \"http://www.test.de/test#fileDistanceLessThan1\"." + - "\"http://www.test.de/test#WKing\") ");*/ + - test.add("EXISTS \"http://www.test.de/test#hasPiece\".EXISTS \"http://www.test.de/test#hasLowerRankThan\".(\"http://www.test.de/test#WRook\" AND ALL \"http://www.test.de/test#fileDistanceLessThan1\".\"http://www.test.de/test#WKing\")") ; - for (int i = 0; i < test.size(); i++) { String conceptStr = test.get(i); oc.verifyConcept(conceptStr); @@ -352,21 +340,37 @@ kb.addABoxAxiom(new ObjectPropertyAssertion(getRole(fdistance + Fdist), A.id, B.id)); symmetricRoleSet.add(fdistance + Fdist); + + - if (A.meHasLowerFileThan(B)) + if (A.meHasLowerFileThan(B)){ kb.addABoxAxiom(new ObjectPropertyAssertion(fileLessThan, A.id, B.id)); + if(useHigherThan)kb.addABoxAxiom(new ObjectPropertyAssertion(fileHigherThan, B.id, + A.id)); + + } // 18:00 - else if (B.meHasLowerFileThan(A)) + else if (B.meHasLowerFileThan(A)){ kb.addABoxAxiom(new ObjectPropertyAssertion(fileLessThan, B.id, A.id)); + if(useHigherThan)kb.addABoxAxiom(new ObjectPropertyAssertion(fileHigherThan, A.id, + B.id)); + } - if (A.meHasLowerRankThan(B)) + if (A.meHasLowerRankThan(B)){ kb.addABoxAxiom(new ObjectPropertyAssertion(rankLessThan, A.id, B.id)); - else if (B.meHasLowerRankThan(A)) + if(useHigherThan)kb.addABoxAxiom(new ObjectPropertyAssertion(rankHigherThan, B.id, + A.id)); + } + else if (B.meHasLowerRankThan(A)){ kb.addABoxAxiom(new ObjectPropertyAssertion(rankLessThan, B.id, A.id)); + if(useHigherThan)kb.addABoxAxiom(new ObjectPropertyAssertion(rankHigherThan, A.id, + B.id)); + + } } public static void init() { @@ -384,7 +388,7 @@ // DisJointClasses1.add(Rank); // DisJointClasses1.add(File); DisJointClasses1.add(Game); - kb.addTBoxAxiom(new DisjointClassesAxiom(DisJointClasses1)); + //kb.addTBoxAxiom(new DisjointClassesAxiom(DisJointClasses1)); SortedSet<Description> DisJointClasses2 = new TreeSet<Description>(); DisJointClasses2 = new TreeSet<Description>(); @@ -395,7 +399,7 @@ // DisJointClasses2.add(File); // DisJointClasses2.add(Game); - kb.addTBoxAxiom(new DisjointClassesAxiom(DisJointClasses2)); + //kb.addTBoxAxiom(new DisjointClassesAxiom(DisJointClasses2)); } public static void initClassHierarchy() { @@ -404,6 +408,19 @@ kb.addTBoxAxiom(new SubClassAxiom(WKing, Piece)); kb.addTBoxAxiom(new SubClassAxiom(WRook, Piece)); kb.addTBoxAxiom(new SubClassAxiom(BKing, Piece)); + + String[] letters=new String[]{"A","B","C","D","E","F","G","H"}; + String[] numbers=new String[8]; + for (int i = 0; i < numbers.length; i++) { + numbers[i]="F"+i; + } + //System.out.println(numbers); + + for (int i = 0; i < numbers.length; i++) { + kb.addTBoxAxiom(new SubClassAxiom(getAtomicConcept(letters[i]),Piece)); + kb.addTBoxAxiom(new SubClassAxiom(getAtomicConcept(letters[i]),Piece)); + } + } static void initClassesForRankAndFile() { @@ -458,10 +475,15 @@ kb.addRBoxAxiom(new ObjectPropertyDomainAxiom(rankLessThan, Piece)); kb.addRBoxAxiom(new ObjectPropertyRangeAxiom(rankLessThan, Piece)); - kb.addRBoxAxiom(new ObjectPropertyDomainAxiom(fileLessThan, Piece)); kb.addRBoxAxiom(new ObjectPropertyRangeAxiom(fileLessThan, Piece)); - + + if(useHigherThan) { + kb.addRBoxAxiom(new ObjectPropertyDomainAxiom(rankHigherThan, Piece)); + kb.addRBoxAxiom(new ObjectPropertyRangeAxiom(rankHigherThan, Piece)); + kb.addRBoxAxiom(new ObjectPropertyDomainAxiom(fileHigherThan, Piece)); + kb.addRBoxAxiom(new ObjectPropertyRangeAxiom(fileHigherThan, Piece)); + } } static void finishBackgroundForRoles() { @@ -469,6 +491,11 @@ if (useTransitivity) { kb.addRBoxAxiom(new TransitiveObjectPropertyAxiom(rankLessThan)); kb.addRBoxAxiom(new TransitiveObjectPropertyAxiom(fileLessThan)); + if(useHigherThan) { + kb.addRBoxAxiom(new TransitiveObjectPropertyAxiom(rankHigherThan)); + kb.addRBoxAxiom(new TransitiveObjectPropertyAxiom(fileHigherThan)); + } + } if (useInverse) // INVERSE @@ -677,7 +704,20 @@ OWLAPIReasoner.exportKBToOWL(owlfile, kb, ontologyURI); } + + protected static void writeKBFile(String filename) { + System.out.println("Writing kb"); + try{ + FileWriter fw = new FileWriter(workingDir+"/" + filename,false); + fw.write(kb.toKBSyntaxString(ontologyURI.toString(), null)); + fw.flush(); + }catch (Exception e) {e.printStackTrace();} + System.out.println("done writing kb"); + + + } + protected static Individual getIndividual(String name) { return new Individual(ontologyURI + "#" + name); } Added: trunk/src/dl-learner/org/dllearner/examples/KRKModular.java =================================================================== --- trunk/src/dl-learner/org/dllearner/examples/KRKModular.java (rev 0) +++ trunk/src/dl-learner/org/dllearner/examples/KRKModular.java 2008-04-15 10:20:23 UTC (rev 788) @@ -0,0 +1,775 @@ +package org.dllearner.examples; + +import java.io.BufferedReader; +import java.io.File; +import java.io.FileNotFoundException; +import java.io.FileOutputStream; +import java.io.FileReader; +import java.io.IOException; +import java.net.URI; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Random; +import java.util.Set; +import java.util.SortedSet; +import java.util.StringTokenizer; +import java.util.TreeSet; + +import org.dllearner.algorithms.refexamples.ExampleBasedROLComponent; +import org.dllearner.core.ComponentManager; +import org.dllearner.core.KnowledgeSource; +import org.dllearner.core.LearningAlgorithm; +import org.dllearner.core.LearningProblem; +import org.dllearner.core.ReasonerComponent; +import org.dllearner.core.ReasoningService; +import org.dllearner.core.owl.ClassAssertionAxiom; +import org.dllearner.core.owl.Description; +import org.dllearner.core.owl.Individual; +import org.dllearner.core.owl.KB; +import org.dllearner.core.owl.NamedClass; +import org.dllearner.core.owl.ObjectProperty; +import org.dllearner.core.owl.ObjectPropertyAssertion; +import org.dllearner.kb.KBFile; +import org.dllearner.learningproblems.PosNegDefinitionLP; +import org.dllearner.learningproblems.PosNegLP; +import org.dllearner.parser.KBParser; +import org.dllearner.reasoning.FastInstanceChecker; +import org.dllearner.reasoning.OWLAPIReasoner; +import org.dllearner.utilities.SimpleClock; + +/* + * Structure + * + * + * + * + * */ + +public class KRKModular { + + // REMEMBER + // FILES are letters + // RANKS are numbers + + // FLAGS + // + // turn off to not write the owl, needs about 30 seconds or more + /*static boolean writeOWL = true; + static boolean writeKB = false; + static boolean useTransitivity = false; + + static boolean writeExampleSets = true; + static boolean writeConciseOWLAllDifferent = false; + */ + boolean useHigherThan = KRKOntologyTBox.useHigherThan; + + + + //static boolean useInverse = false; + // dependent, love and marriage, horse and carriage + //static boolean useTripleSubProps = useInverse && false; + + + static String workingDir = "examples/krk/"; + static String allData = workingDir+"krkopt_no_draw.data"; + + static URI ontologyURI = KRKOntologyTBox.ontologyURI; + + // static SortedSet<String> fileSet = new TreeSet<String>(); + //static SortedSet<String> allInstances = new TreeSet<String>(); + //static SortedSet<String> classSet = new TreeSet<String>(); + //static SortedSet<String> symmetricRoleSet = new TreeSet<String>(); + + static HashMap<String, SortedSet<Individual>> classToInd = new HashMap<String, SortedSet<Individual>>(); + static HashMap<Individual, String> indToClass = new HashMap<Individual, String>(); + + static Set<ReasonerComponent> allReasoners = new HashSet<ReasonerComponent>(); + static int negativeExamplesAdded = 300; + + // static LinkedList<String> words; + public KB kb; + public ReasonerComponent reasoner; + + + //public FastInstanceChecker fic; + // static HashMap<String,SortedSet<String>> classToInd; + + + public static void init(){ + if (!new File(workingDir).exists()) { + System.out.println("Created directory: " + workingDir + + " : " + new File(workingDir).mkdir()+ "."); + } + } + /** + * @param args + */ + public static void main(String[] args) { + init(); + initAllInstancesAndReasoners(); + System.out.println("initializing finished"); + String currentClass = "ZERO"; + SortedSet<Individual> allPos = classToInd.get(currentClass); + //if(allPos.size()<400)negativeExamplesAdded = allPos.size(); + //else negativeExamplesAdded = 400; + SortedSet<Individual> tmp = new TreeSet<Individual>(); + for (Individual individual : indToClass.keySet()) { + tmp.add(individual); + } + + SortedSet<Individual> neg = getNegativeExamples(currentClass, tmp, negativeExamplesAdded); + SortedSet<Integer> lines = getLines(allPos, neg); + KB kb = getKB(lines); + + + while (true){ + + /*for (String set : classToInd.keySet()) { + for (Individual individual : classToInd.get(set)) { + if(indToClass.get(individual)==null)System.out.println(indToClass.get(individual)); + }}*/ + + + + Description d= learn(kb, allPos, neg); + SortedSet<Individual> result = retrieveAll(d); + System.out.println("still left: " + (result.size()-allPos.size())); + if(verify(currentClass, result)) { + System.out.println("Correct solution: "+ d.toKBSyntaxString(ontologyURI+"#", null)); + break;} + neg.addAll(getNegativeExamples(currentClass, result, negativeExamplesAdded)); + lines = getLines(allPos, neg); + kb = getKB(lines); + + + } + //System.out.println(allPos); + //System.out.println(neg); + + //cm. + + + /*Map<Class<? extends Component>, String> componentPrefixMapping = Start.createComponentPrefixMapping(); + ComponentManager cm = ComponentManager.getInstance(); + + Set<KnowledgeSource> sources = new HashSet<KnowledgeSource>(); + KnowledgeSource ks = cm.knowledgeSource(KBFile.class); + sources.add(ks); + cm.applyConfigEntry(ks, "url", null); + ks.init(); + */ + + + + + + + //verifyConcept("EXISTS hasPiece.EXISTS fileDistance0.TOP"); + //verifyConcept("(EXISTS \"http://dl-learner.org/krk#hasPiece\".EXISTS \"http://dl-learner.org/krk#rankDistanceLessThan2\".(\"http://dl-learner.org/krk#BKing\" AND EXISTS \"http://dl-learner.org/krk#fileDistanceLessThan1\".(\"http://dl-learner.org/krk#A\" OR \"http://dl-learner.org/krk#F3\")) AND EXISTS \"http://dl-learner.org/krk#hasPiece\".(\"http://dl-learner.org/krk#WKing\" AND ((\"http://dl-learner.org/krk#C\" AND EXISTS \"http://dl-learner.org/krk#hasLowerRankThan\".\"http://dl-learner.org/krk#A\") OR (\"http://dl-learner.org/krk#F3\" AND EXISTS \"http://dl-learner.org/krk#rankDistance2\".\"http://dl-learner.org/krk#WRook\"))))"); + //verifyConcept("EXISTS hasPiece.TOP"); + + //.writeOWLFile("test.owl"); + + } + + static Description learn(KB kb, SortedSet<Individual> pos,SortedSet<Individual> neg){ + + System.out.println(pos); + System.out.println(neg); + + ComponentManager cm = ComponentManager.getInstance(); + LearningAlgorithm la = null; + try { + Set<KnowledgeSource> sources = new HashSet<KnowledgeSource>(); + sources.add(new KBFile(kb)); + ReasonerComponent r = new FastInstanceChecker(sources); + r.init(); + ReasoningService rs = new ReasoningService(r); + + LearningProblem lp = new PosNegDefinitionLP(rs); + ((PosNegLP)lp).setPositiveExamples(pos); + ((PosNegLP)lp).setNegativeExamples(neg); + lp.init(); + + la = cm.learningAlgorithm(ExampleBasedROLComponent.class, lp, rs); + SortedSet<String> ignoredConcepts = getIgnoredConcepts(pos, neg); + + cm.applyConfigEntry(la,"useAllConstructor",false); + cm.applyConfigEntry(la,"useExistsConstructor",true); + cm.applyConfigEntry(la,"useCardinalityRestrictions",false); + cm.applyConfigEntry(la,"useNegation",false); + //cm.applyConfigEntry(la,"quiet",false); + cm.applyConfigEntry(la,"ignoredConcepts",ignoredConcepts); + + + la.init(); + + System.out.println("start learning"); + + la.start(); + //System.out.println("best"+la.getBestSolution()); + + }catch (Exception e) {e.printStackTrace();} + return la.getBestSolution(); + } + + static KB getKB(SortedSet<Integer> lines){ + BufferedReader in = null; + try { + in = new BufferedReader(new FileReader(allData)); + } catch (FileNotFoundException e) { + e.printStackTrace(); + } + + KRKModular km = new KRKModular(); + try { + String line = ""; + int x = 0; + while ((line = in.readLine()) != null) { + Integer tmp = new Integer(x); + if(lines.contains(tmp)) + km.addOneLineToKB(x, line); + x++; + }// endWhile + }catch (Exception e) {e.printStackTrace();} + return km.kb; + + } + + + static SortedSet<Integer> getLines(SortedSet<Individual> pos,SortedSet<Individual> neg){ + SortedSet<Integer> ret = new TreeSet<Integer>(); + + for (Individual individual : pos) { + int a = Integer.parseInt(individual.getName().substring((ontologyURI+"#g").length())); + ret.add(new Integer(a)); + } + for (Individual individual : neg) { + int a = Integer.parseInt(individual.getName().substring((ontologyURI+"#g").length())); + ret.add(new Integer(a)); + } + return ret; + + } + + static SortedSet<String> getIgnoredConcepts(SortedSet<Individual> pos,SortedSet<Individual> neg){ + SortedSet<String> ret = new TreeSet<String>(); + + for (Individual individual : pos) { + String tmp = indToClass.get(individual); + //System.out.println("pos"+tmp+individual); + ret.add(ontologyURI+"#"+tmp); + } + for (Individual individual : neg) { + //String tmp = indToClass.get((Individual)individual); + //System.out.println("neg"+tmp+individual); + for (Individual string : indToClass.keySet()) { + if(string.toString().equals(individual.getName())){ + ret.add(ontologyURI+"#"+indToClass.get(string)); + //System.out.println("aaaaaaaa"+individual.getName()); + } + + } + + } + + //System.out.println(indToClass); + return ret; + + } + + public KRKModular() { + this.kb = makeOntologyTBox(); + } + + public KRKModular(String concept) { + this.kb = makeOntologyTBox(concept); + } + + public static void initAllInstancesAndReasoners(){ + // Datei \xF6ffnen + BufferedReader in = null; + try { + in = new BufferedReader(new FileReader(allData)); + } catch (FileNotFoundException e) { + e.printStackTrace(); + } + SimpleClock sc= new SimpleClock(); + KRKModular km =null; + km = new KRKModular(); + try { + String line = ""; + int x = 0; + while ((line = in.readLine()) != null) { + if (x % 10000 == 0) + {sc.print("Currently at line " + x+" : ");} + km.addOneLineToKBinit(x, line); + if(x%1000==0 && x!=0){ + km.initReasonerFact(); + allReasoners.add(km.reasoner); + km = new KRKModular(); + } + if(x==26000)break; + x++; + }// endWhile + + km.initReasonerFact(); + allReasoners.add(km.reasoner); + km = null; + + + sc.printAndSet("initialization finished"); + + //sc.printAndSet("nach Retrieval"); + //km.writeOWLFile(); + /*SortedSet<Individual> s = new TreeSet<Individual>(); + for (int i = 0; i < x; i++) { + s.add(getIndividual("g"+i)); + //if(km.check2(i))howmany++; + }*/ + //writeExampleSet(s); + + + //sc.printAndSet("before "); + //km.initReasonerFact(); + //sc.printAndSet("after initfact"); + + //SortedSet<Individual> ret = km.checkAllOWLAPI(concept, s); + //sc.print("totalfic ("+ret.size()+") for 1000: "); + + + } catch (Exception e) { + e.printStackTrace(); + } + + } + + + + public static SortedSet<Individual> retrieveAll(String concept){ + Description d = null; + try{ + d = KBParser.parseConcept(concept); + }catch (Exception e) {e.printStackTrace();} + return retrieveAll(d); + } + + public static SortedSet<Individual> retrieveAll(Description d){ + SortedSet<Individual> ret = new TreeSet<Individual>(); + try{ + + for (ReasonerComponent onereasoner : allReasoners) { + ret.addAll(onereasoner.retrieval(d)); + } + + }catch (Exception e) {e.printStackTrace();} + return ret; + } + + + + + + public void initReasonerFact(){ + KBFile kbFile = new KBFile(this.kb); + Set<KnowledgeSource> ks = new HashSet<KnowledgeSource>(); + ks.add(kbFile); + reasoner = new OWLAPIReasoner(ks); + ((OWLAPIReasoner)reasoner).setReasonerType("fact"); + try{ + reasoner.init(); + }catch (Exception e) {e.printStackTrace();} + } + + + + public void initFIC(){ + KBFile kbFile = new KBFile(this.kb); + Set<KnowledgeSource> ks = new HashSet<KnowledgeSource>(); + ks.add(kbFile); + //System.out.println("blabla"); + reasoner = new FastInstanceChecker(ks); + //fic.setReasonerType("fact"); + try{ + reasoner.init(); + }catch (Exception e) {e.printStackTrace();} + } + + public KB makeOntologyTBox(){ + + KRKOntologyTBox tbox = new KRKOntologyTBox(); + return tbox.getKb(); + + } + + public KB makeOntologyTBox(String concept){ + + KRKOntologyTBox tbox = new KRKOntologyTBox(); + tbox.addConcept(concept); + return tbox.getKb(); + + } + + + public void addOneLineToKBinit(int x, String line){ + + String[] ar = new String[6]; + Individual gameind = KRKOntologyTBox.getIndividual("g" + x); + ar = tokenize(line); + addToHM(ar[6], gameind); + addOneLineToKB( x, line); + + + } + + public void addOneLineToKB(int x, String line){ + + Individual gameind; + Individual wkingind; + Individual wrookind; + Individual bkingind; + + String[] ar = new String[6]; + + ar = tokenize(line); + + //String currentclass = ar[6]; + + gameind = KRKOntologyTBox.getIndividual("g" + x); + wkingind = KRKOntologyTBox.getIndividual("wking_" + ar[0] + ar[1] + "_" + x); + wrookind = KRKOntologyTBox.getIndividual("wrook_" + ar[2] + ar[3] + "_" + x); + bkingind = KRKOntologyTBox.getIndividual("bking_" + ar[4] + ar[5] + "_" + x); + + + + //allInstances.add(gameind+""); + //allInstances.add(wkingind+""); + //allInstances.add(wrookind+""); + //allInstances.add(bkingind+""); + + // save it for examplegeneration + + // .add(gameind.getName()); + //classSet.add(ar[6]); + + // CLASSES + kb.addABoxAxiom(new ClassAssertionAxiom(KRKOntologyTBox.Game, gameind)); + kb.addABoxAxiom(new ClassAssertionAxiom( + getAtomicConcept(ar[6]), gameind)); + kb.addABoxAxiom(new ClassAssertionAxiom(KRKOntologyTBox.WKing, wkingind)); + kb.addABoxAxiom(new ClassAssertionAxiom(KRKOntologyTBox.WRook, wrookind)); + kb.addABoxAxiom(new ClassAssertionAxiom(KRKOntologyTBox.BKing, bkingind)); + + + /**Files and Ranks***/ + // FILES are letters + // RANKS are numbers + + //WKing + kb.addABoxAxiom(new ClassAssertionAxiom(getAtomicConcept(ar[0].toUpperCase()), wkingind)); + kb.addABoxAxiom(new ClassAssertionAxiom(getAtomicConcept("F"+ar[1]) , wkingind)); + + //WRook + kb.addABoxAxiom(new ClassAssertionAxiom(getAtomicConcept(ar[2].toUpperCase()), wrookind)); + kb.addABoxAxiom(new ClassAssertionAxiom(getAtomicConcept("F"+ar[3]) , wrookind)); + + //BKing + kb.addABoxAxiom(new ClassAssertionAxiom(getAtomicConcept(ar[4].toUpperCase()), bkingind)); + kb.addABoxAxiom(new ClassAssertionAxiom(getAtomicConcept("F"+ar[5]), bkingind)); + + + + // PROPERTIES + kb.addABoxAxiom(new ObjectPropertyAssertion(KRKOntologyTBox.hasPiece, gameind, + wkingind)); + kb.addABoxAxiom(new ObjectPropertyAssertion(KRKOntologyTBox.hasPiece, gameind, + wrookind)); + kb.addABoxAxiom(new ObjectPropertyAssertion(KRKOntologyTBox.hasPiece, gameind, + bkingind)); + + // labels + + KRKPiece WKingPiece = new KRKPiece(wkingind, ar[0], Integer + .parseInt(ar[1])); + KRKPiece WRookPiece = new KRKPiece(wrookind, ar[2], Integer + .parseInt(ar[3])); + KRKPiece BKingPiece = new KRKPiece(bkingind, ar[4], Integer + .parseInt(ar[5])); + + makeDistanceRoles(WKingPiece, WRookPiece); + makeDistanceRoles(WKingPiece, BKingPiece); + makeDistanceRoles(WRookPiece, BKingPiece); + + } + + + /*protected static void verifySomeConcepts(OntologyCloser oc) { + + ArrayList<String> test=new ArrayList<String>(); + test.add("(EXISTS \"http://www.test.de/test#hasPiece\".EXISTS \"http://www.test.de/test#rankDistanceLessThan2\".(\"http://www.test.de/test#BKing\" AND EXISTS \"http://www.test.de/test#fileDistanceLessThan1\".(\"http://www.test.de/test#A\" OR \"http://www.test.de/test#WKing\")) AND EXISTS \"http://www.test.de/test#hasPiece\".(\"http://www.test.de/test#WKing\" AND ((\"http://www.test.de/test#C\" AND EXISTS \"http://www.test.de/test#hasLowerRankThan\".\"http://www.test.de/test#A\") OR (\"http://www.test.de/test#F3\" AND EXISTS \"http://www.test.de/test#rankDistance2\".\"http://www.test.de/test#WRook\"))))"); + for (int i = 0; i < test.size(); i++) { + String conceptStr = test.get(i); + oc.verifyConcept(conceptStr); + } + /*conceptStr = "EXISTS \"http://www.test.de/test#hasLowerRankThan\"."+ + "(\"http://www.test.de/test#WRook\""+ + "AND ALL \"http://www.test.de/test#fileDistanceLessThan1\".\"http://www.test.de/test#WKing\") "; + + System.out.println(); + }*/ + + public void makeDistanceRoles(KRKPiece A, KRKPiece B) { + int Fdist = A.getFileDistance(B); + int Rdist = A.getRankDistance(B); + String rdistance = "rankDistance"; + String fdistance = "fileDistance"; + + kb.addABoxAxiom(new ObjectPropertyAssertion(getRole(rdistance + Rdist), + A.id, B.id)); + kb.addABoxAxiom(new ObjectPropertyAssertion(getRole(fdistance + Fdist), + A.id, B.id)); + + if (A.meHasLowerFileThan(B)){ + kb.addABoxAxiom(new ObjectPropertyAssertion(KRKOntologyTBox.fileLessThan, A.id, + B.id)); + if(useHigherThan)kb.addABoxAxiom(new ObjectPropertyAssertion(KRKOntologyTBox.fileHigherThan, B.id, + A.id)); + } + else if (B.meHasLowerFileThan(A)){ + kb.addABoxAxiom(new ObjectPropertyAssertion(KRKOntologyTBox.fileLessThan, B.id, + A.id)); + if(useHigherThan)kb.addABoxAxiom(new ObjectPropertyAssertion(KRKOntologyTBox.fileHigherThan, A.id, + B.id)); + } + + if (A.meHasLowerRankThan(B)){ + kb.addABoxAxiom(new ObjectPropertyAssertion(KRKOntologyTBox.rankLessThan, A.id, + B.id)); + if(useHigherThan)kb.addABoxAxiom(new ObjectPropertyAssertion(KRKOntologyTBox.rankHigherThan, B.id, + A.id)); + } + else if (B.meHasLowerRankThan(A)){ + kb.addABoxAxiom(new ObjectPropertyAssertion(KRKOntologyTBox.rankLessThan, B.id, + A.id)); + if(useHigherThan)kb.addABoxAxiom(new ObjectPropertyAssertion(KRKOntologyTBox.rankHigherThan, A.id, + B.id)); + + } + } + + + + + protected static void writeExampleSet(Set<Individual> s) { + for (Individual individual : s) { + writeToFile(workingDir+"example.txt", "+\""+individual.getName()+"\"\n"); + } + + } + + + + + + /*protected static void writeExampleSets() { + StringBuffer collect1 = new StringBuffer(); + StringBuffer collect2 = new StringBuffer(); + System.out.println("start writing sets"); + + for (String keys : classToInd.keySet()) { + System.out.println(keys); + SortedSet<String> tmpset = classToInd.get(keys); + for (String individuals : tmpset) { + collect1.append("+\"" + individuals + "\"\n"); + collect2.append("-\"" + individuals + "\"\n"); + } + + writeToFile(workingDir+"/examples_for_" + keys + ".txt", collect1 + + "\n\n" + collect2 + "\n"); + collect1 = new StringBuffer(); + collect2 = new StringBuffer(); + } + // System.out.println("Sets written"); + collect1 = new StringBuffer(); + collect2 = new StringBuffer(); + for (String key : classToInd.keySet()) { + + SortedSet<String> tmpset = classToInd.get(key); + + if (key.equals("ZERO")) {*/ + // collect1.append("/**" + key + "**/\n"); + /* for (String individuals : tmpset) { + collect1.append("+\"" + individuals + "\"\n"); + } + + continue; + } else { */ + // collect2.append("/**" + key + "**/\n"); + /* for (String individuals : tmpset) { + collect2.append("-\"" + individuals + "\"\n"); + } + } + + } + writeToFile(workingDir+"/examples_for_ZERO_and_Rest.txt", collect1 + + "\n\n" + collect2 + "\n"); + System.out.println("Example sets written"); + } + */ + + + + + + + /*protected void writeOWLFile(String filename) { + + Iterator<String> it = classSet.iterator(); + System.out.println("import(\"" + filename + "\");"); + String collect = "refinement.ignoredConcepts={"; + while (it.hasNext()) { + String tmp = (String) it.next(); + collect += "\n\"" + getAtomicConcept(tmp).getName() + "\","; + } + collect = collect.substring(0, collect.length() - 1); + System.out.println(collect + "};"); + + System.out.println("Writing owl"); + File owlfile = new File(workingDir+"/" + filename); + // System.out.println(kb.toString("http://www.test.de/test", new + // HashMap<String, String>())); + OWLAPIReasoner.exportKBToOWL(owlfile, kb, ontologyURI); + + }*/ + + protected void writeOWLFile() { + writeOWLFile("test.owl"); + } + + protected void writeOWLFile(String filename) { + + System.out.println("Writing owl"); + File owlfile = new File(workingDir+"/" + filename); + OWLAPIReasoner.exportKBToOWL(owlfile, this.kb, ontologyURI); + + } + + + + protected static void writeToFile(String filename, String content) { + // create the file we want to use + File file = new File(filename); + + try { + file.createNewFile(); + FileOutputStream fos = new FileOutputStream(filename, true); + // ObjectOutputStream o = new ObjectOutputStream(fos); + fos.write(content.getBytes()); + fos.flush(); + fos.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + + protected static void addToHM(String className, Individual ind) { + if (classToInd.get(className) == null) + classToInd.put(className, new TreeSet<Individual>()); + + classToInd.get(className).add(ind); + indToClass.put(ind, className); + + } + + + protected static Individual getIndividual(String name) { + return new Individual(ontologyURI + "#" + name); + } + + protected static ObjectProperty getRole(String name) { + return new ObjectProperty(ontologyURI + "#" + name); + } + + protected static NamedClass getAtomicConcept(String name) { + return new NamedClass(ontologyURI + "#" + name); + } + + public static String[] tokenize(String s) { + StringTokenizer st = new StringTokenizer(s, ","); + + String tmp = ""; + String[] ret = new String[7]; + int x = 0; + while (st.hasMoreTokens()) { + tmp = st.nextToken(); + if (x == 6) + tmp = tmp.toUpperCase(); + ret[x] = tmp; + x++; + } + return ret; + + } + + static SortedSet<Individual> getNegativeExamples(String currentClass, SortedSet<Individual> allRetrieved, int howmany) { + SortedSet<Individual> ret = new TreeSet<Individual>(); + + //clean + SortedSet<Individual> allPos = classToInd.get(currentClass); + for (Individual individual : allPos) { + if(!allRetrieved.remove(individual))System.out.println("WARNING, not all positives covered");; + } + + Random r = new Random(); + double treshold = ((double)howmany)/allRetrieved.size(); + //System.out.println("treshold"+howmany); + //System.out.println("treshold"+allRetrieved.size()); + //System.out.println("treshold"+treshold); + int added=0; + for (Individual oneInd : allRetrieved) { + if(r.nextDouble()<treshold) { + ret.add(oneInd); + added++; + } + } + System.out.println(added+" new negs added"); + return ret; + } + static boolean verify(String currentClass, SortedSet<Individual> allRetrieved) { + //clean + SortedSet<Individual> allPos = classToInd.get(currentClass); + boolean hasAll=true; + for (Individual individual : allPos) { + if(!allRetrieved.contains(individual))hasAll=false; + } + if(hasAll && allRetrieved.size()==allPos.size()){return true;} + else return false; + + } + + /*public SortedSet<Individual> checkAll(String concept, SortedSet<Individual> s){ + try{ + Description d = KBParser.parseConcept(concept,ontologyURI.toString()+"#"); + + return reasoner.instanceCheck(d, s); + }catch (Exception e) {e.printStackTrace();} + return null; +} + +public SortedSet<Individual> checkAllOWLAPI(String concept,SortedSet<Individual> s){ + try{ + Description d = KBParser.parseConcept(concept,ontologyURI.toString()+"#"); + return reasoner.instanceCheck(d, s); + }catch (Exception e) {e.printStackTrace();} + return null; +} + +/*public SortedSet<Individual> retrieveAllowlAPI(String concept){ + try{ + Description d = KBParser.parseConcept(concept,ontologyURI.toString()+"#"); + return reasoner.retrieval(d); + }catch (Exception e) {e.printStackTrace();} + return null; +}*/ + +} Added: trunk/src/dl-learner/org/dllearner/examples/KRKOntologyTBox.java =================================================================== --- trunk/src/dl-learner/org/dllearner/examples/KRKOntologyTBox.java (rev 0) +++ trunk/src/dl-learner/org/dllearner/examples/KRKOntologyTBox.java 2008-04-15 10:20:23 UTC (rev 788) @@ -0,0 +1,251 @@ +package org.dllearner.examples; + +import java.net.URI; +import java.util.SortedSet; +import java.util.TreeSet; + +import org.dllearner.core.owl.ClassAssertionAxiom; +import org.dllearner.core.owl.DatatypeProperty; +import org.dllearner.core.owl.Description; +import org.dllearner.core.owl.DisjointClassesAxiom; +import org.dllearner.core.owl.EquivalentClassesAxiom; +import org.dllearner.core.owl.Individual; +import org.dllearner.core.owl.KB; +import org.dllearner.core.owl.NamedClass; +import org.dllearner.core.owl.ObjectProperty; +import org.dllearner.core.owl.ObjectPropertyAssertion; +import org.dllearner.core.owl.ObjectPropertyDomainAxiom; +import org.dllearner.core.owl.ObjectPropertyRangeAxiom; +import org.dllearner.core.owl.SubClassAxiom; +import org.dllearner.core.owl.SubObjectPropertyAxiom; +import org.dllearner.core.owl.SymmetricObjectPropertyAxiom; +import org.dllearner.parser.KBParser; + +public class KRKOntologyTBox { + + private KB kb; + static URI ontologyURI = URI.create("http://dl-learner.org/krk"); + + static boolean useHigherThan=false; + static boolean useInverse = false; + + static NamedClass Game = getAtomicConcept("Game"); + static NamedClass WKing = getAtomicConcept("WKing"); + static NamedClass WRook = getAtomicConcept("WRook"); + static NamedClass BKing = getAtomicConcept("BKing"); + // had to rename, too much similarity to java.io.File + static NamedClass FileData = getAtomicConcept("File"); + static NamedClass Rank = getAtomicConcept("Rank"); + static NamedClass Piece = getAtomicConcept("Piece"); + + static ObjectProperty hasPiece = getRole("hasPiece"); + static ObjectProperty hasWKing = getRole("hasWKing"); + static ObjectProperty hasWRook = getRole("hasWRook"); + static ObjectProperty hasBKing = getRole("hasBKing"); + + static ObjectProperty hasPieceInv = getRole("hasGame"); + static ObjectProperty hasWKingInv = getRole("hasWKingInv"); + static ObjectProperty hasWRookInv = getRole("hasWRookInv"); + static ObjectProperty hasBKingInv = getRole("hasBKingInv"); + + static ObjectProperty rankLessThan = getRole("hasLowerRankThan"); + static ObjectProperty fileLessThan = getRole("hasLowerFileThan"); + + static ObjectProperty rankHigherThan = getRole("hasHigherRankThan"); + static ObjectProperty fileHigherThan = getRole("hasHigherFileThan"); + + + /*public KRKOntologyTBox(KB kbin){ + this.kb=kbin; + + }*/ + + public KRKOntologyTBox(){ + this.kb=new KB(); + initOntologyTBox(); + + + } + + public void addConcept(String concept){ + try{ + //make Description + Description d = KBParser.parseConcept(concept,ontologyURI.toString()+"#"); + //d.addChild(oecr); + kb.addTBoxAxiom(new EquivalentClassesAxiom(getAtomicConcept("test"),d)); + + }catch (Exception e) {e.printStackTrace();} + } + + public void initOntologyTBox(){ + + //DISJOINTCLASSES + SortedSet<Description> DisJointClasses1 = new TreeSet<Description>(); + DisJointClasses1.add(Piece); + DisJointClasses1.add(Game); + kb.addTBoxAxiom(new DisjointClassesAxiom(DisJointClasses1)); + + SortedSet<Description> DisJointClasses2 = new TreeSet<Description>(); + DisJointClasses2 = new TreeSet<Description>(); + DisJointClasses2.add(WKing); + DisJointClasses2.add(WRook); + DisJointClasses2.add(BKing); + // DisJointClasses2.add(Rank); + // DisJointClasses2.add(File); + // DisJointClasses2.add(Game); + kb.addTBoxAxiom(new DisjointClassesAxiom(DisJointClasses2)); + + /**CLASSES***/ + // all sub of piece + kb.addTBoxAxiom(new SubClassAxiom(WKing, Piece)); + kb.addTBoxAxiom(new SubClassAxiom(WRook, Piece)); + kb.addTBoxAxiom(new SubClassAxiom(BKing, Piece)); + + String[] letters=new String[]{"A","B","C","D","E","F","G","H"}; + String[] numbers=new String[8]; + for (int i = 0; i < numbers.length; i++) { + numbers[i]="F"+(i+1); + } + //System.out.println(numbers); + + for (int i = 0; i < numbers.length; i++) { + kb.addTBoxAxiom(new SubClassAxiom(getAtomicConcept(letters[i]),Piece)); + kb.addTBoxAxiom(new SubClassAxiom(getAtomicConcept(numbers[i]),Piece)); + } + + + kb.addRBoxAxiom(new ObjectPropertyDomainAxiom(hasPiece, Game)); + kb.addRBoxAxiom(new ObjectPropertyRangeAxiom(hasPiece, Piece)); + + + if (useInverse) { + kb.addRBoxAxiom(new ObjectPropertyDomainAxiom(hasPieceInv, Piece)); + kb.addRBoxAxiom(new ObjectPropertyRangeAxiom(hasPieceInv, Game)); + + kb.addRBoxAxiom(new ObjectPropertyDomainAxiom(hasWKingInv, WKing)); + kb.addRBoxAxiom(new ObjectPropertyRangeAxiom(hasWKingInv, Game)); + + kb.addRBoxAxiom(new ObjectPropertyDomainAxiom(hasWRookInv, WRook)); + kb.addRBoxAxiom(new ObjectPropertyRangeAxiom(hasWRookInv, Game)); + + kb.addRBoxAxiom(new ObjectPropertyDomainAxiom(hasBKingInv, BKing)); + kb.addRBoxAxiom(new ObjectPropertyRangeAxiom(hasBKingInv, Game)); + } + + kb.addRBoxAxiom(new ObjectPropertyDomainAxiom(rankLessThan, Piece)); + kb.addRBoxAxiom(new ObjectPropertyRangeAxiom(rankLessThan, Piece)); + kb.addRBoxAxiom(new ObjectPropertyDomainAxiom(fileLessThan, Piece)); + kb.addRBoxAxiom(new ObjectPropertyRangeAxiom(fileLessThan, Piece)); + + if(useHigherThan) { + kb.addRBoxAxiom(new ObjectPropertyDomainAxiom(rankHigherThan, Piece)); + kb.addRBoxAxiom(new ObjectPropertyRangeAxiom(rankHigherThan, Piece)); + kb.addRBoxAxiom(new ObjectPropertyDomainAxiom(fileHigherThan, Piece)); + kb.addRBoxAxiom(new ObjectPropertyRangeAxiom(fileHigherThan, Piece)); + } + + finishBackgroundForRoles(); + + //return this.kb; + + } + + + public void finishBackgroundForRoles() { + + for (int i = 8; i > 0; i--) { + + + ObjectProperty rankDistance = getRole("rankDistance"+(i-1)); + ObjectProperty fileDistance = getRole("fileDistance"+(i-1)); + kb.addRBoxAxiom(new SymmetricObjectPropertyAxiom(rankDistance)); + kb.addRBoxAxiom(new SymmetricObjectPropertyAxiom(fileDistance)); + kb.addRBoxAxiom(new ObjectPropertyDomainAxiom(rankDistance, + KRKOntologyTBox.Piece)); + kb.addRBoxAxiom(new ObjectPropertyRangeAxiom(rankDistance, + KRKOntologyTBox.Piece)); + kb.addRBoxAxiom(new ObjectPropertyDomainAxiom(fileDistance, + KRKOntologyTBox.Piece)); + kb.addRBoxAxiom(new ObjectPropertyRangeAxiom(fileDistance, + KRKOntologyTBox.Piece)); + + + + kb.addRBoxAxiom(new SubObjectPropertyAxiom( + getRole("rankDistance" + (i - 1)), + getRole("rankDistanceLessThan" + i))); + kb.addRBoxAxiom(new SubObjectPropertyAxiom( + getRole("fileDistance" + (i - 1)), + getRole("fileDistanceLessThan" + i))); + + kb.addRBoxAxiom(new ObjectPropertyDomainAxiom( + getRole("rankDistanceLessThan" + i), KRKOntologyTBox.Piece)); + kb.addRBoxAxiom(new ObjectPropertyRangeAxiom( + getRole("rankDistanceLessThan" + i), KRKOntologyTBox.Piece)); + + kb.addRBoxAxiom(new ObjectPropertyDomainAxiom( + getRole("fileDistanceLessThan" + i), KRKOntologyTBox.Piece)); + kb.addRBoxAxiom(new ObjectPropertyRangeAxiom( + getRole("fileDistanceLessThan" + i), KRKOntologyTBox.Piece)); + + + if(i==1) continue; + + kb.addRBoxAxiom(new SubObjectPropertyAxiom( + getRole("rankDistanceLessThan" + (i - 1)), + getRole("rankDistanceLessThan" + i))); + kb.addRBoxAxiom(new SubObjectPropertyAxiom( + getRole("fileDistanceLessThan" + (i - 1)), + getRole("fileDistanceLessThan" + i))); + + + } + + + } + + + protected static Individual getIndividual(String name) { + return new Individual(ontologyURI + "#" + name); + } + + protected static ObjectProperty getRole(String name) { + return new ObjectProperty(ontologyURI + "#" + name); + } + + @SuppressWarnings("unused") + protected static DatatypeProperty getDatatypeProperty(String name) { + return new DatatypeProperty(ontologyURI + "#" + name); + } + + protected static NamedClass getAtomicConcept(String name) { + return new NamedClass(ontologyURI + "#" + name); + } + + @SuppressWarnings("unused") + protected static String getURI(String name) { + return ontologyURI + "#" + name; + } + + @SuppressWarnings("unused") + protected static ClassAssertionAxiom getConceptAssertion(String concept, + String instance) { + Individual ind = getIndividual(instance); + NamedClass c = getAtomicConcept(concept); + return new ClassAssertionAxiom(c, ind); + } + + @SuppressWarnings("unused") + protected static ObjectPropertyAssertion getRoleAssertion(String role, + String i1, String i2) { + Individual ind1 = getIndividual(i1); + Individual ind2 = getIndividual(i2); + ObjectProperty ar = getRole(role); + return new ObjectPropertyAssertion(ar, ind1, ind2); + } + + public KB getKb() { + return kb; + } + +} Modified: trunk/src/dl-learner/org/dllearner/learningproblems/PosNegLP.java =================================================================== --- trunk/src/dl-learner/org/dllearner/learningproblems/PosNegLP.java 2008-04-14 22:45:16 UTC (rev 787) +++ trunk/src/dl-learner/org/dllearner/learningproblems/PosNegLP.java 2008-04-15 10:20:23 UTC (rev 788) @@ -145,6 +145,14 @@ return positiveExamples; } + public void setNegativeExamples(SortedSet<Individual> set) { + this.negativeExamples=set; + } + + public void setPositiveExamples(SortedSet<Individual> set) { + this.positiveExamples=set; + } + public abstract int coveredNegativeExamplesOrTooWeak(Description concept); public double getPercentPerLengthUnit() { Modified: trunk/src/dl-learner/org/dllearner/parser/KBParser.java =================================================================== --- trunk/src/dl-learner/org/dllearner/parser/KBParser.java 2008-04-14 22:45:16 UTC (rev 787) +++ trunk/src/dl-learner/org/dllearner/parser/KBParser.java 2008-04-15 10:20:23 UTC (rev 788) @@ -18,6 +18,12 @@ return internalNamespace + name; } + //TODO beware of this function it is evil + public static Description parseConcept(String string, String namespace) throws ParseException { + internalNamespace = namespace; + return parseConcept(string); + } + public static Description parseConcept(String string) throws ParseException { // when just parsing the string as concept, we have no guarantee // that the parser uses all symbols, e.g. a AND b returns just a Modified: trunk/src/dl-learner/org/dllearner/utilities/SimpleClock.java =================================================================== --- trunk/src/dl-learner/org/dllearner/utilities/SimpleClock.java 2008-04-14 22:45:16 UTC (rev 787) +++ trunk/src/dl-learner/org/dllearner/utilities/SimpleClock.java 2008-04-15 10:20:23 UTC (rev 788) @@ -11,6 +11,10 @@ time=System.currentTimeMillis(); } + + + + /** * prints time needed * and resets the clock @@ -33,6 +37,18 @@ time=now; } + + /** + * prints time needed + * + * @param s String for printing + */ + public void print(String s) { + long now=System.currentTimeMillis(); + System.out.println(s+" needed "+(now-time)+" ms"); + + } + public void setTime() { time=System.currentTimeMillis(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ku...@us...> - 2008-04-14 22:45:20
|
Revision: 787 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=787&view=rev Author: kurzum Date: 2008-04-14 15:45:16 -0700 (Mon, 14 Apr 2008) Log Message: ----------- added config option reasonertype for fastinstancechecker to be able to use it with fact Modified Paths: -------------- trunk/src/dl-learner/org/dllearner/reasoning/FastInstanceChecker.java trunk/src/dl-learner/org/dllearner/reasoning/OWLAPIReasoner.java Modified: trunk/src/dl-learner/org/dllearner/reasoning/FastInstanceChecker.java =================================================================== --- trunk/src/dl-learner/org/dllearner/reasoning/FastInstanceChecker.java 2008-04-14 14:45:06 UTC (rev 786) +++ trunk/src/dl-learner/org/dllearner/reasoning/FastInstanceChecker.java 2008-04-14 22:45:16 UTC (rev 787) @@ -20,6 +20,8 @@ package org.dllearner.reasoning; import java.io.File; +import java.util.Collection; +import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.Set; @@ -35,7 +37,9 @@ 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; +import org.dllearner.core.config.StringConfigOption; import org.dllearner.core.owl.BooleanValueRestriction; import org.dllearner.core.owl.DataRange; import org.dllearner.core.owl.DatatypeProperty; @@ -86,6 +90,8 @@ private boolean defaultNegation = true; + private String reasonerType = "pellet"; + private Set<NamedClass> atomicConcepts; private Set<ObjectProperty> atomicRoles; private SortedSet<DatatypeProperty> datatypeProperties; @@ -119,6 +125,17 @@ this.sources = sources; } + + public static Collection<ConfigOption<?>> createConfigOptions() { + Collection<ConfigOption<?>> options = new LinkedList<ConfigOption<?>>(); + StringConfigOption type = new StringConfigOption("reasonerType", "FaCT++ or Pellet to dematerialize", "pellet"); + type.setAllowedValues(new String[] {"fact", "pellet"}); + // closure option? see: + // http://owlapi.svn.sourceforge.net/viewvc/owlapi/owl1_1/trunk/tutorial/src/main/java/uk/ac/manchester/owl/tutorial/examples/ClosureAxiomsExample.java?view=markup + options.add(type); + return options; + } + /* * (non-Javadoc) * @@ -126,7 +143,9 @@ */ @Override public <T> void applyConfigEntry(ConfigEntry<T> entry) throws InvalidConfigOptionValueException { - + String name = entry.getOptionName(); + if(name.equals("reasonerType")) + reasonerType = (String) entry.getValue(); } public static String getName() { @@ -142,6 +161,8 @@ @Override public void init() throws ComponentInitException { rc = new OWLAPIReasoner(sources); + //TODO make it nice + rc.setReasonerType(reasonerType); rc.init(); try { @@ -598,4 +619,8 @@ rc.releaseKB(); } + public void setReasonerType(String type){ + reasonerType=type; + } + } Modified: trunk/src/dl-learner/org/dllearner/reasoning/OWLAPIReasoner.java =================================================================== --- trunk/src/dl-learner/org/dllearner/reasoning/OWLAPIReasoner.java 2008-04-14 14:45:06 UTC (rev 786) +++ trunk/src/dl-learner/org/dllearner/reasoning/OWLAPIReasoner.java 2008-04-14 22:45:16 UTC (rev 787) @@ -892,5 +892,9 @@ public List<OWLOntology> getOWLAPIOntologies() { return owlAPIOntologies; } + + public void setReasonerType(String type){ + reasonerType=type; + } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ku...@us...> - 2008-04-14 14:45:13
|
Revision: 786 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=786&view=rev Author: kurzum Date: 2008-04-14 07:45:06 -0700 (Mon, 14 Apr 2008) Log Message: ----------- changed String to StringBuffer which is faster Modified Paths: -------------- trunk/src/dl-learner/org/dllearner/core/owl/KB.java Modified: trunk/src/dl-learner/org/dllearner/core/owl/KB.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/owl/KB.java 2008-04-10 13:20:09 UTC (rev 785) +++ trunk/src/dl-learner/org/dllearner/core/owl/KB.java 2008-04-14 14:45:06 UTC (rev 786) @@ -204,16 +204,17 @@ } public String toKBSyntaxString(String baseURI, Map<String,String> prefixes) { - String str = "TBox["+tbox.size()+"]:\n"; + StringBuffer strbuff = new StringBuffer(); + strbuff.append("TBox["+tbox.size()+"]:\n"); for(Axiom a : tbox) - str += " " + a.toString(baseURI, prefixes)+"\n"; - str += "RBox["+rbox.size()+"]:\n"; + strbuff.append(" " + a.toString(baseURI, prefixes)+"\n"); + strbuff.append("\nRBox["+rbox.size()+"]:\n"); for(Axiom a : rbox) - str += " " + a.toString(baseURI, prefixes)+"\n"; - str += "ABox["+abox.size()+"]:\n"; + strbuff.append(" " + a.toString(baseURI, prefixes)+"\n"); + strbuff.append("\nABox["+abox.size()+"]:\n"); for(Axiom a : abox) - str += " " + a.toString(baseURI, prefixes)+"\n"; - return str; + strbuff.append(" " + a.toString(baseURI, prefixes)+"\n"); + return strbuff.toString(); } public Set<Individual> findRelatedIndividuals(Individual individual) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ku...@us...> - 2008-04-10 13:20:23
|
Revision: 785 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=785&view=rev Author: kurzum Date: 2008-04-10 06:20:09 -0700 (Thu, 10 Apr 2008) Log Message: ----------- some kbsyntax manchester fixes, added option useCardinalityRestrictions Modified Paths: -------------- trunk/src/dl-learner/org/dllearner/algorithms/refexamples/ExampleBasedROLComponent.java trunk/src/dl-learner/org/dllearner/algorithms/refexamples/ExampleBasedROLearner.java trunk/src/dl-learner/org/dllearner/algorithms/refexamples/MultiHeuristic.java trunk/src/dl-learner/org/dllearner/core/config/CommonConfigOptions.java trunk/src/dl-learner/org/dllearner/core/owl/ObjectExactCardinalityRestriction.java trunk/src/dl-learner/org/dllearner/core/owl/ObjectMaxCardinalityRestriction.java trunk/src/dl-learner/org/dllearner/core/owl/ObjectMinCardinalityRestriction.java trunk/src/dl-learner/org/dllearner/examples/KRK.java trunk/src/dl-learner/org/dllearner/refinementoperators/RhoDRDown.java Modified: trunk/src/dl-learner/org/dllearner/algorithms/refexamples/ExampleBasedROLComponent.java =================================================================== --- trunk/src/dl-learner/org/dllearner/algorithms/refexamples/ExampleBasedROLComponent.java 2008-04-10 13:01:21 UTC (rev 784) +++ trunk/src/dl-learner/org/dllearner/algorithms/refexamples/ExampleBasedROLComponent.java 2008-04-10 13:20:09 UTC (rev 785) @@ -101,6 +101,7 @@ private boolean improveSubsumptionHierarchy = true; private boolean useAllConstructor = true; private boolean useExistsConstructor = true; + private boolean useCardinalityRestrictions = true; private boolean useNegation = true; private boolean useBooleanDatatypes = true; private double noisePercentage = 0.0; @@ -160,8 +161,10 @@ options.add(CommonConfigOptions.ignoredRoles()); options.add(CommonConfigOptions.useAllConstructor()); options.add(CommonConfigOptions.useExistsConstructor()); + options.add(CommonConfigOptions.useCardinalityRestrictions()); options.add(CommonConfigOptions.useNegation()); options.add(CommonConfigOptions.useBooleanDatatypes()); + DoubleConfigOption noisePercentage = new DoubleConfigOption("noisePercentage", "the (approximated) percentage of noise within the examples"); noisePercentage.setLowerLimit(0); noisePercentage.setUpperLimit(100); @@ -213,6 +216,8 @@ useAllConstructor = (Boolean) entry.getValue(); } else if(name.equals("useExistsConstructor")) { useExistsConstructor = (Boolean) entry.getValue(); + } else if(name.equals("useCardinalityRestrictions")) { + useCardinalityRestrictions = (Boolean) entry.getValue(); } else if(name.equals("useNegation")) { useNegation = (Boolean) entry.getValue(); } else if(name.equals("noisePercentage")) { @@ -292,6 +297,7 @@ applyExistsFilter, useAllConstructor, useExistsConstructor, + useCardinalityRestrictions, useNegation, useBooleanDatatypes, startClass Modified: trunk/src/dl-learner/org/dllearner/algorithms/refexamples/ExampleBasedROLearner.java =================================================================== --- trunk/src/dl-learner/org/dllearner/algorithms/refexamples/ExampleBasedROLearner.java 2008-04-10 13:01:21 UTC (rev 784) +++ trunk/src/dl-learner/org/dllearner/algorithms/refexamples/ExampleBasedROLearner.java 2008-04-10 13:20:09 UTC (rev 785) @@ -739,8 +739,11 @@ // String bestNodeString = "currently best node: " + bestNode + " accuracy: " + df.format(accuracy) + "%"; logger.debug("start node: " + startNode.getShortDescription(nrOfPositiveExamples, nrOfNegativeExamples, baseURI)); String bestNodeString = "currently best node: " + bestNode.getShortDescription(nrOfPositiveExamples, nrOfNegativeExamples, baseURI); + String bestNodeStringKBSyntax = "currently best node KBSyntax: " + bestNode.getConcept().toKBSyntaxString(); + // searchTree += bestNodeString + "\n"; logger.debug(bestNodeString); + logger.debug(bestNodeStringKBSyntax); String expandedNodeString = "next expanded node: " + candidates.last().getShortDescription(nrOfPositiveExamples, nrOfNegativeExamples, baseURI); // searchTree += expandedNodeString + "\n"; logger.debug(expandedNodeString); Modified: trunk/src/dl-learner/org/dllearner/algorithms/refexamples/MultiHeuristic.java =================================================================== --- trunk/src/dl-learner/org/dllearner/algorithms/refexamples/MultiHeuristic.java 2008-04-10 13:01:21 UTC (rev 784) +++ trunk/src/dl-learner/org/dllearner/algorithms/refexamples/MultiHeuristic.java 2008-04-10 13:20:09 UTC (rev 785) @@ -78,7 +78,7 @@ private double expansionPenaltyFactor; private double gainBonusFactor; private double nodeChildPenalty = 0.0001; - private double startNodeBonus = 2.0; + private double startNodeBonus = 0.1; //was 2.0 // penalise errors on positive examples harder than on negative examples // (positive weight = 1) private double negativeWeight = 0.8; Modified: trunk/src/dl-learner/org/dllearner/core/config/CommonConfigOptions.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/config/CommonConfigOptions.java 2008-04-10 13:01:21 UTC (rev 784) +++ trunk/src/dl-learner/org/dllearner/core/config/CommonConfigOptions.java 2008-04-10 13:20:09 UTC (rev 785) @@ -28,6 +28,21 @@ * */ public final class CommonConfigOptions { + + //public static boolean applyAllFilterDefault = true; + //public static boolean applyExistsFilterDefault = true; + //public static boolean useTooWeakListDefault = true; + //public static boolean useOverlyGeneralListDefault = true; + //public static boolean useShortConceptConstructionDefault = true; + //public static boolean improveSubsumptionHierarchyDefault = true; + public static boolean useAllConstructorDefault = true; + public static boolean useExistsConstructorDefault = true; + public static boolean useCardinalityRestrictionsDefault = true; + public static boolean useNegationDefault = true; + public static boolean useBooleanDatatypesDefault = true; + //public static double noisePercentageDefault = 0.0; + + public static StringConfigOption getVerbosityOption() { StringConfigOption verbosityOption = new StringConfigOption("verbosity", "control verbosity of output for this component", "warning"); @@ -72,18 +87,22 @@ } public static BooleanConfigOption useAllConstructor() { - return new BooleanConfigOption("useAllConstructor", "specifies whether to universal concept constructor is used in the learning algorothm"); + return new BooleanConfigOption("useAllConstructor", "specifies whether the universal concept constructor is used in the learning algorithm",useAllConstructorDefault); } public static BooleanConfigOption useExistsConstructor() { - return new BooleanConfigOption("useExistsConstructor", "specifies whether to existential concept constructor is used in the learning algorothm"); + return new BooleanConfigOption("useExistsConstructor", "specifies whether the existential concept constructor is used in the learning algorithm",useExistsConstructorDefault); } + public static BooleanConfigOption useCardinalityRestrictions() { + return new BooleanConfigOption("useCardinalityRestrictions", "specifies whether CardinalityRestrictions is used in the learning algorithm",useCardinalityRestrictionsDefault); + } + public static BooleanConfigOption useNegation() { - return new BooleanConfigOption("useNegation", "specifies whether negation is used in the learning algorothm"); + return new BooleanConfigOption("useNegation", "specifies whether negation is used in the learning algorothm",useNegationDefault); } public static BooleanConfigOption useBooleanDatatypes() { - return new BooleanConfigOption("useBooleanDatatypes", "specifies whether boolean datatypes are used in the learning algorothm"); + return new BooleanConfigOption("useBooleanDatatypes", "specifies whether boolean datatypes are used in the learning algorothm",useBooleanDatatypesDefault); } } Modified: trunk/src/dl-learner/org/dllearner/core/owl/ObjectExactCardinalityRestriction.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/owl/ObjectExactCardinalityRestriction.java 2008-04-10 13:01:21 UTC (rev 784) +++ trunk/src/dl-learner/org/dllearner/core/owl/ObjectExactCardinalityRestriction.java 2008-04-10 13:20:09 UTC (rev 785) @@ -37,11 +37,11 @@ } public String toString(String baseURI, Map<String,String> prefixes) { - return "= " + number + " " + role.toString(baseURI, prefixes) + " " + getChild(0).toString(baseURI, prefixes); + return "= " + number + " " + role.toString(baseURI, prefixes) + "." + getChild(0).toString(baseURI, prefixes); } public String toKBSyntaxString(String baseURI, Map<String,String> prefixes) { - return "= " + number + " " + role.toKBSyntaxString(baseURI, prefixes) + " " + getChild(0).toKBSyntaxString(baseURI, prefixes); + return "= " + number + " " + role.toKBSyntaxString(baseURI, prefixes) + "." + getChild(0).toKBSyntaxString(baseURI, prefixes); } @Override Modified: trunk/src/dl-learner/org/dllearner/core/owl/ObjectMaxCardinalityRestriction.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/owl/ObjectMaxCardinalityRestriction.java 2008-04-10 13:01:21 UTC (rev 784) +++ trunk/src/dl-learner/org/dllearner/core/owl/ObjectMaxCardinalityRestriction.java 2008-04-10 13:20:09 UTC (rev 785) @@ -14,11 +14,11 @@ } public String toString(String baseURI, Map<String,String> prefixes) { - return "<= " + number + " " + role.toString(baseURI, prefixes) + " " + getChild(0).toString(baseURI, prefixes); + return "<= " + number + " " + role.toString(baseURI, prefixes) + "." + getChild(0).toString(baseURI, prefixes); } public String toKBSyntaxString(String baseURI, Map<String,String> prefixes) { - return "<= " + number + " " + role.toKBSyntaxString(baseURI, prefixes) + " " + getChild(0).toKBSyntaxString(baseURI, prefixes); + return "<= " + number + " " + role.toKBSyntaxString(baseURI, prefixes) + "." + getChild(0).toKBSyntaxString(baseURI, prefixes); } @Override Modified: trunk/src/dl-learner/org/dllearner/core/owl/ObjectMinCardinalityRestriction.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/owl/ObjectMinCardinalityRestriction.java 2008-04-10 13:01:21 UTC (rev 784) +++ trunk/src/dl-learner/org/dllearner/core/owl/ObjectMinCardinalityRestriction.java 2008-04-10 13:20:09 UTC (rev 785) @@ -14,11 +14,11 @@ } public String toString(String baseURI, Map<String,String> prefixes) { - return ">= " + number + " " + role.toString(baseURI, prefixes) + " " + getChild(0).toString(baseURI, prefixes); + return ">= " + number + " " + role.toString(baseURI, prefixes) + "." + getChild(0).toString(baseURI, prefixes); } public String toKBSyntaxString(String baseURI, Map<String,String> prefixes) { - return ">= " + number + " " + role.toKBSyntaxString(baseURI, prefixes) + " " + getChild(0).toKBSyntaxString(baseURI, prefixes); + return ">= " + number + " " + role.toKBSyntaxString(baseURI, prefixes) + "." + getChild(0).toKBSyntaxString(baseURI, prefixes); } @Override Modified: trunk/src/dl-learner/org/dllearner/examples/KRK.java =================================================================== --- trunk/src/dl-learner/org/dllearner/examples/KRK.java 2008-04-10 13:01:21 UTC (rev 784) +++ trunk/src/dl-learner/org/dllearner/examples/KRK.java 2008-04-10 13:20:09 UTC (rev 785) @@ -56,7 +56,7 @@ static boolean writeConciseOWLAllDifferent = false; - static boolean closeKB=true; + static boolean closeKB=false; static boolean closeConcise= true && closeKB; static boolean writeClosedOWL = true && closeKB; static boolean verifySomeConcepts = false && closeKB; Modified: trunk/src/dl-learner/org/dllearner/refinementoperators/RhoDRDown.java =================================================================== --- trunk/src/dl-learner/org/dllearner/refinementoperators/RhoDRDown.java 2008-04-10 13:01:21 UTC (rev 784) +++ trunk/src/dl-learner/org/dllearner/refinementoperators/RhoDRDown.java 2008-04-10 13:20:09 UTC (rev 785) @@ -167,16 +167,17 @@ // 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, null); + this(reasoningService, true, true, true, true, true, true, true, null); } public RhoDRDown(ReasoningService reasoningService, boolean applyAllFilter, boolean applyExistsFilter, boolean useAllConstructor, - boolean useExistsConstructor, boolean useNegation, boolean useBooleanDatatypes, NamedClass startClass) { + boolean useExistsConstructor,boolean useCardinalityRestrictions,boolean useNegation, boolean useBooleanDatatypes, NamedClass startClass) { this.rs = reasoningService; this.applyAllFilter = applyAllFilter; this.applyExistsFilter = applyExistsFilter; this.useAllConstructor = useAllConstructor; this.useExistsConstructor = useExistsConstructor; + this.useCardinalityRestrictions = useCardinalityRestrictions; this.useNegation = useNegation; this.useBooleanDatatypes = useBooleanDatatypes; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hee...@us...> - 2008-04-10 13:02:22
|
Revision: 784 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=784&view=rev Author: heeroyuy Date: 2008-04-10 06:01:21 -0700 (Thu, 10 Apr 2008) Log Message: ----------- deleted duplicated jars Removed Paths: ------------- trunk/lib/protege/log4j.jar trunk/lib/protege/org.semanticweb.owl.owlapi.jar Deleted: trunk/lib/protege/log4j.jar =================================================================== (Binary files differ) Deleted: trunk/lib/protege/org.semanticweb.owl.owlapi.jar =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hee...@us...> - 2008-04-10 12:53:13
|
Revision: 783 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=783&view=rev Author: heeroyuy Date: 2008-04-10 05:52:58 -0700 (Thu, 10 Apr 2008) Log Message: ----------- added buildjob to compile Protegeplugin Modified Paths: -------------- trunk/build.xml Modified: trunk/build.xml =================================================================== --- trunk/build.xml 2008-04-10 10:55:38 UTC (rev 782) +++ trunk/build.xml 2008-04-10 12:52:58 UTC (rev 783) @@ -4,7 +4,9 @@ <!-- directory settings --> <property name="lib_dir" value="lib" /> <property name="source_dir" value="src/dl-learner" /> + <property name="protege_dir" value="/Programme/Protege_4.0_alpha/plugins" /> <property name="class_dir" value="classes" /> + <property name="php_client_dir" value="src/php-client" /> <tstamp> <format property="today" pattern="yyyy-MM-dd" locale="en" /> @@ -214,4 +216,35 @@ </javadoc> </target> + <!-- build protege plugin and copy it to the plugin folder --> + <target name="protege"> + <property name="source" value="src/dl-learner/org/dllearner/tools/protege" /> + <property name="temp" value="${source}/temp" /> + + <mkdir dir="${temp}" /> + <mkdir dir="${temp}/META-INF" /> + <mkdir dir="${temp}/lib" /> + <copy toDir="${temp}/META-INF" > + <fileset dir="${source}/META-INF" includes="MANIFEST.MF," /> + </copy> + <copy toDir="${temp}/lib" > + <fileset dir="${lib_dir}" /> + </copy> + <copy toDir="${temp}" > + <fileset dir="${class_dir}" /> + </copy> + <copy toDir="${temp}" > + <fileset dir="${source}/META-INF" includes="**/*.xml," excludes="build.xml" /> + </copy> + <javac srcdir="${source}" + destdir="${temp}" + classpath="jarfile" + debug="on" /> + <jar destfile="${protege_dir}/dl-learner.jar" manifest="${temp}/META-INF/MANIFEST.MF"> + <fileset dir="${temp}" /> + </jar> + <delete dir="${temp}" /> + + </target> + </project> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lor...@us...> - 2008-04-10 10:55:42
|
Revision: 782 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=782&view=rev Author: lorenz_b Date: 2008-04-10 03:55:38 -0700 (Thu, 10 Apr 2008) Log Message: ----------- added ListSelectionEvent to LearningPanel Modified Paths: -------------- trunk/src/dl-learner/org/dllearner/tools/ore/LearningPanel.java trunk/src/dl-learner/org/dllearner/tools/ore/LearningPanelDescriptor.java Modified: trunk/src/dl-learner/org/dllearner/tools/ore/LearningPanel.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/ore/LearningPanel.java 2008-04-10 06:42:27 UTC (rev 781) +++ trunk/src/dl-learner/org/dllearner/tools/ore/LearningPanel.java 2008-04-10 10:55:38 UTC (rev 782) @@ -13,6 +13,7 @@ import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.ListSelectionModel; +import javax.swing.event.ListSelectionListener; import javax.swing.table.DefaultTableModel; import org.jdesktop.swingx.JXBusyLabel; @@ -141,10 +142,12 @@ return resultList; } + public void addSelectionListener(ListSelectionListener l){ + resultList.addListSelectionListener(l); + } - } Modified: trunk/src/dl-learner/org/dllearner/tools/ore/LearningPanelDescriptor.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/ore/LearningPanelDescriptor.java 2008-04-10 06:42:27 UTC (rev 781) +++ trunk/src/dl-learner/org/dllearner/tools/ore/LearningPanelDescriptor.java 2008-04-10 10:55:38 UTC (rev 782) @@ -5,11 +5,12 @@ import java.util.List; import java.util.Timer; import java.util.TimerTask; -import java.util.Vector; import java.util.concurrent.ExecutionException; import javax.swing.SwingUtilities; import javax.swing.SwingWorker; +import javax.swing.event.ListSelectionEvent; +import javax.swing.event.ListSelectionListener; import org.dllearner.core.LearningAlgorithm; import org.dllearner.core.owl.Description; @@ -17,7 +18,7 @@ -public class LearningPanelDescriptor extends WizardPanelDescriptor implements ActionListener{ +public class LearningPanelDescriptor extends WizardPanelDescriptor implements ActionListener, ListSelectionListener{ public static final String IDENTIFIER = "LEARNING_PANEL"; @@ -30,6 +31,7 @@ panel4 = new LearningPanel(); panel4.addStartButtonListener(this); panel4.addStopButtonListener(this); + panel4.addSelectionListener(this); setPanelDescriptorIdentifier(IDENTIFIER); setPanelComponent(panel4); @@ -65,7 +67,7 @@ @SuppressWarnings("unchecked") @Override public void run() { - publish(getWizardModel().getOre().getLearningResults(5)); + publish(getWizardModel().getOre().getLearningResults(10)); } }, 0, 1000); @@ -178,4 +180,11 @@ + } + + @Override + public void valueChanged(ListSelectionEvent e) { + if (!e.getValueIsAdjusting()) + System.out.println(panel4.getResultList().getSelectedValue()); + }} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lor...@us...> - 2008-04-10 06:42:35
|
Revision: 781 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=781&view=rev Author: lorenz_b Date: 2008-04-09 23:42:27 -0700 (Wed, 09 Apr 2008) Log Message: ----------- added ListRenderers added method getCorrectness to ORE to get Correctness of learned Concept added correctness in view of JList in LearningPanel Modified Paths: -------------- trunk/src/dl-learner/org/dllearner/tools/ore/ConceptPanel.java trunk/src/dl-learner/org/dllearner/tools/ore/ConceptPanelDescriptor.java trunk/src/dl-learner/org/dllearner/tools/ore/IntroductionPanelDescriptor.java trunk/src/dl-learner/org/dllearner/tools/ore/KnowledgeSourcePanel.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/Main.java trunk/src/dl-learner/org/dllearner/tools/ore/ORE.java trunk/src/dl-learner/org/dllearner/tools/ore/Wizard.java trunk/src/dl-learner/org/dllearner/tools/ore/WizardController.java Added Paths: ----------- trunk/src/dl-learner/org/dllearner/tools/ore/ColorListCellRenderer.java trunk/src/dl-learner/org/dllearner/tools/ore/ColumnListCellRenderer.java Added: trunk/src/dl-learner/org/dllearner/tools/ore/ColorListCellRenderer.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/ore/ColorListCellRenderer.java (rev 0) +++ trunk/src/dl-learner/org/dllearner/tools/ore/ColorListCellRenderer.java 2008-04-10 06:42:27 UTC (rev 781) @@ -0,0 +1,42 @@ +package org.dllearner.tools.ore; + +import java.awt.Color; +import java.awt.Component; + +import javax.swing.JLabel; +import javax.swing.JList; +import javax.swing.ListCellRenderer; + +public class ColorListCellRenderer extends JLabel implements ListCellRenderer { + + public ColorListCellRenderer() { + setOpaque(true); + } + + public Component getListCellRendererComponent(JList list, Object value, + int index, boolean isSelected, boolean cellHasFocus) { + + setText(value.toString()); + Color background; + Color foreground; + + if (index % 2 == 0 && !isSelected) { + background = new Color(242, 242, 242); + foreground = Color.BLACK; + + } else if(isSelected){ + + background = Color.BLUE; + foreground = Color.WHITE; + }else{ + background = Color.WHITE; + foreground = Color.BLACK; + } + + setForeground(foreground); + setBackground(background); + + return this; + } + +} Added: trunk/src/dl-learner/org/dllearner/tools/ore/ColumnListCellRenderer.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/ore/ColumnListCellRenderer.java (rev 0) +++ trunk/src/dl-learner/org/dllearner/tools/ore/ColumnListCellRenderer.java 2008-04-10 06:42:27 UTC (rev 781) @@ -0,0 +1,60 @@ +package org.dllearner.tools.ore; + +import java.awt.BorderLayout; +import java.awt.Color; +import java.awt.Component; + +import javax.swing.JLabel; +import javax.swing.JList; +import javax.swing.JPanel; +import javax.swing.ListCellRenderer; + +import org.dllearner.core.owl.Description; + +public class ColumnListCellRenderer extends JPanel implements ListCellRenderer { + + private ORE ore; + + + public ColumnListCellRenderer(ORE ore) { + this.ore = ore; + setOpaque(true); + } + + public Component getListCellRendererComponent(JList list, Object value, + int index, boolean isSelected, boolean cellHasFocus) { + removeAll(); + JLabel cor = new JLabel(); + JLabel desc = new JLabel(); + setLayout(new BorderLayout()); + + + desc.setText(value.toString()); + cor.setText( (ore.getCorrectness((Description)value)).toString()); + + add(cor, BorderLayout.WEST); + add(desc, BorderLayout.EAST); + + Color background; + Color foreground; + + if (index % 2 == 0 && !isSelected) { + background = new Color(242, 242, 242); + foreground = Color.BLACK; + + } else if(isSelected){ + + background = Color.BLUE; + foreground = Color.WHITE; + }else{ + background = Color.WHITE; + foreground = Color.BLACK; + } + + setForeground(foreground); + setBackground(background); + + return this; + } + +} \ No newline at end of file Modified: trunk/src/dl-learner/org/dllearner/tools/ore/ConceptPanel.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/ore/ConceptPanel.java 2008-04-09 18:35:28 UTC (rev 780) +++ trunk/src/dl-learner/org/dllearner/tools/ore/ConceptPanel.java 2008-04-10 06:42:27 UTC (rev 781) @@ -29,29 +29,33 @@ private JXBusyLabel loadingLabel; private JLabel statusLabel; + @SuppressWarnings("unchecked") public ConceptPanel() { super(); model = new DefaultListModel(); - loadingLabel = new JXBusyLabel(new Dimension(24,24)); + loadingLabel = new JXBusyLabel(new Dimension(15,15)); statusLabel = new JLabel(); - BusyPainter<?> painter = new BusyPainter( - new RoundRectangle2D.Float(0, 0,10.0f,3.2f,10.0f,10.0f), - new Ellipse2D.Float(3.5f,3.5f,17.0f,17.0f)); - painter.setTrailLength(4); - painter.setPoints(8); + + BusyPainter painter = new BusyPainter( + new RoundRectangle2D.Float(0, 0,6.0f,2.6f,10.0f,10.0f), + new Ellipse2D.Float(2.0f,2.0f,11.0f,11.0f)); + painter.setTrailLength(2); + painter.setPoints(7); painter.setFrame(-1); - loadingLabel.setPreferredSize(new Dimension(24,24)); - loadingLabel.setIcon(new EmptyIcon(24,24)); + loadingLabel.setPreferredSize(new Dimension(15,15)); + loadingLabel.setIcon(new EmptyIcon(15,15)); loadingLabel.setBusyPainter(painter); - + + JPanel labelPanel = new JPanel(); + labelPanel.add(loadingLabel); labelPanel.add(statusLabel); - labelPanel.add(loadingLabel); + contentPanel = getContentPanel(); setLayout(new java.awt.BorderLayout()); add(contentPanel,BorderLayout.CENTER); @@ -65,7 +69,8 @@ conceptList = new JList(model); - scroll.setPreferredSize(new Dimension(200,200)); + conceptList.setCellRenderer(new ColorListCellRenderer()); + scroll.setPreferredSize(new Dimension(400,400)); scroll.setViewportView(conceptList); contentPanel1.add(scroll); Modified: trunk/src/dl-learner/org/dllearner/tools/ore/ConceptPanelDescriptor.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/ore/ConceptPanelDescriptor.java 2008-04-09 18:35:28 UTC (rev 780) +++ trunk/src/dl-learner/org/dllearner/tools/ore/ConceptPanelDescriptor.java 2008-04-10 06:42:27 UTC (rev 781) @@ -24,15 +24,18 @@ } - public Object getNextPanelDescriptor() { + @Override + public Object getNextPanelDescriptor() { return LearningPanelDescriptor.IDENTIFIER; } - public Object getBackPanelDescriptor() { + @Override + public Object getBackPanelDescriptor() { return KnowledgeSourcePanelDescriptor.IDENTIFIER; } - public void aboutToDisplayPanel() { + @Override + public void aboutToDisplayPanel() { setNextButtonAccordingToConceptSelected(); } Modified: trunk/src/dl-learner/org/dllearner/tools/ore/IntroductionPanelDescriptor.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/ore/IntroductionPanelDescriptor.java 2008-04-09 18:35:28 UTC (rev 780) +++ trunk/src/dl-learner/org/dllearner/tools/ore/IntroductionPanelDescriptor.java 2008-04-10 06:42:27 UTC (rev 781) @@ -10,11 +10,13 @@ super(IDENTIFIER, new IntroductionPanel()); } - public Object getNextPanelDescriptor() { + @Override + public Object getNextPanelDescriptor() { return KnowledgeSourcePanelDescriptor.IDENTIFIER; } - public Object getBackPanelDescriptor() { + @Override + public Object getBackPanelDescriptor() { return null; } Modified: trunk/src/dl-learner/org/dllearner/tools/ore/KnowledgeSourcePanel.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/ore/KnowledgeSourcePanel.java 2008-04-09 18:35:28 UTC (rev 780) +++ trunk/src/dl-learner/org/dllearner/tools/ore/KnowledgeSourcePanel.java 2008-04-10 06:42:27 UTC (rev 781) @@ -21,7 +21,7 @@ public KnowledgeSourcePanel() { -new LeftPanel(1); + new LeftPanel(1); contentPanel = getContentPanel(); setLayout(new java.awt.BorderLayout()); @@ -72,11 +72,13 @@ filechooser.setCurrentDirectory(new File(fileURL.getText())); filechooser.addChoosableFileFilter(new FileFilter() { - public boolean accept(File f) { + @Override + public boolean accept(File f) { if (f.isDirectory()) return true; return f.getName().toLowerCase().endsWith(".owl"); } - public String getDescription () { return "OWLs"; } + @Override + public String getDescription () { return "OWLs"; } }); int status = filechooser.showOpenDialog( null ); @@ -119,7 +121,10 @@ public File getOWLFile() { return new File(fileURL.getText()); } - + public void setFileURL(String fileURL){ + this.fileURL.setText(fileURL); + } + } Modified: trunk/src/dl-learner/org/dllearner/tools/ore/KnowledgeSourcePanelDescriptor.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/ore/KnowledgeSourcePanelDescriptor.java 2008-04-09 18:35:28 UTC (rev 780) +++ trunk/src/dl-learner/org/dllearner/tools/ore/KnowledgeSourcePanelDescriptor.java 2008-04-10 06:42:27 UTC (rev 781) @@ -15,7 +15,7 @@ public static final String IDENTIFIER = "KNOWLEDGESOURCE_CHOOSE_PANEL"; - KnowledgeSourcePanel panel2; + private KnowledgeSourcePanel panel2; public KnowledgeSourcePanelDescriptor() { @@ -28,16 +28,19 @@ } - public Object getNextPanelDescriptor() { + @Override + public Object getNextPanelDescriptor() { return ConceptPanelDescriptor.IDENTIFIER; } - public Object getBackPanelDescriptor() { + @Override + public Object getBackPanelDescriptor() { return IntroductionPanelDescriptor.IDENTIFIER; } - public void aboutToDisplayPanel() { + @Override + public void aboutToDisplayPanel() { setNextButtonAccordingToExistingOWLFile(); } @@ -108,6 +111,9 @@ } +public KnowledgeSourcePanel getPanel() { + return panel2; +} Modified: trunk/src/dl-learner/org/dllearner/tools/ore/LearningPanel.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/ore/LearningPanel.java 2008-04-09 18:35:28 UTC (rev 780) +++ trunk/src/dl-learner/org/dllearner/tools/ore/LearningPanel.java 2008-04-10 06:42:27 UTC (rev 781) @@ -3,6 +3,8 @@ import java.awt.BorderLayout; import java.awt.Dimension; import java.awt.event.ActionListener; +import java.awt.geom.Ellipse2D; +import java.awt.geom.RoundRectangle2D; import javax.swing.DefaultListModel; import javax.swing.JButton; @@ -10,39 +12,73 @@ import javax.swing.JList; import javax.swing.JPanel; import javax.swing.JScrollPane; +import javax.swing.ListSelectionModel; +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; + public class LearningPanel extends JPanel{ - + private JPanel contentPanel; + private javax.swing.JList resultList; + private DefaultListModel model; - private JPanel contentPanel; + private JXTable resultTable; + private DefaultTableModel model1; - private DefaultListModel model; - private JLabel result; + private JLabel statusLabel; + private JXBusyLabel loadingLabel; + private JButton startButton; private JButton stopButton; + @SuppressWarnings("unchecked") public LearningPanel() { super(); model = new DefaultListModel(); - result = new JLabel(); + + model1 = new DefaultTableModel(); + model1.addColumn("Description"); + model1.addColumn("Correctness"); + + JPanel buttonPanel = new JPanel(); startButton = new JButton("Start"); - stopButton = new JButton("Stop"); stopButton.setEnabled(false); - buttonPanel.add(startButton); buttonPanel.add(stopButton); + + + JPanel labelPanel = new JPanel(); + statusLabel = new JLabel(); + + loadingLabel = new JXBusyLabel(new Dimension(15,15)); + BusyPainter painter = new BusyPainter( + new RoundRectangle2D.Float(0, 0,6.0f,2.6f,10.0f,10.0f), + new Ellipse2D.Float(2.0f,2.0f,11.0f,11.0f)); + painter.setTrailLength(2); + painter.setPoints(7); + painter.setFrame(-1); + loadingLabel.setPreferredSize(new Dimension(15,15)); + loadingLabel.setIcon(new EmptyIcon(15,15)); + loadingLabel.setBusyPainter(painter); + labelPanel.add(loadingLabel); + labelPanel.add(statusLabel); + contentPanel = getContentPanel(); setLayout(new java.awt.BorderLayout()); add(buttonPanel, BorderLayout.EAST); add(contentPanel,BorderLayout.CENTER); - add(result, BorderLayout.SOUTH); + add(labelPanel, BorderLayout.SOUTH); } private JPanel getContentPanel() { @@ -50,9 +86,16 @@ 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); - scroll.setPreferredSize(new Dimension(300, 300)); +// resultList.setCellRenderer(new ColumnListCellRenderer()); + scroll.setPreferredSize(new Dimension(400, 400)); + scroll.setViewportView(resultList); contentPanel1.add(scroll); @@ -70,10 +113,14 @@ stopButton.addActionListener(a); } - public void setResult(String resultStr){ - result.setText(resultStr); + public JLabel getStatusLabel() { + return statusLabel; } + public JXBusyLabel getLoadingLabel() { + return loadingLabel; + } + public JButton getStartButton() { return startButton; } @@ -85,6 +132,10 @@ public DefaultListModel getModel() { return model; } + +// public DefaultTableModel getModel() { +// return model1; +// } public javax.swing.JList getResultList() { return resultList; Modified: trunk/src/dl-learner/org/dllearner/tools/ore/LearningPanelDescriptor.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/ore/LearningPanelDescriptor.java 2008-04-09 18:35:28 UTC (rev 780) +++ trunk/src/dl-learner/org/dllearner/tools/ore/LearningPanelDescriptor.java 2008-04-10 06:42:27 UTC (rev 781) @@ -5,6 +5,7 @@ import java.util.List; import java.util.Timer; import java.util.TimerTask; +import java.util.Vector; import java.util.concurrent.ExecutionException; import javax.swing.SwingUtilities; @@ -32,14 +33,17 @@ setPanelDescriptorIdentifier(IDENTIFIER); setPanelComponent(panel4); + } - public Object getNextPanelDescriptor() { + @Override + public Object getNextPanelDescriptor() { return LearningPanelDescriptor.IDENTIFIER; } - public Object getBackPanelDescriptor() { + @Override + public Object getBackPanelDescriptor() { return ConceptPanelDescriptor.IDENTIFIER; } @@ -51,11 +55,15 @@ @Override public List<Description> doInBackground() { - + panel4.getResultList().setCellRenderer(new ColumnListCellRenderer(getWizardModel().getOre())); + panel4.getLoadingLabel().setBusy(true); + panel4.getStatusLabel().setText("Learning"); la = getWizardModel().getOre().start(); timer = new Timer(); timer.schedule(new TimerTask() { + @SuppressWarnings("unchecked") + @Override public void run() { publish(getWizardModel().getOre().getLearningResults(5)); } @@ -68,7 +76,10 @@ return result; } + @Override public void done() { + + timer.cancel(); List<Description> result = null; try { @@ -78,10 +89,12 @@ } catch (ExecutionException e) { e.printStackTrace(); } + panel4.getStartButton().setEnabled(true); panel4.getStopButton().setEnabled(false); updateList(result); - + panel4.getLoadingLabel().setBusy(false); + panel4.getStatusLabel().setText("Algorithm terminated successfully."); } @Override @@ -100,6 +113,8 @@ public void run() { panel4.getModel().clear(); for (Description d : result) { + System.err.println(d+"=="+getWizardModel().getOre().getCorrectness(d)); + panel4.getModel().addElement(d); } @@ -108,6 +123,37 @@ SwingUtilities.invokeLater(doUpdateList); } + +// void updateList(final List<Description> result) { +// Runnable doUpdateList = new Runnable() { +// +// public void run() { +// +// +// int i = panel4.getModel().getRowCount(); +// if(!(i == 0)) +// for(int j = panel4.getModel().getRowCount(); j >= 0 ; j--){ +// System.out.println(panel4.getModel().getRowCount()); +// panel4.getModel().removeRow(j); +// } +// +// +// +// +// for (Description d : result) { +// Object[] rowData = new Object[2]; +// rowData[0] = d; +// rowData[1] = getWizardModel().getOre().getCorrectness(d); +// System.err.println(d+"=="+rowData[1]); +// +// panel4.getModel().addRow(rowData ); +// } +// +// } +// }; +// SwingUtilities.invokeLater(doUpdateList); +// +// } public LearningAlgorithm getLa() { return la; @@ -126,7 +172,8 @@ else{ panel4.getStopButton().setEnabled(false); worker.getLa().stop(); - panel4.getStartButton().setEnabled(true); + panel4.getStartButton().setEnabled(true); + panel4.getStatusLabel().setText("Algorithm aborted"); } Modified: trunk/src/dl-learner/org/dllearner/tools/ore/Main.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/ore/Main.java 2008-04-09 18:35:28 UTC (rev 780) +++ trunk/src/dl-learner/org/dllearner/tools/ore/Main.java 2008-04-10 06:42:27 UTC (rev 781) @@ -26,7 +26,7 @@ } Wizard wizard = new Wizard(); wizard.getDialog().setTitle("DL-Learner ORE-Tool"); - wizard.getDialog().setSize(700, 400); + wizard.getDialog().setSize(800, 500); WizardPanelDescriptor descriptor1 = new IntroductionPanelDescriptor(); wizard.registerWizardPanel(IntroductionPanelDescriptor.IDENTIFIER, descriptor1); @@ -40,9 +40,17 @@ WizardPanelDescriptor descriptor4 = new LearningPanelDescriptor(); wizard.registerWizardPanel(LearningPanelDescriptor.IDENTIFIER, descriptor4); - wizard.setCurrentPanel(IntroductionPanelDescriptor.IDENTIFIER); - + if ( !(args.length == 1)){ + wizard.setCurrentPanel(IntroductionPanelDescriptor.IDENTIFIER); + }else{ + ((KnowledgeSourcePanelDescriptor)descriptor2).getPanel().setFileURL(args[0]); + wizard.setCurrentPanel(KnowledgeSourcePanelDescriptor.IDENTIFIER); + + } + + int ret = wizard.showModalDialog(); + System.out.println("Dialog return code is (0=Finish,1=Cancel,2=Error): " + ret); Modified: trunk/src/dl-learner/org/dllearner/tools/ore/ORE.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/ore/ORE.java 2008-04-09 18:35:28 UTC (rev 780) +++ trunk/src/dl-learner/org/dllearner/tools/ore/ORE.java 2008-04-10 06:42:27 UTC (rev 781) @@ -1,6 +1,8 @@ package org.dllearner.tools.ore; import java.io.File; +import java.math.BigDecimal; +import java.util.List; import java.util.Set; import java.util.SortedSet; import java.util.TreeSet; @@ -20,8 +22,6 @@ import org.dllearner.learningproblems.PosNegDefinitionLP; import org.dllearner.reasoning.OWLAPIReasoner; -import java.util.List; - public class ORE { private LearningAlgorithm la; @@ -63,7 +63,6 @@ ReasonerComponent reasoner = cm.reasoner( OWLAPIReasoner.class, ks); - try { reasoner.init(); } catch (ComponentInitException e) { @@ -117,9 +116,6 @@ } } -// public void setConcept(String conceptStr){ -// concept = new NamedClass(conceptStr); -// } public void setConcept(NamedClass concept){ this.concept = concept; @@ -143,8 +139,38 @@ public List<Description> getLearningResults(int anzahl){ return la.getBestSolutions(anzahl); } + + public BigDecimal getCorrectness(Description d){ + int numberPosExamples = 0; + int numberNegExamples = 0; + 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++; + } + + result_tmp = ((float)(numberPosExamples) + (float)(numberNegExamples))/((float)(posExamples.size())+(float)(negExamples.size())) * 100; + BigDecimal result = new BigDecimal( result_tmp ); + result = result.setScale( 2, BigDecimal.ROUND_HALF_UP ); + return result; + + + } + public void addAxiomToOWL(Description desc){ +// OWLDescription newConceptOWLAPI = OWLAPIDescriptionConvertVisitor.getOWLDescription(desc); + + + } + public static void main(String[] args){ ORE test = new ORE(); Modified: trunk/src/dl-learner/org/dllearner/tools/ore/Wizard.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/ore/Wizard.java 2008-04-09 18:35:28 UTC (rev 780) +++ trunk/src/dl-learner/org/dllearner/tools/ore/Wizard.java 2008-04-10 06:42:27 UTC (rev 781) @@ -405,7 +405,8 @@ * @param WindowEvent The event passed in from AWT. */ - public void windowClosing(WindowEvent e) { + @Override + public void windowClosing(WindowEvent e) { returnCode = CANCEL_RETURN_CODE; } Modified: trunk/src/dl-learner/org/dllearner/tools/ore/WizardController.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/ore/WizardController.java 2008-04-09 18:35:28 UTC (rev 780) +++ trunk/src/dl-learner/org/dllearner/tools/ore/WizardController.java 2008-04-10 06:42:27 UTC (rev 781) @@ -161,18 +161,17 @@ } } - class ConceptRetriever extends SwingWorker<Set<NamedClass>, NamedClass> - { - Object nextPanelID; - - public ConceptRetriever(Object nextPanelDescriptor) { - - nextPanelID = nextPanelDescriptor; - } - - - public Set<NamedClass> doInBackground() { + class ConceptRetriever extends SwingWorker<Set<NamedClass>, NamedClass> { + Object nextPanelID; + public ConceptRetriever(Object nextPanelDescriptor) { + + nextPanelID = nextPanelDescriptor; + } + + @Override + public Set<NamedClass> doInBackground() { + ((ConceptPanelDescriptor) wizard.getModel().getPanelHashMap().get( nextPanelID)).panel3.getStatusLabel().setText( "Loading concepts"); @@ -186,36 +185,38 @@ return ind; } - - public void done(){ - Set<NamedClass> ind = null; - try { - ind = get(); - } catch (InterruptedException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } catch (ExecutionException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - ConceptPanelDescriptor nextPanel = (ConceptPanelDescriptor)wizard.getModel().getPanelHashMap().get(nextPanelID); - DefaultListModel dm = new DefaultListModel(); - - for (NamedClass cl : ind){ - dm.addElement(cl); - //nextPanel.panel3.getModel().addElement(cl); - System.out.println(cl.getName()); - } - nextPanel.panel3.getList().setModel(dm); - ((ConceptPanelDescriptor) wizard.getModel().getPanelHashMap().get( + + @Override + public void done() { + Set<NamedClass> ind = null; + try { + ind = get(); + } catch (InterruptedException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (ExecutionException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + ConceptPanelDescriptor nextPanel = (ConceptPanelDescriptor) wizard + .getModel().getPanelHashMap().get(nextPanelID); + DefaultListModel dm = new DefaultListModel(); + + for (NamedClass cl : ind) { + dm.addElement(cl); + //nextPanel.panel3.getModel().addElement(cl); + System.out.println(cl.getName()); + } + nextPanel.panel3.getList().setModel(dm); + ((ConceptPanelDescriptor) wizard.getModel().getPanelHashMap().get( nextPanelID)).panel3.getStatusLabel().setText( "Concepts loaded"); - ((ConceptPanelDescriptor)wizard.getModel().getPanelHashMap().get(nextPanelID)).panel3.getLoadingLabel().setBusy(false); - } - - - } + ((ConceptPanelDescriptor) wizard.getModel().getPanelHashMap().get( + nextPanelID)).panel3.getLoadingLabel().setBusy(false); + } + } + } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lor...@us...> - 2008-04-09 18:35:41
|
Revision: 780 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=780&view=rev Author: lorenz_b Date: 2008-04-09 11:35:28 -0700 (Wed, 09 Apr 2008) Log Message: ----------- added method getCorrectness() in class ORE to get the correctness of a learned concept Added Paths: ----------- trunk/src/dl-learner/org/dllearner/tools/ore/ore/ Copied: trunk/src/dl-learner/org/dllearner/tools/ore/ore (from rev 779, trunk/src/dl-learner/org/dllearner/tools/ore) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hee...@us...> - 2008-04-09 12:14:47
|
Revision: 779 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=779&view=rev Author: heeroyuy Date: 2008-04-09 05:14:35 -0700 (Wed, 09 Apr 2008) Log Message: ----------- warnings fixed Modified Paths: -------------- trunk/src/dl-learner/org/dllearner/tools/protege/ActionHandler.java trunk/src/dl-learner/org/dllearner/tools/protege/ButtonList.java trunk/src/dl-learner/org/dllearner/tools/protege/META-INF/MANIFEST.MF trunk/src/dl-learner/org/dllearner/tools/protege/ProtegePlugin.java Added Paths: ----------- trunk/src/dl-learner/org/dllearner/tools/protege/DLLearnerModel.java trunk/src/dl-learner/org/dllearner/tools/protege/SuggestEquivalentClassButton.java trunk/src/dl-learner/org/dllearner/tools/protege/SuggestEquivalentClassView.java Removed Paths: ------------- trunk/src/dl-learner/org/dllearner/tools/protege/DLLearnerComponentListener.java trunk/src/dl-learner/org/dllearner/tools/protege/DLLearnerConfig.java trunk/src/dl-learner/org/dllearner/tools/protege/DLLearnerOptionTab.java trunk/src/dl-learner/org/dllearner/tools/protege/SuggestClassButton.java Modified: trunk/src/dl-learner/org/dllearner/tools/protege/ActionHandler.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/protege/ActionHandler.java 2008-04-09 09:29:09 UTC (rev 778) +++ trunk/src/dl-learner/org/dllearner/tools/protege/ActionHandler.java 2008-04-09 12:14:35 UTC (rev 779) @@ -1,38 +1,30 @@ package org.dllearner.tools.protege; import java.awt.event.*; - -public class ActionHandler implements ActionListener, ComponentListener{ - private ActionHandler action; - +public class ActionHandler implements ActionListener, ItemListener{ + private DLLearnerModel model; - public ActionHandler(ActionHandler a) + public ActionHandler(ActionHandler a,DLLearnerModel m) { - action = a; + model = m; } public void actionPerformed(ActionEvent z){ - System.out.println("hihihi: "+ z.getActionCommand()); + if(z.getActionCommand().equals("RUN")) + { + model.configDLLearner(); + model.DLLearnerStart(); + //setChanged(); + //notifyObservers(model.getSolutions()); + System.out.println(model.getSolutions()); + //config.setDescriptionList(model.getSolutions()); + } } - public void componentHidden(ComponentEvent e) - { - System.out.println("1: "+e.getID()); - } - public void componentMoved(ComponentEvent e) + public void itemStateChanged(ItemEvent i) { - System.out.println("2: "+ e.getComponent().getClass().getName()); + } - public void componentResized(ComponentEvent e) - { - //System.out.println("3: "+ e.getComponent().getClass().getName()); - } - - public void componentShown(ComponentEvent e) - { - System.out.println("4: "+ e.getID()); - } - } Modified: trunk/src/dl-learner/org/dllearner/tools/protege/ButtonList.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/protege/ButtonList.java 2008-04-09 09:29:09 UTC (rev 778) +++ trunk/src/dl-learner/org/dllearner/tools/protege/ButtonList.java 2008-04-09 12:14:35 UTC (rev 779) @@ -15,7 +15,7 @@ { super(editorKit.getOWLModelManager().getOWLOntologyManager()); addSection(new OWLEquivalentClassesAxiomFrameSection(editorKit, this)); - addSection(new SuggestClassButton(editorKit, this)); + addSection(new SuggestEquivalentClassButton(editorKit, this)); addSection(new OWLSubClassAxiomFrameSection(editorKit, this)); //addSection(new SuggestClassButton(editorKit, this)); addSection(new InheritedAnonymousClassesFrameSection(editorKit, this)); Deleted: trunk/src/dl-learner/org/dllearner/tools/protege/DLLearnerComponentListener.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/protege/DLLearnerComponentListener.java 2008-04-09 09:29:09 UTC (rev 778) +++ trunk/src/dl-learner/org/dllearner/tools/protege/DLLearnerComponentListener.java 2008-04-09 12:14:35 UTC (rev 779) @@ -1,16 +0,0 @@ -package org.dllearner.tools.protege; - -import java.awt.event.*; - -public class DLLearnerComponentListener implements ItemListener { - - public void itemStateChanged(ItemEvent e) { - if (e.getStateChange() == ItemEvent.SELECTED) { - - System.out.println("JUHU "+e.getStateChange()); - - } else { - - } - } -} Deleted: trunk/src/dl-learner/org/dllearner/tools/protege/DLLearnerConfig.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/protege/DLLearnerConfig.java 2008-04-09 09:29:09 UTC (rev 778) +++ trunk/src/dl-learner/org/dllearner/tools/protege/DLLearnerConfig.java 2008-04-09 12:14:35 UTC (rev 779) @@ -1,54 +0,0 @@ -package org.dllearner.tools.protege; - -import org.protege.editor.owl.OWLEditorKit; - -public class DLLearnerConfig { - - - - public void DLLearnerStart() - { - System.out.println("blub"); - /*ComponentManager cm = ComponentManager.getInstance(); - KnowledgeSource source = cm.knowledgeSource(OWLFile.class); - String example = "examples/family/father.owl"; - cm.applyConfigEntry(source, "url", new File(example).toURI().toString()); - source.init(); - - // create DIG reasoning service with standard settings - ReasonerComponent reasoner = cm.reasoner(DIGReasoner.class, source); - // ReasoningService rs = cm.reasoningService(DIGReasonerNew.class, source); - reasoner.init(); - ReasoningService rs = cm.reasoningService(reasoner); - - // create a learning problem and set positive and negative examples - LearningProblem lp = cm.learningProblem(PosNegDefinitionLP.class, rs); - Set<String> positiveExamples = new TreeSet<String>(); - positiveExamples.add("http://example.com/father#stefan"); - positiveExamples.add("http://example.com/father#markus"); - positiveExamples.add("http://example.com/father#martin"); - Set<String> negativeExamples = new TreeSet<String>(); - negativeExamples.add("http://example.com/father#heinz"); - negativeExamples.add("http://example.com/father#anna"); - negativeExamples.add("http://example.com/father#michelle"); - cm.applyConfigEntry(lp, "positiveExamples", positiveExamples); - cm.applyConfigEntry(lp, "negativeExamples", negativeExamples); - lp.init(); - - // create the learning algorithm - LearningAlgorithm la = null; - try { - la = cm.learningAlgorithm(RandomGuesser.class, lp, rs); - } catch (LearningProblemUnsupportedException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - cm.applyConfigEntry(la, "numberOfTrees", 100); - cm.applyConfigEntry(la, "maxDepth", 5); - la.init(); - - // start the algorithm and print the best concept found - la.start(); - System.out.println(la.getBestSolution());*/ - } -} Added: trunk/src/dl-learner/org/dllearner/tools/protege/DLLearnerModel.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/protege/DLLearnerModel.java (rev 0) +++ trunk/src/dl-learner/org/dllearner/tools/protege/DLLearnerModel.java 2008-04-09 12:14:35 UTC (rev 779) @@ -0,0 +1,185 @@ +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 java.io.*; +import javax.swing.JCheckBox; +import org.dllearner.algorithms.refinement.*; +import org.dllearner.core.*; +import org.dllearner.reasoning.*; +import org.dllearner.learningproblems.*; + +public class DLLearnerModel extends Observable{ + 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"}; + private String uri; + private Vector<JCheckBox> positiv; + private Vector<JCheckBox> negativ; + private ComponentManager cm; + private ReasonerComponent reasoner; + private ReasoningService rs; + private static final int anzahl = 10; + private String[] description = new String[anzahl]; + + public DLLearnerModel() + + { + positiv = new Vector<JCheckBox>(); + negativ = new Vector<JCheckBox>(); + + } + /** + * String um die Componenten des DL-Learners anzumelden + */ + public void setDLLearnerModel(Vector<JCheckBox> pos, Vector<JCheckBox> neg, String s) + { + positiv=pos; + negativ=neg; + uri=s; + } + public void configDLLearner() + { + ComponentManager.setComponentClasses(componenten); + // get singleton instance of component manager + cm = ComponentManager.getInstance(); + + // create knowledge source + KnowledgeSource source = cm.knowledgeSource(OWLFile.class); + cm.applyConfigEntry(source, "url", new File(uri).toURI().toString()); + try{ + source.init(); + } + catch(Exception e){ + } + // create DIG reasoning service with standard settings + reasoner = cm.reasoner(OWLAPIReasoner.class, source); + // ReasoningService rs = cm.reasoningService(DIGReasonerNew.class, source); + try{ + reasoner.init(); + } + catch(Exception e){ + + } + rs = cm.reasoningService(reasoner); + } + + public void startPosNegDefinitionReasoning() + { + + } + public void DLLearnerStart() + { + // create a learning problem and set positive and negative examples + LearningProblem lp = cm.learningProblem(PosNegDefinitionLP.class, rs); + Set<String> positiveExamples = new TreeSet<String>(); + for(int i=0;i<positiv.size();i++) + { + if(positiv.get(i).isSelected()) + { + positiveExamples.add(positiv.get(i).getText()); + } + } + Set<String> negativeExamples = new TreeSet<String>(); + for(int i=0;i<negativ.size();i++) + { + if(negativ.get(i).isSelected()) + { + negativeExamples.add(negativ.get(i).getText()); + } + } + cm.applyConfigEntry(lp, "positiveExamples", positiveExamples); + cm.applyConfigEntry(lp, "negativeExamples", negativeExamples); + try{ + lp.init(); + } + catch(Exception e){ + + } + + // create the learning algorithm + LearningAlgorithm la = null; + try { + la = cm.learningAlgorithm(ROLearner.class, lp, rs); + } catch (LearningProblemUnsupportedException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + cm.applyConfigEntry(la, "numberOfTrees", 100); + cm.applyConfigEntry(la, "maxDepth", 5); + try{ + la.init(); + } + catch(Exception e){ + + } + + // start the algorithm and print the best concept found + la.start(); + description[0]=la.getBestSolution().toString(); + setChanged(); + notifyObservers(description); + } + + public String[] getSolutions() + { + return description; + } + public Vector<JCheckBox> getPosVector() + { + return positiv; + } + + public Vector<JCheckBox> getNegVector() + { + return negativ; + } + + public void setPosVector(Vector<JCheckBox> a) + { + positiv =a; + } + + public void setNegVector(Vector<JCheckBox> b) + { + negativ = b; + } + + public void addToPosVector(JCheckBox a) + { + positiv.add(a); + } + + public void addToNegVector(JCheckBox b) + { + negativ.add(b); + } + + public void clearVector() + { + positiv.removeAllElements(); + negativ.removeAllElements(); + } + + public String getUri() + { + return uri; + } + + public void setDescriptionList(String[] list) + { + description=list; + } + + public String[] getSollutions() + { + return description; + } + + +} Deleted: trunk/src/dl-learner/org/dllearner/tools/protege/DLLearnerOptionTab.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/protege/DLLearnerOptionTab.java 2008-04-09 09:29:09 UTC (rev 778) +++ trunk/src/dl-learner/org/dllearner/tools/protege/DLLearnerOptionTab.java 2008-04-09 12:14:35 UTC (rev 779) @@ -1,175 +0,0 @@ -package org.dllearner.tools.protege; - -import org.protege.editor.owl.OWLEditorKit; - -import org.semanticweb.owl.model.OWLClass; -import org.semanticweb.owl.model.OWLDescription; -import org.semanticweb.owl.model.OWLException; -import org.protege.editor.owl.ui.frame.*; -import org.protege.editor.owl.ui.framelist.OWLFrameList2; - -import javax.swing.*; -import javax.swing.event.ChangeEvent; -import javax.swing.event.ChangeListener; -import javax.swing.event.DocumentEvent; -import javax.swing.event.DocumentListener; - -import java.awt.*; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; -import java.io.File; -import java.util.*; - -import org.dllearner.algorithms.RandomGuesser; -import org.dllearner.core.ComponentInitException; -import org.dllearner.algorithms.refexamples.ExampleBasedROLearner; -import org.dllearner.core.ComponentManager; -import org.dllearner.reasoning.DIGReasoner; -import org.dllearner.algorithms.RandomGuesser; -import org.dllearner.core.ComponentInitException; -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.ReasonerComponent; -import org.dllearner.core.ReasoningService; -import org.dllearner.kb.OWLFile; -import org.dllearner.learningproblems.PosNegDefinitionLP; -import org.dllearner.reasoning.DIGReasoner; -import org.dllearner.learningproblems.PosNegDefinitionLP; -import org.dllearner.core.KnowledgeSource; -import org.dllearner.kb.OWLFile; -import org.semanticweb.owl.model.*; - - - -public class DLLearnerOptionTab extends AbstractOWLFrameSectionRowObjectEditor<OWLDescription> - { - - private JLabel pos; - private JComponent learner; - private JSplitPane split; - private JButton accept; - private JButton config; - private OWLEditorKit editor; - private JPanel option; - private JScrollPane suggest; - private JPanel vorschlag; - private Object[] blub; - private OWLDescription initialDescription; - private JLabel neg; - private String test; - private ActionHandler action; - private DLLearnerComponentListener listen; - private DLLearnerConfig dlLearnerConfig; - private JCheckBox hi; - - - //TODO: Layout selber festlegen denn die standartlayouts sind scheisse - //TODO: ActionListener implementieren - //TODO: Reasoner, learningproblems und algos direkt vom dl-learner beziehen - //TODO: instanz vom DLLearnerOptionTab wieder zuruecksetzen damit beim laden neue Ontologie erkannt wird - public DLLearnerOptionTab(OWLEditorKit editorKit, OWLDescription description) { - - dlLearnerConfig = new DLLearnerConfig(); - editor = editorKit; - initialDescription = description; - split = new JSplitPane(split.HORIZONTAL_SPLIT,false); - suggest = new JScrollPane(); - vorschlag = new JPanel(new GridLayout(3,1)); - learner = new JPanel(); - option = new JPanel(new GridLayout(20,1)); - init(); - hi= new JCheckBox("Test", true); - //buildLearnerOption(); - } - - public void startDLLearner() - { - new DLLearnerConfig().DLLearnerStart(); - - - } - public void init() - { - action = new ActionHandler(this.action); - listen = new DLLearnerComponentListener(); - } - - public OWLDescription getEditedObject() - { - String expression = "JUHU"; - try { - return editor.getOWLModelManager().getOWLDescriptionParser().createOWLDescription(expression); - } - catch (OWLException e){ - return null; - } - - } - - private void buildLearnerOption() - { - learner.setPreferredSize(new Dimension(500, 400)); - split = new JSplitPane(split.HORIZONTAL_SPLIT,false); - split.setResizeWeight(0.5); - - pos = new JLabel("Positive Examples"); - option.add(pos); - blub=editor.getOWLModelManager().getActiveOntology().getReferencedIndividuals().toArray(); - for(int j = 0; j<editor.getOWLModelManager().getActiveOntology().getReferencedIndividuals().size();j++) - { - option.add(new JCheckBox(editor.getOWLModelManager().getActiveOntology().getURI().toString()+"#"+blub[j], true)).addComponentListener(action); - } - neg = new JLabel("Negative Examples"); - option.add(neg); - for(int j = 0; j<editor.getOWLModelManager().getActiveOntology().getReferencedIndividuals().size();j++) - { - option.add(new JCheckBox(editor.getOWLModelManager().getActiveOntology().getURI().toString()+"#"+blub[j], true)).addComponentListener(action); - } - config = new JButton("Config"); - config.addActionListener(this.action); - option.add(config); - option.add(hi); - accept = new JButton("RUN"); - accept.addActionListener(this.action); - vorschlag.add(suggest); - vorschlag.add(accept); - split.setLeftComponent(option); - split.setRightComponent(vorschlag); - learner.add(split); - System.out.println(""); - //System.out.println("hi: "+hi.get); - startDLLearner(); - - } - -public void actionPerformed(ActionEvent a) -{ - System.out.println(a.getSource()); -} - public JComponent getEditorComponent() - { - buildLearnerOption(); - return learner; - } - - public void clear() - { - if(split!=null) - { - split.removeAll(); - option.removeAll(); - vorschlag.removeAll(); - } - } - - public void dispose(){ - } - - public Set<OWLDescription> getEditedObjects() - { - return super.getEditedObjects(); - } - } \ No newline at end of file Modified: trunk/src/dl-learner/org/dllearner/tools/protege/META-INF/MANIFEST.MF =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/protege/META-INF/MANIFEST.MF 2008-04-09 09:29:09 UTC (rev 778) +++ trunk/src/dl-learner/org/dllearner/tools/protege/META-INF/MANIFEST.MF 2008-04-09 12:14:35 UTC (rev 779) @@ -6,7 +6,7 @@ Bundle-Description: blablabla Bundle-Vendor: blablabla Bundle-DocURL: blablabla -Bundle-ClassPath: .,lib/xbean.jar,lib/dig1.1-xmlbeans.jar,lib/junit-4.4.jar,log4j.jar,lib/components.ini +Bundle-ClassPath: .,lib/xbean.jar,lib/dig1.1-xmlbeans.jar,lib/junit-4.4.jar,log4j.jar,lib/components.ini,lib/pellet/pellet.jar,lib/pellet/aterm-java-1.6.jar,lib/pellet/relaxngDatatype.jar,lib/pellet/xsdlib.jar,lib/jena/commons-logging-1.1.jar Import-Package: org.osgi.framework,org.apache.log4j Export-Package: lib Bundle-Version: 1.0.0 Modified: trunk/src/dl-learner/org/dllearner/tools/protege/ProtegePlugin.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/protege/ProtegePlugin.java 2008-04-09 09:29:09 UTC (rev 778) +++ trunk/src/dl-learner/org/dllearner/tools/protege/ProtegePlugin.java 2008-04-09 12:14:35 UTC (rev 779) @@ -9,7 +9,7 @@ public class ProtegePlugin extends AbstractOWLClassViewComponent { - +private static final long serialVersionUID = 728362819273927L; private OWLFrameList2<OWLClass> list; public void initialiseClassView() throws Exception { Deleted: trunk/src/dl-learner/org/dllearner/tools/protege/SuggestClassButton.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/protege/SuggestClassButton.java 2008-04-09 09:29:09 UTC (rev 778) +++ trunk/src/dl-learner/org/dllearner/tools/protege/SuggestClassButton.java 2008-04-09 12:14:35 UTC (rev 779) @@ -1,64 +0,0 @@ -package org.dllearner.tools.protege; - -import java.util.Comparator; - -import org.protege.editor.owl.OWLEditorKit; -import org.protege.editor.owl.ui.frame.AbstractOWLFrameSection; -import org.protege.editor.owl.ui.frame.OWLFrame; -import org.protege.editor.owl.ui.frame.OWLFrameSectionRow; -import org.protege.editor.owl.ui.frame.OWLFrameSectionRowObjectEditor; -import org.semanticweb.owl.model.OWLClass; -import org.semanticweb.owl.model.OWLDescription; -import org.semanticweb.owl.model.OWLEquivalentClassesAxiom; -import org.semanticweb.owl.model.OWLOntology; -import org.semanticweb.owl.util.CollectionFactory; - - -public class SuggestClassButton extends AbstractOWLFrameSection<OWLClass, OWLEquivalentClassesAxiom, OWLDescription> { - - private static final String LABEL = "Suggest a class"; - - - public SuggestClassButton(OWLEditorKit editorKit, OWLFrame<OWLClass> frame) - { - super(editorKit, LABEL, frame); - } - - protected void clear() { - - } - - - - protected void refill(OWLOntology ontology) { - - } - - - protected void refillInferred() { - - } - - - public void visit(SuggestClassButton axiom) { - - - } - - - protected OWLEquivalentClassesAxiom createAxiom(OWLDescription object) { - return getOWLDataFactory().getOWLEquivalentClassesAxiom(CollectionFactory.createSet(getRootObject(), object)); - } - - - public OWLFrameSectionRowObjectEditor<OWLDescription> getObjectEditor() { - - return new DLLearnerOptionTab(getOWLEditorKit(), null); - - } - - - public Comparator<OWLFrameSectionRow<OWLClass, OWLEquivalentClassesAxiom, OWLDescription>> getRowComparator() { - return null; - } -} Added: trunk/src/dl-learner/org/dllearner/tools/protege/SuggestEquivalentClassButton.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/protege/SuggestEquivalentClassButton.java (rev 0) +++ trunk/src/dl-learner/org/dllearner/tools/protege/SuggestEquivalentClassButton.java 2008-04-09 12:14:35 UTC (rev 779) @@ -0,0 +1,63 @@ +package org.dllearner.tools.protege; + +import java.util.Comparator; + +import org.protege.editor.owl.OWLEditorKit; +import org.protege.editor.owl.ui.frame.AbstractOWLFrameSection; +import org.protege.editor.owl.ui.frame.OWLFrame; +import org.protege.editor.owl.ui.frame.OWLFrameSectionRow; +import org.protege.editor.owl.ui.frame.OWLFrameSectionRowObjectEditor; +import org.semanticweb.owl.model.OWLClass; +import org.semanticweb.owl.model.OWLDescription; +import org.semanticweb.owl.model.OWLEquivalentClassesAxiom; +import org.semanticweb.owl.model.OWLOntology; +import org.semanticweb.owl.util.CollectionFactory; + + +public class SuggestEquivalentClassButton extends AbstractOWLFrameSection<OWLClass, OWLEquivalentClassesAxiom, OWLDescription> { + + private static final String LABEL = "Suggest a equivalent Class"; + private OWLFrame<OWLClass> frame; + public SuggestEquivalentClassButton(OWLEditorKit editorKit, OWLFrame<OWLClass> frame) + { + super(editorKit, LABEL, frame); + this.frame = frame; + } + + protected void clear() { + + } + + + + protected void refill(OWLOntology ontology) { + + } + + + protected void refillInferred() { + + } + + + public void visit(SuggestEquivalentClassButton axiom) { + + + } + + + protected OWLEquivalentClassesAxiom createAxiom(OWLDescription object) { + return getOWLDataFactory().getOWLEquivalentClassesAxiom(CollectionFactory.createSet(getRootObject(), object)); + } + + + public OWLFrameSectionRowObjectEditor<OWLDescription> getObjectEditor() { + return new SuggestEquivalentClassView(getOWLEditorKit(), null, frame); + + } + + + public Comparator<OWLFrameSectionRow<OWLClass, OWLEquivalentClassesAxiom, OWLDescription>> getRowComparator() { + return null; + } +} \ No newline at end of file Added: trunk/src/dl-learner/org/dllearner/tools/protege/SuggestEquivalentClassView.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/protege/SuggestEquivalentClassView.java (rev 0) +++ trunk/src/dl-learner/org/dllearner/tools/protege/SuggestEquivalentClassView.java 2008-04-09 12:14:35 UTC (rev 779) @@ -0,0 +1,233 @@ +package org.dllearner.tools.protege; + + +import java.awt.Dimension; +import java.awt.GridLayout; +import java.util.*; + +import org.semanticweb.owl.model.OWLClass; +import org.dllearner.core.owl.Description; +import org.protege.editor.owl.ui.frame.OWLFrame; +import javax.swing.JButton; +import javax.swing.JCheckBox; +import javax.swing.JComponent; +import javax.swing.JLabel; +import javax.swing.JPanel; +import javax.swing.JScrollPane; +import javax.swing.JList; +import javax.swing.JSplitPane; + + +import org.protege.editor.owl.OWLEditorKit; +import org.protege.editor.owl.ui.frame.AbstractOWLFrameSectionRowObjectEditor; +import org.semanticweb.owl.model.OWLDescription; +import org.semanticweb.owl.model.OWLException; + + +public class SuggestEquivalentClassView extends AbstractOWLFrameSectionRowObjectEditor<OWLDescription> implements Observer{ + + private JLabel pos; + private Vector<JCheckBox> positive = new Vector<JCheckBox>(); + private Vector<JCheckBox> negative = new Vector<JCheckBox>(); + private JComponent learner; + private JSplitPane split; + private JButton accept; + private JButton run; + private OWLEditorKit editor; + private JPanel option; + private JPanel listPanel; + private JScrollPane test; + private JList suggest; + private JPanel vorschlag; + private Object[] blub; + private JLabel neg; + private ActionHandler action; + private DLLearnerModel model; + private OWLFrame<OWLClass> aktuell; + private JPanel panel; + + public void update(Observable m,Object c) + { + if( model != m) return; + draw(); + } + //TODO: Layout selber festlegen denn die standartlayouts sind scheisse + //TODO: MVC Achitektur erstellen + //TODO: herrausfinden wie das mit dem scrollen geht + public SuggestEquivalentClassView(OWLEditorKit editorKit, OWLDescription description, OWLFrame<OWLClass> h) { + + editor = editorKit; + aktuell = h; + split = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT,false); + model = new DLLearnerModel(); + model.addObserver( this); + vorschlag = new JPanel(); + panel = new JPanel(new GridLayout(0,1)); + panel.setPreferredSize(new Dimension(290,490)); + suggest = new JList(); + //positiv.setPreferredSize(new Dimension(190,200)); + //negativ.setPreferredSize(new Dimension(190,200)); + learner = new JPanel(); + listPanel = new JPanel(); + learner.setPreferredSize(new Dimension(600, 500)); + split.setResizeWeight(0.5); + pos = new JLabel("Positive Examples"); + neg = new JLabel("Negative Examples"); + run = new JButton("RUN"); + accept = new JButton("ADD"); + //accept.setSize(190, 20); + accept.setPreferredSize(new Dimension(290,50)); + action = new ActionHandler(this.action, model); + } + + public OWLDescription getEditedObject() + { + String expression = "JUHU"; + try { + return editor.getOWLModelManager().getOWLDescriptionParser().createOWLDescription(expression); + } + catch (OWLException e){ + return null; + } + + } + + public void makeView() + { + test= new JScrollPane(); + option = new JPanel(new GridLayout(0,1)); + option.setPreferredSize(new Dimension(290,0)); + option.add(pos); + blub=editor.getOWLModelManager().getActiveOntology().getReferencedIndividuals().toArray(); + for(int j = 0; j<blub.length;j++) + { + positive.add(new JCheckBox(editor.getOWLModelManager().getActiveOntology().getURI().toString()+"#"+blub[j].toString())); + + } + for(int j=0; j<positive.size();j++) + { + option.add(positive.get(j)); + } + option.add(neg); + for(int j = 0; j<blub.length;j++) + { + negative.add(new JCheckBox(editor.getOWLModelManager().getActiveOntology().getURI().toString()+"#"+blub[j].toString())); + } + for(int i=0;i<negative.size();i++) + { + option.add(negative.get(i)); + } + //individuals.add(negative); + option.add(run); + panel.add(suggest); + panel.add(accept); + test.add(option); + split.setLeftComponent(option); + split.setRightComponent(panel); + learner.add(split); + System.out.println(aktuell.getRootObject()); + addListener(); + model.setDLLearnerModel(positive,negative,getUri()); + } + + public JComponent getEditorComponent() + { + makeView(); + return learner; + } + /** + * Methode die den View wieder leert nachdem er nicht mehr gebraucht wird + */ + public void clear() + { + if(split!=null) + { + split.removeAll(); + panel.removeAll(); + if(option!=null) + { + option.removeAll(); + } + suggest.removeAll(); + vorschlag.removeAll(); + positive.removeAllElements(); + negative.removeAllElements(); + } + } + /** + * Methode die alle Buttons und CheckBoxes an dem ActionListener anmeldet + */ + private void addListener() + { + run.addActionListener(this.action); + accept.addActionListener(this.action); + + for(int i=0;i<positive.size();i++) + { + positive.get(i).addItemListener(action); + } + + for(int i=0;i<negative.size();i++) + { + negative.get(i).addItemListener(action); + } + } + + public void dispose(){ + } + public String getUri() + { + char[] test = editor.getOWLModelManager().getOntologyPhysicalURI(editor.getOWLModelManager().getActiveOntology()).toString().toCharArray(); + String uri=""; + for(int i =6; i<test.length;i++) + { + uri=uri+test[i]; + } + return uri; + } + + public void setSuggestionList(java.util.List<Description> list) + { + System.out.println(list.isEmpty()); + if(list.isEmpty()) + { + listPanel.add(new JLabel("No Suggestions")); + } + else + { + for(int i = 0; i<list.size();i++) + { + listPanel.add(new JLabel(list.get(i).toString())); + } + } + } + + + public Set<OWLDescription> getEditedObjects() + { + return super.getEditedObjects(); + } + private void resetPanel() + { + option.removeAll(); + positive.removeAllElements(); + negative.removeAllElements(); + panel.removeAll(); + } + public void release() + { + model.deleteObserver( this); + model = null; + } + + protected void draw() { + if (model != null) { + String desc[] = ((DLLearnerModel)model).getSolutions(); + + suggest = new JList(desc); + System.out.println("Hallo Welt"); + resetPanel(); + makeView(); + } + } + } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ku...@us...> - 2008-04-09 09:29:19
|
Revision: 778 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=778&view=rev Author: kurzum Date: 2008-04-09 02:29:09 -0700 (Wed, 09 Apr 2008) Log Message: ----------- changed to latest fact library, please update classpath. Since old library is missing, go to Project options build path and remove old library (lib/fact/FaCTpp-OWLAPI-v1.1.10+.jar) there, then add new (lib/fact/FaCTpp-OWLAPI-v1.1.11.jar) Modified Paths: -------------- trunk/lib/fact/FaCTPlusPlusJNI.dll trunk/lib/fact/libFaCTPlusPlusJNI.jnilib trunk/lib/fact/libFaCTPlusPlusJNI.so Added Paths: ----------- trunk/bin/closeOntology trunk/bin/closeOntology.bat trunk/lib/fact/FaCTpp-OWLAPI-v1.1.11.jar Removed Paths: ------------- trunk/lib/fact/FaCT++OWLAPI-v1.1.10+.jar Added: trunk/bin/closeOntology =================================================================== --- trunk/bin/closeOntology (rev 0) +++ trunk/bin/closeOntology 2008-04-09 09:29:09 UTC (rev 778) @@ -0,0 +1 @@ +java -Xmx1024m -cp .:./lib/dig1.1-xmlbeans.jar:./lib/fact/FaCT++OWLAPI-v1.1.10+.jar:./lib/jena/antlr-2.7.5.jar:./lib/jena/arq.jar:./lib/jena/commons-logging-1.1.jar:./lib/jena/concurrent.jar:./lib/jena/icu4j_3_4.jar:./lib/jena/iri.jar:./lib/jena/jena.jar:./lib/jena/json.jar:./lib/jena/xercesImpl.jar:./lib/junit-4.4.jar:./lib/kaon2.jar:./lib/log4j.jar:./lib/ore-tool/swingx-0.9.2.jar:./lib/owlapi/antlr-runtime-3.0.jar:./lib/owlapi/commons-lang-2.2.jar:./lib/owlapi/owlapi-api.jar:./lib/owlapi/owlapi-apibinding.jar:./lib/owlapi/owlapi-change.jar:./lib/owlapi/owlapi-debugging.jar:./lib/owlapi/owlapi-dig1_1.jar:./lib/owlapi/owlapi-functionalparser.jar:./lib/owlapi/owlapi-functionalrenderer.jar:./lib/owlapi/owlapi-impl.jar:./lib/owlapi/owlapi-krssparser.jar:./lib/owlapi/owlapi-mansyntaxparser.jar:./lib/owlapi/owlapi-mansyntaxrenderer.jar:./lib/owlapi/owlapi-metrics.jar:./lib/owlapi/owlapi-oboparser.jar:./lib/owlapi/owlapi-owlxmlparser.jar:./lib/owlapi/owlapi-owlxmlrenderer.jar:./lib/owlapi/owlapi-rdfapi.jar:./lib/owlapi/owlapi-rdfxmlparser.jar:./lib/owlapi/owlapi-rdfxmlrenderer.jar:./lib/owlapi/owlapi-util.jar:./lib/pellet/aterm-java-1.6.jar:./lib/pellet/pellet.jar:./lib/pellet/relaxngDatatype.jar:./lib/pellet/xsdlib.jar:./lib/xbean.jar:./lib/dllearner.jar org.dllearner.utilities.CloseOntology $@ \ No newline at end of file Added: trunk/bin/closeOntology.bat =================================================================== --- trunk/bin/closeOntology.bat (rev 0) +++ trunk/bin/closeOntology.bat 2008-04-09 09:29:09 UTC (rev 778) @@ -0,0 +1 @@ +java -Xmx1024m -cp .;.\lib\dig1.1-xmlbeans.jar;.\lib\fact\FaCT++OWLAPI-v1.1.10+.jar;.\lib\jena\antlr-2.7.5.jar;.\lib\jena\arq.jar;.\lib\jena\commons-logging-1.1.jar;.\lib\jena\concurrent.jar;.\lib\jena\icu4j_3_4.jar;.\lib\jena\iri.jar;.\lib\jena\jena.jar;.\lib\jena\json.jar;.\lib\jena\xercesImpl.jar;.\lib\junit-4.4.jar;.\lib\kaon2.jar;.\lib\log4j.jar;.\lib\ore-tool\swingx-0.9.2.jar;.\lib\owlapi\antlr-runtime-3.0.jar;.\lib\owlapi\commons-lang-2.2.jar;.\lib\owlapi\owlapi-api.jar;.\lib\owlapi\owlapi-apibinding.jar;.\lib\owlapi\owlapi-change.jar;.\lib\owlapi\owlapi-debugging.jar;.\lib\owlapi\owlapi-dig1_1.jar;.\lib\owlapi\owlapi-functionalparser.jar;.\lib\owlapi\owlapi-functionalrenderer.jar;.\lib\owlapi\owlapi-impl.jar;.\lib\owlapi\owlapi-krssparser.jar;.\lib\owlapi\owlapi-mansyntaxparser.jar;.\lib\owlapi\owlapi-mansyntaxrenderer.jar;.\lib\owlapi\owlapi-metrics.jar;.\lib\owlapi\owlapi-oboparser.jar;.\lib\owlapi\owlapi-owlxmlparser.jar;.\lib\owlapi\owlapi-owlxmlrenderer.jar;.\lib\owlapi\owlapi-rdfapi.jar;.\lib\owlapi\owlapi-rdfxmlparser.jar;.\lib\owlapi\owlapi-rdfxmlrenderer.jar;.\lib\owlapi\owlapi-util.jar;.\lib\pellet\aterm-java-1.6.jar;.\lib\pellet\pellet.jar;.\lib\pellet\relaxngDatatype.jar;.\lib\pellet\xsdlib.jar;.\lib\xbean.jar;.\lib\dllearner.jar org.dllearner.utilities.CloseOntology %* \ No newline at end of file Deleted: trunk/lib/fact/FaCT++OWLAPI-v1.1.10+.jar =================================================================== (Binary files differ) Modified: trunk/lib/fact/FaCTPlusPlusJNI.dll =================================================================== (Binary files differ) Added: trunk/lib/fact/FaCTpp-OWLAPI-v1.1.11.jar =================================================================== (Binary files differ) Property changes on: trunk/lib/fact/FaCTpp-OWLAPI-v1.1.11.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: trunk/lib/fact/libFaCTPlusPlusJNI.jnilib =================================================================== (Binary files differ) Modified: trunk/lib/fact/libFaCTPlusPlusJNI.so =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |