From: <jen...@us...> - 2008-07-24 16:42:42
|
Revision: 1018 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=1018&view=rev Author: jenslehmann Date: 2008-07-24 16:42:40 +0000 (Thu, 24 Jul 2008) Log Message: ----------- - removed ToDo-Taglet from Javadoc ant task - slightly improved Javadoc Modified Paths: -------------- trunk/build.xml trunk/src/dl-learner/org/dllearner/algorithms/refexamples/ExampleBasedROLearner.java trunk/src/dl-learner/org/dllearner/core/ComponentManager.java Modified: trunk/build.xml =================================================================== --- trunk/build.xml 2008-07-24 11:06:45 UTC (rev 1017) +++ trunk/build.xml 2008-07-24 16:42:40 UTC (rev 1018) @@ -246,7 +246,7 @@ <pathconvert refid="classpath" property="jdocclasspath"/> <javadoc access="public" author="true" - classpath="${jdocclasspath};${java.home}/../lib/tools.jar" + classpath="${jdocclasspath}" destdir="doc/javadoc" doctitle="DL-Learner Javadoc" nodeprecated="false" @@ -265,7 +265,6 @@ bottom="<img style='float:right' src='http://sflogo.sourceforge.net/sflogo.php?group_id=203619&type=1' width='88' height='31' border='0' alt='SourceForge.net Logo' /> DL-Learner is licenced under the terms of the GNU General Public License.<br />Copyright &#169; 2007 Jens Lehmann" Encoding="ISO-8859-1" windowtitle="DL-Learner Javadoc"> - <taglet name="org.dllearner.utilities.ToDoTaglet" path="classes" /> <link href="http://java.sun.com/javase/6/docs/api/"/> </javadoc> </target> Modified: trunk/src/dl-learner/org/dllearner/algorithms/refexamples/ExampleBasedROLearner.java =================================================================== --- trunk/src/dl-learner/org/dllearner/algorithms/refexamples/ExampleBasedROLearner.java 2008-07-24 11:06:45 UTC (rev 1017) +++ trunk/src/dl-learner/org/dllearner/algorithms/refexamples/ExampleBasedROLearner.java 2008-07-24 16:42:40 UTC (rev 1018) @@ -434,7 +434,9 @@ System.out.println("best child of this node: " + bestChild); System.out.println(bestNode.getChildConcepts()); System.out.println("TODO: needs to be integrated with other stopping criteria"); - System.exit(0); + System.out.println("You tried to use this algorithm for positive only learning, which is not recommended (yet)."); +// System.out.println("Exiting."); +// System.exit(0); } else { // tag as non-candidate so we do not need to search again bestNode.setPosOnlyCandidate(false); Modified: trunk/src/dl-learner/org/dllearner/core/ComponentManager.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/ComponentManager.java 2008-07-24 11:06:45 UTC (rev 1017) +++ trunk/src/dl-learner/org/dllearner/core/ComponentManager.java 2008-07-24 16:42:40 UTC (rev 1018) @@ -1,5 +1,5 @@ /** - * Copyright (C) 2007, Jens Lehmann + * Copyright (C) 2007-2008, Jens Lehmann * * This file is part of DL-Learner. * @@ -178,6 +178,16 @@ return cm; } + /** + * Set the classes, which can be used as components. By default, + * this is read from components.ini, but this method can be used + * to set the components programmatically. This method must be + * used before the first call to {@link #getInstance()}, otherwise + * it has no effect. + * + * @param componentClasses A list of class names, e.g. + * org.dllearner.refinement.ROLearner. + */ public static void setComponentClasses(String[] componentClasses) { ComponentManager.componentClasses = componentClasses; } @@ -211,9 +221,9 @@ * value is correct, it is preferable to create a ConfigEntry object and * apply it to the component (no type checking necessary). * - * @param component - * @param optionName - * @param value + * @param component A component. + * @param optionName The name of the config option. + * @param value The value of the config option. */ @SuppressWarnings( { "unchecked" }) public <T> void applyConfigEntry(Component component, String optionName, T value) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jen...@us...> - 2008-07-28 17:50:15
|
Revision: 1020 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=1020&view=rev Author: jenslehmann Date: 2008-07-28 17:50:10 +0000 (Mon, 28 Jul 2008) Log Message: ----------- Javadoc improvements and small fixes Modified Paths: -------------- trunk/build.xml trunk/src/dl-learner/org/dllearner/cli/Start.java trunk/src/dl-learner/org/dllearner/core/Component.java trunk/src/dl-learner/org/dllearner/core/ComponentManager.java Modified: trunk/build.xml =================================================================== --- trunk/build.xml 2008-07-28 09:21:08 UTC (rev 1019) +++ trunk/build.xml 2008-07-28 17:50:10 UTC (rev 1020) @@ -262,7 +262,7 @@ use="true" version="true" linksource="true" - bottom="<img style='float:right' src='http://sflogo.sourceforge.net/sflogo.php?group_id=203619&type=1' width='88' height='31' border='0' alt='SourceForge.net Logo' /> DL-Learner is licenced under the terms of the GNU General Public License.<br />Copyright &#169; 2007 Jens Lehmann" + bottom="<img style='float:right' src='http://sflogo.sourceforge.net/sflogo.php?group_id=203619&type=1' width='88' height='31' border='0' alt='SourceForge.net Logo' /> DL-Learner is licenced under the terms of the GNU General Public License.<br />Copyright &#169; 2007-2008 Jens Lehmann" Encoding="ISO-8859-1" windowtitle="DL-Learner Javadoc"> <link href="http://java.sun.com/javase/6/docs/api/"/> Modified: trunk/src/dl-learner/org/dllearner/cli/Start.java =================================================================== --- trunk/src/dl-learner/org/dllearner/cli/Start.java 2008-07-28 09:21:08 UTC (rev 1019) +++ trunk/src/dl-learner/org/dllearner/cli/Start.java 2008-07-28 17:50:10 UTC (rev 1020) @@ -769,6 +769,16 @@ return rs; } + public static String getCLIMapping(String componentSuperClass){ + HashMap<String, String> m = new HashMap<String, String>(); + m.put("KnowledgeSource", "import"); + m.put("ReasonerComponent", "reasoner"); + m.put("PosNegLP", "problem"); + m.put("PosOnlyLP", "problem"); + m.put("LearningAlgorithm", "algorithm"); + return m.get(componentSuperClass); + } + /** * Set Reasoner class. Define here all possible reasoners. * Modified: trunk/src/dl-learner/org/dllearner/core/Component.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/Component.java 2008-07-28 09:21:08 UTC (rev 1019) +++ trunk/src/dl-learner/org/dllearner/core/Component.java 2008-07-28 17:50:10 UTC (rev 1020) @@ -1,5 +1,5 @@ /** - * Copyright (C) 2007, Jens Lehmann + * Copyright (C) 2007-2008, Jens Lehmann * * This file is part of DL-Learner. * @@ -27,7 +27,7 @@ import org.dllearner.core.config.InvalidConfigOptionValueException; /** - * General component base class. + * Base class of all components. See also http://dl-learner.org/wiki/Architecture. * * @author Jens Lehmann * @@ -35,7 +35,9 @@ public abstract class Component { /** - * + * Returns the name of this component. By default, "unnamed + * component" is returned, but all implementations of components + * are strongly encouraged to overwrite this method. * @return The name of this component. */ public static String getName() { @@ -44,6 +46,8 @@ /** * Returns all configuration options supported by this component. + * @return A list of supported configuration options for this + * component. */ public static Collection<ConfigOption<?>> createConfigOptions() { return new LinkedList<ConfigOption<?>>(); @@ -51,11 +55,16 @@ /** * Method to be called after the component has been configured. + * Implementation of components can overwrite this method to + * perform setup and initialisation tasks for this component. */ public abstract void init() throws ComponentInitException; /** - * Applies a configuration option to this component. + * Applies a configuration option to this component. Implementations + * of components should use option and value of the config entry to + * perform an action (usually setting an internal variable to + * an appropriate value). * * @param entry A configuration entry. */ Modified: trunk/src/dl-learner/org/dllearner/core/ComponentManager.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/ComponentManager.java 2008-07-28 09:21:08 UTC (rev 1019) +++ trunk/src/dl-learner/org/dllearner/core/ComponentManager.java 2008-07-28 17:50:10 UTC (rev 1020) @@ -135,7 +135,6 @@ } } catch (ClassNotFoundException e) { - // TODO Auto-generated catch block e.printStackTrace(); } } @@ -169,7 +168,7 @@ } /** - * + * Gets the singleton instance of <code>ComponentManager</code>. * @return The singleton <code>ComponentManager</code> instance. */ public static ComponentManager getInstance() { @@ -301,6 +300,17 @@ return ks; } + /** + * Factory method for creating a reasoner component from a single + * knowledge source. Example + * call: reasoner(OWLAPIReasoner.class, ks) where ks is a + * knowledge source object. + * @see #reasoner(Class, Set) + * @param <T> The type of this method is a subclass of reasoner component. + * @param reasoner A class object, where the class is subclass of ReasonerComponent. + * @param source A knowledge source. + * @return A reasoner component. + */ public <T extends ReasonerComponent> T reasoner(Class<T> reasoner, KnowledgeSource source) { Set<KnowledgeSource> sources = new HashSet<KnowledgeSource>(); @@ -308,6 +318,15 @@ return reasoner(reasoner, sources); } + /** + * Factory method for creating a reasoner component from a set of + * knowledge sources. + * @see #reasoner(Class, KnowledgeSource) + * @param <T> The type of this method is a subclass of reasoner component. + * @param reasoner A class object, where the class is subclass of ReasonerComponent. + * @param sources A set of knowledge sources. + * @return A reasoner component. + */ public <T extends ReasonerComponent> T reasoner(Class<T> reasoner, Set<KnowledgeSource> sources) { if (!reasonerComponents.contains(reasoner)) @@ -336,6 +355,13 @@ return new ReasoningService(reasoner); } + /** + * Factory method for creating a learning problem component. + * @param <T> The type of this method is a subclass of learning problem. + * @param lpClass A class object, where the class is a subclass of learning problem. + * @param reasoner A reasoning service object. + * @return A learning problem component. + */ public <T extends LearningProblem> T learningProblem(Class<T> lpClass, ReasoningService reasoner) { if (!learningProblems.contains(lpClass)) System.err.println("Warning: learning problem " + lpClass @@ -347,7 +373,17 @@ return lp; } - // automagically calls the right constructor for the given learning problem + /** + * Factory method for creating a learning algorithm, which + * automagically calls the right constructor for the given problem. + * @param <T> The type of this method is a subclass of learning algorithm. + * @param laClass A class object, where the class is subclass of learning algorithm. + * @param lp A learning problem, which the algorithm should try to solve. + * @param rs A reasoning service for querying the background knowledge of this learning problem. + * @return A learning algorithm component. + * @throws LearningProblemUnsupportedException Thrown when the learning problem and + * the learning algorithm are not compatible. + */ public <T extends LearningAlgorithm> T learningAlgorithm(Class<T> laClass, LearningProblem lp, ReasoningService rs) throws LearningProblemUnsupportedException { if (!learningAlgorithms.contains(laClass)) System.err.println("Warning: learning algorithm " + laClass @@ -360,7 +396,7 @@ if (problemClass.isAssignableFrom(lp.getClass())) constructorArgument = problemClass; } - + if (constructorArgument == null) { throw new LearningProblemUnsupportedException(lp.getClass(), laClass, algorithmProblemsMapping.get(laClass)); // System.err.println("Warning: No suitable constructor registered for algorithm " @@ -387,10 +423,28 @@ pool.unregisterComponent(component); } + /** + * Frees all references to components created by <code>ComponentManager</code>. + * @see #freeComponent(Component) + */ public void freeAllComponents() { pool.clearComponents(); } + /** + * Gets the value of a config option of the specified component. + * This is done by first checking, which value the given option + * was set to using {@link #applyConfigEntry(Component, ConfigEntry)}. + * If the value has not been changed, the default value for this + * option is returned. Note, that this method will not work properly + * if the component options are changed internally surpassing the + * component manager (which is discouraged). + * + * @param <T> The type of the config option, e.g. String, boolean, integer. + * @param component The component, which has the specified option. + * @param option The option for which we want to know its value. + * @return The value of the specified option in the specified component. + */ public <T> T getConfigOptionValue(Component component, ConfigOption<T> option) { T object = pool.getLastValidConfigValue(component, option); if(object==null) @@ -399,12 +453,30 @@ return object; } + /** + * Works as {@link #getConfigOptionValue(Component, ConfigOption)}, + * but using the name of the option instead of a <code>ConfigOption</code> + * object. + * @see #getConfigOptionValue(Component, ConfigOption) + * @param component A component. + * @param optionName A valid option name for this component. + * @return The value of the specified option in the specified component. + */ public Object getConfigOptionValue(Component component, String optionName) { ConfigOption<?> option = (ConfigOption<?>) componentOptionsByName.get( component.getClass()).get(optionName); return getConfigOptionValue(component, option); } + /** + * Writes documentation for all components available in this + * <code>ComponentManager</code> instance. It goes through + * all components (sorted by their type) and all the configuration + * options of the components. Explanations, default values, allowed + * values for the options are collected and the obtained string is + * written in a file. + * @param file The documentation file. + */ public void writeConfigDocumentation(File file) { String doc = ""; doc += "This file contains an automatically generated files of all components and their config options.\n\n"; @@ -440,7 +512,7 @@ private String getComponentConfigString(Class<? extends Component> component) { String componentDescription = "component: " + invokeStaticMethod(component,"getName") + " (" + component.getName() + ")"; String str = componentDescription + "\n"; - String CLI = getCLIMapping(component.getSuperclass().getSimpleName()+""); + String CLI = Start.getCLIMapping(component.getSuperclass().getSimpleName()+""); String usage =""; Map<Class<? extends Component>, String> m=Start.createComponentPrefixMapping(); @@ -466,17 +538,9 @@ return str+"\n"; } - public static String getCLIMapping(String componentSuperClass){ - HashMap<String, String> m = new HashMap<String, String>(); - m.put("KnowledgeSource", "import"); - m.put("ReasonerComponent", "reasoner"); - m.put("PosNegLP", "problem"); - m.put("PosOnlyLP", "problem"); - m.put("LearningAlgorithm", "algorithm"); - return m.get(componentSuperClass); - } - - + // convenience method for invoking a static method; + // used as a central point for exception handling for Java reflection + // static method calls private Object invokeStaticMethod(Class<?> clazz, String methodName, Object... args) { // unfortunately Java does not seem to offer a way to call // a static method given a class object directly, so we have @@ -485,53 +549,49 @@ Method method = clazz.getMethod(methodName); return method.invoke(null, args); } catch (SecurityException e) { - // TODO Auto-generated catch block e.printStackTrace(); } catch (NoSuchMethodException e) { - // TODO Auto-generated catch block e.printStackTrace(); } catch (IllegalArgumentException e) { - // TODO Auto-generated catch block e.printStackTrace(); } catch (IllegalAccessException e) { - // TODO Auto-generated catch block e.printStackTrace(); } catch (InvocationTargetException e) { - // TODO Auto-generated catch block e.printStackTrace(); } return null; } + // convenience method for invoking a constructor; + // used as a central point for exception handling for Java reflection + // constructor calls private <T> T invokeConstructor(Class<T> clazz, Class<?>[] argumentClasses, Object[] argumentObjects) { try { Constructor<T> constructor = clazz.getConstructor(argumentClasses); return constructor.newInstance(argumentObjects); } catch (IllegalArgumentException e) { - // TODO Auto-generated catch block e.printStackTrace(); } catch (InstantiationException e) { - // TODO Auto-generated catch block e.printStackTrace(); } catch (IllegalAccessException e) { - // TODO Auto-generated catch block e.printStackTrace(); } catch (InvocationTargetException e) { - // TODO Auto-generated catch block e.printStackTrace(); } catch (SecurityException e) { - // TODO Auto-generated catch block e.printStackTrace(); } catch (NoSuchMethodException e) { - // TODO Auto-generated catch block e.printStackTrace(); } - return null; } + /** + * Returns the available options of the specified component. + * @param componentClass The class object of a component. + * @return A list of available configuration options of the specified component. + */ public static List<ConfigOption<?>> getConfigOptions(Class<? extends Component> componentClass) { if (!components.contains(componentClass)) System.err.println("Warning: component " + componentClass @@ -539,44 +599,71 @@ return componentOptions.get(componentClass); } + /** + * Returns a <code>ConfigOption</code> object given a component and + * the option name. + * @param component A component class object. + * @param name A valid configuration option name for the component. + * @return A <code>ConfigOption</code> object for the specified component class and option name. + */ public ConfigOption<?> getConfigOption(Class<? extends Component> component, String name) { return componentOptionsByName.get(component).get(name); } + /** + * Returns the name of a component. + * @param component A component class object. + * @return The name of the component. + */ public String getComponentName(Class<? extends Component> component) { return componentNames.get(component); } /** - * @return the components + * Returns a list of all available components in this instance + * of <code>ComponentManager</code>. + * @return the components A list of component classes available in this + * instance of <code>ComponentManager</code>. */ public List<Class<? extends Component>> getComponents() { return new LinkedList<Class<? extends Component>>(components); } /** - * @return the knowledgeSources + * Returns a list of all available knowledge sources in this instance + * of <code>ComponentManager</code>. + * @return the components A list of knowledge source component classes available in this + * instance of <code>ComponentManager</code>. */ public List<Class<? extends KnowledgeSource>> getKnowledgeSources() { return new LinkedList<Class<? extends KnowledgeSource>>(knowledgeSources); } /** - * @return the reasonerComponents - */ + * Returns a list of all available reasoners in this instance + * of <code>ComponentManager</code>. + * @return the components A list of reasoner component classes available in this + * instance of <code>ComponentManager</code>. + */ public List<Class<? extends ReasonerComponent>> getReasonerComponents() { return new LinkedList<Class<? extends ReasonerComponent>>(reasonerComponents); } /** - * @return the learningProblems - */ + * Returns a list of all available learning problems in this instance + * of <code>ComponentManager</code>. + * @return the components A list of learning problem classes available in this + * instance of <code>ComponentManager</code>. + */ public List<Class<? extends LearningProblem>> getLearningProblems() { return new LinkedList<Class<? extends LearningProblem>>(learningProblems); } /** - * @return the learningAlgorithms + * Returns a list of all available learning algorithms in this instance + * of <code>ComponentManager</code>. + * @return the components A list of learning algorithm classes available in this + * instance of <code>ComponentManager</code>. */ public List<Class<? extends LearningAlgorithm>> getLearningAlgorithms() { return new LinkedList<Class<? extends LearningAlgorithm>>(learningAlgorithms); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jen...@us...> - 2008-08-06 10:10:26
|
Revision: 1055 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=1055&view=rev Author: jenslehmann Date: 2008-08-06 09:53:31 +0000 (Wed, 06 Aug 2008) Log Message: ----------- code style and logging improvements Modified Paths: -------------- trunk/doc/checkstyle.xml trunk/src/dl-learner/org/dllearner/core/Component.java trunk/src/dl-learner/org/dllearner/core/ComponentManager.java trunk/src/dl-learner/org/dllearner/core/ComponentPool.java trunk/src/dl-learner/org/dllearner/core/EvaluatedDescription.java trunk/src/dl-learner/org/dllearner/core/owl/KBElement.java Modified: trunk/doc/checkstyle.xml =================================================================== --- trunk/doc/checkstyle.xml 2008-08-05 14:56:56 UTC (rev 1054) +++ trunk/doc/checkstyle.xml 2008-08-06 09:53:31 UTC (rev 1055) @@ -85,7 +85,6 @@ <property name="header" value="/** * 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/>. * */"/> <property name="ignoreLines" value="20"/> </module> - <module name="AbstractClassName"/> </module> <module name="JavadocPackage"/> <module name="NewlineAtEndOfFile"/> Modified: trunk/src/dl-learner/org/dllearner/core/Component.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/Component.java 2008-08-05 14:56:56 UTC (rev 1054) +++ trunk/src/dl-learner/org/dllearner/core/Component.java 2008-08-06 09:53:31 UTC (rev 1055) @@ -57,6 +57,13 @@ * Method to be called after the component has been configured. * Implementation of components can overwrite this method to * perform setup and initialisation tasks for this component. + * + * @throws ComponentInitException This exception is thrown if any + * exceptions occur within the initialisation process of this + * component. As component developer, you are encouraged to + * rethrow occuring exception as ComponentInitException and + * giving an error message as well as the actualy exception by + * using the constructor {@link ComponentInitException#ComponentInitException(String, Throwable)}. */ public abstract void init() throws ComponentInitException; @@ -66,7 +73,16 @@ * perform an action (usually setting an internal variable to * an appropriate value). * + * @param <T> Type of the config entry (Integer, String etc.). * @param entry A configuration entry. + * @throws InvalidConfigOptionValueException This exception is thrown if the + * value of the config entry is not valid. For instance, a config option + * may only accept values, which are within intervals 0.1 to 0.3 or 0.5 to 0.8. + * If the value is outside of those intervals, an exception is thrown. Note + * that many of the common cases are already caught in the constructor of + * ConfigEntry (for instance for a {@link DoubleConfigOption} you can specify + * an interval for the value). This means that, as a component developer, you + * often do not need to implement further validity checks. */ public abstract <T> void applyConfigEntry(ConfigEntry<T> entry) throws InvalidConfigOptionValueException; Modified: trunk/src/dl-learner/org/dllearner/core/ComponentManager.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/ComponentManager.java 2008-08-05 14:56:56 UTC (rev 1054) +++ trunk/src/dl-learner/org/dllearner/core/ComponentManager.java 2008-08-06 09:53:31 UTC (rev 1055) @@ -60,7 +60,7 @@ * @author Jens Lehmann * */ -public class ComponentManager { +public final class ComponentManager { private static Logger logger = Logger .getLogger(ComponentManager.class); @@ -95,14 +95,15 @@ }; - @SuppressWarnings( { "unchecked" }) + @SuppressWarnings("unchecked") private ComponentManager() { // read in components file List<String> componentsString; - if(componentClasses.length > 0) + if(componentClasses.length > 0) { componentsString = Arrays.asList(componentClasses); - else + } else { componentsString = readComponentsFile(); + } // component list components = new TreeSet<Class<? extends Component>>(classComparator); @@ -120,13 +121,13 @@ Component.class); components.add(component); - if (KnowledgeSource.class.isAssignableFrom(component)) + if (KnowledgeSource.class.isAssignableFrom(component)) { knowledgeSources.add((Class<? extends KnowledgeSource>) component); - else if (ReasonerComponent.class.isAssignableFrom(component)) + } else if (ReasonerComponent.class.isAssignableFrom(component)) { reasonerComponents.add((Class<? extends ReasonerComponent>) component); - else if (LearningProblem.class.isAssignableFrom(component)) + } else if (LearningProblem.class.isAssignableFrom(component)) { learningProblems.add((Class<? extends LearningProblem>) component); - else if (LearningAlgorithm.class.isAssignableFrom(component)) { + } else if (LearningAlgorithm.class.isAssignableFrom(component)) { Class<? extends LearningAlgorithm> learningAlgorithmClass = (Class<? extends LearningAlgorithm>) component; learningAlgorithms.add(learningAlgorithmClass); Collection<Class<? extends LearningProblem>> problems = (Collection<Class<? extends LearningProblem>>) invokeStaticMethod( @@ -157,8 +158,9 @@ // make config options accessible by name Map<String, ConfigOption<?>> byName = new HashMap<String, ConfigOption<?>>(); - for (ConfigOption<?> option : options) + for (ConfigOption<?> option : options) { byName.put(option.getName(), option); + } componentOptionsByName.put(component, byName); } @@ -172,8 +174,9 @@ * @return The singleton <code>ComponentManager</code> instance. */ public static ComponentManager getInstance() { - if(cm == null) + if(cm == null) { cm = new ComponentManager(); + } return cm; } @@ -203,8 +206,9 @@ while ((line = br.readLine()) != null) { if (!(line.startsWith("#") || line.startsWith("//") || line.startsWith("%") || line - .length() <= 1)) + .length() <= 1)) { componentStrings.add(line); + } } in.close(); @@ -220,11 +224,12 @@ * value is correct, it is preferable to create a ConfigEntry object and * apply it to the component (no type checking necessary). * + * @param <T> Type of the config option (Integer, String etc.). * @param component A component. * @param optionName The name of the config option. * @param value The value of the config option. */ - @SuppressWarnings( { "unchecked" }) + @SuppressWarnings("unchecked") public <T> void applyConfigEntry(Component component, String optionName, T value) { logger.trace(component); logger.trace(optionName); @@ -258,11 +263,13 @@ System.out.println("Warning: value " + value + " is not valid for option " + optionName + " in component " + component); } - } else - System.out.println("Warning: undefined option " + optionName + " in component " + } else { + logger.warn("Warning: undefined option " + optionName + " in component " + component); - } else - System.out.println("Warning: unregistered component " + component); + } + } else { + logger.warn("Warning: unregistered component " + component); + } } /** @@ -276,10 +283,10 @@ public <T> boolean applyConfigEntry(Component component, ConfigEntry<T> entry) { try { component.applyConfigEntry(entry); - pool.addConfigEntry(component,entry,true); + pool.addConfigEntry(component, entry, true); return true; } catch (InvalidConfigOptionValueException e) { - pool.addConfigEntry(component,entry,false); + pool.addConfigEntry(component, entry, false); e.printStackTrace(); return false; } @@ -287,13 +294,16 @@ /** * Factory method for creating a knowledge source. + * + * @param <T> The type of this method is a subclass of knowledge source. * @param source A registered knowledge source component. * @return An instance of the given knowledge source class. */ public <T extends KnowledgeSource> T knowledgeSource(Class<T> source) { - if (!knowledgeSources.contains(source)) - System.err.println("Warning: knowledge source " + source + if (!knowledgeSources.contains(source)) { + logger.warn("Warning: knowledge source " + source + " is not a registered knowledge source component."); + } T ks = invokeConstructor(source, new Class[] {}, new Object[] {}); pool.registerComponent(ks); @@ -329,9 +339,10 @@ */ public <T extends ReasonerComponent> T reasoner(Class<T> reasoner, Set<KnowledgeSource> sources) { - if (!reasonerComponents.contains(reasoner)) + if (!reasonerComponents.contains(reasoner)) { System.err.println("Warning: reasoner component " + reasoner + " is not a registered reasoner component."); + } T rc = invokeConstructor(reasoner, new Class[] { Set.class }, new Object[] { sources }); @@ -363,9 +374,10 @@ * @return A learning problem component. */ public <T extends LearningProblem> T learningProblem(Class<T> lpClass, ReasoningService reasoner) { - if (!learningProblems.contains(lpClass)) + if (!learningProblems.contains(lpClass)) { System.err.println("Warning: learning problem " + lpClass + " is not a registered learning problem component."); + } T lp = invokeConstructor(lpClass, new Class[] { ReasoningService.class }, new Object[] { reasoner }); @@ -385,16 +397,18 @@ * the learning algorithm are not compatible. */ public <T extends LearningAlgorithm> T learningAlgorithm(Class<T> laClass, LearningProblem lp, ReasoningService rs) throws LearningProblemUnsupportedException { - if (!learningAlgorithms.contains(laClass)) + if (!learningAlgorithms.contains(laClass)) { System.err.println("Warning: learning algorithm " + laClass + " is not a registered learning algorithm component."); + } // find the right constructor: use the one that is registered and // has the class of the learning problem as a subclass Class<? extends LearningProblem> constructorArgument = null; for (Class<? extends LearningProblem> problemClass : algorithmProblemsMapping.get(laClass)) { - if (problemClass.isAssignableFrom(lp.getClass())) + if (problemClass.isAssignableFrom(lp.getClass())) { constructorArgument = problemClass; + } } if (constructorArgument == null) { @@ -447,10 +461,11 @@ */ public <T> T getConfigOptionValue(Component component, ConfigOption<T> option) { T object = pool.getLastValidConfigValue(component, option); - if(object==null) + if(object==null) { return option.getDefaultValue(); - else + } else { return object; + } } /** @@ -485,40 +500,44 @@ doc += "*********************\n"; doc += "* Knowledge Sources *\n"; doc += "*********************\n\n"; - for(Class<? extends Component> component : knowledgeSources) + for(Class<? extends Component> component : knowledgeSources) { doc += getComponentConfigString(component); + } doc += "*************\n"; doc += "* Reasoners *\n"; doc += "*************\n\n"; - for(Class<? extends Component> component : reasonerComponents) + for(Class<? extends Component> component : reasonerComponents) { doc += getComponentConfigString(component); + } doc += "*********************\n"; doc += "* Learning Problems *\n"; doc += "*********************\n\n"; - for(Class<? extends Component> component : learningProblems) + for(Class<? extends Component> component : learningProblems) { doc += getComponentConfigString(component); + } doc += "***********************\n"; doc += "* Learning Algorithms *\n"; doc += "***********************\n\n"; - for(Class<? extends Component> component : learningAlgorithms) + for(Class<? extends Component> component : learningAlgorithms) { doc += getComponentConfigString(component); + } Files.createFile(file, doc); } private String getComponentConfigString(Class<? extends Component> component) { - String componentDescription = "component: " + invokeStaticMethod(component,"getName") + " (" + component.getName() + ")"; + String componentDescription = "component: " + invokeStaticMethod(component, "getName") + " (" + component.getName() + ")"; String str = componentDescription + "\n"; - String CLI = Start.getCLIMapping(component.getSuperclass().getSimpleName()+""); + String cli = Start.getCLIMapping(component.getSuperclass().getSimpleName()+""); String usage =""; Map<Class<? extends Component>, String> m=Start.createComponentPrefixMapping(); for (Class<? extends Component> c : m.keySet()) { - if(c.getCanonicalName().equals(component.getCanonicalName())) - { usage=m.get(c); + if(c.getCanonicalName().equals(component.getCanonicalName())) { + usage=m.get(c); } } @@ -526,14 +545,12 @@ str += "="; } str += "\n\n"; - str += "CLI usage: "+CLI+" = "+usage+";\n\n"; + str += "CLI usage: "+cli+" = "+usage+";\n\n"; for(ConfigOption<?> option : componentOptions.get(component)) { - str += option.toString() + - "CLI usage: "+usage+"."+ - option.getName()+" = "+option.getDefaultValue()+ - ";\n\n"; + str += option.toString() + "CLI usage: "+usage+"." + + option.getName()+" = "+option.getDefaultValue()+";\n\n"; } return str+"\n"; } @@ -593,9 +610,10 @@ * @return A list of available configuration options of the specified component. */ public static List<ConfigOption<?>> getConfigOptions(Class<? extends Component> componentClass) { - if (!components.contains(componentClass)) + if (!components.contains(componentClass)) { System.err.println("Warning: component " + componentClass + " is not a registered component. [ComponentManager.getConfigOptions]"); + } return componentOptions.get(componentClass); } Modified: trunk/src/dl-learner/org/dllearner/core/ComponentPool.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/ComponentPool.java 2008-08-05 14:56:56 UTC (rev 1054) +++ trunk/src/dl-learner/org/dllearner/core/ComponentPool.java 2008-08-06 09:53:31 UTC (rev 1055) @@ -1,5 +1,5 @@ /** - * Copyright (C) 2007, Jens Lehmann + * Copyright (C) 2007-2008, Jens Lehmann * * This file is part of DL-Learner. * @@ -24,57 +24,95 @@ import java.util.List; import java.util.Map; +import org.apache.log4j.Logger; import org.dllearner.core.config.ConfigEntry; import org.dllearner.core.config.ConfigOption; /** - * Stores all live components and the configuration options, which were - * applied to them. + * Stores all live components and the configuration options, which were applied + * to them. This allows to detect, which components are currently active, which + * values are assigned to specific options, and to collect statistics (e.g. in + * a web service scenario). * * @author Jens Lehmann - * + * */ -public class ComponentPool { +public final class ComponentPool { - // stores all components, which are live (components which are + private static Logger logger = Logger + .getLogger(ComponentPool.class); + + // stores all components, which are live (components which are // no longer used have to be deregistered) private List<Component> components = new LinkedList<Component>(); - - // stores the last value which was set for a particular + + // stores the last value which was set for a particular // config option - private Map<Component,Map<ConfigOption<?>,Object>> lastValidConfigValue = new HashMap<Component,Map<ConfigOption<?>,Object>>(); + private Map<Component, Map<ConfigOption<?>, Object>> lastValidConfigValue = new HashMap<Component, Map<ConfigOption<?>, Object>>(); // complete history of all made config entries for a component - private Map<Component,List<ConfigEntry<?>>> configEntryHistory = new HashMap<Component,List<ConfigEntry<?>>>(); - + private Map<Component, List<ConfigEntry<?>>> configEntryHistory = new HashMap<Component, List<ConfigEntry<?>>>(); + + /** + * Registers a component instance in the pool. + * @param component The component to add to the pool. + */ public void registerComponent(Component component) { components.add(component); - Map<ConfigOption<?>,Object> emptyMap = new HashMap<ConfigOption<?>,Object>(); + Map<ConfigOption<?>, Object> emptyMap = new HashMap<ConfigOption<?>, Object>(); lastValidConfigValue.put(component, emptyMap); configEntryHistory.put(component, new LinkedList<ConfigEntry<?>>()); + logger.debug("Component instance " + component + " added to component pool."); } + /** + * Unregisters a component instance. This method should be used if the + * component will not be used anymore. It frees the memory for + * storing the component and its configuration options. + * @param component The component to remove from the pool. + */ public void unregisterComponent(Component component) { configEntryHistory.remove(component); lastValidConfigValue.remove(component); components.remove(component); + logger.debug("Component instance " + component + " removed from component pool."); } - @SuppressWarnings({"unchecked"}) - public <T> T getLastValidConfigValue(Component component, ConfigOption<T> option) { + /** + * Gets the last valid config value set for this component. + * @param <T> The type of the value of the config option (String, Integer etc.). + * @param component The component to query. + * @param option The option for which one wants to get the value. + * @return The last value set for this option or null if the value hasn't been + * set using the {@link ComponentManager}. In this case, the value is + * usually at the default value (or has been set internally surpassing the + * component architecture, which is not recommended). + */ + @SuppressWarnings("unchecked") + protected <T> T getLastValidConfigValue(Component component, ConfigOption<T> option) { return (T) lastValidConfigValue.get(component).get(option); } - - public void addConfigEntry(Component component, ConfigEntry<?> entry, boolean valid) { + + /** + * Add a config entry change for the specified component. + * @param component The component, where the config entry has been set. + * @param entry The set config entry. + * @param valid A boolean value indicating whether the value was valid or not. + */ + protected void addConfigEntry(Component component, ConfigEntry<?> entry, boolean valid) { configEntryHistory.get(component).add(entry); - if(valid) + if (valid) { lastValidConfigValue.get(component).put(entry.getOption(), entry.getValue()); + } + logger.trace("Config entry " + entry + " has been set for component " + component + " (validity: " + valid + ")."); } - - // unregisters all components - public void clearComponents() { + + /** + * Unregisters all components. + */ + protected void clearComponents() { components = new LinkedList<Component>(); - lastValidConfigValue = new HashMap<Component,Map<ConfigOption<?>,Object>>(); - configEntryHistory = new HashMap<Component,List<ConfigEntry<?>>>(); + lastValidConfigValue = new HashMap<Component, Map<ConfigOption<?>, Object>>(); + configEntryHistory = new HashMap<Component, List<ConfigEntry<?>>>(); } - + } Modified: trunk/src/dl-learner/org/dllearner/core/EvaluatedDescription.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/EvaluatedDescription.java 2008-08-05 14:56:56 UTC (rev 1054) +++ trunk/src/dl-learner/org/dllearner/core/EvaluatedDescription.java 2008-08-06 09:53:31 UTC (rev 1055) @@ -83,6 +83,7 @@ /** * @see org.dllearner.core.owl.Description#getLength() + * @return Length of the description. */ public int getDescriptionLength() { return description.getLength(); @@ -185,8 +186,9 @@ // as arguments and does not use toString) private static JSONArray getJSONArray(Set<Individual> individuals) { JSONArray j = new JSONArray(); - for(Individual i : individuals) + for(Individual i : individuals) { j.put(i.getName()); + } return j; } } Modified: trunk/src/dl-learner/org/dllearner/core/owl/KBElement.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/owl/KBElement.java 2008-08-05 14:56:56 UTC (rev 1054) +++ trunk/src/dl-learner/org/dllearner/core/owl/KBElement.java 2008-08-06 09:53:31 UTC (rev 1055) @@ -10,6 +10,16 @@ */ public interface KBElement { + /** + * Gets the length of this knowledge base element. For instance, + * A AND B should have length 3 (as three constructs are involved). + * There are different ways to define the length of an axiom, + * class description etc., but this method provides a straightforward + * definition of it. + * + * @return The syntactic length of the KB element, defined as the + * number of syntactic constructs not including brackets. + */ public int getLength(); public String toString(String baseURI, Map<String,String> prefixes); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ku...@us...> - 2008-08-08 11:38:30
|
Revision: 1058 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=1058&view=rev Author: kurzum Date: 2008-08-08 11:38:27 +0000 (Fri, 08 Aug 2008) Log Message: ----------- added new ant task for rdbtoonto Modified Paths: -------------- trunk/build.xml trunk/src/dl-learner/org/dllearner/scripts/WikipediaCategoryCleaner.java Property Changed: ---------------- trunk/ Property changes on: trunk ___________________________________________________________________ Modified: svn:ignore - .lastUsedExample .settings .project .classpath classes log cache + .lastUsedExample .settings .project .classpath classes log cache cachePersistant reports results local rdbtoonto the_log.txt Modified: trunk/build.xml =================================================================== --- trunk/build.xml 2008-08-07 11:06:52 UTC (rev 1057) +++ trunk/build.xml 2008-08-08 11:38:27 UTC (rev 1058) @@ -27,7 +27,22 @@ <target name="full_release" depends="javadoc,build" description="full release, javadoc, scripts"> </target> + <!-- build target --> + <target name="rdbtoonto" description="makes jar"> + <!-- compile project into temporary directory --> + <mkdir dir="classes_tmp"/> + <javac destdir="classes_tmp" target="1.6"> + <src path="${source_dir}"/> + <classpath refid="classpath"/> + </javac> + + <jar jarfile="lib/rdbtoonto/test.jar"> + <fileset dir="classes_tmp"/> + </jar> + <delete dir="classes_tmp"/> + </target> + <!-- build target --> <target name="local" depends="createScripts" description="fast build including scripts, no javadoc, no tar, just executables in local, can be used on a server"> Modified: trunk/src/dl-learner/org/dllearner/scripts/WikipediaCategoryCleaner.java =================================================================== --- trunk/src/dl-learner/org/dllearner/scripts/WikipediaCategoryCleaner.java 2008-08-07 11:06:52 UTC (rev 1057) +++ trunk/src/dl-learner/org/dllearner/scripts/WikipediaCategoryCleaner.java 2008-08-08 11:38:27 UTC (rev 1058) @@ -119,7 +119,7 @@ WikipediaCategoryTasks wikiTasks; ConceptSPARQLReEvaluator csparql; - + System.out.println("test"); wikiTasks = new WikipediaCategoryTasks(sparqlTasks); csparql = new ConceptSPARQLReEvaluator(sparqlTasks, DEPTH_OF_RDFS, SPARQL_RESULTSET_LIMIT); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jen...@us...> - 2008-08-15 10:30:44
|
Revision: 1080 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=1080&view=rev Author: jenslehmann Date: 2008-08-15 10:30:38 +0000 (Fri, 15 Aug 2008) Log Message: ----------- - extended build.xml to create startup files for DL-Learner GUI - extended GUI to take a conf file as parameter (which is then loaded) Modified Paths: -------------- trunk/bin/dllearner trunk/bin/dllearner.bat trunk/bin/quickstart trunk/bin/quickstart.bat trunk/bin/ws trunk/bin/ws.bat trunk/build.xml trunk/src/dl-learner/org/dllearner/Info.java trunk/src/dl-learner/org/dllearner/gui/StartGUI.java trunk/src/dl-learner/org/dllearner/test/junit/ELDownTests.java Added Paths: ----------- trunk/bin/gui trunk/bin/gui.bat Modified: trunk/bin/dllearner =================================================================== --- trunk/bin/dllearner 2008-08-15 07:56:49 UTC (rev 1079) +++ trunk/bin/dllearner 2008-08-15 10:30:38 UTC (rev 1080) @@ -1 +1 @@ -java -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/log4j.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.cli.Start $@ \ No newline at end of file +java -cp .:./lib/dig1.1-xmlbeans.jar:./lib/fact/FaCTpp-OWLAPI-v1.1.11.jar:./lib/jamon-2.7.jar:./lib/jena/antlr-2.7.5.jar:./lib/jena/arq.jar:./lib/jena/commons-logging-1.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/log4j.jar:./lib/ore-tool/swingx-0.9.2.jar:./lib/owlapi/owlapi-bin.jar:./lib/pellet/aterm-java-1.6.jar:./lib/pellet/pellet.jar:./lib/pellet/relaxngDatatype.jar:./lib/pellet/xsdlib.jar:./lib/protege/org.protege.editor.core.application.jar:./lib/protege/org.protege.editor.owl.jar:./lib/xbean.jar:./lib/dllearner.jar org.dllearner.cli.Start $@ \ No newline at end of file Modified: trunk/bin/dllearner.bat =================================================================== --- trunk/bin/dllearner.bat 2008-08-15 07:56:49 UTC (rev 1079) +++ trunk/bin/dllearner.bat 2008-08-15 10:30:38 UTC (rev 1080) @@ -1 +1 @@ -java -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\log4j.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.cli.Start %* \ No newline at end of file +java -Xmx1024m -cp .;.\lib\dig1.1-xmlbeans.jar;.\lib\fact\FaCTpp-OWLAPI-v1.1.11.jar;.\lib\jamon-2.7.jar;.\lib\jena\antlr-2.7.5.jar;.\lib\jena\arq.jar;.\lib\jena\commons-logging-1.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\log4j.jar;.\lib\ore-tool\swingx-0.9.2.jar;.\lib\owlapi\owlapi-bin.jar;.\lib\pellet\aterm-java-1.6.jar;.\lib\pellet\pellet.jar;.\lib\pellet\relaxngDatatype.jar;.\lib\pellet\xsdlib.jar;.\lib\protege\org.protege.editor.core.application.jar;.\lib\protege\org.protege.editor.owl.jar;.\lib\xbean.jar;.\lib\dllearner.jar org.dllearner.cli.Start %* \ No newline at end of file Added: trunk/bin/gui =================================================================== --- trunk/bin/gui (rev 0) +++ trunk/bin/gui 2008-08-15 10:30:38 UTC (rev 1080) @@ -0,0 +1 @@ +java -cp .:./lib/dig1.1-xmlbeans.jar:./lib/fact/FaCTpp-OWLAPI-v1.1.11.jar:./lib/jamon-2.7.jar:./lib/jena/antlr-2.7.5.jar:./lib/jena/arq.jar:./lib/jena/commons-logging-1.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/log4j.jar:./lib/ore-tool/swingx-0.9.2.jar:./lib/owlapi/owlapi-bin.jar:./lib/pellet/aterm-java-1.6.jar:./lib/pellet/pellet.jar:./lib/pellet/relaxngDatatype.jar:./lib/pellet/xsdlib.jar:./lib/protege/org.protege.editor.core.application.jar:./lib/protege/org.protege.editor.owl.jar:./lib/xbean.jar:./lib/dllearner.jar org.dllearner.gui.StartGUI $@ \ No newline at end of file Added: trunk/bin/gui.bat =================================================================== --- trunk/bin/gui.bat (rev 0) +++ trunk/bin/gui.bat 2008-08-15 10:30:38 UTC (rev 1080) @@ -0,0 +1 @@ +java -cp .;.\lib\dig1.1-xmlbeans.jar;.\lib\fact\FaCTpp-OWLAPI-v1.1.11.jar;.\lib\jamon-2.7.jar;.\lib\jena\antlr-2.7.5.jar;.\lib\jena\arq.jar;.\lib\jena\commons-logging-1.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\log4j.jar;.\lib\ore-tool\swingx-0.9.2.jar;.\lib\owlapi\owlapi-bin.jar;.\lib\pellet\aterm-java-1.6.jar;.\lib\pellet\pellet.jar;.\lib\pellet\relaxngDatatype.jar;.\lib\pellet\xsdlib.jar;.\lib\protege\org.protege.editor.core.application.jar;.\lib\protege\org.protege.editor.owl.jar;.\lib\xbean.jar;.\lib\dllearner.jar org.dllearner.gui.StartGUI %* \ No newline at end of file Modified: trunk/bin/quickstart =================================================================== --- trunk/bin/quickstart 2008-08-15 07:56:49 UTC (rev 1079) +++ trunk/bin/quickstart 2008-08-15 10:30:38 UTC (rev 1080) @@ -1 +1 @@ -java -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/log4j.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.cli.QuickStart \ No newline at end of file +java -cp .:./lib/dig1.1-xmlbeans.jar:./lib/fact/FaCTpp-OWLAPI-v1.1.11.jar:./lib/jamon-2.7.jar:./lib/jena/antlr-2.7.5.jar:./lib/jena/arq.jar:./lib/jena/commons-logging-1.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/log4j.jar:./lib/ore-tool/swingx-0.9.2.jar:./lib/owlapi/owlapi-bin.jar:./lib/pellet/aterm-java-1.6.jar:./lib/pellet/pellet.jar:./lib/pellet/relaxngDatatype.jar:./lib/pellet/xsdlib.jar:./lib/protege/org.protege.editor.core.application.jar:./lib/protege/org.protege.editor.owl.jar:./lib/xbean.jar:./lib/dllearner.jar org.dllearner.cli.QuickStart \ No newline at end of file Modified: trunk/bin/quickstart.bat =================================================================== --- trunk/bin/quickstart.bat 2008-08-15 07:56:49 UTC (rev 1079) +++ trunk/bin/quickstart.bat 2008-08-15 10:30:38 UTC (rev 1080) @@ -1 +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\log4j.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.cli.QuickStart \ No newline at end of file +java -Xmx1024m -cp .;.\lib\dig1.1-xmlbeans.jar;.\lib\fact\FaCTpp-OWLAPI-v1.1.11.jar;.\lib\jamon-2.7.jar;.\lib\jena\antlr-2.7.5.jar;.\lib\jena\arq.jar;.\lib\jena\commons-logging-1.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\log4j.jar;.\lib\ore-tool\swingx-0.9.2.jar;.\lib\owlapi\owlapi-bin.jar;.\lib\pellet\aterm-java-1.6.jar;.\lib\pellet\pellet.jar;.\lib\pellet\relaxngDatatype.jar;.\lib\pellet\xsdlib.jar;.\lib\protege\org.protege.editor.core.application.jar;.\lib\protege\org.protege.editor.owl.jar;.\lib\xbean.jar;.\lib\dllearner.jar org.dllearner.cli.QuickStart \ No newline at end of file Modified: trunk/bin/ws =================================================================== --- trunk/bin/ws 2008-08-15 07:56:49 UTC (rev 1079) +++ trunk/bin/ws 2008-08-15 10:30:38 UTC (rev 1080) @@ -1 +1 @@ -java -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/log4j.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.server.DLLearnerWSStart $@ \ No newline at end of file +java -cp .:./lib/dig1.1-xmlbeans.jar:./lib/fact/FaCTpp-OWLAPI-v1.1.11.jar:./lib/jamon-2.7.jar:./lib/jena/antlr-2.7.5.jar:./lib/jena/arq.jar:./lib/jena/commons-logging-1.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/log4j.jar:./lib/ore-tool/swingx-0.9.2.jar:./lib/owlapi/owlapi-bin.jar:./lib/pellet/aterm-java-1.6.jar:./lib/pellet/pellet.jar:./lib/pellet/relaxngDatatype.jar:./lib/pellet/xsdlib.jar:./lib/protege/org.protege.editor.core.application.jar:./lib/protege/org.protege.editor.owl.jar:./lib/xbean.jar:./lib/dllearner.jar org.dllearner.server.DLLearnerWSStart $@ \ No newline at end of file Modified: trunk/bin/ws.bat =================================================================== --- trunk/bin/ws.bat 2008-08-15 07:56:49 UTC (rev 1079) +++ trunk/bin/ws.bat 2008-08-15 10:30:38 UTC (rev 1080) @@ -1 +1 @@ -java -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\log4j.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.server.DLLearnerWSStart %* \ No newline at end of file +java -cp .;.\lib\dig1.1-xmlbeans.jar;.\lib\fact\FaCTpp-OWLAPI-v1.1.11.jar;.\lib\jamon-2.7.jar;.\lib\jena\antlr-2.7.5.jar;.\lib\jena\arq.jar;.\lib\jena\commons-logging-1.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\log4j.jar;.\lib\ore-tool\swingx-0.9.2.jar;.\lib\owlapi\owlapi-bin.jar;.\lib\pellet\aterm-java-1.6.jar;.\lib\pellet\pellet.jar;.\lib\pellet\relaxngDatatype.jar;.\lib\pellet\xsdlib.jar;.\lib\protege\org.protege.editor.core.application.jar;.\lib\protege\org.protege.editor.owl.jar;.\lib\xbean.jar;.\lib\dllearner.jar org.dllearner.server.DLLearnerWSStart %* \ No newline at end of file Modified: trunk/build.xml =================================================================== --- trunk/build.xml 2008-08-15 07:56:49 UTC (rev 1079) +++ trunk/build.xml 2008-08-15 10:30:38 UTC (rev 1080) @@ -152,11 +152,13 @@ <include name="${version_dir}/dllearner" /> <include name="${version_dir}/quickstart" /> <include name="${version_dir}/ws" /> + <include name="${version_dir}/gui" /> </tarfileset> <tarfileset dir="release/"> <exclude name="${version_dir}/dllearner"/> <exclude name="${version_dir}/quickstart" /> <exclude name="${version_dir}/ws" /> + <exclude name="${version_dir}/gui" /> </tarfileset> </tar> @@ -251,9 +253,11 @@ <echo file="bin/quickstart.bat" message="java -Xmx1024m -cp ${pathStringWin} org.dllearner.cli.QuickStart"/> <echo file="bin/dllearner.bat" message="java -Xmx1024m -cp ${pathStringWin} org.dllearner.cli.Start %*"/> <echo file="bin/ws.bat" message="java -cp ${pathStringWin} org.dllearner.server.DLLearnerWSStart %*"/> + <echo file="bin/gui.bat" message="java -cp ${pathStringWin} org.dllearner.gui.StartGUI %*"/> <echo file="bin/quickstart" message="java -cp ${pathStringUnix} org.dllearner.cli.QuickStart"/> <echo file="bin/dllearner" message="java -cp ${pathStringUnix} org.dllearner.cli.Start $@"/> <echo file="bin/ws" message="java -cp ${pathStringUnix} org.dllearner.server.DLLearnerWSStart $@"/> + <echo file="bin/gui" message="java -cp ${pathStringUnix} org.dllearner.gui.StartGUI $@"/> </target> <!-- generate Javadoc --> Modified: trunk/src/dl-learner/org/dllearner/Info.java =================================================================== --- trunk/src/dl-learner/org/dllearner/Info.java 2008-08-15 07:56:49 UTC (rev 1079) +++ trunk/src/dl-learner/org/dllearner/Info.java 2008-08-15 10:30:38 UTC (rev 1080) @@ -3,6 +3,6 @@ package org.dllearner; public class Info { - public static final String build = "2008-08-01"; + public static final String build = "2008-08-15"; } \ No newline at end of file Modified: trunk/src/dl-learner/org/dllearner/gui/StartGUI.java =================================================================== --- trunk/src/dl-learner/org/dllearner/gui/StartGUI.java 2008-08-15 07:56:49 UTC (rev 1079) +++ trunk/src/dl-learner/org/dllearner/gui/StartGUI.java 2008-08-15 10:30:38 UTC (rev 1080) @@ -64,6 +64,10 @@ private JMenuItem saveItem = new JMenuItem("Save As Config"); public StartGUI() { + this(null); + } + + public StartGUI(File file) { this.setTitle("DL-Learner"); this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); this.setLocationByPlatform(true); @@ -103,6 +107,11 @@ init(); } }); + + if(file != null) { + configLoad.openFile(file); + configLoad.startParser(); + } } public void init() { @@ -122,7 +131,11 @@ logger.addAppender(consoleAppender); logger.setLevel(Level.INFO); - new StartGUI(); + File file = null; + if(args.length > 0) + file = new File(args[args.length - 1]); + + new StartGUI(file); } public void actionPerformed(ActionEvent e) { Modified: trunk/src/dl-learner/org/dllearner/test/junit/ELDownTests.java =================================================================== --- trunk/src/dl-learner/org/dllearner/test/junit/ELDownTests.java 2008-08-15 07:56:49 UTC (rev 1079) +++ trunk/src/dl-learner/org/dllearner/test/junit/ELDownTests.java 2008-08-15 10:30:38 UTC (rev 1080) @@ -116,10 +116,10 @@ // number of refinements has to be correct and each produced // refinement must be in the set of desired refinements -// assertTrue(refinements.size() == desired.size()); + assertTrue(refinements.size() == desired.size()); for(Description refinement : refinements) { System.out.println(refinement); -// assertTrue(desired.contains(refinement)); + assertTrue(desired.contains(refinement)); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jen...@us...> - 2008-08-20 11:21:40
|
Revision: 1105 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=1105&view=rev Author: jenslehmann Date: 2008-08-20 11:21:37 +0000 (Wed, 20 Aug 2008) Log Message: ----------- improved display of best class descriptions in DL-Learner GUI (now in Manchester OWL Syntax using base URI and prefixes in OWL file, accuracy of each class description is also shown) Modified Paths: -------------- trunk/examples/father.conf trunk/src/dl-learner/org/dllearner/gui/Config.java trunk/src/dl-learner/org/dllearner/gui/RunPanel.java Modified: trunk/examples/father.conf =================================================================== --- trunk/examples/father.conf 2008-08-19 17:35:48 UTC (rev 1104) +++ trunk/examples/father.conf 2008-08-20 11:21:37 UTC (rev 1105) @@ -11,8 +11,8 @@ import("father.kb"); +// reasoner = dig; - /** examples **/ +stefan +markus Modified: trunk/src/dl-learner/org/dllearner/gui/Config.java =================================================================== --- trunk/src/dl-learner/org/dllearner/gui/Config.java 2008-08-19 17:35:48 UTC (rev 1104) +++ trunk/src/dl-learner/org/dllearner/gui/Config.java 2008-08-20 11:21:37 UTC (rev 1105) @@ -1,5 +1,3 @@ -package org.dllearner.gui; - /** * Copyright (C) 2007-2008, Jens Lehmann * @@ -20,6 +18,8 @@ * */ +package org.dllearner.gui; + import org.dllearner.core.ComponentManager; import org.dllearner.core.KnowledgeSource; import org.dllearner.core.LearningProblem; Modified: trunk/src/dl-learner/org/dllearner/gui/RunPanel.java =================================================================== --- trunk/src/dl-learner/org/dllearner/gui/RunPanel.java 2008-08-19 17:35:48 UTC (rev 1104) +++ trunk/src/dl-learner/org/dllearner/gui/RunPanel.java 2008-08-20 11:21:37 UTC (rev 1105) @@ -25,9 +25,14 @@ import java.awt.GridBagLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; +import java.text.DecimalFormat; import java.util.List; +import java.util.Map; + import javax.swing.*; +import org.dllearner.core.EvaluatedDescription; + /** * @author Tilo Hielscher * @@ -35,6 +40,7 @@ public class RunPanel extends JPanel implements ActionListener { private static final long serialVersionUID = 1643304576470046636L; + private DecimalFormat df = new DecimalFormat(); private JButton runButton, stopButton, treeButton; private JTextArea infoArea; @@ -172,9 +178,9 @@ infoArea.setText(""); // best solutions - if (config.getLearningAlgorithm().getCurrentlyBestEvaluatedDescriptions(5) != null) { - infoArea.append("Best solutions: \n\n" - + listToString(config.getLearningAlgorithm().getCurrentlyBestEvaluatedDescriptions(10)) + "\n"); + if (config.getLearningAlgorithm().getCurrentlyBestDescriptions() != null) { + infoArea.append("Best class descriptions in Manchester OWL Syntax: \n\n" + + getSolutionString(config.getLearningAlgorithm().getCurrentlyBestEvaluatedDescriptions(10)) + "\n"); } // solution score // if (config.getLearningAlgorithm().getSolutionScore() != null) @@ -292,6 +298,17 @@ gbc.weighty = wy; } + public String getSolutionString(List<EvaluatedDescription> solutions) { + String baseURI = config.getReasoningService().getBaseURI(); + Map<String,String> prefixes = config.getReasoningService().getPrefixes(); + String string = ""; + for (EvaluatedDescription d : solutions) { + string += "accuracy: " + (df.format(d.getAccuracy()*100)) + "%: \t" + + d.getDescription().toManchesterSyntaxString(baseURI, prefixes) + "\n"; + } + return string; + } + /** * Make a string from list, every entry in new line. * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jen...@us...> - 2008-08-20 20:05:16
|
Revision: 1115 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=1115&view=rev Author: jenslehmann Date: 2008-08-20 20:05:10 +0000 (Wed, 20 Aug 2008) Log Message: ----------- some fixes as result of example unit tests Modified Paths: -------------- trunk/examples/carcinogenesis/train.conf trunk/examples/lymphography/lymphography_Class1.conf trunk/examples/lymphography/lymphography_Class2.conf trunk/examples/lymphography/lymphography_Class3.conf trunk/examples/lymphography/lymphography_Class4.conf trunk/examples/sparql/AristotlePos.conf trunk/examples/sparql/govtrack.conf trunk/src/dl-learner/org/dllearner/algorithms/refexamples/ExampleBasedROLearner.java trunk/src/dl-learner/org/dllearner/test/junit/ExampleTests.java trunk/src/dl-learner/org/dllearner/utilities/Helper.java trunk/src/dl-learner/org/dllearner/utilities/statistics/SimpleClock.java Removed Paths: ------------- trunk/examples/test.conf Modified: trunk/examples/carcinogenesis/train.conf =================================================================== --- trunk/examples/carcinogenesis/train.conf 2008-08-20 19:25:05 UTC (rev 1114) +++ trunk/examples/carcinogenesis/train.conf 2008-08-20 20:05:10 UTC (rev 1115) @@ -2,7 +2,8 @@ reasoner = fastInstanceChecker; algorithm = refexamples; -refexamples.noisePercentage = 28; +// refexamples.noisePercentage = 28; +refexamples.noisePercentage = 32; refexamples.startClass = "http://dl-learner.org/carcinogenesis#Compound"; refexamples.writeSearchTree = false; refexamples.searchTreeFile = "log/carcinogenesis/searchTree.log"; Modified: trunk/examples/lymphography/lymphography_Class1.conf =================================================================== --- trunk/examples/lymphography/lymphography_Class1.conf 2008-08-20 19:25:05 UTC (rev 1114) +++ trunk/examples/lymphography/lymphography_Class1.conf 2008-08-20 20:05:10 UTC (rev 1115) @@ -17,15 +17,6 @@ */ - -reasoner = dig; -//reasoner = fastRetrieval; - -algorithm = refinement; -//refinement.heuristic = flexible; -//algorithm = refexamples; - - refinement.ignoredConcepts = { "http://www.example.org/lymphography#Target1_NormalFind", "http://www.example.org/lymphography#Target2_Metastases", Modified: trunk/examples/lymphography/lymphography_Class2.conf =================================================================== --- trunk/examples/lymphography/lymphography_Class2.conf 2008-08-20 19:25:05 UTC (rev 1114) +++ trunk/examples/lymphography/lymphography_Class2.conf 2008-08-20 20:05:10 UTC (rev 1115) @@ -13,16 +13,8 @@ it will need a lot of time to find a solution, in case it exists at all. Mainly used as a test case for improving the algorithms (example 4 uses a new experimental version of the refinement algorithm) - - */ -reasoner = dig; -//reasoner = fastRetrieval; -algorithm = refinement; -//refinement.heuristic = flexible; -//algorithm = refexamples; - refinement.ignoredConcepts = { "http://www.example.org/lymphography#Target1_NormalFind", "http://www.example.org/lymphography#Target2_Metastases", @@ -30,12 +22,10 @@ "http://www.example.org/lymphography#Target4_Fibrosis" }; - - - refinement.useAllConstructor = false; refinement.useExistsConstructor = true; refinement.useNegation = false; + import("lymphography.owl"); /*Class2*/ Modified: trunk/examples/lymphography/lymphography_Class3.conf =================================================================== --- trunk/examples/lymphography/lymphography_Class3.conf 2008-08-20 19:25:05 UTC (rev 1114) +++ trunk/examples/lymphography/lymphography_Class3.conf 2008-08-20 20:05:10 UTC (rev 1115) @@ -17,15 +17,6 @@ */ - - -reasoner = dig; -//reasoner = fastRetrieval; - -algorithm = refinement; -//refinement.heuristic = flexible; -//algorithm = refexamples; - refinement.ignoredConcepts = { "http://www.example.org/lymphography#Target1_NormalFind", "http://www.example.org/lymphography#Target2_Metastases", Modified: trunk/examples/lymphography/lymphography_Class4.conf =================================================================== --- trunk/examples/lymphography/lymphography_Class4.conf 2008-08-20 19:25:05 UTC (rev 1114) +++ trunk/examples/lymphography/lymphography_Class4.conf 2008-08-20 20:05:10 UTC (rev 1115) @@ -13,18 +13,8 @@ it will need a lot of time to find a solution, in case it exists at all. Mainly used as a test case for improving the algorithms (example 4 uses a new experimental version of the refinement algorithm) - - */ - -//reasoner = dig; -reasoner = fastRetrieval; - -//algorithm = refinement; -//refinement.heuristic = flexible; -algorithm = refexamples; - refexamples.ignoredConcepts = { "http://www.example.org/lymphography#Target1_NormalFind", "http://www.example.org/lymphography#Target2_Metastases", Modified: trunk/examples/sparql/AristotlePos.conf =================================================================== --- trunk/examples/sparql/AristotlePos.conf 2008-08-20 19:25:05 UTC (rev 1114) +++ trunk/examples/sparql/AristotlePos.conf 2008-08-20 20:05:10 UTC (rev 1115) @@ -18,7 +18,8 @@ algorithm = refexamples; reasoner = fastInstanceChecker; -problem = posOnlyDefinitionLP; +// comment this out to enable positive only learning +// problem = posOnlyDefinitionLP; sparql.instances = { "http://dbpedia.org/resource/Democritus", @@ -33,9 +34,10 @@ +"http://dbpedia.org/resource/Pythagoras" +"http://dbpedia.org/resource/Philolaus" +"http://dbpedia.org/resource/Archytas" -/* + +// comment this out to enable positive only learning -"http://dbpedia.org/resource/Socrates" -"http://dbpedia.org/resource/Plato" -"http://dbpedia.org/resource/Zeno_of_Elea" -"http://dbpedia.org/resource/Democritus" -*/ + Modified: trunk/examples/sparql/govtrack.conf =================================================================== --- trunk/examples/sparql/govtrack.conf 2008-08-20 19:25:05 UTC (rev 1114) +++ trunk/examples/sparql/govtrack.conf 2008-08-20 20:05:10 UTC (rev 1115) @@ -7,7 +7,7 @@ reasoner = owlAPI; // reasoner = fastInstanceChecker; -import("http://rdfabout.com/sparql/","SPARQL"); +import("http://www.govtrack.us/sparql","SPARQL"); sparql.instances = { "http://www.rdfabout.com/rdf/usgov/congress/people/A000069", Deleted: trunk/examples/test.conf =================================================================== --- trunk/examples/test.conf 2008-08-20 19:25:05 UTC (rev 1114) +++ trunk/examples/test.conf 2008-08-20 20:05:10 UTC (rev 1115) @@ -1,13 +0,0 @@ -import("father.kb"); -reasoner = "fastInstanceChecker"; -problem = "posNegDefinition"; - -+"http://localhost/foo#markus" -+"http://localhost/foo#michelle" -+"http://localhost/foo#stefan" - --"http://localhost/foo#anna" --"http://localhost/foo#bernd" --"http://localhost/foo#gabi" - -algorithm = "refexamples"; Modified: trunk/src/dl-learner/org/dllearner/algorithms/refexamples/ExampleBasedROLearner.java =================================================================== --- trunk/src/dl-learner/org/dllearner/algorithms/refexamples/ExampleBasedROLearner.java 2008-08-20 19:25:05 UTC (rev 1114) +++ trunk/src/dl-learner/org/dllearner/algorithms/refexamples/ExampleBasedROLearner.java 2008-08-20 20:05:10 UTC (rev 1115) @@ -451,7 +451,9 @@ System.out.println("solution: " + bestNode.getConcept()); System.out.println("maxPosOnlyExpansion: " + maxPosOnlyExpansion); System.out.println("best child of this node: " + bestChild); - System.out.println(bestNode.getChildConcepts()); + if(bestNode.getChildConcepts().size()<100) { + System.out.println(bestNode.getChildConcepts()); + } System.out.println("TODO: needs to be integrated with other stopping criteria"); System.out .println("You tried to use this algorithm for positive only learning, which is not recommended (yet)."); Modified: trunk/src/dl-learner/org/dllearner/test/junit/ExampleTests.java =================================================================== --- trunk/src/dl-learner/org/dllearner/test/junit/ExampleTests.java 2008-08-20 19:25:05 UTC (rev 1114) +++ trunk/src/dl-learner/org/dllearner/test/junit/ExampleTests.java 2008-08-20 20:05:10 UTC (rev 1115) @@ -25,6 +25,8 @@ import java.util.ArrayList; import java.util.Date; import java.util.HashMap; +import java.util.Set; +import java.util.TreeSet; import org.apache.log4j.ConsoleAppender; import org.apache.log4j.FileAppender; @@ -34,6 +36,7 @@ import org.dllearner.cli.QuickStart; import org.dllearner.cli.Start; import org.dllearner.core.ComponentInitException; +import org.dllearner.core.ComponentManager; import org.dllearner.utilities.Helper; import org.junit.Test; @@ -48,7 +51,7 @@ /** * This test runs all conf files in the examples directory. Each conf file * corresponds to one unit test, which is succesful if a concept was - * learned. + * learned. This unit test takes several hours. * * @throws ComponentInitException * If any component initialisation exception occurs in the @@ -72,18 +75,34 @@ SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss"); + // ignore list (examples which are temporarily not working due + // to server downtime, lack of features etc., but should still + // remain in the example directory + Set<String> ignore = new TreeSet<String>(); + ignore.add("./examples/sparql/govtrack.conf"); // HTTP 500 Server error + ignore.add("./examples/sparql/musicbrainz.conf"); // HTTP 502 error - NullPointer in extraction + ignore.add("./examples/sparql/SKOSTEST_local.conf"); // Out of Memory Error + ignore.add("./examples/sparql/scrobble.conf"); // HTTP 502 Proxy Error + ignore.add("./examples/family-benchmark/Cousin.conf"); // Out of Memory Error + for (String path : confFiles.keySet()) { for (String file : confFiles.get(path)) { String conf = path + file + ".conf"; - System.out.println("Testing " + conf + " (time: " + sdf.format(new Date()) + ")."); - long startTime = System.nanoTime(); - // start example - Start start = new Start(new File(conf)); - start.start(false); - // test is successful if a concept was learned - assert (start.getLearningAlgorithm().getCurrentlyBestDescription() != null); - long timeNeeded = System.nanoTime() - startTime; - System.out.println("Test of " + conf + " completed in " + Helper.prettyPrintNanoSeconds(timeNeeded) + "."); + if(ignore.contains(conf)) { + System.out.println("Skipping " + conf + " (is on ignore list)."); + } else { + System.out.println("Testing " + conf + " (time: " + sdf.format(new Date()) + ")."); + long startTime = System.nanoTime(); + // start example + Start start = new Start(new File(conf)); + start.start(false); + // test is successful if a concept was learned + assert (start.getLearningAlgorithm().getCurrentlyBestDescription() != null); + long timeNeeded = System.nanoTime() - startTime; + start.getReasoningService().releaseKB(); + ComponentManager.getInstance().freeAllComponents(); + System.out.println("Test of " + conf + " completed in " + Helper.prettyPrintNanoSeconds(timeNeeded) + "."); + } } } Modified: trunk/src/dl-learner/org/dllearner/utilities/Helper.java =================================================================== --- trunk/src/dl-learner/org/dllearner/utilities/Helper.java 2008-08-20 19:25:05 UTC (rev 1114) +++ trunk/src/dl-learner/org/dllearner/utilities/Helper.java 2008-08-20 20:05:10 UTC (rev 1115) @@ -445,21 +445,20 @@ // ignore some concepts (possibly produced by Jena) if (conceptName.startsWith("anon")) { - System.out - .println(" Ignoring concept " + logger.debug(" Ignoring concept " + conceptName + " (probably an anonymous concept produced by Jena when reading in OWL file)."); it.remove(); } else if (conceptName.startsWith("http://www.w3.org/1999/02/22-rdf-syntax-ns#")) { - System.out.println(" Ignoring concept " + conceptName + logger.debug(" Ignoring concept " + conceptName + " (RDF construct produced by Jena when reading in OWL file)."); it.remove(); } else if (conceptName.startsWith("http://www.w3.org/2000/01/rdf-schema#")) { - System.out.println(" Ignoring concept " + conceptName + logger.debug(" Ignoring concept " + conceptName + " (RDF Schema construct produced by Jena when reading in OWL file)."); it.remove(); } else if (conceptName.startsWith("http://www.w3.org/2002/07/owl#")) { - System.out.println(" Ignoring concept " + conceptName + logger.debug(" Ignoring concept " + conceptName + " (OWL construct produced by Jena when reading in OWL file)."); it.remove(); } Modified: trunk/src/dl-learner/org/dllearner/utilities/statistics/SimpleClock.java =================================================================== --- trunk/src/dl-learner/org/dllearner/utilities/statistics/SimpleClock.java 2008-08-20 19:25:05 UTC (rev 1114) +++ trunk/src/dl-learner/org/dllearner/utilities/statistics/SimpleClock.java 2008-08-20 20:05:10 UTC (rev 1115) @@ -1,78 +1,93 @@ package org.dllearner.utilities.statistics; /** - * class for counting time and output it + * 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/>. + * */ +import org.apache.log4j.Logger; + +/** + * Class for counting time and outputting it. + * + * @author Unknown + */ public class SimpleClock { + + private static Logger logger = Logger.getLogger(SimpleClock.class); + private long time; - + public SimpleClock() { - time=System.currentTimeMillis(); + time = System.currentTimeMillis(); } - - - - - + /** - * prints time needed - * and resets the clock + * prints time needed and resets the clock */ public void printAndSet() { - - System.out.println("needed "+getTime()+" ms"); + logger.info("needed " + getTime() + " ms"); setTime(); } - - + /** - * prints time needed - * and resets the clock - * @param s String for printing + * prints time needed and resets the clock + * + * @param s + * String for printing */ public void printAndSet(String s) { - - System.out.println(s+" needed "+getTime()+" ms"); + logger.info(s + " needed " + getTime() + " ms"); setTime(); } - + public String getAndSet(String s) { - - String ret = s+" needed "+getTime()+" ms"; + String ret = s + " needed " + getTime() + " ms"; setTime(); return ret; - } - - + /** * prints time needed - * - * @param s String for printing + * + * @param s + * String for printing */ public void print(String s) { - - System.out.println(s+" needed "+getTime()+" ms"); - + logger.info(s + " needed " + getTime() + " ms"); } - + /** * resets the clock */ public void setTime() { - time=System.currentTimeMillis(); + time = System.currentTimeMillis(); } + /** * resets the clock */ public void reset() { setTime(); } - + public long getTime() { - long now=System.currentTimeMillis(); - return now-time; + long now = System.currentTimeMillis(); + return now - time; } - + } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jen...@us...> - 2008-09-10 10:23:07
|
Revision: 1190 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=1190&view=rev Author: jenslehmann Date: 2008-09-10 10:23:02 +0000 (Wed, 10 Sep 2008) Log Message: ----------- GUI intermediate commit Modified Paths: -------------- trunk/src/dl-learner/org/dllearner/core/config/BooleanConfigOption.java trunk/src/dl-learner/org/dllearner/core/config/ConfigEntry.java trunk/src/dl-learner/org/dllearner/core/config/ConfigOption.java trunk/src/dl-learner/org/dllearner/core/config/DoubleConfigOption.java trunk/src/dl-learner/org/dllearner/core/config/IntegerConfigOption.java trunk/src/dl-learner/org/dllearner/core/config/StringConfigOption.java trunk/src/dl-learner/org/dllearner/core/config/StringSetConfigOption.java trunk/src/dl-learner/org/dllearner/core/config/StringTupleListConfigOption.java trunk/src/dl-learner/org/dllearner/core/configurators/BruteForceLearnerConfigurator.java trunk/src/dl-learner/org/dllearner/core/configurators/ComponentFactory.java trunk/src/dl-learner/org/dllearner/core/configurators/Configurator.java trunk/src/dl-learner/org/dllearner/core/configurators/DBpediaNavigationSuggestorConfigurator.java trunk/src/dl-learner/org/dllearner/core/configurators/DIGReasonerConfigurator.java trunk/src/dl-learner/org/dllearner/core/configurators/ExampleBasedROLComponentConfigurator.java trunk/src/dl-learner/org/dllearner/core/configurators/FastInstanceCheckerConfigurator.java trunk/src/dl-learner/org/dllearner/core/configurators/FastRetrievalReasonerConfigurator.java trunk/src/dl-learner/org/dllearner/core/configurators/GPConfigurator.java trunk/src/dl-learner/org/dllearner/core/configurators/KBFileConfigurator.java trunk/src/dl-learner/org/dllearner/core/configurators/OWLAPIOntologyConfigurator.java trunk/src/dl-learner/org/dllearner/core/configurators/OWLAPIReasonerConfigurator.java trunk/src/dl-learner/org/dllearner/core/configurators/OWLFileConfigurator.java trunk/src/dl-learner/org/dllearner/core/configurators/PosNegDefinitionLPConfigurator.java trunk/src/dl-learner/org/dllearner/core/configurators/PosNegDefinitionLPStrictConfigurator.java trunk/src/dl-learner/org/dllearner/core/configurators/PosNegInclusionLPConfigurator.java trunk/src/dl-learner/org/dllearner/core/configurators/PosOnlyDefinitionLPConfigurator.java trunk/src/dl-learner/org/dllearner/core/configurators/PosOnlyInclusionLPConfigurator.java trunk/src/dl-learner/org/dllearner/core/configurators/ROLearnerConfigurator.java trunk/src/dl-learner/org/dllearner/core/configurators/RandomGuesserConfigurator.java trunk/src/dl-learner/org/dllearner/core/configurators/SimpleSuggestionLearningAlgorithmConfigurator.java trunk/src/dl-learner/org/dllearner/core/configurators/SparqlKnowledgeSourceConfigurator.java trunk/src/dl-learner/org/dllearner/gui/Config.java trunk/src/dl-learner/org/dllearner/gui/ConfigLoad.java trunk/src/dl-learner/org/dllearner/gui/KnowledgeSourcePanel.java trunk/src/dl-learner/org/dllearner/gui/LearningAlgorithmPanel.java trunk/src/dl-learner/org/dllearner/gui/LearningProblemPanel.java trunk/src/dl-learner/org/dllearner/gui/OptionPanel.java trunk/src/dl-learner/org/dllearner/gui/ReasonerPanel.java trunk/src/dl-learner/org/dllearner/gui/StartGUI.java trunk/src/dl-learner/org/dllearner/gui/StatusPanel.java trunk/src/dl-learner/org/dllearner/gui/widgets/WidgetPanelString.java trunk/src/dl-learner/org/dllearner/kb/KBFile.java trunk/src/dl-learner/org/dllearner/kb/OWLFile.java trunk/src/dl-learner/org/dllearner/scripts/NewSample.java Added Paths: ----------- trunk/doc/header.txt Added: trunk/doc/header.txt =================================================================== --- trunk/doc/header.txt (rev 0) +++ trunk/doc/header.txt 2008-09-10 10:23:02 UTC (rev 1190) @@ -0,0 +1,19 @@ +/** + * 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/>. + * + */ Modified: trunk/src/dl-learner/org/dllearner/core/config/BooleanConfigOption.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/config/BooleanConfigOption.java 2008-09-10 05:48:08 UTC (rev 1189) +++ trunk/src/dl-learner/org/dllearner/core/config/BooleanConfigOption.java 2008-09-10 10:23:02 UTC (rev 1190) @@ -77,7 +77,7 @@ * @see org.dllearner.core.config.ConfigOption#getValueFormatting(java.lang.Object) */ @Override - public String getValueFormatting(Boolean value, Integer special) { + public String getValueFormatting(Boolean value) { if (value != null) { if (value) return "true;"; Modified: trunk/src/dl-learner/org/dllearner/core/config/ConfigEntry.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/config/ConfigEntry.java 2008-09-10 05:48:08 UTC (rev 1189) +++ trunk/src/dl-learner/org/dllearner/core/config/ConfigEntry.java 2008-09-10 10:23:02 UTC (rev 1190) @@ -58,11 +58,16 @@ */ public String toConfString(String componentName) { if (option.getName().equalsIgnoreCase("positiveExamples")) { - return option.getValueFormatting(value, 1); + return option.getValueFormatting(value); } else if (option.getName().equalsIgnoreCase("negativeExamples")) { - return option.getValueFormatting(value, 2); + return option.getValueFormatting(value); } return componentName.toString() + "." + option.getName() + " = " - + option.getValueFormatting(value, 0); + + option.getValueFormatting(value); } + + @Override + public String toString() { + return option.name + " = " + value; + } } Modified: trunk/src/dl-learner/org/dllearner/core/config/ConfigOption.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/config/ConfigOption.java 2008-09-10 05:48:08 UTC (rev 1189) +++ trunk/src/dl-learner/org/dllearner/core/config/ConfigOption.java 2008-09-10 10:23:02 UTC (rev 1190) @@ -205,14 +205,10 @@ /** * Get a formatted value to put into configuration file. * - * @param value - * @param special - * 0 for normal output. - * 1 for positiveExamples. - * 2 for negativeExamples. + * @param value Option value. * - * @return a string to put into a file + * @return A string to put into a conf file. */ - public abstract String getValueFormatting(T value, Integer special); + public abstract String getValueFormatting(T value); } Modified: trunk/src/dl-learner/org/dllearner/core/config/DoubleConfigOption.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/config/DoubleConfigOption.java 2008-09-10 05:48:08 UTC (rev 1189) +++ trunk/src/dl-learner/org/dllearner/core/config/DoubleConfigOption.java 2008-09-10 10:23:02 UTC (rev 1190) @@ -119,7 +119,7 @@ * @see org.dllearner.core.config.ConfigOption#getValueFormatting(java.lang.Object) */ @Override - public String getValueFormatting(Double value, Integer special) { + public String getValueFormatting(Double value) { if (value != null) return value.toString() + ";"; else Modified: trunk/src/dl-learner/org/dllearner/core/config/IntegerConfigOption.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/config/IntegerConfigOption.java 2008-09-10 05:48:08 UTC (rev 1189) +++ trunk/src/dl-learner/org/dllearner/core/config/IntegerConfigOption.java 2008-09-10 10:23:02 UTC (rev 1190) @@ -126,7 +126,7 @@ * @see org.dllearner.core.config.ConfigOption#getValueFormatting(java.lang.Object) */ @Override - public String getValueFormatting(Integer value, Integer special) { + public String getValueFormatting(Integer value) { if (value != null) return value.toString() + ";"; else Modified: trunk/src/dl-learner/org/dllearner/core/config/StringConfigOption.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/config/StringConfigOption.java 2008-09-10 05:48:08 UTC (rev 1189) +++ trunk/src/dl-learner/org/dllearner/core/config/StringConfigOption.java 2008-09-10 10:23:02 UTC (rev 1190) @@ -36,12 +36,10 @@ public StringConfigOption(String name, String description) { super(name, description); - } public StringConfigOption(String name, String description, String defaultValue) { super(name, description, defaultValue); - } public StringConfigOption(String name, String description, String defaultValue, boolean mandatory, boolean requiresInit) { @@ -112,7 +110,7 @@ * @see org.dllearner.core.config.ConfigOption#getValueFormatting(java.lang.Object) */ @Override - public String getValueFormatting(String value, Integer special) { + public String getValueFormatting(String value) { if (value != null) return value.toString() + ";"; else Modified: trunk/src/dl-learner/org/dllearner/core/config/StringSetConfigOption.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/config/StringSetConfigOption.java 2008-09-10 05:48:08 UTC (rev 1189) +++ trunk/src/dl-learner/org/dllearner/core/config/StringSetConfigOption.java 2008-09-10 10:23:02 UTC (rev 1190) @@ -99,9 +99,9 @@ * @see org.dllearner.core.config.ConfigOption#getValueFormatting(java.lang.Object) */ @Override - public String getValueFormatting(Set<String> value, Integer special) { + public String getValueFormatting(Set<String> value) { String back = ""; - if (value != null && special == 0) { + if (value != null && !name.equals("positiveExamples") && !name.equals("negativeExamples")) { Integer count = 0; back = "{"; for (String i : value) { @@ -114,14 +114,14 @@ return back; } // positive examples - if (value != null && special == 1) { + if (value != null && name.equals("positiveExamples")) { for (String i : value) { back += "\n+\"" + i + "\""; } return back + "\n"; } // negative examples - if (value != null && special == 2) { + if (value != null && name.equals("negativeExamples")) { Integer count = 0; for (String i : value) { count++; Modified: trunk/src/dl-learner/org/dllearner/core/config/StringTupleListConfigOption.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/config/StringTupleListConfigOption.java 2008-09-10 05:48:08 UTC (rev 1189) +++ trunk/src/dl-learner/org/dllearner/core/config/StringTupleListConfigOption.java 2008-09-10 10:23:02 UTC (rev 1190) @@ -103,7 +103,7 @@ * @see org.dllearner.core.config.ConfigOption#getValueFormatting(java.lang.Object) */ @Override - public String getValueFormatting(List<StringTuple> value, Integer special) { + public String getValueFormatting(List<StringTuple> value) { Integer count = 0; if (value != null) { String back = "["; Modified: trunk/src/dl-learner/org/dllearner/core/configurators/BruteForceLearnerConfigurator.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/configurators/BruteForceLearnerConfigurator.java 2008-09-10 05:48:08 UTC (rev 1189) +++ trunk/src/dl-learner/org/dllearner/core/configurators/BruteForceLearnerConfigurator.java 2008-09-10 10:23:02 UTC (rev 1190) @@ -16,7 +16,7 @@ * 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.core.configurators; Modified: trunk/src/dl-learner/org/dllearner/core/configurators/ComponentFactory.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/configurators/ComponentFactory.java 2008-09-10 05:48:08 UTC (rev 1189) +++ trunk/src/dl-learner/org/dllearner/core/configurators/ComponentFactory.java 2008-09-10 10:23:02 UTC (rev 1190) @@ -16,10 +16,11 @@ * 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.core.configurators; +import java.net.URL; import java.util.Set; import org.dllearner.algorithms.BruteForceLearner; import org.dllearner.algorithms.DBpediaNavigationSuggestor; @@ -41,7 +42,6 @@ import org.dllearner.learningproblems.PosNegInclusionLP; import org.dllearner.learningproblems.PosOnlyDefinitionLP; import org.dllearner.learningproblems.PosOnlyInclusionLP; -import org.dllearner.learningproblems.RoleLearning; import org.dllearner.reasoning.DIGReasoner; import org.dllearner.reasoning.FastInstanceChecker; import org.dllearner.reasoning.FastRetrievalReasoner; @@ -74,7 +74,7 @@ * @param url URL pointing to the OWL file * @return a component ready for initialization OWLFile **/ -public static OWLFile getOWLFile(String url) { +public static OWLFile getOWLFile(URL url) { return OWLFileConfigurator.getOWLFile(url); } @@ -168,16 +168,6 @@ } /** -* @param positiveExamples positive examples -* @param negativeExamples negative examples -* @param reasoningService see ReasoningService -* @return a component ready for initialization RoleLearning -**/ -public static RoleLearning getRoleLearning(ReasoningService reasoningService, Set<String> positiveExamples, Set<String> negativeExamples) { -return RoleLearningConfigurator.getRoleLearning(reasoningService, positiveExamples, negativeExamples); -} - -/** * @param learningProblem see LearningProblem * @param reasoningService see ReasoningService * @throws LearningProblemUnsupportedException see Modified: trunk/src/dl-learner/org/dllearner/core/configurators/Configurator.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/configurators/Configurator.java 2008-09-10 05:48:08 UTC (rev 1189) +++ trunk/src/dl-learner/org/dllearner/core/configurators/Configurator.java 2008-09-10 10:23:02 UTC (rev 1190) @@ -16,7 +16,7 @@ * 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.core.configurators; Modified: trunk/src/dl-learner/org/dllearner/core/configurators/DBpediaNavigationSuggestorConfigurator.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/configurators/DBpediaNavigationSuggestorConfigurator.java 2008-09-10 05:48:08 UTC (rev 1189) +++ trunk/src/dl-learner/org/dllearner/core/configurators/DBpediaNavigationSuggestorConfigurator.java 2008-09-10 10:23:02 UTC (rev 1190) @@ -16,7 +16,7 @@ * 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.core.configurators; Modified: trunk/src/dl-learner/org/dllearner/core/configurators/DIGReasonerConfigurator.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/configurators/DIGReasonerConfigurator.java 2008-09-10 05:48:08 UTC (rev 1189) +++ trunk/src/dl-learner/org/dllearner/core/configurators/DIGReasonerConfigurator.java 2008-09-10 10:23:02 UTC (rev 1190) @@ -16,7 +16,7 @@ * 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.core.configurators; Modified: trunk/src/dl-learner/org/dllearner/core/configurators/ExampleBasedROLComponentConfigurator.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/configurators/ExampleBasedROLComponentConfigurator.java 2008-09-10 05:48:08 UTC (rev 1189) +++ trunk/src/dl-learner/org/dllearner/core/configurators/ExampleBasedROLComponentConfigurator.java 2008-09-10 10:23:02 UTC (rev 1190) @@ -16,7 +16,7 @@ * 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.core.configurators; Modified: trunk/src/dl-learner/org/dllearner/core/configurators/FastInstanceCheckerConfigurator.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/configurators/FastInstanceCheckerConfigurator.java 2008-09-10 05:48:08 UTC (rev 1189) +++ trunk/src/dl-learner/org/dllearner/core/configurators/FastInstanceCheckerConfigurator.java 2008-09-10 10:23:02 UTC (rev 1190) @@ -16,7 +16,7 @@ * 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.core.configurators; Modified: trunk/src/dl-learner/org/dllearner/core/configurators/FastRetrievalReasonerConfigurator.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/configurators/FastRetrievalReasonerConfigurator.java 2008-09-10 05:48:08 UTC (rev 1189) +++ trunk/src/dl-learner/org/dllearner/core/configurators/FastRetrievalReasonerConfigurator.java 2008-09-10 10:23:02 UTC (rev 1190) @@ -16,7 +16,7 @@ * 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.core.configurators; Modified: trunk/src/dl-learner/org/dllearner/core/configurators/GPConfigurator.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/configurators/GPConfigurator.java 2008-09-10 05:48:08 UTC (rev 1189) +++ trunk/src/dl-learner/org/dllearner/core/configurators/GPConfigurator.java 2008-09-10 10:23:02 UTC (rev 1190) @@ -16,7 +16,7 @@ * 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.core.configurators; Modified: trunk/src/dl-learner/org/dllearner/core/configurators/KBFileConfigurator.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/configurators/KBFileConfigurator.java 2008-09-10 05:48:08 UTC (rev 1189) +++ trunk/src/dl-learner/org/dllearner/core/configurators/KBFileConfigurator.java 2008-09-10 10:23:02 UTC (rev 1190) @@ -16,10 +16,12 @@ * 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.core.configurators; +import java.net.URL; + import org.dllearner.core.ComponentManager; import org.dllearner.kb.KBFile; @@ -64,10 +66,10 @@ * url URL pointer to the KB file. * mandatory: false| reinit necessary: true * default value: null -* @return String +* @return URL **/ -public String getUrl() { -return (String) ComponentManager.getInstance().getConfigOptionValue(kBFile, "url") ; +public URL getUrl() { +return (URL) ComponentManager.getInstance().getConfigOptionValue(kBFile, "url") ; } /** @@ -84,7 +86,7 @@ * mandatory: false| reinit necessary: true * default value: null **/ -public void setUrl(String url) { +public void setUrl(URL url) { ComponentManager.getInstance().applyConfigEntry(kBFile, "url", url); reinitNecessary = true; } Modified: trunk/src/dl-learner/org/dllearner/core/configurators/OWLAPIOntologyConfigurator.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/configurators/OWLAPIOntologyConfigurator.java 2008-09-10 05:48:08 UTC (rev 1189) +++ trunk/src/dl-learner/org/dllearner/core/configurators/OWLAPIOntologyConfigurator.java 2008-09-10 10:23:02 UTC (rev 1190) @@ -16,7 +16,7 @@ * 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.core.configurators; Modified: trunk/src/dl-learner/org/dllearner/core/configurators/OWLAPIReasonerConfigurator.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/configurators/OWLAPIReasonerConfigurator.java 2008-09-10 05:48:08 UTC (rev 1189) +++ trunk/src/dl-learner/org/dllearner/core/configurators/OWLAPIReasonerConfigurator.java 2008-09-10 10:23:02 UTC (rev 1190) @@ -16,7 +16,7 @@ * 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.core.configurators; Modified: trunk/src/dl-learner/org/dllearner/core/configurators/OWLFileConfigurator.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/configurators/OWLFileConfigurator.java 2008-09-10 05:48:08 UTC (rev 1189) +++ trunk/src/dl-learner/org/dllearner/core/configurators/OWLFileConfigurator.java 2008-09-10 10:23:02 UTC (rev 1190) @@ -16,10 +16,12 @@ * 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.core.configurators; +import java.net.URL; + import org.dllearner.core.ComponentManager; import org.dllearner.kb.OWLFile; @@ -45,7 +47,7 @@ * @param url URL pointing to the OWL file * @return OWLFile **/ -public static OWLFile getOWLFile(String url) { +public static OWLFile getOWLFile(URL url) { OWLFile component = ComponentManager.getInstance().knowledgeSource(OWLFile.class); ComponentManager.getInstance().applyConfigEntry(component, "url", url); return component; @@ -55,10 +57,10 @@ * url URL pointing to the OWL file. * mandatory: true| reinit necessary: true * default value: null -* @return String +* @return URL **/ -public String getUrl() { -return (String) ComponentManager.getInstance().getConfigOptionValue(oWLFile, "url") ; +public URL getUrl() { +return (URL) ComponentManager.getInstance().getConfigOptionValue(oWLFile, "url") ; } /** @@ -66,7 +68,7 @@ * mandatory: true| reinit necessary: true * default value: null **/ -public void setUrl(String url) { +public void setUrl(URL url) { ComponentManager.getInstance().applyConfigEntry(oWLFile, "url", url); reinitNecessary = true; } Modified: trunk/src/dl-learner/org/dllearner/core/configurators/PosNegDefinitionLPConfigurator.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/configurators/PosNegDefinitionLPConfigurator.java 2008-09-10 05:48:08 UTC (rev 1189) +++ trunk/src/dl-learner/org/dllearner/core/configurators/PosNegDefinitionLPConfigurator.java 2008-09-10 10:23:02 UTC (rev 1190) @@ -16,7 +16,7 @@ * 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.core.configurators; Modified: trunk/src/dl-learner/org/dllearner/core/configurators/PosNegDefinitionLPStrictConfigurator.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/configurators/PosNegDefinitionLPStrictConfigurator.java 2008-09-10 05:48:08 UTC (rev 1189) +++ trunk/src/dl-learner/org/dllearner/core/configurators/PosNegDefinitionLPStrictConfigurator.java 2008-09-10 10:23:02 UTC (rev 1190) @@ -16,7 +16,7 @@ * 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.core.configurators; Modified: trunk/src/dl-learner/org/dllearner/core/configurators/PosNegInclusionLPConfigurator.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/configurators/PosNegInclusionLPConfigurator.java 2008-09-10 05:48:08 UTC (rev 1189) +++ trunk/src/dl-learner/org/dllearner/core/configurators/PosNegInclusionLPConfigurator.java 2008-09-10 10:23:02 UTC (rev 1190) @@ -16,7 +16,7 @@ * 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.core.configurators; Modified: trunk/src/dl-learner/org/dllearner/core/configurators/PosOnlyDefinitionLPConfigurator.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/configurators/PosOnlyDefinitionLPConfigurator.java 2008-09-10 05:48:08 UTC (rev 1189) +++ trunk/src/dl-learner/org/dllearner/core/configurators/PosOnlyDefinitionLPConfigurator.java 2008-09-10 10:23:02 UTC (rev 1190) @@ -16,7 +16,7 @@ * 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.core.configurators; Modified: trunk/src/dl-learner/org/dllearner/core/configurators/PosOnlyInclusionLPConfigurator.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/configurators/PosOnlyInclusionLPConfigurator.java 2008-09-10 05:48:08 UTC (rev 1189) +++ trunk/src/dl-learner/org/dllearner/core/configurators/PosOnlyInclusionLPConfigurator.java 2008-09-10 10:23:02 UTC (rev 1190) @@ -16,7 +16,7 @@ * 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.core.configurators; Modified: trunk/src/dl-learner/org/dllearner/core/configurators/ROLearnerConfigurator.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/configurators/ROLearnerConfigurator.java 2008-09-10 05:48:08 UTC (rev 1189) +++ trunk/src/dl-learner/org/dllearner/core/configurators/ROLearnerConfigurator.java 2008-09-10 10:23:02 UTC (rev 1190) @@ -16,7 +16,7 @@ * 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.core.configurators; Modified: trunk/src/dl-learner/org/dllearner/core/configurators/RandomGuesserConfigurator.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/configurators/RandomGuesserConfigurator.java 2008-09-10 05:48:08 UTC (rev 1189) +++ trunk/src/dl-learner/org/dllearner/core/configurators/RandomGuesserConfigurator.java 2008-09-10 10:23:02 UTC (rev 1190) @@ -16,7 +16,7 @@ * 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.core.configurators; Modified: trunk/src/dl-learner/org/dllearner/core/configurators/SimpleSuggestionLearningAlgorithmConfigurator.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/configurators/SimpleSuggestionLearningAlgorithmConfigurator.java 2008-09-10 05:48:08 UTC (rev 1189) +++ trunk/src/dl-learner/org/dllearner/core/configurators/SimpleSuggestionLearningAlgorithmConfigurator.java 2008-09-10 10:23:02 UTC (rev 1190) @@ -16,7 +16,7 @@ * 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.core.configurators; Modified: trunk/src/dl-learner/org/dllearner/core/configurators/SparqlKnowledgeSourceConfigurator.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/configurators/SparqlKnowledgeSourceConfigurator.java 2008-09-10 05:48:08 UTC (rev 1189) +++ trunk/src/dl-learner/org/dllearner/core/configurators/SparqlKnowledgeSourceConfigurator.java 2008-09-10 10:23:02 UTC (rev 1190) @@ -16,7 +16,7 @@ * 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.core.configurators; Modified: trunk/src/dl-learner/org/dllearner/gui/Config.java =================================================================== --- trunk/src/dl-learner/org/dllearner/gui/Config.java 2008-09-10 05:48:08 UTC (rev 1189) +++ trunk/src/dl-learner/org/dllearner/gui/Config.java 2008-09-10 10:23:02 UTC (rev 1190) @@ -20,6 +20,15 @@ package org.dllearner.gui; +import java.awt.BorderLayout; +import java.net.URL; + +import javax.swing.ImageIcon; +import javax.swing.JFrame; +import javax.swing.JLabel; +import javax.swing.SwingWorker; + +import org.apache.log4j.Logger; import org.dllearner.core.Component; import org.dllearner.core.ComponentInitException; import org.dllearner.core.ComponentManager; @@ -33,6 +42,7 @@ import org.dllearner.core.config.ConfigOption; import org.dllearner.kb.KBFile; import org.dllearner.kb.OWLFile; +import org.dllearner.learningproblems.PosNegLP; // import org.dllearner.core.Component; @@ -47,6 +57,7 @@ public class Config { private ComponentManager cm = ComponentManager.getInstance(); + private static Logger logger = Logger.getLogger(Config.class); // the components currently active private KnowledgeSource source; @@ -108,9 +119,9 @@ * * @param knowledgeSource */ - public void setKnowledgeSource(KnowledgeSource knowledgeSource) { - source = knowledgeSource; - } +// public void setKnowledgeSource(KnowledgeSource knowledgeSource) { +// source = knowledgeSource; +// } /** * Get KnowledgeSource. @@ -128,17 +139,32 @@ */ public KnowledgeSource newKnowledgeSource(Class<? extends KnowledgeSource> clazz) { source = cm.knowledgeSource(clazz); +// logger.debug("new knowledge source " + clazz + " created"); return source; } /** + * Changes active knowledge source. This method does not not only + * create a knowledge source, but also updates the active reasoner + * to use the new knowledge source. + * @param clazz + */ + public KnowledgeSource changeKnowledgeSource(Class<? extends KnowledgeSource> clazz) { + source = cm.knowledgeSource(clazz); +// logger.debug("knowledge source " + clazz + " changed"); + // create a new reasoner object using the current class and the selected source + reasoner = cm.reasoner(reasoner.getClass(), source); + return source; + } + + /** * Set Reasoner. * * @param reasoner */ - public void setReasoner(ReasonerComponent reasoner) { - this.reasoner = reasoner; - } +// public void setReasoner(ReasonerComponent reasoner) { +// this.reasoner = reasoner; +// } /** * Get Reasoner. @@ -161,9 +187,9 @@ * * @param reasoningService */ - public void setReasoningService(ReasoningService reasoningService) { - this.rs = reasoningService; - } +// public void setReasoningService(ReasoningService reasoningService) { +// this.rs = reasoningService; +// } /** * Get ReasoningService. @@ -179,9 +205,9 @@ * * @param learningProblem */ - public void setLearningProblem(LearningProblem learningProblem) { - this.lp = learningProblem; - } +// public void setLearningProblem(LearningProblem learningProblem) { +// this.lp = learningProblem; +// } /** * Get LearningProblem. @@ -202,9 +228,9 @@ * * @param learningAlgorithm */ - public void setLearningAlgorithm(LearningAlgorithm learningAlgorithm) { - this.la = learningAlgorithm; - } +// public void setLearningAlgorithm(LearningAlgorithm learningAlgorithm) { +// this.la = learningAlgorithm; +// } /** * Get LearningAlgorithm. @@ -374,15 +400,110 @@ // init the specified component and record which ones where initialised public void init(int tabIndex) { + + // a thread class for handling inits (GUI has to remain + // responsive while init process is executed) + class InitThread extends Thread { + private Component component; + public InitThread(Component component) { + this.component = component; + } + @Override + public void run() { + gui.disableTabbedPane(); + try { + component.init(); + } catch (ComponentInitException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + gui.enableTabbedPane(); + } + } + +// final SwingWorker worker = new SwingWorker() { + class InitWorker extends SwingWorker<Boolean,Boolean> { + private Component component; + public InitWorker(Component component) { + this.component = component; + } + + @Override + protected Boolean doInBackground() throws Exception { + gui.getStatusPanel().setStatus("Initialising reasoner ... "); +// gui.getStatusPanel().repaint(); + gui.disableTabbedPane(); + gui.setEnabled(false); + JFrame waitFrame = new JFrame(); + waitFrame.setUndecorated(true); + waitFrame.setSize(200, 200); + URL imgURL = Config.class.getResource("ajaxloader.gif"); + ImageIcon waitIcon = new ImageIcon(imgURL, "wait"); +// waitFrame.add(new JLabel("Wait!"), waitIcon, SwingConstants.RIGHT); +// waitFrame.add(new JLabel("Wait")); + waitFrame.add(new JLabel(waitIcon), BorderLayout.NORTH); + waitFrame.add(new JLabel("Initialising reasoner. Please wait."), BorderLayout.SOUTH); + waitFrame.setLocationRelativeTo(gui); + waitFrame.setVisible(true); + try { + component.init(); + } catch (ComponentInitException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + gui.enableTabbedPane(); + gui.setEnabled(true); + gui.getStatusPanel().extendMessage("done."); + waitFrame.dispose(); + // TODO Auto-generated method stub +// return null; + return true; + } + }; + + try { if(tabIndex==0) { + gui.disableTabbedPane(); + gui.getStatusPanel().setStatus("Initialising knowledge source ... "); source.init(); + gui.getStatusPanel().extendMessage("done."); + gui.enableTabbedPane(); } else if(tabIndex==1) { - reasoner.init(); +// gui.disableTabbedPane(); +// gui.getStatusPanel().setStatus("Initialising reasoner ... "); +// gui.repaint(); +// Thread initThread = new InitThread(reasoner); +// initThread.run(); +// SwingWorker worker; +// try { +// SwingUtilities.invokeAndWait(initThread); +// } catch (InterruptedException e) { +// // TODO Auto-generated catch block +// e.printStackTrace(); +// } catch (InvocationTargetException e) { +// // TODO Auto-generated catch block +// e.printStackTrace(); +// } + + InitWorker worker = new InitWorker(reasoner); + worker.execute(); + +// reasoner.init(); +// gui.getStatusPanel().extendMessage("done."); +// gui.enableTabbedPane(); } else if(tabIndex==2) { + gui.disableTabbedPane(); + gui.getStatusPanel().setStatus("Initialising learning problem ... "); lp.init(); + gui.getStatusPanel().extendMessage("done."); + gui.enableTabbedPane(); } else if(tabIndex == 3) { + gui.disableTabbedPane(); + gui.getStatusPanel().setStatus("Initialising learning algorithm ... "); la.init(); + gui.getStatusPanel().extendMessage("done."); + gui.enableTabbedPane(); } } catch (ComponentInitException e) { // TODO display message in status bar @@ -395,6 +516,8 @@ // applies a configuration option - used as delegate method, which invalidates components public <T> void applyConfigEntry(Component component, ConfigEntry<T> entry) { + System.out.println("Applying " + entry + " to " + component.getClass().getName() + "."); + cm.applyConfigEntry(component, entry); // enable tabs if setting the value completed mandatory settings enableTabsIfPossible(); @@ -433,27 +556,35 @@ private void enableTabsIfPossible() { if(mandatoryOptionsSpecified(source)) { isEnabled[0] = true; - } else if(mandatoryOptionsSpecified(reasoner)) { + } + if(mandatoryOptionsSpecified(reasoner) && isEnabled[0]) { isEnabled[1] = true; - } else if(mandatoryOptionsSpecified(lp)) { + } + if(mandatoryOptionsSpecified(lp) && isEnabled[1]) { isEnabled[2] = true; - } else if(mandatoryOptionsSpecified(la)) { + } + if(mandatoryOptionsSpecified(la) && isEnabled[1] && isEnabled[2]) { isEnabled[3] = true; } } // TODO use specification of mandatory variables private boolean mandatoryOptionsSpecified(Component component) { +// System.out.println("check mandatory options for " + component.getClass().getName()); if(component instanceof OWLFile) { - if(cm.getConfigOptionValue(source, "url") != null) { - return true; + if(cm.getConfigOptionValue(source, "url") == null) { + return false; } } else if(component instanceof KBFile) { - if(cm.getConfigOptionValue(source, "url") != null | cm.getConfigOptionValue(source, "filename") != null) { - return true; + if(cm.getConfigOptionValue(source, "url") == null && cm.getConfigOptionValue(source, "filename") == null) { + return false; } + } else if(component instanceof PosNegLP) { + if(cm.getConfigOptionValue(component, "positiveExamples")==null || cm.getConfigOptionValue(component, "negativeExamples") == null) { + return false; + } } - return false; + return true; } // delegate method for getting config option values Modified: trunk/src/dl-learner/org/dllearner/gui/ConfigLoad.java =================================================================== --- trunk/src/dl-learner/org/dllearner/gui/ConfigLoad.java 2008-09-10 05:48:08 UTC (rev 1189) +++ trunk/src/dl-learner/org/dllearner/gui/ConfigLoad.java 2008-09-10 10:23:02 UTC (rev 1190) @@ -24,14 +24,14 @@ import java.net.URL; import java.util.Map; import java.util.SortedSet; + +import org.dllearner.cli.ConfFileOption; +import org.dllearner.cli.Start; +import org.dllearner.core.Component; import org.dllearner.core.ComponentInitException; import org.dllearner.core.KnowledgeSource; -import org.dllearner.core.LearningProblemUnsupportedException; import org.dllearner.learningproblems.PosOnlyDefinitionLP; import org.dllearner.parser.ConfParser; -import org.dllearner.core.Component; -import org.dllearner.cli.ConfFileOption; -import org.dllearner.cli.Start; /** * Open a config file. @@ -85,13 +85,13 @@ Map<URL, Class<? extends KnowledgeSource>> importedFiles = Start.getImportedFiles( parser, file.getParentFile().getPath()); for (Map.Entry<URL, Class<? extends KnowledgeSource>> entry : importedFiles.entrySet()) { - config.setKnowledgeSource(config.getComponentManager().knowledgeSource( - entry.getValue())); +// config.setKnowledgeSource(config.getComponentManager().knowledgeSource( +// entry.getValue())); config.getComponentManager().applyConfigEntry(config.getKnowledgeSource(), "url", entry.getKey().toString()); // sources.add(ks); // TODO more then 1 KnowledgeSource - config.setKnowledgeSource(config.getKnowledgeSource()); +// config.setKnowledgeSource(config.getKnowledgeSource()); Start.configureComponent(config.getComponentManager(), config.getKnowledgeSource(), componentPrefixMapping, parser); startGUI.updateTabs(); @@ -109,8 +109,8 @@ // REASONER ConfFileOption reasonerOption = parser.getConfOptionsByName("reasoner"); - config.setReasoner(config.getComponentManager().reasoner( - Start.getReasonerClass(reasonerOption), config.getKnowledgeSource())); +// config.setReasoner(config.getComponentManager().reasoner( +// Start.getReasonerClass(reasonerOption), config.getKnowledgeSource())); Start.configureComponent(config.getComponentManager(), config.getReasoner(), componentPrefixMapping, parser); if (config.getKnowledgeSource() != null && config.getReasoner() != null) { @@ -118,8 +118,8 @@ config.getReasoner().init(); System.out.println("init Reasoner"); // set ReasoningService - config.setReasoningService(config.getComponentManager().reasoningService( - config.getReasoner())); +// config.setReasoningService(config.getComponentManager().reasoningService( +// config.getReasoner())); System.out.println("init ReasoningService"); // config.setInitReasoner(true); startGUI.updateTabs(); @@ -130,8 +130,8 @@ // LEARNING PROBLEM ConfFileOption problemOption = parser.getConfOptionsByName("problem"); - config.setLearningProblem(config.getComponentManager().learningProblem( - Start.getLearningProblemClass(problemOption), config.getReasoningService())); +// config.setLearningProblem(config.getComponentManager().learningProblem( +// Start.getLearningProblemClass(problemOption), config.getReasoningService())); SortedSet<String> posExamples = parser.getPositiveExamples(); SortedSet<String> negExamples = parser.getNegativeExamples(); config.getComponentManager().applyConfigEntry(config.getLearningProblem(), @@ -155,13 +155,13 @@ // LEARNING ALGORITHM ConfFileOption algorithmOption = parser.getConfOptionsByName("algorithm"); if (config.getLearningProblem() != null && config.getReasoningService() != null) { - try { - config.setLearningAlgorithm(config.getComponentManager().learningAlgorithm( - Start.getLearningAlgorithm(algorithmOption), - config.getLearningProblem(), config.getReasoningService())); - } catch (LearningProblemUnsupportedException e) { - e.printStackTrace(); - } +// try { +// config.setLearningAlgorithm(config.getComponentManager().learningAlgorithm( +// Start.getLearningAlgorithm(algorithmOption), +// config.getLearningProblem(), config.getReasoningService())); +// } catch (LearningProblemUnsupportedException e) { +// e.printStackTrace(); +// } } Start.configureComponent(config.getComponentManager(), config.getLearningAlgorithm(), componentPrefixMapping, parser); Modified: trunk/src/dl-learner/org/dllearner/gui/KnowledgeSourcePanel.java =================================================================== --- trunk/src/dl-learner/org/dllearner/gui/KnowledgeSourcePanel.java 2008-09-10 05:48:08 UTC (rev 1189) +++ trunk/src/dl-learner/org/dllearner/gui/KnowledgeSourcePanel.java 2008-09-10 10:23:02 UTC (rev 1190) @@ -96,7 +96,7 @@ if (choosenClassIndex != cb.getSelectedIndex()) { choosenClassIndex = cb.getSelectedIndex(); // create a new knowledge source component - config.newKnowledgeSource(selectableSources.get(choosenClassIndex)); + config.changeKnowledgeSource(selectableSources.get(choosenClassIndex)); // updateAll(); updateOptionPanel(); @@ -106,8 +106,8 @@ } if (e.getSource() == clearButton) { - config.setKnowledgeSource(config.getComponentManager().knowledgeSource( - selectableSources.get(choosenClassIndex))); +// config.setKnowledgeSource(config.getComponentManager().knowledgeSource( +// selectableSources.get(choosenClassIndex))); updateOptionPanel(); } Modified: trunk/src/dl-learner/org/dllearner/gui/LearningAlgorithmPanel.java =================================================================== --- trunk/src/dl-learner/org/dllearner/gui/LearningAlgorithmPanel.java 2008-09-10 05:48:08 UTC (rev 1189) +++ trunk/src/dl-learner/org/dllearner/gui/LearningAlgorithmPanel.java 2008-09-10 10:23:02 UTC (rev 1190) @@ -109,8 +109,8 @@ // init(); } - if (e.getSource() == autoInitButton) - setLearningAlgorithm(); +// if (e.getSource() == autoInitButton) +// setLearningAlgorithm(); // if (e.getSource() == initButton) // init(); @@ -119,18 +119,18 @@ /** * after this, you can change widgets */ - public void setLearningAlgorithm() { - if (config.getLearningProblem() != null && config.getReasoningService() != null) { - try { - config.setLearningAlgorithm(config.getComponentManager().learningAlgorithm( - selectableAlgorithms.get(choosenClassIndex), config.getLearningProblem(), - config.getReasoningService())); - updateOptionPanel(); - } catch (LearningProblemUnsupportedException e) { - e.printStackTrace(); - } - } - } +// public void setLearningAlgorithm() { +// if (config.getLearningProblem() != null && config.getReasoningService() != null) { +// try { +// config.setLearningAlgorithm(config.getComponentManager().learningAlgorithm( +// selectableAlgorithms.get(choosenClassIndex), config.getLearningProblem(), +// config.getReasoningService())); +// updateOptionPanel(); +// } catch (LearningProblemUnsupportedException e) { +// e.printStackTrace(); +// } +// } +// } /** * after this, next tab can be used Modified: trunk/src/dl-learner/org/dllearner/gui/LearningProblemPanel.java =================================================================== --- trunk/src/dl-learner/org/dllearner/gui/LearningProblemPanel.java 2008-09-10 05:48:08 UTC (rev 1189) +++ trunk/src/dl-learner/org/dllearner/gui/LearningProblemPanel.java 2008-09-10 10:23:02 UTC (rev 1190) @@ -42,7 +42,7 @@ private static final long serialVersionUID = -3819627680918930203L; private Config config; - private StartGUI startGUI; +// private StartGUI startGUI; private List<Class<? extends LearningProblem>> lpClasses; private String[] lpBoxItems = {}; private JComboBox cb = new JComboBox(lpBoxItems); @@ -56,7 +56,7 @@ super(new BorderLayout()); this.config = config; - this.startGUI = startGUI; +// this.startGUI = startGUI; lpClasses = config.getComponentManager().getLearningProblems(); setButton = new JButton("Set"); @@ -93,8 +93,8 @@ // init(); } - if (e.getSource() == setButton) - setLearningProblem(); +// if (e.getSource() == setButton) +// setLearningProblem(); // if (e.getSource() == initButton) // init(); @@ -103,14 +103,14 @@ /** * after this, you can change widgets */ - private void setLearningProblem() { - if (config.needsInitReasoner()) { - config.setLearningProblem(config.getComponentManager().learningProblem( - lpClasses.get(choosenClassIndex), config.getReasoningService())); - startGUI.updateTabs(); - updateOptionPanel(); - } - } +// private void setLearningProblem() { +// if (config.needsInitReasoner()) { +// config.setLearningProblem(config.getComponentManager().learningProblem( +// lpClasses.get(choosenClassIndex), config.getReasoningService())); +// startGUI.updateTabs(); +// updateOptionPanel(); +// } +// } /** * after this, next tab can be used Modified: trunk/src/dl-learner/org/dllearner/gui/OptionPanel.java =================================================================== --- trunk/src/dl-learner/org/dllearner/gui/OptionPanel.java 2008-09-10 05:48:08 UTC (rev 1189) +++ trunk/src/dl-learner/org/dllearner/gui/OptionPanel.java 2008-09-10 10:23:02 UTC (rev 1190) @@ -39,6 +39,7 @@ import org.dllearner.gui.widgets.WidgetPanelString; import org.dllearner.gui.widgets.WidgetPanelStringSet; import org.dllearner.gui.widgets.WidgetPanelStringTupleList; +import org.dllearner.gui.widgets.WidgetPanelURL; /** * OptionPanel reads all possible options and use all widgets. Definition map is @@ -107,6 +108,8 @@ widgetPanel = new WidgetPanelDouble(config, component, (DoubleConfigOption) option); } else if (option instanceof StringConfigOption) { widgetPanel = new WidgetPanelString(config, component, (StringConfigOption) option); + } else if (option instanceof URLConfigOption) { + widgetPanel = new WidgetPanelURL(config, component, (URLConfigOption) option); } else if (option instanceof StringSetConfigOption) { widgetPanel = new WidgetPanelStringSet(config, component, (StringSetConfigOption) option); } else if (option instanceof StringTupleListConfigOption) { Modified: trunk/src/dl-learner/org/dllearner/gui/ReasonerPanel.java =================================================================== --- trunk/src/dl-learner/org/dllearner/gui/ReasonerPanel.java 2008-09-10 05:48:08 UTC (rev 1189) +++ trunk/src/dl-learner/org/dllearner/gui/ReasonerPanel.java 2008-09-10 10:23:02 UTC (rev 1190) @@ -89,7 +89,7 @@ add(initPanel, BorderLayout.PAGE_END); choosenClassIndex = cb.getSelectedIndex(); - setReasoner(); +// setReasoner(); updateInitButtonColor(); } @@ -102,10 +102,10 @@ // init(); } - if (e.getSource() == setButton) { -// config.setInitReasoner(false); - setReasoner(); - } +// if (e.getSource() == setButton) { +//// config.setInitReasoner(false); +// setReasoner(); +// } // if (e.getSource() == initButton) // init(); @@ -114,16 +114,16 @@ /** * after this, you can change widgets */ - public void setReasoner() { - if (config.needsInitKnowledgeSource()) { - config.setReasoner(config.getComponentManager().reasoner( - reasoner.get(choosenClassIndex), config.getKnowledgeSource())); - updateOptionPanel(); -// startGUI.updateTabColors(); -// config.setInitReasoner(false); -// updateInitButtonColor(); - } - } +// public void setReasoner() { +// if (config.needsInitKnowledgeSource()) { +// config.setReasoner(config.getComponentManager().reasoner( +// reasoner.get(choosenClassIndex), config.getKnowledgeSource())); +// updateOptionPanel(); +//// startGUI.updateTabColors(); +//// config.setInitReasoner(false); +//// updateInitButtonColor(); +// } +// } /** * after this, next tab can be used Modified: trunk/src/dl-learner/org/dllearner/gui/StartGUI.java =================================================================== --- trunk/src/dl-learner/org/dllearner/gui/StartGUI.java 2008-09-10 05:48:08 UTC (rev 1189) +++ trunk/src/dl-learner/org/dllearner/gui/StartGUI.java 2008-09-10 10:23:02 UTC (rev 1190) @@ -136,7 +136,9 @@ // check whether we need to initialise components if (index != 0 && config.tabNeedsInit(index - 1)) { for (int i = 0; i < index; i++) { - config.init(i); + if(config.tabNeedsInit(i)) { + config.init(i); + } } } @@ -171,7 +173,7 @@ Logger logger = Logger.getRootLogger(); logger.removeAllAppenders(); logger.addAppender(consoleAppender); - logger.setLevel(Level.INFO); + logger.setLevel(Level.DEBUG); File file = null; if (args.length > 0) @@ -301,7 +303,23 @@ } + // freeze tab + public void disableTabbedPane() { + tabPane.setEnabled(false); + } + + public void enableTabbedPane() { + tabPane.setEnabled(true); + } + public void setStatusMessage(String message) { statusPanel.setStatus(message); } + + /** + * @return the statusPanel + */ + public StatusPanel getStatusPanel() { + return statusPanel; + } } Modified: trunk/src/dl-learner/org/dllearner/gui/StatusPanel.java =================================================================== --- trunk/src/dl-learner/org/dllearner/gui/StatusPanel.java 2008-09-10 05:48:08 UTC (rev 1189) +++ trunk/src/dl-learner/org/dllearner/gui/StatusPanel.java 2008-09-10 10:23:02 UTC (rev 1190) @@ -36,17 +36,36 @@ private JLabel statusLabel = new JLabel(tabInitText); + private String message = tabInitText; + + private String oldMessage; + public StatusPanel() { super(); add(statusLabel); } - public void setStatus(String message) { + private void updateMessage(String message) { + oldMessage = this.message; + this.message = message; statusLabel.setText(message); +// repaint(); } + public void setStatus(String message) { + updateMessage(message); + } + public void setTabInitMessage() { - statusLabel.setText(tabInitText); +// updateMessage(tabInitText); } + public void extendMessage(String addition) { + message += addition; + statusLabel.setText(message); + } + + public void revertToPreviousMessage() { + updateMessage(oldMessage); + } } Modified: trunk/src/dl-learner/org/dllearner/gui/widgets/WidgetPanelString.java =================================================================== --- trunk/src/dl-learner/org/dllearner/gui/widgets/WidgetPanelString.java 2008-09-10 05:48:08 UTC (rev 1189) +++ trunk/src/dl-learner/org/dllearner/gui/widgets/WidgetPanelString.java 2008-09-10 10:23:02 UTC (rev 1190) @@ -56,7 +56,7 @@ public void actionPerformed(ActionEvent e) { if (e.getSource() == setButton) { - if (configOption.getName().equals("filename")) { + if (configOption.getName().equals("filename") || configOption.getName().equals("url")) { JFileChooser fc; if(component instanceof OWLFile) { fc = new ExampleFileChooser("owl"); Modified: trunk/src/dl-learner/org/dllearner/kb/KBFile.java =================================================================== --- trunk/src/dl-learner/org/dllearner/kb/KBFile.java 2008-09-10 05:48:08 UTC (rev 1189) +++ trunk/src/dl-learner/org/dllearner/kb/KBFile.java 2008-09-10 10:23:02 UTC (rev 1190) @@ -34,6 +34,7 @@ import org.dllearner.core.config.ConfigOption; import org.dllearner.core.config.InvalidConfigOptionValueException; import org.dllearner.core.config.StringConfigOption; +import org.dllearner.core.config.URLConfigOption; import org.dllearner.core.configurators.KBFileConfigurator; import org.dllearner.core.owl.KB; import org.dllearner.parser.KBParser; @@ -98,7 +99,7 @@ public static Collection<ConfigOption<?>> createConfigOptions() { Collection<ConfigOption<?>> options = new LinkedList<ConfigOption<?>>(); options.add(new StringConfigOption("filename", "pointer to the KB file on local file system",null, true, true)); - options.add(new StringConfigOption("url", "URL pointer to the KB file",null, false, true)); + options.add(new URLConfigOption("url", "URL pointer to the KB file",null, false, true)); return options; } @@ -118,7 +119,7 @@ //URL url = null; try { String filename = configurator.getFilename(); - String urlString = configurator.getUrl(); + String urlString = configurator.getUrl().toString(); if(filename!=null){ url = new File(filename).toURI().toURL(); }else if(urlString!=null){ Modified: trunk/src/dl-learner/org/dllearner/kb/OWLFile.java =================================================================== --- trunk/src/dl-learner/org/dllearner/kb/OWLFile.java 2008-09-10 05:48:08 UTC (rev 1189) +++ trunk/src/dl-learner/org/dllearner/kb/OWLFile.java 2008-09-10 10:23:02 UTC (rev 1190) @@ -20,20 +20,20 @@ package org.dllearner.kb; import java.io.File; -import java.net.MalformedURLException; import java.net.URI; import java.net.URL; import java.util.Collection; import java.util.LinkedList; import org.apache.log4j.Logger; +import org.dllearner.core.ComponentInitException; import org.dllearner.core.KnowledgeSource; import org.dllearner.core.OntologyFormat; import org.dllearner.core.OntologyFormatUnsupportedException; 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.config.URLConfigOption; import org.dllearner.core.configurators.OWLFileConfigurator; import org.dllearner.core.owl.KB; import org.dllearner.reasoning.OWLAPIDIGConverter; @@ -47,7 +47,7 @@ private static Logger logger = Logger .getLogger(OWLFile.class); - private URL url; +// private URL url; private OWLFileConfigurator configurator ; @Override public OWLFileConfigurator getConfigurator(){ @@ -65,7 +65,7 @@ public static Collection<ConfigOption<?>> createConfigOptions() { Collection<ConfigOption<?>> options = new LinkedList<ConfigOption<?>>(); - options.add(new StringConfigOption("url", "URL pointing to the OWL file", null, true, true)); + options.add(new URLConfigOption("url", "URL pointing to the OWL file", null, true, true)); return options; } @@ -81,16 +81,20 @@ * @see org.dllearner.core.Component#init() */ @Override - public void init() { + public void init() throws ComponentInitException { + if(configurator.getUrl() == null) { + logger.error("Cannot initialise OWL file with empty URL"); + } + /* try { url = new URL(configurator.getUrl()); } catch (MalformedURLException e) { logger.error(e.getMessage()); //throw new InvalidConfigOptionValueException(entry.getOption(), entry.getValue(),"malformed URL " + configurator.getUrl()); } + */ - } /* @@ -101,14 +105,15 @@ @Override public String toDIG(URI kbURI) { // TODO: need some handling for cases where the URL was not set - return OWLAPIDIGConverter.getTellsString(url, OntologyFormat.RDF_XML, kbURI); + return OWLAPIDIGConverter.getTellsString(configurator.getUrl(), OntologyFormat.RDF_XML, kbURI); } public URL getURL() { - return url; + return configurator.getUrl(); } public void setURL(URL url) { - this.url = url; +// this.url = url; + configurator.setUrl(url); } /* (non-Javadoc) Modified: trunk/src/dl-learner/org/dllearner/scripts/NewSample.java =================================================================== --- trunk/src/dl-learner/org/dllearner/scripts/NewSample.java 2008-09-10 05:48:08 UTC (rev 1189) +++ trunk/src/dl-learner/org/dllearner/scripts/NewSample.java 2008-09-10 10:23:02 UTC (rev 1190) @@ -19,6 +19,8 @@ import java.io.File; import java.io.IOException; +import java.net.MalformedURLException; +import java.net.URL; import java.text.DecimalFormat; import java.util.HashSet; import java.util.List; @@ -119,7 +121,13 @@ // knowledge source //KnowledgeSource ks = cm.knowledgeSource(OWLFile.class); - String fileURL = new File(owlFile).toURI().toString(); + URL fileURL = null; + try { + fileURL = new File(owlFile).toURI().toURL(); + } catch (MalformedURLException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } OWLFile ks = ComponentFactory.getOWLFile( fileURL); Set<KnowledgeSource> tmp = new HashSet<KnowledgeSource>(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jen...@us...> - 2008-09-15 17:28:36
|
Revision: 1214 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=1214&view=rev Author: jenslehmann Date: 2008-09-15 17:28:02 +0000 (Mon, 15 Sep 2008) Log Message: ----------- - fixed and improved search tree display - fixed some conf files according to unit test Modified Paths: -------------- trunk/examples/arch/arch_owl.conf trunk/examples/conflict/arch_refexamples_owlAPI.conf trunk/examples/conflict/test_ZERO_ONE_refexamples_owlAPI.conf trunk/examples/cross-benchmark/arch/arch_gp.conf trunk/examples/cross-benchmark/arch/arch_hybrid.conf trunk/examples/cross-benchmark/arch/arch_refexamples.conf trunk/examples/cross-benchmark/forte/uncle_gp.conf trunk/examples/cross-benchmark/forte/uncle_hybrid.conf trunk/examples/cross-benchmark/forte/uncle_refexamples.conf trunk/examples/cross-benchmark/moral_reasoner/moral_43examples_complex_gp.conf trunk/examples/cross-benchmark/moral_reasoner/moral_43examples_complex_hybrid.conf trunk/examples/cross-benchmark/moral_reasoner/moral_43examples_complex_refexamples.conf trunk/examples/cross-benchmark/moral_reasoner/moral_43examples_simple_gp.conf trunk/examples/cross-benchmark/moral_reasoner/moral_43examples_simple_hybrid.conf trunk/examples/cross-benchmark/moral_reasoner/moral_43examples_simple_refexamples.conf trunk/examples/cross-benchmark/poker/pair_gp.conf trunk/examples/cross-benchmark/poker/pair_hybrid.conf trunk/examples/cross-benchmark/poker/pair_refexamples.conf trunk/examples/cross-benchmark/poker/straight_gp.conf trunk/examples/cross-benchmark/poker/straight_hybrid.conf trunk/examples/cross-benchmark/poker/straight_refexamples.conf trunk/examples/cross-benchmark/trains/trains_gp.conf trunk/examples/cross-benchmark/trains/trains_hybrid.conf trunk/examples/cross-benchmark/trains/trains_refexamples.conf trunk/examples/family/father_posonly.conf trunk/examples/krk/complete_no_draw.conf trunk/examples/semantic_bible/normal.conf trunk/examples/semantic_bible/normal_retrieval_special.conf trunk/examples/semantic_bible/sparqlbible.conf trunk/examples/semantic_bible/woman.conf trunk/examples/sparql/govtrack.conf trunk/examples/sparql/musicbrainz.conf trunk/examples/sparql/roles_notworking/Roles_fixed_DBPedia_monarch_range_yago.conf trunk/src/dl-learner/org/dllearner/algorithms/refexamples/ExampleBasedNode.java trunk/src/dl-learner/org/dllearner/gui/EBNodeTreeModel.java trunk/src/dl-learner/org/dllearner/gui/RunPanel.java trunk/src/dl-learner/org/dllearner/gui/StartGUI.java trunk/src/dl-learner/org/dllearner/gui/TreeWindow.java trunk/src/dl-learner/org/dllearner/test/junit/ExampleTests.java Added Paths: ----------- trunk/src/dl-learner/org/dllearner/gui/SearchTree.java Modified: trunk/examples/arch/arch_owl.conf =================================================================== --- trunk/examples/arch/arch_owl.conf 2008-09-15 13:30:02 UTC (rev 1213) +++ trunk/examples/arch/arch_owl.conf 2008-09-15 17:28:02 UTC (rev 1214) @@ -16,8 +16,9 @@ * Copyright (C) 2007, Sebastian Hellmann */ +refexamples.writeSearchTree = true; +refexamples.searchTreeFile = "log/test.txt"; - /** background knowledge **/ import("arch.owl"); Modified: trunk/examples/conflict/arch_refexamples_owlAPI.conf =================================================================== --- trunk/examples/conflict/arch_refexamples_owlAPI.conf 2008-09-15 13:30:02 UTC (rev 1213) +++ trunk/examples/conflict/arch_refexamples_owlAPI.conf 2008-09-15 17:28:02 UTC (rev 1214) @@ -17,7 +17,7 @@ */ algorithm = refexamples; -reasoner=owlAPI; +reasoner=owlAPIReasoner; Modified: trunk/examples/conflict/test_ZERO_ONE_refexamples_owlAPI.conf =================================================================== --- trunk/examples/conflict/test_ZERO_ONE_refexamples_owlAPI.conf 2008-09-15 13:30:02 UTC (rev 1213) +++ trunk/examples/conflict/test_ZERO_ONE_refexamples_owlAPI.conf 2008-09-15 17:28:02 UTC (rev 1214) @@ -11,7 +11,7 @@ algorithm = refexamples; -reasoner=owlAPI; +reasoner=owlAPIReasoner; refexamples.useAllConstructor = false; Modified: trunk/examples/cross-benchmark/arch/arch_gp.conf =================================================================== --- trunk/examples/cross-benchmark/arch/arch_gp.conf 2008-09-15 13:30:02 UTC (rev 1213) +++ trunk/examples/cross-benchmark/arch/arch_gp.conf 2008-09-15 17:28:02 UTC (rev 1214) @@ -10,7 +10,7 @@ gp.hillClimbingProbability = 0; posNegDefinitionLP.percentPerLenghtUnit = 0.02; gp.maxConceptLength = 30; -reasoner = owlAPI; +reasoner = owlAPIReasoner; import("arch.owl"); Modified: trunk/examples/cross-benchmark/arch/arch_hybrid.conf =================================================================== --- trunk/examples/cross-benchmark/arch/arch_hybrid.conf 2008-09-15 13:30:02 UTC (rev 1213) +++ trunk/examples/cross-benchmark/arch/arch_hybrid.conf 2008-09-15 17:28:02 UTC (rev 1214) @@ -10,7 +10,7 @@ gp.hillClimbingProbability = 0; posNegDefinitionLP.percentPerLenghtUnit = 0.02; gp.maxConceptLength = 30; -reasoner = owlAPI; +reasoner = owlAPIReasoner; import("arch.owl"); Modified: trunk/examples/cross-benchmark/arch/arch_refexamples.conf =================================================================== --- trunk/examples/cross-benchmark/arch/arch_refexamples.conf 2008-09-15 13:30:02 UTC (rev 1213) +++ trunk/examples/cross-benchmark/arch/arch_refexamples.conf 2008-09-15 17:28:02 UTC (rev 1214) @@ -1,5 +1,5 @@ algorithm = refexamples; -reasoner = owlAPI; +reasoner = owlAPIReasoner; import("arch.owl"); +c1 Modified: trunk/examples/cross-benchmark/forte/uncle_gp.conf =================================================================== --- trunk/examples/cross-benchmark/forte/uncle_gp.conf 2008-09-15 13:30:02 UTC (rev 1213) +++ trunk/examples/cross-benchmark/forte/uncle_gp.conf 2008-09-15 17:28:02 UTC (rev 1214) @@ -27,7 +27,7 @@ gp.hillClimbingProbability = 0; posNegDefinitionLP.percentPerLenghtUnit = 0.02; gp.maxConceptLength = 30; -reasoner = owlAPI; +reasoner = owlAPIReasoner; import("forte_family.owl"); /** examples **/ Modified: trunk/examples/cross-benchmark/forte/uncle_hybrid.conf =================================================================== --- trunk/examples/cross-benchmark/forte/uncle_hybrid.conf 2008-09-15 13:30:02 UTC (rev 1213) +++ trunk/examples/cross-benchmark/forte/uncle_hybrid.conf 2008-09-15 17:28:02 UTC (rev 1214) @@ -28,7 +28,7 @@ gp.hillClimbingProbability = 0; posNegDefinitionLP.percentPerLenghtUnit = 0.02; gp.maxConceptLength = 30; -reasoner = owlAPI; +reasoner = owlAPIReasoner; import("forte_family.owl"); /** examples **/ Modified: trunk/examples/cross-benchmark/forte/uncle_refexamples.conf =================================================================== --- trunk/examples/cross-benchmark/forte/uncle_refexamples.conf 2008-09-15 13:30:02 UTC (rev 1213) +++ trunk/examples/cross-benchmark/forte/uncle_refexamples.conf 2008-09-15 17:28:02 UTC (rev 1214) @@ -18,7 +18,7 @@ algorithm = refexamples; refexamples.useCardinalityRestrictions = false; -reasoner = owlAPI; +reasoner = owlAPIReasoner; import("forte_family.owl"); /** examples **/ Modified: trunk/examples/cross-benchmark/moral_reasoner/moral_43examples_complex_gp.conf =================================================================== --- trunk/examples/cross-benchmark/moral_reasoner/moral_43examples_complex_gp.conf 2008-09-15 13:30:02 UTC (rev 1213) +++ trunk/examples/cross-benchmark/moral_reasoner/moral_43examples_complex_gp.conf 2008-09-15 17:28:02 UTC (rev 1214) @@ -20,7 +20,7 @@ gp.hillClimbingProbability = 0; posNegDefinitionLP.percentPerLenghtUnit = 0.02; gp.maxConceptLength = 30; -reasoner = owlAPI; +reasoner = owlAPIReasoner; /** background knowledge **/ import("moral_43instances_complex.owl"); Modified: trunk/examples/cross-benchmark/moral_reasoner/moral_43examples_complex_hybrid.conf =================================================================== --- trunk/examples/cross-benchmark/moral_reasoner/moral_43examples_complex_hybrid.conf 2008-09-15 13:30:02 UTC (rev 1213) +++ trunk/examples/cross-benchmark/moral_reasoner/moral_43examples_complex_hybrid.conf 2008-09-15 17:28:02 UTC (rev 1214) @@ -20,7 +20,7 @@ gp.hillClimbingProbability = 0; posNegDefinitionLP.percentPerLenghtUnit = 0.02; gp.maxConceptLength = 30; -reasoner = owlAPI; +reasoner = owlAPIReasoner; /** background knowledge **/ import("moral_43instances_complex.owl"); Modified: trunk/examples/cross-benchmark/moral_reasoner/moral_43examples_complex_refexamples.conf =================================================================== --- trunk/examples/cross-benchmark/moral_reasoner/moral_43examples_complex_refexamples.conf 2008-09-15 13:30:02 UTC (rev 1213) +++ trunk/examples/cross-benchmark/moral_reasoner/moral_43examples_complex_refexamples.conf 2008-09-15 17:28:02 UTC (rev 1214) @@ -10,7 +10,7 @@ ***********************/ algorithm = refexamples; refexamples.useCardinalityRestrictions = false; -reasoner = owlAPI; +reasoner = owlAPIReasoner; /** background knowledge **/ import("moral_43instances_complex.owl"); Modified: trunk/examples/cross-benchmark/moral_reasoner/moral_43examples_simple_gp.conf =================================================================== --- trunk/examples/cross-benchmark/moral_reasoner/moral_43examples_simple_gp.conf 2008-09-15 13:30:02 UTC (rev 1213) +++ trunk/examples/cross-benchmark/moral_reasoner/moral_43examples_simple_gp.conf 2008-09-15 17:28:02 UTC (rev 1214) @@ -21,7 +21,7 @@ gp.hillClimbingProbability = 0; posNegDefinitionLP.percentPerLenghtUnit = 0.02; gp.maxConceptLength = 30; -reasoner = owlAPI; +reasoner = owlAPIReasoner; /** background knowledge **/ import("moral_43instances.owl"); Modified: trunk/examples/cross-benchmark/moral_reasoner/moral_43examples_simple_hybrid.conf =================================================================== --- trunk/examples/cross-benchmark/moral_reasoner/moral_43examples_simple_hybrid.conf 2008-09-15 13:30:02 UTC (rev 1213) +++ trunk/examples/cross-benchmark/moral_reasoner/moral_43examples_simple_hybrid.conf 2008-09-15 17:28:02 UTC (rev 1214) @@ -20,7 +20,7 @@ gp.hillClimbingProbability = 0; posNegDefinitionLP.percentPerLenghtUnit = 0.02; gp.maxConceptLength = 30; -reasoner = owlAPI; +reasoner = owlAPIReasoner; /** background knowledge **/ import("moral_43instances.owl"); Modified: trunk/examples/cross-benchmark/moral_reasoner/moral_43examples_simple_refexamples.conf =================================================================== --- trunk/examples/cross-benchmark/moral_reasoner/moral_43examples_simple_refexamples.conf 2008-09-15 13:30:02 UTC (rev 1213) +++ trunk/examples/cross-benchmark/moral_reasoner/moral_43examples_simple_refexamples.conf 2008-09-15 17:28:02 UTC (rev 1214) @@ -10,7 +10,7 @@ ***********************/ algorithm = refexamples; refexamples.useCardinalityRestrictions = false; -reasoner = owlAPI; +reasoner = owlAPIReasoner; /** background knowledge **/ import("moral_43instances.owl"); Modified: trunk/examples/cross-benchmark/poker/pair_gp.conf =================================================================== --- trunk/examples/cross-benchmark/poker/pair_gp.conf 2008-09-15 13:30:02 UTC (rev 1213) +++ trunk/examples/cross-benchmark/poker/pair_gp.conf 2008-09-15 17:28:02 UTC (rev 1214) @@ -17,7 +17,7 @@ gp.hillClimbingProbability = 0; posNegDefinitionLP.percentPerLenghtUnit = 0.02; gp.maxConceptLength = 30; -reasoner = owlAPI; +reasoner = owlAPIReasoner; /*Background knowledge*/ import("pair50.owl"); Modified: trunk/examples/cross-benchmark/poker/pair_hybrid.conf =================================================================== --- trunk/examples/cross-benchmark/poker/pair_hybrid.conf 2008-09-15 13:30:02 UTC (rev 1213) +++ trunk/examples/cross-benchmark/poker/pair_hybrid.conf 2008-09-15 17:28:02 UTC (rev 1214) @@ -17,7 +17,7 @@ gp.hillClimbingProbability = 0; posNegDefinitionLP.percentPerLenghtUnit = 0.02; gp.maxConceptLength = 30; -reasoner = owlAPI; +reasoner = owlAPIReasoner; /*Background knowledge*/ import("pair50.owl"); Modified: trunk/examples/cross-benchmark/poker/pair_refexamples.conf =================================================================== --- trunk/examples/cross-benchmark/poker/pair_refexamples.conf 2008-09-15 13:30:02 UTC (rev 1213) +++ trunk/examples/cross-benchmark/poker/pair_refexamples.conf 2008-09-15 17:28:02 UTC (rev 1214) @@ -6,7 +6,7 @@ */ algorithm = refexamples; refexamples.useCardinalityRestrictions = false; -reasoner = owlAPI; +reasoner = owlAPIReasoner; /*Background knowledge*/ import("pair50.owl"); Modified: trunk/examples/cross-benchmark/poker/straight_gp.conf =================================================================== --- trunk/examples/cross-benchmark/poker/straight_gp.conf 2008-09-15 13:30:02 UTC (rev 1213) +++ trunk/examples/cross-benchmark/poker/straight_gp.conf 2008-09-15 17:28:02 UTC (rev 1214) @@ -18,7 +18,7 @@ gp.hillClimbingProbability = 0; posNegDefinitionLP.percentPerLenghtUnit = 0.02; gp.maxConceptLength = 30; -reasoner = owlAPI; +reasoner = owlAPIReasoner; import("straight.owl"); /*Examples*/ Modified: trunk/examples/cross-benchmark/poker/straight_hybrid.conf =================================================================== --- trunk/examples/cross-benchmark/poker/straight_hybrid.conf 2008-09-15 13:30:02 UTC (rev 1213) +++ trunk/examples/cross-benchmark/poker/straight_hybrid.conf 2008-09-15 17:28:02 UTC (rev 1214) @@ -18,7 +18,7 @@ gp.hillClimbingProbability = 0; posNegDefinitionLP.percentPerLenghtUnit = 0.02; gp.maxConceptLength = 30; -reasoner = owlAPI; +reasoner = owlAPIReasoner; import("straight.owl"); /*Examples*/ Modified: trunk/examples/cross-benchmark/poker/straight_refexamples.conf =================================================================== --- trunk/examples/cross-benchmark/poker/straight_refexamples.conf 2008-09-15 13:30:02 UTC (rev 1213) +++ trunk/examples/cross-benchmark/poker/straight_refexamples.conf 2008-09-15 17:28:02 UTC (rev 1214) @@ -8,7 +8,7 @@ /*Background knowledge*/ algorithm = refexamples; refexamples.useCardinalityRestrictions = false; -reasoner = owlAPI; +reasoner = owlAPIReasoner; import("straight.owl"); /*Examples*/ Modified: trunk/examples/cross-benchmark/trains/trains_gp.conf =================================================================== --- trunk/examples/cross-benchmark/trains/trains_gp.conf 2008-09-15 13:30:02 UTC (rev 1213) +++ trunk/examples/cross-benchmark/trains/trains_gp.conf 2008-09-15 17:28:02 UTC (rev 1214) @@ -17,7 +17,7 @@ gp.hillClimbingProbability = 0; posNegDefinitionLP.percentPerLenghtUnit = 0.02; gp.maxConceptLength = 30; -reasoner = owlAPI; +reasoner = owlAPIReasoner; hidePrefix = "http://example.com/foo#"; Modified: trunk/examples/cross-benchmark/trains/trains_hybrid.conf =================================================================== --- trunk/examples/cross-benchmark/trains/trains_hybrid.conf 2008-09-15 13:30:02 UTC (rev 1213) +++ trunk/examples/cross-benchmark/trains/trains_hybrid.conf 2008-09-15 17:28:02 UTC (rev 1214) @@ -17,7 +17,7 @@ gp.hillClimbingProbability = 0; posNegDefinitionLP.percentPerLenghtUnit = 0.02; gp.maxConceptLength = 30; -reasoner = owlAPI; +reasoner = owlAPIReasoner; hidePrefix = "http://example.com/foo#"; /*Background knowledge*/ Modified: trunk/examples/cross-benchmark/trains/trains_refexamples.conf =================================================================== --- trunk/examples/cross-benchmark/trains/trains_refexamples.conf 2008-09-15 13:30:02 UTC (rev 1213) +++ trunk/examples/cross-benchmark/trains/trains_refexamples.conf 2008-09-15 17:28:02 UTC (rev 1214) @@ -7,7 +7,7 @@ algorithm = refexamples; refexamples.useCardinalityRestrictions = false; -reasoner = owlAPI; +reasoner = owlAPIReasoner; hidePrefix = "http://example.com/foo#"; /*Background knowledge*/ Modified: trunk/examples/family/father_posonly.conf =================================================================== --- trunk/examples/family/father_posonly.conf 2008-09-15 13:30:02 UTC (rev 1213) +++ trunk/examples/family/father_posonly.conf 2008-09-15 17:28:02 UTC (rev 1214) @@ -13,7 +13,7 @@ import("father.kb"); problem = posOnlyDefinitionLP; -reasoner = owlAPI; +reasoner = owlAPIReasoner; algorithm = refexamples; refexamples.usePropernessChecks = true; refexamples.maxPosOnlyExpansion = 4; Modified: trunk/examples/krk/complete_no_draw.conf =================================================================== --- trunk/examples/krk/complete_no_draw.conf 2008-09-15 13:30:02 UTC (rev 1213) +++ trunk/examples/krk/complete_no_draw.conf 2008-09-15 17:28:02 UTC (rev 1214) @@ -23,7 +23,7 @@ algorithm = refexamples; reasoner=fastInstanceChecker; -//reasoner=owlAPI; +//reasoner=owlAPIReasoner; //fastInstanceChecker.reasonerType = fact; refexamples.useAllConstructor = false; Modified: trunk/examples/semantic_bible/normal.conf =================================================================== --- trunk/examples/semantic_bible/normal.conf 2008-09-15 13:30:02 UTC (rev 1213) +++ trunk/examples/semantic_bible/normal.conf 2008-09-15 17:28:02 UTC (rev 1214) @@ -16,7 +16,7 @@ //refexamples.ignoredConcepts = {"http://semanticbible.org/ns/2006/NTNames#God"}; //reasoner = fastInstanceChecker; -reasoner = owlAPI; +reasoner = owlAPIReasoner; owlAPIReasoner.reasonerType = pellet; /** examples **/ Modified: trunk/examples/semantic_bible/normal_retrieval_special.conf =================================================================== --- trunk/examples/semantic_bible/normal_retrieval_special.conf 2008-09-15 13:30:02 UTC (rev 1213) +++ trunk/examples/semantic_bible/normal_retrieval_special.conf 2008-09-15 17:28:02 UTC (rev 1214) @@ -16,7 +16,7 @@ //refexamples.ignoredConcepts = {"http://semanticbible.org/ns/2006/NTNames#God"}; //reasoner = fastInstanceChecker; -reasoner = owlAPI; +reasoner = owlAPIReasoner; owlAPIReasoner.reasonerType = pellet; problem = posNegDefinitionLP; Modified: trunk/examples/semantic_bible/sparqlbible.conf =================================================================== --- trunk/examples/semantic_bible/sparqlbible.conf 2008-09-15 13:30:02 UTC (rev 1213) +++ trunk/examples/semantic_bible/sparqlbible.conf 2008-09-15 17:28:02 UTC (rev 1214) @@ -16,7 +16,7 @@ //refexamples.ignoredConcepts = {"http://semanticbible.org/ns/2006/NTNames#God"}; //reasoner = fastInstanceChecker; -reasoner = owlAPI; +reasoner = owlAPIReasoner; owlAPIReasoner.reasonerType = pellet; /** examples **/ Modified: trunk/examples/semantic_bible/woman.conf =================================================================== --- trunk/examples/semantic_bible/woman.conf 2008-09-15 13:30:02 UTC (rev 1213) +++ trunk/examples/semantic_bible/woman.conf 2008-09-15 17:28:02 UTC (rev 1214) @@ -14,7 +14,7 @@ //refexamples.ignoredConcepts = {"http://semanticbible.org/ns/2006/NTNames#God"}; reasoner = fastInstanceChecker; -//reasoner = owlAPI; +//reasoner = owlAPIReasoner; //owlAPIReasoner.reasonerType = pellet; /** examples **/ Modified: trunk/examples/sparql/govtrack.conf =================================================================== --- trunk/examples/sparql/govtrack.conf 2008-09-15 13:30:02 UTC (rev 1213) +++ trunk/examples/sparql/govtrack.conf 2008-09-15 17:28:02 UTC (rev 1214) @@ -4,7 +4,7 @@ sparql.useLits = true; algorithm = refexamples; -reasoner = owlAPI; +reasoner = owlAPIReasoner; // reasoner = fastInstanceChecker; import("http://www.govtrack.us/sparql","SPARQL"); Modified: trunk/examples/sparql/musicbrainz.conf =================================================================== --- trunk/examples/sparql/musicbrainz.conf 2008-09-15 13:30:02 UTC (rev 1213) +++ trunk/examples/sparql/musicbrainz.conf 2008-09-15 17:28:02 UTC (rev 1214) @@ -13,7 +13,7 @@ sparql.useLits=true; algorithm = refexamples; -//reasoner = owlAPI; +//reasoner = owlAPIReasoner; reasoner = fastInstanceChecker; Modified: trunk/examples/sparql/roles_notworking/Roles_fixed_DBPedia_monarch_range_yago.conf =================================================================== --- trunk/examples/sparql/roles_notworking/Roles_fixed_DBPedia_monarch_range_yago.conf 2008-09-15 13:30:02 UTC (rev 1213) +++ trunk/examples/sparql/roles_notworking/Roles_fixed_DBPedia_monarch_range_yago.conf 2008-09-15 17:28:02 UTC (rev 1214) @@ -18,7 +18,7 @@ sparql2.predefinedFilter=1; // use DBpedia endpoint -import("http://dbpedia.openlinksw.com:8890/sparql","SPARQL2"); +import("http://dbpedia.openlinksw.com:8890/sparql","SPARQL"); //***********ROLE SPECIFIC Modified: trunk/src/dl-learner/org/dllearner/algorithms/refexamples/ExampleBasedNode.java =================================================================== --- trunk/src/dl-learner/org/dllearner/algorithms/refexamples/ExampleBasedNode.java 2008-09-15 13:30:02 UTC (rev 1213) +++ trunk/src/dl-learner/org/dllearner/algorithms/refexamples/ExampleBasedNode.java 2008-09-15 17:28:02 UTC (rev 1214) @@ -178,6 +178,29 @@ return ret; } + public String getShortDescriptionHTML(int nrOfPositiveExamples, int nrOfNegativeExamples, String baseURI) { + String ret = "<html> " + concept.toString(baseURI,null) + " <i>["; + + if(isTooWeak) + ret += "q:tw"; + else { + double accuracy = 100 * (coveredPositives.size() + nrOfNegativeExamples - coveredNegatives.size())/(double)(nrOfPositiveExamples+nrOfNegativeExamples); + ret += "<b>acc: " + df.format(accuracy) + "% </b>"; + + // 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 + "</i></html>"; + } + //TODO integrate this method with the one above public String getStats(int nrOfPositiveExamples, int nrOfNegativeExamples) { String ret = " ["; Modified: trunk/src/dl-learner/org/dllearner/gui/EBNodeTreeModel.java =================================================================== --- trunk/src/dl-learner/org/dllearner/gui/EBNodeTreeModel.java 2008-09-15 13:30:02 UTC (rev 1213) +++ trunk/src/dl-learner/org/dllearner/gui/EBNodeTreeModel.java 2008-09-15 17:28:02 UTC (rev 1214) @@ -22,6 +22,7 @@ import java.util.LinkedList; import java.util.List; import java.util.Map; +import java.util.SortedSet; import java.util.TreeMap; import javax.swing.event.TreeModelEvent; @@ -92,6 +93,7 @@ } + @SuppressWarnings("unused") private void fireTreeStructureChanged(ExampleBasedNode node) { TreeModelEvent e = new TreeModelEvent(this, new Object[] {node}); @@ -102,13 +104,25 @@ // convert the set of children to a list and store it in this model private List<ExampleBasedNode> getChildren(ExampleBasedNode node) { +// System.out.println("asking for children of " + node); + List<ExampleBasedNode> children = childrenMap.get(node); // if the children have not been cached or the list is outdated // (node has more children now) we do an update if(children == null || children.size() != node.getChildren().size()) { - children = new LinkedList<ExampleBasedNode>(node.getChildren()); + SortedSet<ExampleBasedNode> childrenSet = node.getChildren(); + children = new LinkedList<ExampleBasedNode>(childrenSet); + + // we need to ensure that the children are sorted correctly +// children = new LinkedList<ExampleBasedNode>(); +// for(ExampleBasedNode child : childrenSet) { +// children.add(child); +// } + childrenMap.put(node, children); - fireTreeStructureChanged(node); + +// fireTreeStructureChanged(node); +// System.out.println("updating children of " + node); } return children; } Modified: trunk/src/dl-learner/org/dllearner/gui/RunPanel.java =================================================================== --- trunk/src/dl-learner/org/dllearner/gui/RunPanel.java 2008-09-15 13:30:02 UTC (rev 1213) +++ trunk/src/dl-learner/org/dllearner/gui/RunPanel.java 2008-09-15 17:28:02 UTC (rev 1214) @@ -31,7 +31,9 @@ import javax.swing.*; +import org.dllearner.algorithms.refexamples.ExampleBasedROLComponent; import org.dllearner.core.EvaluatedDescription; +import org.dllearner.learningproblems.PosNegDefinitionLP; /** * @author Tilo Hielscher @@ -82,8 +84,10 @@ stopButton.setEnabled(false); stopButton.addActionListener(this); showPanel.add(stopButton); + treeButton = new JButton("Tree"); treeButton.addActionListener(this); + treeButton.setEnabled(false); showPanel.add(treeButton); infoPanel.setLayout(gridbag); @@ -182,8 +186,8 @@ } // tree if (e.getSource() == treeButton) { - @SuppressWarnings("unused") TreeWindow a = new TreeWindow(config); + a.setLocationRelativeTo(startGUI); } } @@ -348,7 +352,17 @@ * Method is called when algorithm has terminated successfully. */ public void algorithmTerminated() { + // the methods called are similar to those when the stop button is pressed stopButton.setEnabled(false); runButton.setEnabled(true); + startGUI.enableTabbedPane(); + + System.out.println("TEST"); + + // enable tree button + if((config.getLearningAlgorithm() instanceof ExampleBasedROLComponent) + && (config.getLearningProblem() instanceof PosNegDefinitionLP)) { + treeButton.setEnabled(true); + } } } Added: trunk/src/dl-learner/org/dllearner/gui/SearchTree.java =================================================================== --- trunk/src/dl-learner/org/dllearner/gui/SearchTree.java (rev 0) +++ trunk/src/dl-learner/org/dllearner/gui/SearchTree.java 2008-09-15 17:28:02 UTC (rev 1214) @@ -0,0 +1,57 @@ +/** + * 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.gui; + +import javax.swing.JTree; + +import org.dllearner.algorithms.refexamples.ExampleBasedNode; + +/** + * Own JTree implemenation with improved formatting. + * + * @author Jens Lehmann + * + */ +public class SearchTree extends JTree { + + private static final long serialVersionUID = 4509903171856747400L; + + private int nrOfNegativeExamples; + private int nrOfPositiveExamples; + private String baseURI; + + public SearchTree(EBNodeTreeModel model, int nrOfPositiveExamples, int nrOfNegativeExamples, String baseURI) { + super(model); + this.nrOfPositiveExamples = nrOfPositiveExamples; + this.nrOfNegativeExamples = nrOfNegativeExamples; + this.baseURI = baseURI; + } + + @Override + public String convertValueToText(Object value, + boolean selected, + boolean expanded, + boolean leaf, + int row, + boolean hasFocus) { + ExampleBasedNode node = (ExampleBasedNode) value; + return node.getShortDescriptionHTML(nrOfPositiveExamples, nrOfNegativeExamples, baseURI); + } +} Modified: trunk/src/dl-learner/org/dllearner/gui/StartGUI.java =================================================================== --- trunk/src/dl-learner/org/dllearner/gui/StartGUI.java 2008-09-15 13:30:02 UTC (rev 1213) +++ trunk/src/dl-learner/org/dllearner/gui/StartGUI.java 2008-09-15 17:28:02 UTC (rev 1214) @@ -171,6 +171,11 @@ setVisible(true); updateTabs(); + // load file + if(file != null) { + config.loadFile(file); + } + // Register a change listener tabPane.addChangeListener(new ChangeListener() { // This method is called whenever the selected tab changes Modified: trunk/src/dl-learner/org/dllearner/gui/TreeWindow.java =================================================================== --- trunk/src/dl-learner/org/dllearner/gui/TreeWindow.java 2008-09-15 13:30:02 UTC (rev 1213) +++ trunk/src/dl-learner/org/dllearner/gui/TreeWindow.java 2008-09-15 17:28:02 UTC (rev 1214) @@ -20,13 +20,18 @@ * */ -import javax.swing.*; +import java.util.Set; +import javax.swing.JFrame; +import javax.swing.JScrollPane; +import javax.swing.JTree; import javax.swing.event.TreeExpansionEvent; import javax.swing.event.TreeWillExpandListener; import javax.swing.tree.ExpandVetoException; -import org.dllearner.algorithms.refexamples.*; +import org.dllearner.algorithms.refexamples.ExampleBasedNode; +import org.dllearner.algorithms.refexamples.ExampleBasedROLComponent; +import org.dllearner.learningproblems.PosNegDefinitionLP; /** * TreeWindow @@ -42,13 +47,14 @@ private EBNodeTreeModel ebNodeModel; private ExampleBasedNode rootNode; private JTree tree; - + + @SuppressWarnings("unchecked") public TreeWindow(Config config) { this.config = config; this.setTitle("DL-Learner Tree"); this.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE); - this.setLocationByPlatform(true); - this.setSize(640, 300); +// this.setLocationByPlatform(true); + this.setSize(800, 600); // set icon if (this.getClass().getResource("icon.gif") != null) @@ -61,7 +67,7 @@ .getLearningAlgorithm(); this.rootNode = ebrol.getStartNode(); - System.out.println("childs1: " + rootNode.getChildren()); +// System.out.println("childs1: " + rootNode.getChildren()); this.ebNodeModel = new EBNodeTreeModel(rootNode); @@ -71,15 +77,23 @@ // System.out.println("childs2: " + // ebNodeModel.getChildren((ExampleBasedNode) first)); - - tree = new JTree(ebNodeModel); - tree.addTreeWillExpandListener(this); + + // collect some helper values for display and accuracy calculations + PosNegDefinitionLP lp = (PosNegDefinitionLP) config.getLearningProblem(); + Set<String> posExamples = lp.getConfigurator().getPositiveExamples(); + Set<String> negExamples = lp.getConfigurator().getNegativeExamples(); + String baseURI = config.getReasoningService().getBaseURI(); + int nrOfPositiveExamples = posExamples.size(); + int nrOfNegativeExamples = negExamples.size(); + + tree = new SearchTree(ebNodeModel, nrOfPositiveExamples, nrOfNegativeExamples, baseURI); +// tree.addTreeWillExpandListener(this); this.add(new JScrollPane(tree)); } // } - this.repaint(); - this.setVisible(true); +// this.repaint(); + setVisible(true); } /* Modified: trunk/src/dl-learner/org/dllearner/test/junit/ExampleTests.java =================================================================== --- trunk/src/dl-learner/org/dllearner/test/junit/ExampleTests.java 2008-09-15 13:30:02 UTC (rev 1213) +++ trunk/src/dl-learner/org/dllearner/test/junit/ExampleTests.java 2008-09-15 17:28:02 UTC (rev 1214) @@ -83,6 +83,8 @@ ignore.add("./examples/sparql/scrobble.conf"); // HTTP 502 Proxy Error ignore.add("./examples/family-benchmark/Cousin.conf"); // Out of Memory Error ignore.add("./examples/sparql/SilentBobWorking2.conf"); // Out of Memory Error + ignore.add("./examples/family/father_posonly.conf"); // ArrayOutOfBoundsException in Pellet - main problem: pos only not working + ignore.add("./examples/sparql/difference/DBPediaSKOS_kohl_vs_angela.conf"); // Pellet: literal cannot be cast to individual for (String path : confFiles.keySet()) { for (String file : confFiles.get(path)) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jen...@us...> - 2008-09-24 08:58:34
|
Revision: 1250 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=1250&view=rev Author: jenslehmann Date: 2008-09-24 08:58:31 +0000 (Wed, 24 Sep 2008) Log Message: ----------- moved ORE OWL test files from source tree to examples directory Modified Paths: -------------- trunk/build.xml Added Paths: ----------- trunk/examples/ore/ trunk/examples/ore/all_test.owl trunk/examples/ore/eq_test.owl trunk/examples/ore/father.owl trunk/examples/ore/father3.owl trunk/examples/ore/father_disjoint.owl trunk/examples/ore/father_inverse_property.owl trunk/examples/ore/father_neg.owl trunk/examples/ore/father_new.owl trunk/examples/ore/father_property.owl trunk/examples/ore/father_wrong.owl trunk/examples/ore/incohaerent.owl trunk/examples/ore/inconsistent.owl trunk/examples/ore/neg_has_all.owl trunk/examples/ore/neg_has_some.owl trunk/examples/ore/pos_b.owl trunk/examples/ore/pos_has_all.owl Removed Paths: ------------- trunk/src/dl-learner/org/dllearner/tools/ore/all_test.owl trunk/src/dl-learner/org/dllearner/tools/ore/eq_test.owl trunk/src/dl-learner/org/dllearner/tools/ore/father.owl trunk/src/dl-learner/org/dllearner/tools/ore/father3.owl trunk/src/dl-learner/org/dllearner/tools/ore/father_disjoint.owl trunk/src/dl-learner/org/dllearner/tools/ore/father_inverse_property.owl trunk/src/dl-learner/org/dllearner/tools/ore/father_neg.owl trunk/src/dl-learner/org/dllearner/tools/ore/father_new.owl trunk/src/dl-learner/org/dllearner/tools/ore/father_property.owl trunk/src/dl-learner/org/dllearner/tools/ore/father_wrong.owl trunk/src/dl-learner/org/dllearner/tools/ore/incohaerent.owl trunk/src/dl-learner/org/dllearner/tools/ore/inconsistent.owl trunk/src/dl-learner/org/dllearner/tools/ore/neg_has_all.owl trunk/src/dl-learner/org/dllearner/tools/ore/neg_has_some.owl trunk/src/dl-learner/org/dllearner/tools/ore/pos_b.owl trunk/src/dl-learner/org/dllearner/tools/ore/pos_has_all.owl Modified: trunk/build.xml =================================================================== --- trunk/build.xml 2008-09-24 08:52:11 UTC (rev 1249) +++ trunk/build.xml 2008-09-24 08:58:31 UTC (rev 1250) @@ -4,7 +4,7 @@ <!-- 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="protege_dir" value="/home/jl/programme/Protege_4.0_beta/plugins" /> <property name="class_dir" value="classes" /> <property name="php_client_dir" value="src/php-client" /> Copied: trunk/examples/ore/all_test.owl (from rev 1244, trunk/src/dl-learner/org/dllearner/tools/ore/all_test.owl) =================================================================== --- trunk/examples/ore/all_test.owl (rev 0) +++ trunk/examples/ore/all_test.owl 2008-09-24 08:58:31 UTC (rev 1250) @@ -0,0 +1,219 @@ +<?xml version="1.0"?> + + +<!DOCTYPE rdf:RDF [ + <!ENTITY father "http://example.com/father#" > + <!ENTITY owl "http://www.w3.org/2002/07/owl#" > + <!ENTITY owl2 "http://www.w3.org/2006/12/owl2#" > + <!ENTITY xsd "http://www.w3.org/2001/XMLSchema#" > + <!ENTITY owl2xml "http://www.w3.org/2006/12/owl2-xml#" > + <!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#" > + <!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#" > +]> + + +<rdf:RDF xmlns="http://example.com/father#" + xml:base="http://example.com/father" + xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" + xmlns:owl2xml="http://www.w3.org/2006/12/owl2-xml#" + xmlns:owl="http://www.w3.org/2002/07/owl#" + xmlns:xsd="http://www.w3.org/2001/XMLSchema#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:owl2="http://www.w3.org/2006/12/owl2#" + xmlns:father="http://example.com/father#"> + <owl:Ontology rdf:about=""/> + + + + <!-- + /////////////////////////////////////////////////////////////////////////////////////// + // + // Object Properties + // + /////////////////////////////////////////////////////////////////////////////////////// + --> + + + + + <!-- http://example.com/father#hasChild --> + + <owl:ObjectProperty rdf:about="#hasChild"/> + + + + <!-- + /////////////////////////////////////////////////////////////////////////////////////// + // + // Classes + // + /////////////////////////////////////////////////////////////////////////////////////// + --> + + + + + <!-- http://example.com/father#father --> + + <owl:Class rdf:about="#father"/> + + + + <!-- http://example.com/father#female --> + + <owl:Class rdf:about="#female"/> + + + + <!-- http://example.com/father#male --> + + <owl:Class rdf:about="#male"> + <owl:equivalentClass> + <owl:Class> + <owl:complementOf rdf:resource="#female"/> + </owl:Class> + </owl:equivalentClass> + </owl:Class> + + + + <!-- + /////////////////////////////////////////////////////////////////////////////////////// + // + // Individuals + // + /////////////////////////////////////////////////////////////////////////////////////// + --> + + + + + <!-- http://example.com/father#anna --> + + <female rdf:about="#anna"> + <hasChild rdf:resource="#heinz"/> + </female> + + + + <!-- http://example.com/father#anton --> + + <male rdf:about="#anton"> + <hasChild rdf:resource="#heinz"/> + </male> + + + + <!-- http://example.com/father#heinz --> + + <male rdf:about="#heinz"> + <hasChild rdf:resource="#anna"/> + <hasChild rdf:resource="#michelle"/> + <hasChild rdf:resource="#patrick"/> + </male> + + + + <!-- http://example.com/father#katja --> + + <female rdf:about="#katja"/> + + + + <!-- http://example.com/father#katrin --> + + <female rdf:about="#katrin"/> + + + + <!-- http://example.com/father#maria --> + + <female rdf:about="#maria"/> + + + + <!-- http://example.com/father#markus --> + + <male rdf:about="#markus"> + <rdf:type rdf:resource="#father"/> + <hasChild rdf:resource="#anna"/> + <hasChild rdf:resource="#anton"/> + <hasChild rdf:resource="#michelle"/> + <hasChild rdf:resource="#tina"/> + </male> + + + + <!-- http://example.com/father#martin --> + + <male rdf:about="#martin"> + <rdf:type rdf:resource="#father"/> + <hasChild rdf:resource="#maria"/> + <hasChild rdf:resource="#steffi"/> + <hasChild rdf:resource="#tim"/> + </male> + + + + <!-- http://example.com/father#michelle --> + + <female rdf:about="#michelle"/> + + + + <!-- http://example.com/father#nicole --> + + <female rdf:about="#nicole"/> + + + + <!-- http://example.com/father#patrick --> + + <male rdf:about="#patrick"/> + + + + <!-- http://example.com/father#sarah --> + + <female rdf:about="#sarah"/> + + + + <!-- http://example.com/father#stefan --> + + <father rdf:about="#stefan"> + <rdf:type rdf:resource="#male"/> + <hasChild rdf:resource="#sarah"/> + <hasChild rdf:resource="#tina"/> + </father> + + + + <!-- http://example.com/father#steffi --> + + <female rdf:about="#steffi"/> + + + + <!-- http://example.com/father#thomas --> + + <father rdf:about="#thomas"> + <rdf:type rdf:resource="#male"/> + <hasChild rdf:resource="#katrin"/> + <hasChild rdf:resource="#nicole"/> + </father> + + + + <!-- http://example.com/father#tim --> + + <male rdf:about="#tim"> + <rdf:type rdf:resource="#father"/> + </male> + + + + <!-- http://example.com/father#tina --> + + <female rdf:about="#tina"/> +</rdf:RDF> Copied: trunk/examples/ore/eq_test.owl (from rev 1244, trunk/src/dl-learner/org/dllearner/tools/ore/eq_test.owl) =================================================================== --- trunk/examples/ore/eq_test.owl (rev 0) +++ trunk/examples/ore/eq_test.owl 2008-09-24 08:58:31 UTC (rev 1250) @@ -0,0 +1,151 @@ +<?xml version="1.0"?> + + +<!DOCTYPE rdf:RDF [ + <!ENTITY father "http://example.com/father#" > + <!ENTITY owl "http://www.w3.org/2002/07/owl#" > + <!ENTITY owl2 "http://www.w3.org/2006/12/owl2#" > + <!ENTITY xsd "http://www.w3.org/2001/XMLSchema#" > + <!ENTITY owl2xml "http://www.w3.org/2006/12/owl2-xml#" > + <!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#" > + <!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#" > +]> + + +<rdf:RDF xmlns="http://example.com/father#" + xml:base="http://example.com/father" + xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" + xmlns:owl2xml="http://www.w3.org/2006/12/owl2-xml#" + xmlns:owl="http://www.w3.org/2002/07/owl#" + xmlns:xsd="http://www.w3.org/2001/XMLSchema#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:owl2="http://www.w3.org/2006/12/owl2#" + xmlns:father="http://example.com/father#"> + <owl:Ontology rdf:about=""/> + + + + <!-- + /////////////////////////////////////////////////////////////////////////////////////// + // + // Object Properties + // + /////////////////////////////////////////////////////////////////////////////////////// + --> + + + + + <!-- http://example.com/father#hasChild --> + + <owl:ObjectProperty rdf:about="#hasChild"/> + + + + <!-- + /////////////////////////////////////////////////////////////////////////////////////// + // + // Classes + // + /////////////////////////////////////////////////////////////////////////////////////// + --> + + + + + <!-- http://example.com/father#father --> + + <owl:Class rdf:about="#father"> + <owl:equivalentClass rdf:resource="#horse"/> + </owl:Class> + + + + <!-- http://example.com/father#female --> + + <owl:Class rdf:about="#female"/> + + + + <!-- http://example.com/father#horse --> + + <owl:Class rdf:about="#horse"> + <rdfs:subClassOf rdf:resource="&owl;Thing"/> + </owl:Class> + + + + <!-- http://example.com/father#male --> + + <owl:Class rdf:about="#male"> + <owl:equivalentClass> + <owl:Class> + <owl:complementOf rdf:resource="#female"/> + </owl:Class> + </owl:equivalentClass> + </owl:Class> + + + + <!-- http://www.w3.org/2002/07/owl#Thing --> + + <owl:Class rdf:about="&owl;Thing"/> + + + + <!-- + /////////////////////////////////////////////////////////////////////////////////////// + // + // Individuals + // + /////////////////////////////////////////////////////////////////////////////////////// + --> + + + + + <!-- http://example.com/father#anna --> + + <female rdf:about="#anna"> + <hasChild rdf:resource="#heinz"/> + </female> + + + + <!-- http://example.com/father#heinz --> + + <male rdf:about="#heinz"/> + + + + <!-- http://example.com/father#markus --> + + <male rdf:about="#markus"> + <rdf:type rdf:resource="#father"/> + <hasChild rdf:resource="#anna"/> + </male> + + + + <!-- http://example.com/father#martin --> + + <male rdf:about="#martin"> + <rdf:type rdf:resource="#father"/> + <hasChild rdf:resource="#heinz"/> + </male> + + + + <!-- http://example.com/father#michelle --> + + <female rdf:about="#michelle"/> + + + + <!-- http://example.com/father#stefan --> + + <father rdf:about="#stefan"> + <rdf:type rdf:resource="#male"/> + <hasChild rdf:resource="#markus"/> + </father> +</rdf:RDF> Copied: trunk/examples/ore/father.owl (from rev 1244, trunk/src/dl-learner/org/dllearner/tools/ore/father.owl) =================================================================== --- trunk/examples/ore/father.owl (rev 0) +++ trunk/examples/ore/father.owl 2008-09-24 08:58:31 UTC (rev 1250) @@ -0,0 +1,41 @@ +<?xml version="1.0"?> +<rdf:RDF + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:xsd="http://www.w3.org/2001/XMLSchema#" + xmlns="http://example.com/father#" + xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" + xmlns:owl="http://www.w3.org/2002/07/owl#" + xml:base="http://example.com/father"> + <owl:Ontology rdf:about=""/> + <owl:Class rdf:ID="father"/> + <owl:Class rdf:ID="female"/> + <owl:Class rdf:ID="male"> + <owl:equivalentClass> + <owl:Class> + <owl:complementOf rdf:resource="#female"/> + </owl:Class> + </owl:equivalentClass> + </owl:Class> + <owl:ObjectProperty rdf:ID="hasChild"/> + <father rdf:ID="markus"> + <rdf:type rdf:resource="#male"/> + <hasChild> + <female rdf:ID="anna"> + <hasChild> + <male rdf:ID="heinz"/> + </hasChild> + </female> + </hasChild> + </father> + <father rdf:ID="stefan"> + <rdf:type rdf:resource="#male"/> + <hasChild rdf:resource="#markus"/> + </father> + <female rdf:ID="michelle"/> + <father rdf:ID="martin"> + <hasChild rdf:resource="#heinz"/> + <rdf:type rdf:resource="#male"/> + </father> +</rdf:RDF> + +<!-- Created with Protege (with OWL Plugin 3.3.1, Build 430) http://protege.stanford.edu --> Copied: trunk/examples/ore/father3.owl (from rev 1244, trunk/src/dl-learner/org/dllearner/tools/ore/father3.owl) =================================================================== --- trunk/examples/ore/father3.owl (rev 0) +++ trunk/examples/ore/father3.owl 2008-09-24 08:58:31 UTC (rev 1250) @@ -0,0 +1,151 @@ +<?xml version="1.0"?> + + +<!DOCTYPE rdf:RDF [ + <!ENTITY father "http://example.com/father#" > + <!ENTITY owl "http://www.w3.org/2002/07/owl#" > + <!ENTITY owl2 "http://www.w3.org/2006/12/owl2#" > + <!ENTITY xsd "http://www.w3.org/2001/XMLSchema#" > + <!ENTITY owl2xml "http://www.w3.org/2006/12/owl2-xml#" > + <!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#" > + <!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#" > +]> + + +<rdf:RDF xmlns="http://example.com/father#" + xml:base="http://example.com/father" + xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" + xmlns:owl2xml="http://www.w3.org/2006/12/owl2-xml#" + xmlns:owl="http://www.w3.org/2002/07/owl#" + xmlns:xsd="http://www.w3.org/2001/XMLSchema#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:owl2="http://www.w3.org/2006/12/owl2#" + xmlns:father="http://example.com/father#"> + <owl:Ontology rdf:about=""/> + + + + <!-- + /////////////////////////////////////////////////////////////////////////////////////// + // + // Object Properties + // + /////////////////////////////////////////////////////////////////////////////////////// + --> + + + + + <!-- http://example.com/father#hasChild --> + + <owl:ObjectProperty rdf:about="#hasChild"/> + + + + <!-- + /////////////////////////////////////////////////////////////////////////////////////// + // + // Classes + // + /////////////////////////////////////////////////////////////////////////////////////// + --> + + + + + <!-- http://example.com/father#father --> + + <owl:Class rdf:about="#father"/> + + + + <!-- http://example.com/father#female --> + + <owl:Class rdf:about="#female"/> + + + + <!-- http://example.com/father#male --> + + <owl:Class rdf:about="#male"> + <owl:equivalentClass> + <owl:Class> + <owl:complementOf rdf:resource="#female"/> + </owl:Class> + </owl:equivalentClass> + </owl:Class> + + + + <!-- + /////////////////////////////////////////////////////////////////////////////////////// + // + // Individuals + // + /////////////////////////////////////////////////////////////////////////////////////// + --> + + + + + <!-- http://example.com/father#anna --> + + <female rdf:about="#anna"> + <hasChild rdf:resource="#heinz"/> + </female> + + + + <!-- http://example.com/father#heinz --> + + <male rdf:about="#heinz"> + <hasChild rdf:resource="#michelle"/> + <hasChild rdf:resource="#patrick"/> + </male> + + + + <!-- http://example.com/father#markus --> + + <male rdf:about="#markus"> + <rdf:type rdf:resource="#father"/> + <hasChild rdf:resource="#anna"/> + <hasChild rdf:resource="#thomas"/> + </male> + + + + <!-- http://example.com/father#martin --> + + <male rdf:about="#martin"> + <rdf:type rdf:resource="#father"/> + <hasChild rdf:resource="#heinz"/> + </male> + + + + <!-- http://example.com/father#michelle --> + + <female rdf:about="#michelle"/> + + + + <!-- http://example.com/father#patrick --> + + <male rdf:about="#patrick"/> + + + + <!-- http://example.com/father#stefan --> + + <father rdf:about="#stefan"> + <rdf:type rdf:resource="#male"/> + <hasChild rdf:resource="#markus"/> + </father> + + + + <!-- http://example.com/father#thomas --> + + <male rdf:about="#thomas"/> +</rdf:RDF> Copied: trunk/examples/ore/father_disjoint.owl (from rev 1244, trunk/src/dl-learner/org/dllearner/tools/ore/father_disjoint.owl) =================================================================== --- trunk/examples/ore/father_disjoint.owl (rev 0) +++ trunk/examples/ore/father_disjoint.owl 2008-09-24 08:58:31 UTC (rev 1250) @@ -0,0 +1,131 @@ +<?xml version="1.0"?> + + +<!DOCTYPE rdf:RDF [ + <!ENTITY father "http://example.com/father#" > + <!ENTITY owl "http://www.w3.org/2002/07/owl#" > + <!ENTITY owl2 "http://www.w3.org/2006/12/owl2#" > + <!ENTITY xsd "http://www.w3.org/2001/XMLSchema#" > + <!ENTITY owl2xml "http://www.w3.org/2006/12/owl2-xml#" > + <!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#" > + <!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#" > +]> + + +<rdf:RDF xmlns="http://example.com/father#" + xml:base="http://example.com/father" + xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" + xmlns:owl2xml="http://www.w3.org/2006/12/owl2-xml#" + xmlns:owl="http://www.w3.org/2002/07/owl#" + xmlns:xsd="http://www.w3.org/2001/XMLSchema#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:owl2="http://www.w3.org/2006/12/owl2#" + xmlns:father="http://example.com/father#"> + <owl:Ontology rdf:about=""/> + + + + <!-- + /////////////////////////////////////////////////////////////////////////////////////// + // + // Object Properties + // + /////////////////////////////////////////////////////////////////////////////////////// + --> + + + + + <!-- http://example.com/father#hasChild --> + + <owl:ObjectProperty rdf:about="#hasChild"/> + + + + <!-- + /////////////////////////////////////////////////////////////////////////////////////// + // + // Classes + // + /////////////////////////////////////////////////////////////////////////////////////// + --> + + + + + <!-- http://example.com/father#father --> + + <owl:Class rdf:about="#father"/> + + + + <!-- http://example.com/father#female --> + + <owl:Class rdf:about="#female"> + <owl:disjointWith rdf:resource="#male"/> + </owl:Class> + + + + <!-- http://example.com/father#male --> + + <owl:Class rdf:about="#male"/> + + + + <!-- + /////////////////////////////////////////////////////////////////////////////////////// + // + // Individuals + // + /////////////////////////////////////////////////////////////////////////////////////// + --> + + + + + <!-- http://example.com/father#anna --> + + <female rdf:about="#anna"> + <hasChild rdf:resource="#heinz"/> + </female> + + + + <!-- http://example.com/father#heinz --> + + <male rdf:about="#heinz"/> + + + + <!-- http://example.com/father#markus --> + + <male rdf:about="#markus"> + <rdf:type rdf:resource="#father"/> + <hasChild rdf:resource="#anna"/> + </male> + + + + <!-- http://example.com/father#martin --> + + <male rdf:about="#martin"> + <rdf:type rdf:resource="#father"/> + <hasChild rdf:resource="#heinz"/> + </male> + + + + <!-- http://example.com/father#michelle --> + + <female rdf:about="#michelle"/> + + + + <!-- http://example.com/father#stefan --> + + <father rdf:about="#stefan"> + <rdf:type rdf:resource="#male"/> + <hasChild rdf:resource="#markus"/> + </father> +</rdf:RDF> Copied: trunk/examples/ore/father_inverse_property.owl (from rev 1244, trunk/src/dl-learner/org/dllearner/tools/ore/father_inverse_property.owl) =================================================================== --- trunk/examples/ore/father_inverse_property.owl (rev 0) +++ trunk/examples/ore/father_inverse_property.owl 2008-09-24 08:58:31 UTC (rev 1250) @@ -0,0 +1,147 @@ +<?xml version="1.0"?> + + +<!DOCTYPE rdf:RDF [ + <!ENTITY father "http://example.com/father#" > + <!ENTITY owl "http://www.w3.org/2002/07/owl#" > + <!ENTITY owl2 "http://www.w3.org/2006/12/owl2#" > + <!ENTITY xsd "http://www.w3.org/2001/XMLSchema#" > + <!ENTITY owl2xml "http://www.w3.org/2006/12/owl2-xml#" > + <!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#" > + <!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#" > +]> + + +<rdf:RDF xmlns="http://example.com/father#" + xml:base="http://example.com/father" + xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" + xmlns:owl2xml="http://www.w3.org/2006/12/owl2-xml#" + xmlns:owl="http://www.w3.org/2002/07/owl#" + xmlns:xsd="http://www.w3.org/2001/XMLSchema#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:owl2="http://www.w3.org/2006/12/owl2#" + xmlns:father="http://example.com/father#"> + <owl:Ontology rdf:about=""/> + + + + <!-- + /////////////////////////////////////////////////////////////////////////////////////// + // + // Object Properties + // + /////////////////////////////////////////////////////////////////////////////////////// + --> + + + + + <!-- http://example.com/father#hasChild --> + + <owl:ObjectProperty rdf:about="#hasChild"/> + + + + <!-- http://example.com/father#hasParent --> + + <owl:ObjectProperty rdf:about="#hasParent"> + <owl:inverseOf rdf:resource="#hasChild"/> + </owl:ObjectProperty> + + + + <!-- + /////////////////////////////////////////////////////////////////////////////////////// + // + // Classes + // + /////////////////////////////////////////////////////////////////////////////////////// + --> + + + + + <!-- http://example.com/father#father --> + + <owl:Class rdf:about="#father"/> + + + + <!-- http://example.com/father#female --> + + <owl:Class rdf:about="#female"/> + + + + <!-- http://example.com/father#male --> + + <owl:Class rdf:about="#male"> + <owl:equivalentClass> + <owl:Class> + <owl:complementOf rdf:resource="#female"/> + </owl:Class> + </owl:equivalentClass> + </owl:Class> + + + + <!-- + /////////////////////////////////////////////////////////////////////////////////////// + // + // Individuals + // + /////////////////////////////////////////////////////////////////////////////////////// + --> + + + + + <!-- http://example.com/father#anna --> + + <female rdf:about="#anna"> + <hasChild rdf:resource="#heinz"/> + <hasParent rdf:resource="#markus"/> + <hasParent rdf:resource="#michelle"/> + </female> + + + + <!-- http://example.com/father#heinz --> + + <male rdf:about="#heinz"/> + + + + <!-- http://example.com/father#markus --> + + <male rdf:about="#markus"> + <rdf:type rdf:resource="#father"/> + <hasChild rdf:resource="#anna"/> + <hasChild rdf:resource="#stefan"/> + </male> + + + + <!-- http://example.com/father#martin --> + + <male rdf:about="#martin"> + <rdf:type rdf:resource="#father"/> + <hasChild rdf:resource="#heinz"/> + </male> + + + + <!-- http://example.com/father#michelle --> + + <female rdf:about="#michelle"/> + + + + <!-- http://example.com/father#stefan --> + + <father rdf:about="#stefan"> + <rdf:type rdf:resource="#male"/> + <hasChild rdf:resource="#markus"/> + <hasParent rdf:resource="#markus"/> + </father> +</rdf:RDF> Copied: trunk/examples/ore/father_neg.owl (from rev 1244, trunk/src/dl-learner/org/dllearner/tools/ore/father_neg.owl) =================================================================== --- trunk/examples/ore/father_neg.owl (rev 0) +++ trunk/examples/ore/father_neg.owl 2008-09-24 08:58:31 UTC (rev 1250) @@ -0,0 +1,143 @@ +<?xml version="1.0"?> + + +<!DOCTYPE rdf:RDF [ + <!ENTITY father "http://example.com/father#" > + <!ENTITY owl "http://www.w3.org/2002/07/owl#" > + <!ENTITY owl2 "http://www.w3.org/2006/12/owl2#" > + <!ENTITY xsd "http://www.w3.org/2001/XMLSchema#" > + <!ENTITY owl2xml "http://www.w3.org/2006/12/owl2-xml#" > + <!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#" > + <!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#" > +]> + + +<rdf:RDF xmlns="http://example.com/father#" + xml:base="http://example.com/father" + xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" + xmlns:owl2xml="http://www.w3.org/2006/12/owl2-xml#" + xmlns:owl="http://www.w3.org/2002/07/owl#" + xmlns:xsd="http://www.w3.org/2001/XMLSchema#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:owl2="http://www.w3.org/2006/12/owl2#" + xmlns:father="http://example.com/father#"> + <owl:Ontology rdf:about=""/> + + + + <!-- + /////////////////////////////////////////////////////////////////////////////////////// + // + // Object Properties + // + /////////////////////////////////////////////////////////////////////////////////////// + --> + + + + + <!-- http://example.com/father#hasChild --> + + <owl:ObjectProperty rdf:about="#hasChild"/> + + + + <!-- + /////////////////////////////////////////////////////////////////////////////////////// + // + // Classes + // + /////////////////////////////////////////////////////////////////////////////////////// + --> + + + + + <!-- http://example.com/father#animal --> + + <owl:Class rdf:about="#animal"/> + + + + <!-- http://example.com/father#father --> + + <owl:Class rdf:about="#father"/> + + + + <!-- http://example.com/father#female --> + + <owl:Class rdf:about="#female"/> + + + + <!-- http://example.com/father#male --> + + <owl:Class rdf:about="#male"> + <owl:equivalentClass> + <owl:Class> + <owl:complementOf rdf:resource="#female"/> + </owl:Class> + </owl:equivalentClass> + </owl:Class> + + + + <!-- + /////////////////////////////////////////////////////////////////////////////////////// + // + // Individuals + // + /////////////////////////////////////////////////////////////////////////////////////// + --> + + + + + <!-- http://example.com/father#anna --> + + <female rdf:about="#anna"> + <hasChild rdf:resource="#heinz"/> + </female> + + + + <!-- http://example.com/father#heinz --> + + <animal rdf:about="#heinz"> + <rdf:type rdf:resource="#male"/> + </animal> + + + + <!-- http://example.com/father#markus --> + + <male rdf:about="#markus"> + <rdf:type rdf:resource="#father"/> + <hasChild rdf:resource="#anna"/> + </male> + + + + <!-- http://example.com/father#martin --> + + <male rdf:about="#martin"> + <rdf:type rdf:resource="#father"/> + <hasChild rdf:resource="#heinz"/> + </male> + + + + <!-- http://example.com/father#michelle --> + + <female rdf:about="#michelle"/> + + + + <!-- http://example.com/father#stefan --> + + <father rdf:about="#stefan"> + <rdf:type rdf:resource="#male"/> + <hasChild rdf:resource="#markus"/> + </father> +</rdf:RDF> Copied: trunk/examples/ore/father_new.owl (from rev 1244, trunk/src/dl-learner/org/dllearner/tools/ore/father_new.owl) =================================================================== --- trunk/examples/ore/father_new.owl (rev 0) +++ trunk/examples/ore/father_new.owl 2008-09-24 08:58:31 UTC (rev 1250) @@ -0,0 +1,143 @@ +<?xml version="1.0"?> + + +<!DOCTYPE rdf:RDF [ + <!ENTITY father "http://example.com/father#" > + <!ENTITY owl "http://www.w3.org/2002/07/owl#" > + <!ENTITY owl2 "http://www.w3.org/2006/12/owl2#" > + <!ENTITY xsd "http://www.w3.org/2001/XMLSchema#" > + <!ENTITY owl2xml "http://www.w3.org/2006/12/owl2-xml#" > + <!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#" > + <!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#" > +]> + + +<rdf:RDF xmlns="http://example.com/father#" + xml:base="http://example.com/father" + xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" + xmlns:owl2xml="http://www.w3.org/2006/12/owl2-xml#" + xmlns:owl="http://www.w3.org/2002/07/owl#" + xmlns:xsd="http://www.w3.org/2001/XMLSchema#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:owl2="http://www.w3.org/2006/12/owl2#" + xmlns:father="http://example.com/father#"> + <owl:Ontology rdf:about=""/> + + + + <!-- + /////////////////////////////////////////////////////////////////////////////////////// + // + // Object Properties + // + /////////////////////////////////////////////////////////////////////////////////////// + --> + + + + + <!-- http://example.com/father#hasChild --> + + <owl:ObjectProperty rdf:about="#hasChild"/> + + + + <!-- + /////////////////////////////////////////////////////////////////////////////////////// + // + // Classes + // + /////////////////////////////////////////////////////////////////////////////////////// + --> + + + + + <!-- http://example.com/father#father --> + + <owl:Class rdf:about="#father"/> + + + + <!-- http://example.com/father#female --> + + <owl:Class rdf:about="#female"/> + + + + <!-- http://example.com/father#male --> + + <owl:Class rdf:about="#male"> + <owl:equivalentClass> + <owl:Class> + <owl:complementOf rdf:resource="#female"/> + </owl:Class> + </owl:equivalentClass> + </owl:Class> + + + + <!-- + /////////////////////////////////////////////////////////////////////////////////////// + // + // Individuals + // + /////////////////////////////////////////////////////////////////////////////////////// + --> + + + + + <!-- http://example.com/father#anna --> + + <female rdf:about="#anna"> + <hasChild rdf:resource="#heinz"/> + </female> + + + + <!-- http://example.com/father#heinz --> + + <male rdf:about="#heinz"/> + + + + <!-- http://example.com/father#lorenz --> + + <male rdf:about="#lorenz"> + <rdf:type rdf:resource="#father"/> + </male> + + + + <!-- http://example.com/father#markus --> + + <male rdf:about="#markus"> + <rdf:type rdf:resource="#father"/> + <hasChild rdf:resource="#anna"/> + </male> + + + + <!-- http://example.com/father#martin --> + + <male rdf:about="#martin"> + <rdf:type rdf:resource="#father"/> + <hasChild rdf:resource="#heinz"/> + </male> + + + + <!-- http://example.com/father#michelle --> + + <female rdf:about="#michelle"/> + + + + <!-- http://example.com/father#stefan --> + + <father rdf:about="#stefan"> + <rdf:type rdf:resource="#male"/> + <hasChild rdf:resource="#markus"/> + </father> +</rdf:RDF> Copied: trunk/examples/ore/father_property.owl (from rev 1244, trunk/src/dl-learner/org/dllearner/tools/ore/father_property.owl) =================================================================== --- trunk/examples/ore/father_property.owl (rev 0) +++ trunk/examples/ore/father_property.owl 2008-09-24 08:58:31 UTC (rev 1250) @@ -0,0 +1,136 @@ +<?xml version="1.0"?> + + +<!DOCTYPE rdf:RDF [ + <!ENTITY father "http://example.com/father#" > + <!ENTITY owl "http://www.w3.org/2002/07/owl#" > + <!ENTITY owl2 "http://www.w3.org/2006/12/owl2#" > + <!ENTITY xsd "http://www.w3.org/2001/XMLSchema#" > + <!ENTITY owl2xml "http://www.w3.org/2006/12/owl2-xml#" > + <!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#" > + <!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#" > +]> + + +<rdf:RDF xmlns="http://example.com/father#" + xml:base="http://example.com/father" + xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" + xmlns:owl2xml="http://www.w3.org/2006/12/owl2-xml#" + xmlns:owl="http://www.w3.org/2002/07/owl#" + xmlns:xsd="http://www.w3.org/2001/XMLSchema#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:owl2="http://www.w3.org/2006/12/owl2#" + xmlns:father="http://example.com/father#"> + <owl:Ontology rdf:about=""/> + + + + <!-- + /////////////////////////////////////////////////////////////////////////////////////// + // + // Object Properties + // + /////////////////////////////////////////////////////////////////////////////////////// + --> + + + + + <!-- http://example.com/father#hasChild --> + + <owl:ObjectProperty rdf:about="#hasChild"/> + + + + <!-- + /////////////////////////////////////////////////////////////////////////////////////// + // + // Classes + // + /////////////////////////////////////////////////////////////////////////////////////// + --> + + + + + <!-- http://example.com/father#father --> + + <owl:Class rdf:about="#father"/> + + + + <!-- http://example.com/father#female --> + + <owl:Class rdf:about="#female"/> + + + + <!-- http://example.com/father#male --> + + <owl:Class rdf:about="#male"> + <owl:equivalentClass> + <owl:Class> + <owl:complementOf rdf:resource="#female"/> + </owl:Class> + </owl:equivalentClass> + </owl:Class> + + + + <!-- + /////////////////////////////////////////////////////////////////////////////////////// + // + // Individuals + // + /////////////////////////////////////////////////////////////////////////////////////// + --> + + + + + <!-- http://example.com/father#anna --> + + <female rdf:about="#anna"> + <hasChild rdf:resource="#heinz"/> + </female> + + + + <!-- http://example.com/father#heinz --> + + <male rdf:about="#heinz"/> + + + + <!-- http://example.com/father#markus --> + + <male rdf:about="#markus"> + <rdf:type rdf:resource="#father"/> + <hasChild rdf:resource="#anna"/> + <hasChild rdf:resource="#heinz"/> + </male> + + + + <!-- http://example.com/father#martin --> + + <male rdf:about="#martin"> + <rdf:type rdf:resource="#father"/> + <hasChild rdf:resource="#heinz"/> + </male> + + + + <!-- http://example.com/father#michelle --> + + <female rdf:about="#michelle"/> + + + + <!-- http://example.com/father#stefan --> + + <father rdf:about="#stefan"> + <rdf:type rdf:resource="#male"/> + <hasChild rdf:resource="#markus"/> + </father> +</rdf:RDF> Copied: trunk/examples/ore/father_wrong.owl (from rev 1244, trunk/src/dl-learner/org/dllearner/tools/ore/father_wrong.owl) =================================================================== --- trunk/examples/ore/father_wrong.owl (rev 0) +++ trunk/examples/ore/father_wrong.owl 2008-09-24 08:58:31 UTC (rev 1250) @@ -0,0 +1,143 @@ +<?xml version="1.0"?> + + +<!DOCTYPE rdf:RDF [ + <!ENTITY father "http://example.com/father#" > + <!ENTITY owl "http://www.w3.org/2002/07/owl#" > + <!ENTITY owl2 "http://www.w3.org/2006/12/owl2#" > + <!ENTITY xsd "http://www.w3.org/2001/XMLSchema#" > + <!ENTITY owl2xml "http://www.w3.org/2006/12/owl2-xml#" > + <!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#" > + <!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#" > +]> + + +<rdf:RDF xmlns="http://example.com/father#" + xml:base="http://example.com/father" + xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" + xmlns:owl2xml="http://www.w3.org/2006/12/owl2-xml#" + xmlns:owl="http://www.w3.org/2002/07/owl#" + xmlns:xsd="http://www.w3.org/2001/XMLSchema#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:owl2="http://www.w3.org/2006/12/owl2#" + xmlns:father="http://example.com/father#"> + <owl:Ontology rdf:about=""/> + + + + <!-- + /////////////////////////////////////////////////////////////////////////////////////// + // + // Object Properties + // + /////////////////////////////////////////////////////////////////////////////////////// + --> + + + + + <!-- http://example.com/father#hasChild --> + + <owl:ObjectProperty rdf:about="#hasChild"/> + + + + <!-- + /////////////////////////////////////////////////////////////////////////////////////// + // + // Classes + // + /////////////////////////////////////////////////////////////////////////////////////// + --> + + + + + <!-- http://example.com/father#father --> + + <owl:Class rdf:about="#father"/> + + + + <!-- http://example.com/father#female --> + + <owl:Class rdf:about="#female"/> + + + + <!-- http://example.com/father#male --> + + <owl:Class rdf:about="#male"> + <owl:equivalentClass> + <owl:Class> + <owl:complementOf rdf:resource="#female"/> + </owl:Class> + </owl:equivalentClass> + </owl:Class> + + + + <!-- + /////////////////////////////////////////////////////////////////////////////////////// + // + // Individuals + // + /////////////////////////////////////////////////////////////////////////////////////// + --> + + + + + <!-- http://example.com/father#anna --> + + <female rdf:about="#anna"> + <hasChild rdf:resource="#heinz"/> + </female> + + + + <!-- http://example.com/father#heinz --> + + <male rdf:about="#heinz"/> + + + + <!-- http://example.com/father#markus --> + + <male rdf:about="#markus"> + <rdf:type rdf:resource="#father"/> + <hasChild rdf:resource="#anna"/> + </male> + + + + <!-- http://example.com/father#martin --> + + <male rdf:about="#martin"> + <rdf:type rdf:resource="#father"/> + <hasChild rdf:resource="#heinz"/> + </male> + + + + <!-- http://example.com/father#michelle --> + + <female rdf:about="#michelle"/> + + + + <!-- http://example.com/father#stefan --> + + <father rdf:about="#stefan"> + <rdf:type rdf:resource="#male"/> + <hasChild rdf:resource="#markus"/> + </father> + + + + <!-- http://example.com/father#wrong --> + + <father rdf:about="#wrong"> + <rdf:type rdf:resource="#male"/> + </father> +</rdf:RDF> Copied: trunk/examples/ore/incohaerent.owl (from rev 1244, trunk/src/dl-learner/org/dllearner/tools/ore/incohaerent.owl) =================================================================== --- trunk/examples/ore/incohaerent.owl (rev 0) +++ trunk/examples/ore/incohaerent.owl 2008-09-24 08:58:31 UTC (rev 1250) @@ -0,0 +1,101 @@ +<?xml version="1.0"?> + + +<!DOCTYPE rdf:RDF [ + <!ENTITY www "http://www.test.owl#" > + <!ENTITY owl "http://www.w3.org/2002/07/owl#" > + <!ENTITY owl2 "http://www.w3.org/2006/12/owl2#" > + <!ENTITY xsd "http://www.w3.org/2001/XMLSchema#" > + <!ENTITY owl2xml "http://www.w3.org/2006/12/owl2-xml#" > + <!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#" > + <!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#" > +]> + + +<rdf:RDF xmlns="http://www.test.owl#" + xml:base="http://www.test.owl" + xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" + xmlns:owl2xml="http://www.w3.org/2006/12/owl2-xml#" + xmlns:www="http://www.test.owl#" + 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:owl2="http://www.w3.org/2006/12/owl2#"> + <owl:Ontology rdf:about=""/> + + + + <!-- + /////////////////////////////////////////////////////////////////////////////////////// + // + // Classes + // + /////////////////////////////////////////////////////////////////////////////////////// + --> + + + + + <!-- http://www.test.owl#A --> + + <owl:Class rdf:about="#A"> + <rdfs:subClassOf rdf:resource="&owl;Thing"/> + </owl:Class> + + + + <!-- http://www.test.owl#B --> + + <owl:Class rdf:about="#B"> + <rdfs:subClassOf rdf:resource="&owl;Thing"/> + <owl:disjointWith rdf:resource="#C"/> + </owl:Class> + + + + <!-- http://www.test.owl#C --> + + <owl:Class rdf:about="#C"> + <rdfs:subClassOf rdf:resource="&owl;Thing"/> + </owl:Class> + + + + <!-- http://www.test.owl#D --> + + <owl:Class rdf:about="#D"> + <rdfs:subClassOf rdf:resource="#B"/> + <rdfs:subClassOf rdf:resource="#C"/> + </owl:Class> + + + + <!-- http://www.w3.org/2002/07/owl#Thing --> + + <owl:Class rdf:about="&owl;Thing"/> + + + + <!-- + /////////////////////////////////////////////////////////////////////////////////////// + // + // Individuals + // + /////////////////////////////////////////////////////////////////////////////////////// + --> + + + + + <!-- http://www.test.owl#frank --> + + <B rdf:about="#frank"/> + + + + <!-- http://www.test.owl#lorenz --> + + <C rdf:about="#lorenz"> + <rdf:type rdf:resource="#A"/> + </C> +</rdf:RDF> Copied: trunk/examples/ore/inconsistent.owl (from rev 1244, trunk/src/dl-learner/org/dllearner/tools/ore/inconsistent.owl) =================================================================== --- trunk/examples/ore/inconsistent.owl (rev 0) +++ trunk/examples/ore/inconsistent.owl 2008-09-24 08:58:31 UTC (rev 1250) @@ -0,0 +1,95 @@ +<?xml version="1.0"?> + + +<!DOCTYPE rdf:RDF [ + <!ENTITY www "http://www.test.owl#" > + <!ENTITY owl "http://www.w3.org/2002/07/owl#" > + <!ENTITY owl2 "http://www.w3.org/2006/12/owl2#" > + <!ENTITY xsd "http://www.w3.org/2001/XMLSchema#" > + <!ENTITY owl2xml "http://www.w3.org/2006/12/owl2-xml#" > + <!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#" > + <!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#" > +]> + + +<rdf:RDF xmlns="http://www.test.owl#" + xml:base="http://www.test.owl" + xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" + xmlns:owl2xml="http://www.w3.org/2006/12/owl2-xml#" + xmlns:www="http://www.test.owl#" + 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:owl2="http://www.w3.org/2006/12/owl2#"> + <owl:Ontology rdf:about=""/> + + + + <!-- + /////////////////////////////////////////////////////////////////////////////////////// + // + // Classes + // + /////////////////////////////////////////////////////////////////////////////////////// + --> + + + + + <!-- http://www.test.owl#A --> + + <owl:Class rdf:about="#A"> + <rdfs:subClassOf rdf:resource="&owl;Thing"/> + </owl:Class> + + + + <!-- http://www.test.owl#B --> + + <owl:Class rdf:about="#B"> + <rdfs:subClassOf rdf:resource="&owl;Thing"/> + <owl:disjointWith rdf:resource="#C"/> + </owl:Class> + + + + <!-- http://www.test.owl#C --> + + <owl:Class rdf:about="#C"> + <rdfs:subClassOf rdf:resource="&owl;Thing"/> + </owl:Class> + + + + <!-- http://www.test.owl#D --> + + <owl:Class rdf:about="#D"> + <rdfs:subClassOf rdf:resource="&owl;Thing"/> + </owl:Class> + + + + <!-- http://www.w3.org/2002/07/owl#Thing --> + + <owl:Class rdf:about="&owl;Thing"/> + + + + <!-- + /////////////////////////////////////////////////////////////////////////////////////// + // + // Individuals + // + /////////////////////////////////////////////////////////////////////////////////////// + --> + + + + + <!-- http://www.test.owl#lorenz --> + + <C rdf:about="#lorenz"> + <rdf:type rdf:resource="#A"/> + <rdf:type rdf:resource="#B"/> + </C> +</rdf:RDF> Copied: trunk/examples/ore/neg_has_all.owl (from rev 1244, trunk/src/dl-learner/org/dllearner/tools/ore/neg_has_all.owl) =================================================================== --- trunk/examples/ore/neg_has_all.owl (rev 0) +++ trunk/examples/ore/neg_has_all.owl 2008-09-24 08:58:31 UTC (rev 1250) @@ -0,0 +1,217 @@ +<?xml version="1.0"?> + + +<!DOCTYPE rdf:RDF [ + <!ENTITY father "http://example.com/father#" > + <!ENTITY owl "http://www.w3.org/2002/07/owl#" > + <!ENTITY owl2 "http://www.w3.org/2006/12/owl2#" > + <!ENTITY xsd "http://www.w3.org/2001/XMLSchema#" > + <!ENTITY owl2xml "http://www.w3.org/2006/12/owl2-xml#" > + <!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#" > + <!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#" > +]> + + +<rdf:RDF xmlns="http://example.com/father#" + xml:base="http://example.com/father" + xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" + xmlns:owl2xml="http://www.w3.org/2006/12/owl2-xml#" + xmlns:owl="http://www.w3.org/2002/07/owl#" + xmlns:xsd="http://www.w3.org/2001/XMLSchema#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:owl2="http://www.w3.org/2006/12/owl2#" + xmlns:father="http://example.com/father#"> + <owl:Ontology rdf:about=""/> + + + + <!-- + /////////////////////////////////////////////////////////////////////////////////////// + // + // Object Properties + // + /////////////////////////////////////////////////////////////////////////////////////// + --> + + + + + <!-- http://example.com/father#hasChild --> + + <owl:ObjectProperty rdf:about="#hasChild"/> + + + + <!-- + /////////////////////////////////////////////////////////////////////////////////////// + // + // Classes + // + /////////////////////////////////////////////////////////////////////////////////////// + --> + + + + + <!-- http://example.com/father#father --> + + <owl:Class rdf:about="#father"/> + + + + <!-- http://example.com/father#female --> + + <owl:Class rdf:about="#female"/> + + + + <!-- http://example.com/father#male --> + + <owl:Class rdf:about="#male"> + <owl:equivalentClass> + <owl:Class> + <owl:complementOf rdf:resource="#female"/> + </owl:Class> + </owl:equivalentClass> + </owl:Class> + + + + <!-- + /////////////////////////////////////////////////////////////////////////////////////// + // + // Individuals + // + /////////////////////////////////////////////////////////////////////////////////////// + --> + + + + + <!-- http://example.com/father#anna --> + + <female rdf:about="#anna"> + <hasChild rdf:resource="#heinz"/> + </female> + + + + <!-- http://example.com/father#anton --> + + <male rdf:about="#anton"/> + + + + <!-- http://example.com/father#heinz --> + + <male rdf:about="#heinz"> + <hasChild rdf:resource="#anna"/> + <hasChild rdf:resource="#michelle"/> + <hasChild rdf:resource="#patrick"/> + </male> + + + + <!-- http://example.com/father#katja --> + + <female rdf:about="#katja"/> + + + + <!-- http://example.com/father#katrin --> + + <female rdf:about="#katrin"/> + + + + <!-- http://example.com/father#maria --> + + <female rdf:about="#maria"/> + + + + <!-- http://example.com/father#markus --> + + <male rdf:about="#markus"> + <rdf:type rdf:resource="#father"/> + <hasChild rdf:resource="#anna"/> + <hasChild rdf:resource="#anton"/> + <hasChild rdf:resource="#michelle"/> + <hasChild rdf:resource="#tina"/> + </male> + + + + <!-- http://example.com/father#martin --> + + <male rdf:about="#martin"> + <rdf:type rdf:resource="#father"/> + <hasChild rdf:resource="#maria"/> + <hasChild rdf:resource="#steffi"/> + <hasChild rdf:resource="#tim"/> + </male> + + + + <!-- http://example.com/father#michelle --> + + <female rdf:about="#michelle"/> + + + + <!-- http://example.com/father#nicole --> + + <female rdf:about="#nicole"/> + + + + <!-- http://example.com/father#patrick --> + + <male rdf:about="#patrick"/> + + + + <!-- http://example.com/father#sarah --> + + <female rdf:about="#sarah"/> + + + + <!-- http://example.com/father#stefan --> + + <father rdf:about="#stefan"> + <rdf:type rdf:resource="#male"/> + <hasChild rdf:resource="#sarah"/> + <hasChild rdf:resource="#tina"/> + </father> + + + + <!-- http://example.com/father#steffi --> + + <female rdf:about="#steffi"/> + + + + <!-- http://example.com/father#thomas --> + + <father rdf:about="#thomas"> + <rdf:type rdf:resource="#male"/> + <hasChild rdf:resource="#katrin"/> + <hasChild rdf:resource="#nicole"/> + </father> + + + + <!-- http://example.com/father#tim --> + + <male rdf:about="#tim"> + <rdf:type rdf:resource="#father"/> + </male> + + + + <!-- http://example.com/father#tina --> + + <female rdf:about="#tina"/> +</rdf:RDF> Copied: trunk/examples/ore/neg_has_some.owl (from rev 1244, trunk/src/dl-learner/org/dllearner/tools/ore/neg_has_some.owl) =================================================================== --- trunk/examples/ore/neg_has_some.owl (rev 0) +++ trunk/examples/ore/neg_has_some.owl 2008-09-24 08:58:31 UTC (rev 1250) @@ -0,0 +1,149 @@ +<?xml version="1.0"?> + + +<!DOCTYPE rdf:RDF [ + <!ENTITY father "http://example.com/father#" > + <!ENTITY owl "http://www.w3.org/2002/07/owl#" > + <!ENTITY owl2 "http://www.w3.org/2006/12/owl2#" > + <!ENTITY xsd "http://www.w3.org/2001/XMLSchema#" > + <!ENTITY owl2xml "http://www.w3.org/2006/12/owl2-xml#" > + <!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#" > + <!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#" > +]> + + +<rdf:RDF xmlns="http://example.com/father#" + xml:base="http://example.com/father" + xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" + xmlns:owl2xml="http://www.w3.org/2006/12/owl2-xml#" + xmlns:owl="http://www.w3.org/2002/07/owl#" + xmlns:xsd="http://www.w3.org/2001/XMLSchema#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:owl2="http://www.w3.org/2006/12/owl2#" + xmlns:father="http://example.com/father#"> + <owl:Ontology rdf:about=""/> + + + + <!-- + /////////////////////////////////////////////////////////////////////////////////////// + // + // Object Properties + // + /////////////////////////////////////////////////////////////////////////////////////// + --> + + + + + <!-- http://example.com/father#hasChild --> + + <owl:ObjectProperty rdf:about="#hasChild"/> + + + + <!-- + /////////////////////////////////////////////////////////////////////////////////////// + // + // Classes + // + /////////////////////////////////////////////////////////////////////////////////////// + --> + + + + + <!-- http://example.com/father#father --> + + <owl:Class rdf:about="#father"/> + + + + <!-- http://example.com/father#female --> + + <owl:Class rdf:about="#female"/> + + + + <!-- http://example.com/father#male --> + + <owl:Class rdf:about="#male"> + <owl:equivalentClass> + <owl:Class> + <owl:complementOf rdf:resource="#female"/> + </owl:Class> + </owl:equivalentClass> + </owl:Class> + + + + <!-- + /////////////////////////////////////////////////////////////////////////////////////// + // + // Individuals + // + /////////////////////////////////////////////////////////////////////////////////////// + --> + + + + + <!-- http://example.com/father#anna --> + + <female rdf:about="#anna"> + <hasChild rdf:resource="#heinz"/> + </female> + + + + <!-- http://example.com/father#heinz --> + + <male rdf:about="#heinz"> + <hasChild rdf:resource="#tina"/> + </male> + + + + <!-- http://example.com/father#markus --> + + <male rdf:about="#markus"> + <rdf:type rdf:resource="#father"/> + <hasChild rdf:resource="#anna"/> + </male> + + + + <!-- http://example.com/father#martin --> + + <male rdf:about="#martin"> + <rdf:type rdf:resource="#father"/> + <hasChild rdf:resource="#michelle"/> + </male> + + + + <!-- http://example.com/father#michelle --> + + <female rdf:about="#michelle"/> + + + + <!-- http://example.com/father#nina --> + + <female rdf:about="#nina"/> + + + + <!-- http://example.com/father#stefan --> + + <father rdf:about="#stefan"> + <rdf:type rdf:resource="#male"/> + <hasChild rdf:resource="#nina"/> + </father> + + + + <!-- http://example.com/father#tina --> + + <female rdf:about="#tina"/> +</rdf:RDF> Copied: trunk/examples/ore/pos_b.owl (from rev 1244, trunk/src/dl-learner/org/dllearner/tools/ore/pos_b.owl) =================================================================== --- trunk/examples/ore/pos_b.owl (rev 0) +++ trunk/examples/ore/pos_b.owl 2008-09-24 08:58:31 UTC (rev 1250) @@ -0,0 +1,212 @@ +<?xml version="1.0"?> + + +<!DOCTYPE rdf:RDF [ + <!ENTITY father "http://example.com/father#" > + <!ENTITY owl "http://www.w3.org/2002/07/owl#" > + <!ENTITY owl2 "http://www.w3.org/2006/12/owl2#" > + <!ENTITY xsd "http://www.w3.org/2001/XMLSchema#" > + <!ENTITY owl2xml "http://www.w3.org/2006/12/owl2-xml#" > + <!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#" > + <!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#" > +]> + + +<rdf:RDF xmlns="http://example.com/father#" + xml:base="http://example.com/father" + xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" + xmlns:owl2xml="http://www.w3.org/2006/12/owl2-xml#" + xmlns:owl="http://www.w3.org/2002/07/owl#" + xmlns:xsd="http://www.w3.org/2001/XMLSchema#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:owl2="http://www.w3.org/2006/12/owl2#" + xmlns:father="http://example.com/father#"> + <owl:Ontology rdf:about=""/> + + + + <!-- + /////////////////////////////////////////////////////////////////////////////////////// + // + // Object Properties + // + /////////////////////////////////////////////////////////////////////////////////////// + --> + + + + + <!-- http://example.com/father#hasChild --> + + <owl:ObjectProperty rdf:about="#hasChild"/> + + + + <!-- + /////////////////////////////////////////////////////////////////////////////////////// + // + // Classes + // + /////////////////////////////////////////////////////////////////////////////////////// + --> + + + + + <!-- http://example.com/father#father --> + + <owl:Class rdf:about="#father"> + <rdfs:subClassOf rdf:resource="&owl;Thing"/> + </owl:Class> + + + + <!-- http://example.com/father#female --> + + <owl:Class rdf:about="#female"/> + + + + <!-- http://example.com/father#male --> + + <owl:Class rdf:about="#male"> + <owl:equivalentClass> + <owl:Class> + <owl:complementOf rdf:resource="#female"/> + </owl:Class> + </owl:equivalentClass> + </owl:Class> + + + + <!-- http://www.w3.org/2002/07/owl#Thing --> + + <owl:Class rdf:about="&owl;Thing"/> + + + + <!-- + /////////////////////////////////////////////////////////////////////////////////////// + // + // Individuals + // + /////////////////////////////////////////////////////////////////////////////////////// + --> + + + + + <!-- http://example.com/father#Christian --> + + <father rdf:about="#Christian"> + <rdf:type rdf:resource="#female"/> + <hasChild rdf:resource="#lydia"/> + </father> + + + + <!-- http://example.com/father#Connie --> + + <female rdf:about="#Connie"> + <hasChild rdf:resource="#sara"/> + </female> + + + + <!-- http://example.com/father#Paul --> + + <male rdf:about="#Paul"> + <rdf:type rdf:resource="#father"/> + <hasChild rdf:resource="#Connie"/> + <hasChild rdf:resource="#stefanie"/> + </male> + + + + <!-- http://example.com/father#anna --> + + <female rdf:about="#anna"> + <hasChild rdf:resource="#heinz"/> + </female> + + + + <!-- http://example.com/father#christine --> + + <female rdf:about="#christine"/> + + + + <!-- http://example.com/father#heinz --> + + <male rdf:about="#heinz"> + <hasChild rdf:resource="#stefan"/> + </male> + + + + <!-- http://example.com/father#lydia --> + + <female rdf:about="#lydia"/> + + + + <!-- http://example.com/father#markus --> + + <male rdf:about="#markus"> + <rdf:type rdf:resource="#father"/> + <hasChild rdf:resource="#anna"/> + <hasChild rdf:resource="#christine"/> + </male> + + + + <!-- http://example.com/father#martin --> + + <male rdf:about="#martin"> + <rdf:type rdf:resource="#father"/> + <hasChild rdf:resource="#heinz"/> + </male> + + + + <!-- http://example.com/father#michelle --> + + <female rdf:about="#michelle"> + <rdf:type rdf:resource="#father"/> + </female> + + + + <!-- http://example.com/father#nadine --> + + <female rdf:about="#nadine"/> + + + + <!-- http://example.com/father#sara --> + + <female rdf:about="#sara"> + <hasChild rdf:resource="#christine"/> + </female> + + + + <!-- http://example.com/father#stefan --> + + <father rdf:about="#stefan"> + <rdf:type rdf:resource="#male"/> + <hasChild rdf:resource="#markus"/> + </father> + + + + <!-- http://example.com/father#stefanie --> + + <female rdf:about="#stefanie"> + <rdf:type rdf:resource="#father"/> + <hasChild rdf:resource="#lydia"/> + <hasChild rdf:resource="#nadine"/> + <hasChild rdf:resource="#sara"/> + </female> +</rdf:RDF> Copied: trunk/examples/ore/pos_has_all.owl (from rev 1244, trunk/src/dl-learner/org/dllearner/tools/ore/pos_has_all.owl) =================================================================== --- trunk/examples/ore/pos_has_all.owl (rev 0) +++ trunk/examples/ore/pos_has_all.owl 2008-09-24 08:58:31 UTC (rev 1250) @@ -0,0 +1,269 @@ +<?xml version="1.0"?> + + +<!DOCTYPE rdf:RDF [ + <!ENTITY father "http://example.com/father#" > + <!ENTITY owl "http://www.w3.org/2002/07/owl#" > + <!ENTITY owl2 "http://www.w3.org/2006/12/owl2#" > + <!ENTITY xsd "http://www.w3.org/2001/XMLSchema#" > + <!ENTITY owl2xml "http://www.w3.org/2006/12/owl2-xml#" > + <!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#" > + <!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#" > +]> + + +<rdf:RDF xmlns="http://example.com/father#" + xml:base="http://example.com/father" + xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" + xmlns:owl2xml="http://www.w3.org/2006/12/owl2-xml#" + xmlns:owl="http://www.w3.org/2002/07/owl#" + xmlns:xsd="http://www.w3.org/2001/XMLSchema#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:owl2="http://www.w3.org/20... [truncated message content] |
From: <jen...@us...> - 2008-09-27 07:48:22
|
Revision: 1283 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=1283&view=rev Author: jenslehmann Date: 2008-09-27 07:48:14 +0000 (Sat, 27 Sep 2008) Log Message: ----------- - working hasValue support (frequency threshold currently at 3) - use refexamples.useHasValueConstructor = true to turn on hasValue support (turned off by default) - provided examples in semantic_bible folder Modified Paths: -------------- trunk/examples/semantic_bible/hasvalue_example.conf trunk/src/dl-learner/org/dllearner/algorithms/refexamples/ExampleBasedROLComponent.java trunk/src/dl-learner/org/dllearner/core/config/CommonConfigOptions.java trunk/src/dl-learner/org/dllearner/core/owl/ObjectValueRestriction.java trunk/src/dl-learner/org/dllearner/core/owl/Restriction.java trunk/src/dl-learner/org/dllearner/core/owl/ValueRestriction.java trunk/src/dl-learner/org/dllearner/gui/StartGUI.java trunk/src/dl-learner/org/dllearner/refinementoperators/RhoDRDown.java Added Paths: ----------- trunk/examples/semantic_bible/hasvalue_simple.conf trunk/examples/semantic_bible/hasvalue_simple.kb Modified: trunk/examples/semantic_bible/hasvalue_example.conf =================================================================== --- trunk/examples/semantic_bible/hasvalue_example.conf 2008-09-26 21:16:59 UTC (rev 1282) +++ trunk/examples/semantic_bible/hasvalue_example.conf 2008-09-27 07:48:14 UTC (rev 1283) @@ -1,11 +1,10 @@ /** - * It should learn ethnicity hasValue Jewish, but does not work for some reason. + * Learns ethnicity hasValue Jewish (+ potentially something more e.g. Man AND ethnicity hasValue Jewish). */ -import("../NTNcombined.owl"); +import("NTNcombined.owl"); -// reasoner = owlAPIReasoner; -owlAPIReasoner.reasonerType = pellet; +refexamples.useHasValueConstructor = true; +"http://semanticbible.org/ns/2006/NTNames#Hezron" +"http://semanticbible.org/ns/2006/NTNames#Jehoshaphat" Added: trunk/examples/semantic_bible/hasvalue_simple.conf =================================================================== --- trunk/examples/semantic_bible/hasvalue_simple.conf (rev 0) +++ trunk/examples/semantic_bible/hasvalue_simple.conf 2008-09-27 07:48:14 UTC (rev 1283) @@ -0,0 +1,11 @@ +import("hasvalue_simple.kb"); + +reasoner = owlAPIReasoner; +refexamples.useHasValueConstructor = true; + ++a ++b ++c +-e +-f + Added: trunk/examples/semantic_bible/hasvalue_simple.kb =================================================================== --- trunk/examples/semantic_bible/hasvalue_simple.kb (rev 0) +++ trunk/examples/semantic_bible/hasvalue_simple.kb 2008-09-27 07:48:14 UTC (rev 1283) @@ -0,0 +1,9 @@ +knows(a,d). +knows(b,d). +knows(c,d). +knows(e,a). +knows(f,b). + +// TODO bug: apparently there are problems if no class is present in the background ontology, +// so we need to add one +person(a). Modified: trunk/src/dl-learner/org/dllearner/algorithms/refexamples/ExampleBasedROLComponent.java =================================================================== --- trunk/src/dl-learner/org/dllearner/algorithms/refexamples/ExampleBasedROLComponent.java 2008-09-26 21:16:59 UTC (rev 1282) +++ trunk/src/dl-learner/org/dllearner/algorithms/refexamples/ExampleBasedROLComponent.java 2008-09-27 07:48:14 UTC (rev 1283) @@ -115,6 +115,7 @@ private boolean improveSubsumptionHierarchy = true; private boolean useAllConstructor = CommonConfigOptions.useAllConstructorDefault; private boolean useExistsConstructor = CommonConfigOptions.useExistsConstructorDefault; + private boolean useHasValueConstructor = CommonConfigOptions.useHasValueConstructorDefault; private boolean useCardinalityRestrictions = CommonConfigOptions.useCardinalityRestrictionsDefault; private boolean useNegation = CommonConfigOptions.useNegationDefault; private boolean useBooleanDatatypes = CommonConfigOptions.useBooleanDatatypesDefault; @@ -190,6 +191,7 @@ options.add(CommonConfigOptions.ignoredRoles()); options.add(CommonConfigOptions.useAllConstructor()); options.add(CommonConfigOptions.useExistsConstructor()); + options.add(CommonConfigOptions.useHasValueConstructor()); options.add(CommonConfigOptions.useCardinalityRestrictions()); options.add(CommonConfigOptions.useNegation()); options.add(CommonConfigOptions.useBooleanDatatypes()); @@ -254,6 +256,8 @@ useAllConstructor = (Boolean) entry.getValue(); } else if(name.equals("useExistsConstructor")) { useExistsConstructor = (Boolean) entry.getValue(); + } else if(name.equals("useHasValueConstructor")) { + useHasValueConstructor = (Boolean) entry.getValue(); } else if(name.equals("useCardinalityRestrictions")) { useCardinalityRestrictions = (Boolean) entry.getValue(); } else if(name.equals("useNegation")) { @@ -365,6 +369,7 @@ applyExistsFilter, useAllConstructor, useExistsConstructor, + useHasValueConstructor, useCardinalityRestrictions, useNegation, useBooleanDatatypes, Modified: trunk/src/dl-learner/org/dllearner/core/config/CommonConfigOptions.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/config/CommonConfigOptions.java 2008-09-26 21:16:59 UTC (rev 1282) +++ trunk/src/dl-learner/org/dllearner/core/config/CommonConfigOptions.java 2008-09-27 07:48:14 UTC (rev 1283) @@ -40,6 +40,7 @@ //public static boolean improveSubsumptionHierarchyDefault = true; public static boolean useAllConstructorDefault = true; public static boolean useExistsConstructorDefault = true; + public static boolean useHasValueConstructorDefault = true; public static boolean useCardinalityRestrictionsDefault = true; public static boolean useNegationDefault = true; public static boolean useBooleanDatatypesDefault = true; @@ -101,6 +102,10 @@ return new BooleanConfigOption("useExistsConstructor", "specifies whether the existential concept constructor is used in the learning algorithm",useExistsConstructorDefault); } + public static BooleanConfigOption useHasValueConstructor() { + return new BooleanConfigOption("useHasValueConstructor", "specifies whether the hasValue constructor is used in the learning algorithm",useHasValueConstructorDefault); + } + public static BooleanConfigOption useCardinalityRestrictions() { return new BooleanConfigOption("useCardinalityRestrictions", "specifies whether CardinalityRestrictions is used in the learning algorithm",useCardinalityRestrictionsDefault); } Modified: trunk/src/dl-learner/org/dllearner/core/owl/ObjectValueRestriction.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/owl/ObjectValueRestriction.java 2008-09-26 21:16:59 UTC (rev 1282) +++ trunk/src/dl-learner/org/dllearner/core/owl/ObjectValueRestriction.java 2008-09-27 07:48:14 UTC (rev 1283) @@ -23,7 +23,7 @@ /** * Restricts the value of an object property to a single individual - * (corresponds to owl:hasValue). + * (corresponds to owl:hasValue) * * @author Jens Lehmann * @@ -42,8 +42,7 @@ */ @Override public String toManchesterSyntaxString(String baseURI, Map<String, String> prefixes) { - // TODO Auto-generated method stub - return null; + return restrictedPropertyExpression.toString(baseURI, prefixes) + " value " + value.toString(baseURI, prefixes); } /* (non-Javadoc) @@ -51,7 +50,6 @@ */ @Override public int getArity() { - // TODO Auto-generated method stub return 0; } @@ -59,21 +57,18 @@ * @see org.dllearner.core.owl.KBElement#getLength() */ public int getLength() { - // TODO Auto-generated method stub - return 0; + return 3; } /* (non-Javadoc) * @see org.dllearner.core.owl.KBElement#toString(java.lang.String, java.util.Map) */ public String toString(String baseURI, Map<String, String> prefixes) { - // TODO Auto-generated method stub - return null; + return restrictedPropertyExpression.toString(baseURI, prefixes) + " hasValue " + value.toString(baseURI, prefixes); } public String toKBSyntaxString(String baseURI, Map<String, String> prefixes) { - // TODO Auto-generated method stub - return null; + return restrictedPropertyExpression.toKBSyntaxString(baseURI, prefixes) + " hasValue " + value.toKBSyntaxString(baseURI, prefixes); } public Individual getIndividual() { Modified: trunk/src/dl-learner/org/dllearner/core/owl/Restriction.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/owl/Restriction.java 2008-09-26 21:16:59 UTC (rev 1282) +++ trunk/src/dl-learner/org/dllearner/core/owl/Restriction.java 2008-09-27 07:48:14 UTC (rev 1283) @@ -27,7 +27,7 @@ */ public abstract class Restriction extends Description { - PropertyExpression restrictedPropertyExpression; + protected PropertyExpression restrictedPropertyExpression; public Restriction(PropertyExpression restrictedPropertyExpression) { this.restrictedPropertyExpression = restrictedPropertyExpression; Modified: trunk/src/dl-learner/org/dllearner/core/owl/ValueRestriction.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/owl/ValueRestriction.java 2008-09-26 21:16:59 UTC (rev 1282) +++ trunk/src/dl-learner/org/dllearner/core/owl/ValueRestriction.java 2008-09-27 07:48:14 UTC (rev 1283) @@ -27,7 +27,7 @@ */ public abstract class ValueRestriction extends Restriction { - KBElement value; + protected KBElement value; public ValueRestriction(PropertyExpression propertyExpression, KBElement value) { super(propertyExpression); Modified: trunk/src/dl-learner/org/dllearner/gui/StartGUI.java =================================================================== --- trunk/src/dl-learner/org/dllearner/gui/StartGUI.java 2008-09-26 21:16:59 UTC (rev 1282) +++ trunk/src/dl-learner/org/dllearner/gui/StartGUI.java 2008-09-27 07:48:14 UTC (rev 1283) @@ -253,7 +253,7 @@ Logger rootLogger = Logger.getRootLogger(); rootLogger.removeAllAppenders(); rootLogger.addAppender(consoleAppender); - rootLogger.setLevel(Level.TRACE); + rootLogger.setLevel(Level.DEBUG); File file = null; if (args.length > 0) Modified: trunk/src/dl-learner/org/dllearner/refinementoperators/RhoDRDown.java =================================================================== --- trunk/src/dl-learner/org/dllearner/refinementoperators/RhoDRDown.java 2008-09-26 21:16:59 UTC (rev 1282) +++ trunk/src/dl-learner/org/dllearner/refinementoperators/RhoDRDown.java 2008-09-27 07:48:14 UTC (rev 1283) @@ -150,8 +150,6 @@ private Map<DatatypeProperty,List<Double>> splits = new TreeMap<DatatypeProperty,List<Double>>(); private int maxNrOfSplits = 10; - // experimental support for hasValue - private boolean useHasValue = false; // data structure for a simple frequent pattern matching preprocessing phase private int frequencyThreshold = 3; private Map<ObjectProperty, Map<Individual, Integer>> valueFrequency = new HashMap<ObjectProperty, Map<Individual, Integer>>(); @@ -166,6 +164,7 @@ private boolean applyExistsFilter = true; private boolean useAllConstructor = true; private boolean useExistsConstructor = true; + private boolean useHasValueConstructor = false; private boolean useCardinalityRestrictions = true; private boolean useNegation = true; private boolean useBooleanDatatypes = true; @@ -181,16 +180,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, true, true, null); + this(reasoningService, true, true, true, true, true, true, true, true, true, null); } public RhoDRDown(ReasoningService reasoningService, boolean applyAllFilter, boolean applyExistsFilter, boolean useAllConstructor, - boolean useExistsConstructor,boolean useCardinalityRestrictions,boolean useNegation, boolean useBooleanDatatypes, boolean useDoubleDatatypes, NamedClass startClass) { + boolean useExistsConstructor, boolean useHasValueConstructor, boolean useCardinalityRestrictions,boolean useNegation, boolean useBooleanDatatypes, boolean useDoubleDatatypes, NamedClass startClass) { this.rs = reasoningService; this.applyAllFilter = applyAllFilter; this.applyExistsFilter = applyExistsFilter; this.useAllConstructor = useAllConstructor; this.useExistsConstructor = useExistsConstructor; + this.useHasValueConstructor = useHasValueConstructor; this.useCardinalityRestrictions = useCardinalityRestrictions; this.useNegation = useNegation; this.useBooleanDatatypes = useBooleanDatatypes; @@ -204,7 +204,7 @@ opDomains.put(op, rs.getDomain(op)); opRanges.put(op, rs.getRange(op)); - if(useHasValue) { + if(useHasValueConstructor) { // init Map<Individual, Integer> opMap = new TreeMap<Individual, Integer>(); valueFrequency.put(op, opMap); @@ -229,7 +229,7 @@ // after threshold is reached) Set<Individual> frequentInds = new TreeSet<Individual>(); for(Individual i : opMap.keySet()) { - if(opMap.get(i) > frequencyThreshold) { + if(opMap.get(i) >= frequencyThreshold) { frequentInds.add(i); } } @@ -455,12 +455,12 @@ } // rule 4: EXISTS r.TOP => EXISTS r.{value} - if(useHasValue && description.getChild(0) instanceof Thing) { + if(useHasValueConstructor && description.getChild(0) instanceof Thing) { // watch out for frequent patterns Set<Individual> frequentInds = frequentValues.get(role); if(frequentInds != null) { for(Individual ind : frequentInds) { - ObjectValueRestriction ovr = new ObjectValueRestriction(ar, ind); + ObjectValueRestriction ovr = new ObjectValueRestriction((ObjectProperty)role, ind); refinements.add(ovr); } } @@ -661,8 +661,11 @@ boolean maxDoubleOccurence = false; // rule 2: min restrictions at most once boolean minDoubleOccurence = false; - // rule 3: no double boolean datatypes + // rule 3: no double occurences of boolean datatypes TreeSet<DatatypeProperty> occuredDP = new TreeSet<DatatypeProperty>(); + // rule 4: no double occurences of hasValue restrictions + TreeSet<ObjectProperty> occuredVR = new TreeSet<ObjectProperty>(); + for(Description child : intersection.getChildren()) { if(child instanceof DatatypeSomeRestriction) { DataRange dr = ((DatatypeSomeRestriction)child).getDataRange(); @@ -683,6 +686,10 @@ // return false if the boolean property exists already if(!occuredDP.add(dp)) return false; + } else if(child instanceof ObjectValueRestriction) { + ObjectProperty op = (ObjectProperty) ((ObjectValueRestriction)child).getRestrictedPropertyExpression(); + if(!occuredVR.add(op)) + return false; } // System.out.println(child.getClass()); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jen...@us...> - 2008-10-01 07:49:11
|
Revision: 1332 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=1332&view=rev Author: jenslehmann Date: 2008-10-01 07:48:46 +0000 (Wed, 01 Oct 2008) Log Message: ----------- - moved RoleLearning to scripts - added new option valueFrequencyThreshold to learning algorithm Modified Paths: -------------- trunk/bin/dllearner trunk/bin/dllearner.bat trunk/bin/gui trunk/bin/gui.bat trunk/bin/quickstart trunk/bin/quickstart.bat trunk/bin/ws trunk/bin/ws.bat trunk/src/dl-learner/org/dllearner/algorithms/refexamples/ExampleBasedROLComponent.java trunk/src/dl-learner/org/dllearner/core/config/CommonConfigOptions.java trunk/src/dl-learner/org/dllearner/core/configurators/BruteForceLearnerConfigurator.java trunk/src/dl-learner/org/dllearner/core/configurators/ComponentFactory.java trunk/src/dl-learner/org/dllearner/core/configurators/Configurator.java trunk/src/dl-learner/org/dllearner/core/configurators/DBpediaNavigationSuggestorConfigurator.java trunk/src/dl-learner/org/dllearner/core/configurators/DIGReasonerConfigurator.java trunk/src/dl-learner/org/dllearner/core/configurators/ExampleBasedROLComponentConfigurator.java trunk/src/dl-learner/org/dllearner/core/configurators/FastInstanceCheckerConfigurator.java trunk/src/dl-learner/org/dllearner/core/configurators/FastRetrievalReasonerConfigurator.java trunk/src/dl-learner/org/dllearner/core/configurators/GPConfigurator.java trunk/src/dl-learner/org/dllearner/core/configurators/KBFileConfigurator.java trunk/src/dl-learner/org/dllearner/core/configurators/OWLAPIOntologyConfigurator.java trunk/src/dl-learner/org/dllearner/core/configurators/OWLAPIReasonerConfigurator.java trunk/src/dl-learner/org/dllearner/core/configurators/OWLFileConfigurator.java trunk/src/dl-learner/org/dllearner/core/configurators/PosNegDefinitionLPConfigurator.java trunk/src/dl-learner/org/dllearner/core/configurators/PosNegDefinitionLPStrictConfigurator.java trunk/src/dl-learner/org/dllearner/core/configurators/PosNegInclusionLPConfigurator.java trunk/src/dl-learner/org/dllearner/core/configurators/PosOnlyDefinitionLPConfigurator.java trunk/src/dl-learner/org/dllearner/core/configurators/PosOnlyInclusionLPConfigurator.java trunk/src/dl-learner/org/dllearner/core/configurators/ROLearnerConfigurator.java trunk/src/dl-learner/org/dllearner/core/configurators/RandomGuesserConfigurator.java trunk/src/dl-learner/org/dllearner/core/configurators/SimpleSuggestionLearningAlgorithmConfigurator.java trunk/src/dl-learner/org/dllearner/core/configurators/SparqlKnowledgeSourceConfigurator.java trunk/src/dl-learner/org/dllearner/refinementoperators/RhoDRDown.java trunk/src/dl-learner/org/dllearner/scripts/SemanticBibleComparison.java Added Paths: ----------- trunk/src/dl-learner/org/dllearner/scripts/RoleLearning.java Removed Paths: ------------- trunk/src/dl-learner/org/dllearner/learningproblems/RoleLearning.java Modified: trunk/bin/dllearner =================================================================== --- trunk/bin/dllearner 2008-09-30 23:11:15 UTC (rev 1331) +++ trunk/bin/dllearner 2008-10-01 07:48:46 UTC (rev 1332) @@ -1 +1 @@ -java -cp .:./lib/dig1.1-xmlbeans.jar:./lib/fact/FaCTpp-OWLAPI-v1.1.11.jar:./lib/jamon-2.7.jar:./lib/jena/antlr-2.7.5.jar:./lib/jena/arq.jar:./lib/jena/commons-logging-1.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/log4j.jar:./lib/ore-tool/swingx-0.9.2.jar:./lib/owlapi/owlapi-bin.jar:./lib/pellet/aterm-java-1.6.jar:./lib/pellet/pellet.jar:./lib/pellet/relaxngDatatype.jar:./lib/pellet/xsdlib.jar:./lib/protege/org.protege.editor.core.application.jar:./lib/protege/org.protege.editor.owl.jar:./lib/xbean.jar:./lib/dllearner.jar org.dllearner.cli.Start $@ \ No newline at end of file +java -cp .:./lib/dig1.1-xmlbeans.jar:./lib/fact/FaCTpp-OWLAPI-v1.1.11.jar:./lib/jamon-2.7.jar:./lib/jena/antlr-2.7.5.jar:./lib/jena/arq.jar:./lib/jena/commons-logging-1.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/log4j.jar:./lib/mysql/mysql-connector-java-5.1.6-bin.jar:./lib/ore-tool/swingx-0.9.2.jar:./lib/owlapi/owlapi-bin.jar:./lib/pellet/aterm-java-1.6.jar:./lib/pellet/pellet.jar:./lib/pellet/relaxngDatatype.jar:./lib/pellet/xsdlib.jar:./lib/protege/org.protege.editor.core.application.jar:./lib/protege/org.protege.editor.owl.jar:./lib/xbean.jar:./lib/dllearner.jar org.dllearner.cli.Start $@ \ No newline at end of file Modified: trunk/bin/dllearner.bat =================================================================== --- trunk/bin/dllearner.bat 2008-09-30 23:11:15 UTC (rev 1331) +++ trunk/bin/dllearner.bat 2008-10-01 07:48:46 UTC (rev 1332) @@ -1 +1 @@ -java -Xmx1024m -cp .;.\lib\dig1.1-xmlbeans.jar;.\lib\fact\FaCTpp-OWLAPI-v1.1.11.jar;.\lib\jamon-2.7.jar;.\lib\jena\antlr-2.7.5.jar;.\lib\jena\arq.jar;.\lib\jena\commons-logging-1.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\log4j.jar;.\lib\ore-tool\swingx-0.9.2.jar;.\lib\owlapi\owlapi-bin.jar;.\lib\pellet\aterm-java-1.6.jar;.\lib\pellet\pellet.jar;.\lib\pellet\relaxngDatatype.jar;.\lib\pellet\xsdlib.jar;.\lib\protege\org.protege.editor.core.application.jar;.\lib\protege\org.protege.editor.owl.jar;.\lib\xbean.jar;.\lib\dllearner.jar org.dllearner.cli.Start %* \ No newline at end of file +java -Xmx1024m -cp .;.\lib\dig1.1-xmlbeans.jar;.\lib\fact\FaCTpp-OWLAPI-v1.1.11.jar;.\lib\jamon-2.7.jar;.\lib\jena\antlr-2.7.5.jar;.\lib\jena\arq.jar;.\lib\jena\commons-logging-1.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\log4j.jar;.\lib\mysql\mysql-connector-java-5.1.6-bin.jar;.\lib\ore-tool\swingx-0.9.2.jar;.\lib\owlapi\owlapi-bin.jar;.\lib\pellet\aterm-java-1.6.jar;.\lib\pellet\pellet.jar;.\lib\pellet\relaxngDatatype.jar;.\lib\pellet\xsdlib.jar;.\lib\protege\org.protege.editor.core.application.jar;.\lib\protege\org.protege.editor.owl.jar;.\lib\xbean.jar;.\lib\dllearner.jar org.dllearner.cli.Start %* \ No newline at end of file Modified: trunk/bin/gui =================================================================== --- trunk/bin/gui 2008-09-30 23:11:15 UTC (rev 1331) +++ trunk/bin/gui 2008-10-01 07:48:46 UTC (rev 1332) @@ -1 +1 @@ -java -cp .:./lib/dig1.1-xmlbeans.jar:./lib/fact/FaCTpp-OWLAPI-v1.1.11.jar:./lib/jamon-2.7.jar:./lib/jena/antlr-2.7.5.jar:./lib/jena/arq.jar:./lib/jena/commons-logging-1.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/log4j.jar:./lib/ore-tool/swingx-0.9.2.jar:./lib/owlapi/owlapi-bin.jar:./lib/pellet/aterm-java-1.6.jar:./lib/pellet/pellet.jar:./lib/pellet/relaxngDatatype.jar:./lib/pellet/xsdlib.jar:./lib/protege/org.protege.editor.core.application.jar:./lib/protege/org.protege.editor.owl.jar:./lib/xbean.jar:./lib/dllearner.jar org.dllearner.gui.StartGUI $@ \ No newline at end of file +java -cp .:./lib/dig1.1-xmlbeans.jar:./lib/fact/FaCTpp-OWLAPI-v1.1.11.jar:./lib/jamon-2.7.jar:./lib/jena/antlr-2.7.5.jar:./lib/jena/arq.jar:./lib/jena/commons-logging-1.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/log4j.jar:./lib/mysql/mysql-connector-java-5.1.6-bin.jar:./lib/ore-tool/swingx-0.9.2.jar:./lib/owlapi/owlapi-bin.jar:./lib/pellet/aterm-java-1.6.jar:./lib/pellet/pellet.jar:./lib/pellet/relaxngDatatype.jar:./lib/pellet/xsdlib.jar:./lib/protege/org.protege.editor.core.application.jar:./lib/protege/org.protege.editor.owl.jar:./lib/xbean.jar:./lib/dllearner.jar org.dllearner.gui.StartGUI $@ \ No newline at end of file Modified: trunk/bin/gui.bat =================================================================== --- trunk/bin/gui.bat 2008-09-30 23:11:15 UTC (rev 1331) +++ trunk/bin/gui.bat 2008-10-01 07:48:46 UTC (rev 1332) @@ -1 +1 @@ -java -cp .;.\lib\dig1.1-xmlbeans.jar;.\lib\fact\FaCTpp-OWLAPI-v1.1.11.jar;.\lib\jamon-2.7.jar;.\lib\jena\antlr-2.7.5.jar;.\lib\jena\arq.jar;.\lib\jena\commons-logging-1.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\log4j.jar;.\lib\ore-tool\swingx-0.9.2.jar;.\lib\owlapi\owlapi-bin.jar;.\lib\pellet\aterm-java-1.6.jar;.\lib\pellet\pellet.jar;.\lib\pellet\relaxngDatatype.jar;.\lib\pellet\xsdlib.jar;.\lib\protege\org.protege.editor.core.application.jar;.\lib\protege\org.protege.editor.owl.jar;.\lib\xbean.jar;.\lib\dllearner.jar org.dllearner.gui.StartGUI %* \ No newline at end of file +java -cp .;.\lib\dig1.1-xmlbeans.jar;.\lib\fact\FaCTpp-OWLAPI-v1.1.11.jar;.\lib\jamon-2.7.jar;.\lib\jena\antlr-2.7.5.jar;.\lib\jena\arq.jar;.\lib\jena\commons-logging-1.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\log4j.jar;.\lib\mysql\mysql-connector-java-5.1.6-bin.jar;.\lib\ore-tool\swingx-0.9.2.jar;.\lib\owlapi\owlapi-bin.jar;.\lib\pellet\aterm-java-1.6.jar;.\lib\pellet\pellet.jar;.\lib\pellet\relaxngDatatype.jar;.\lib\pellet\xsdlib.jar;.\lib\protege\org.protege.editor.core.application.jar;.\lib\protege\org.protege.editor.owl.jar;.\lib\xbean.jar;.\lib\dllearner.jar org.dllearner.gui.StartGUI %* \ No newline at end of file Modified: trunk/bin/quickstart =================================================================== --- trunk/bin/quickstart 2008-09-30 23:11:15 UTC (rev 1331) +++ trunk/bin/quickstart 2008-10-01 07:48:46 UTC (rev 1332) @@ -1 +1 @@ -java -cp .:./lib/dig1.1-xmlbeans.jar:./lib/fact/FaCTpp-OWLAPI-v1.1.11.jar:./lib/jamon-2.7.jar:./lib/jena/antlr-2.7.5.jar:./lib/jena/arq.jar:./lib/jena/commons-logging-1.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/log4j.jar:./lib/ore-tool/swingx-0.9.2.jar:./lib/owlapi/owlapi-bin.jar:./lib/pellet/aterm-java-1.6.jar:./lib/pellet/pellet.jar:./lib/pellet/relaxngDatatype.jar:./lib/pellet/xsdlib.jar:./lib/protege/org.protege.editor.core.application.jar:./lib/protege/org.protege.editor.owl.jar:./lib/xbean.jar:./lib/dllearner.jar org.dllearner.cli.QuickStart \ No newline at end of file +java -cp .:./lib/dig1.1-xmlbeans.jar:./lib/fact/FaCTpp-OWLAPI-v1.1.11.jar:./lib/jamon-2.7.jar:./lib/jena/antlr-2.7.5.jar:./lib/jena/arq.jar:./lib/jena/commons-logging-1.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/log4j.jar:./lib/mysql/mysql-connector-java-5.1.6-bin.jar:./lib/ore-tool/swingx-0.9.2.jar:./lib/owlapi/owlapi-bin.jar:./lib/pellet/aterm-java-1.6.jar:./lib/pellet/pellet.jar:./lib/pellet/relaxngDatatype.jar:./lib/pellet/xsdlib.jar:./lib/protege/org.protege.editor.core.application.jar:./lib/protege/org.protege.editor.owl.jar:./lib/xbean.jar:./lib/dllearner.jar org.dllearner.cli.QuickStart \ No newline at end of file Modified: trunk/bin/quickstart.bat =================================================================== --- trunk/bin/quickstart.bat 2008-09-30 23:11:15 UTC (rev 1331) +++ trunk/bin/quickstart.bat 2008-10-01 07:48:46 UTC (rev 1332) @@ -1 +1 @@ -java -Xmx1024m -cp .;.\lib\dig1.1-xmlbeans.jar;.\lib\fact\FaCTpp-OWLAPI-v1.1.11.jar;.\lib\jamon-2.7.jar;.\lib\jena\antlr-2.7.5.jar;.\lib\jena\arq.jar;.\lib\jena\commons-logging-1.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\log4j.jar;.\lib\ore-tool\swingx-0.9.2.jar;.\lib\owlapi\owlapi-bin.jar;.\lib\pellet\aterm-java-1.6.jar;.\lib\pellet\pellet.jar;.\lib\pellet\relaxngDatatype.jar;.\lib\pellet\xsdlib.jar;.\lib\protege\org.protege.editor.core.application.jar;.\lib\protege\org.protege.editor.owl.jar;.\lib\xbean.jar;.\lib\dllearner.jar org.dllearner.cli.QuickStart \ No newline at end of file +java -Xmx1024m -cp .;.\lib\dig1.1-xmlbeans.jar;.\lib\fact\FaCTpp-OWLAPI-v1.1.11.jar;.\lib\jamon-2.7.jar;.\lib\jena\antlr-2.7.5.jar;.\lib\jena\arq.jar;.\lib\jena\commons-logging-1.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\log4j.jar;.\lib\mysql\mysql-connector-java-5.1.6-bin.jar;.\lib\ore-tool\swingx-0.9.2.jar;.\lib\owlapi\owlapi-bin.jar;.\lib\pellet\aterm-java-1.6.jar;.\lib\pellet\pellet.jar;.\lib\pellet\relaxngDatatype.jar;.\lib\pellet\xsdlib.jar;.\lib\protege\org.protege.editor.core.application.jar;.\lib\protege\org.protege.editor.owl.jar;.\lib\xbean.jar;.\lib\dllearner.jar org.dllearner.cli.QuickStart \ No newline at end of file Modified: trunk/bin/ws =================================================================== --- trunk/bin/ws 2008-09-30 23:11:15 UTC (rev 1331) +++ trunk/bin/ws 2008-10-01 07:48:46 UTC (rev 1332) @@ -1 +1 @@ -java -cp .:./lib/dig1.1-xmlbeans.jar:./lib/fact/FaCTpp-OWLAPI-v1.1.11.jar:./lib/jamon-2.7.jar:./lib/jena/antlr-2.7.5.jar:./lib/jena/arq.jar:./lib/jena/commons-logging-1.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/log4j.jar:./lib/ore-tool/swingx-0.9.2.jar:./lib/owlapi/owlapi-bin.jar:./lib/pellet/aterm-java-1.6.jar:./lib/pellet/pellet.jar:./lib/pellet/relaxngDatatype.jar:./lib/pellet/xsdlib.jar:./lib/protege/org.protege.editor.core.application.jar:./lib/protege/org.protege.editor.owl.jar:./lib/xbean.jar:./lib/dllearner.jar org.dllearner.server.DLLearnerWSStart $@ \ No newline at end of file +java -cp .:./lib/dig1.1-xmlbeans.jar:./lib/fact/FaCTpp-OWLAPI-v1.1.11.jar:./lib/jamon-2.7.jar:./lib/jena/antlr-2.7.5.jar:./lib/jena/arq.jar:./lib/jena/commons-logging-1.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/log4j.jar:./lib/mysql/mysql-connector-java-5.1.6-bin.jar:./lib/ore-tool/swingx-0.9.2.jar:./lib/owlapi/owlapi-bin.jar:./lib/pellet/aterm-java-1.6.jar:./lib/pellet/pellet.jar:./lib/pellet/relaxngDatatype.jar:./lib/pellet/xsdlib.jar:./lib/protege/org.protege.editor.core.application.jar:./lib/protege/org.protege.editor.owl.jar:./lib/xbean.jar:./lib/dllearner.jar org.dllearner.server.DLLearnerWSStart $@ \ No newline at end of file Modified: trunk/bin/ws.bat =================================================================== --- trunk/bin/ws.bat 2008-09-30 23:11:15 UTC (rev 1331) +++ trunk/bin/ws.bat 2008-10-01 07:48:46 UTC (rev 1332) @@ -1 +1 @@ -java -cp .;.\lib\dig1.1-xmlbeans.jar;.\lib\fact\FaCTpp-OWLAPI-v1.1.11.jar;.\lib\jamon-2.7.jar;.\lib\jena\antlr-2.7.5.jar;.\lib\jena\arq.jar;.\lib\jena\commons-logging-1.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\log4j.jar;.\lib\ore-tool\swingx-0.9.2.jar;.\lib\owlapi\owlapi-bin.jar;.\lib\pellet\aterm-java-1.6.jar;.\lib\pellet\pellet.jar;.\lib\pellet\relaxngDatatype.jar;.\lib\pellet\xsdlib.jar;.\lib\protege\org.protege.editor.core.application.jar;.\lib\protege\org.protege.editor.owl.jar;.\lib\xbean.jar;.\lib\dllearner.jar org.dllearner.server.DLLearnerWSStart %* \ No newline at end of file +java -cp .;.\lib\dig1.1-xmlbeans.jar;.\lib\fact\FaCTpp-OWLAPI-v1.1.11.jar;.\lib\jamon-2.7.jar;.\lib\jena\antlr-2.7.5.jar;.\lib\jena\arq.jar;.\lib\jena\commons-logging-1.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\log4j.jar;.\lib\mysql\mysql-connector-java-5.1.6-bin.jar;.\lib\ore-tool\swingx-0.9.2.jar;.\lib\owlapi\owlapi-bin.jar;.\lib\pellet\aterm-java-1.6.jar;.\lib\pellet\pellet.jar;.\lib\pellet\relaxngDatatype.jar;.\lib\pellet\xsdlib.jar;.\lib\protege\org.protege.editor.core.application.jar;.\lib\protege\org.protege.editor.owl.jar;.\lib\xbean.jar;.\lib\dllearner.jar org.dllearner.server.DLLearnerWSStart %* \ No newline at end of file Modified: trunk/src/dl-learner/org/dllearner/algorithms/refexamples/ExampleBasedROLComponent.java =================================================================== --- trunk/src/dl-learner/org/dllearner/algorithms/refexamples/ExampleBasedROLComponent.java 2008-09-30 23:11:15 UTC (rev 1331) +++ trunk/src/dl-learner/org/dllearner/algorithms/refexamples/ExampleBasedROLComponent.java 2008-10-01 07:48:46 UTC (rev 1332) @@ -115,7 +115,8 @@ private boolean improveSubsumptionHierarchy = true; private boolean useAllConstructor = CommonConfigOptions.useAllConstructorDefault; private boolean useExistsConstructor = CommonConfigOptions.useExistsConstructorDefault; - private boolean useHasValueConstructor = CommonConfigOptions.useHasValueConstructorDefault; + private boolean useHasValueConstructor = CommonConfigOptions.useHasValueConstructorDefault; + private int valueFrequencyThreshold = CommonConfigOptions.valueFrequencyThresholdDefault; private boolean useCardinalityRestrictions = CommonConfigOptions.useCardinalityRestrictionsDefault; private boolean useNegation = CommonConfigOptions.useNegationDefault; private boolean useBooleanDatatypes = CommonConfigOptions.useBooleanDatatypesDefault; @@ -192,6 +193,7 @@ options.add(CommonConfigOptions.useAllConstructor()); options.add(CommonConfigOptions.useExistsConstructor()); options.add(CommonConfigOptions.useHasValueConstructor()); + options.add(CommonConfigOptions.valueFreqencyThreshold()); options.add(CommonConfigOptions.useCardinalityRestrictions()); options.add(CommonConfigOptions.useNegation()); options.add(CommonConfigOptions.useBooleanDatatypes()); @@ -258,6 +260,8 @@ useExistsConstructor = (Boolean) entry.getValue(); } else if(name.equals("useHasValueConstructor")) { useHasValueConstructor = (Boolean) entry.getValue(); + } else if(name.equals("valueFrequencyThreshold")) { + valueFrequencyThreshold = (Integer) entry.getValue(); } else if(name.equals("useCardinalityRestrictions")) { useCardinalityRestrictions = (Boolean) entry.getValue(); } else if(name.equals("useNegation")) { @@ -370,6 +374,7 @@ useAllConstructor, useExistsConstructor, useHasValueConstructor, + valueFrequencyThreshold, useCardinalityRestrictions, useNegation, useBooleanDatatypes, Modified: trunk/src/dl-learner/org/dllearner/core/config/CommonConfigOptions.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/config/CommonConfigOptions.java 2008-09-30 23:11:15 UTC (rev 1331) +++ trunk/src/dl-learner/org/dllearner/core/config/CommonConfigOptions.java 2008-10-01 07:48:46 UTC (rev 1332) @@ -41,6 +41,7 @@ public static boolean useAllConstructorDefault = true; public static boolean useExistsConstructorDefault = true; public static boolean useHasValueConstructorDefault = false; + public static int valueFrequencyThresholdDefault = 3; public static boolean useCardinalityRestrictionsDefault = true; public static boolean useNegationDefault = true; public static boolean useBooleanDatatypesDefault = true; @@ -106,6 +107,10 @@ return new BooleanConfigOption("useHasValueConstructor", "specifies whether the hasValue constructor is used in the learning algorithm",useHasValueConstructorDefault); } + public static IntegerConfigOption valueFreqencyThreshold() { + return new IntegerConfigOption("valueFrequencyThreshold", "specifies how often an object must occur as value in order to be considered for hasValue restrictions",valueFrequencyThresholdDefault); + } + public static BooleanConfigOption useCardinalityRestrictions() { return new BooleanConfigOption("useCardinalityRestrictions", "specifies whether CardinalityRestrictions is used in the learning algorithm",useCardinalityRestrictionsDefault); } Modified: trunk/src/dl-learner/org/dllearner/core/configurators/BruteForceLearnerConfigurator.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/configurators/BruteForceLearnerConfigurator.java 2008-09-30 23:11:15 UTC (rev 1331) +++ trunk/src/dl-learner/org/dllearner/core/configurators/BruteForceLearnerConfigurator.java 2008-10-01 07:48:46 UTC (rev 1332) @@ -16,7 +16,7 @@ * 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.core.configurators; Modified: trunk/src/dl-learner/org/dllearner/core/configurators/ComponentFactory.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/configurators/ComponentFactory.java 2008-09-30 23:11:15 UTC (rev 1331) +++ trunk/src/dl-learner/org/dllearner/core/configurators/ComponentFactory.java 2008-10-01 07:48:46 UTC (rev 1332) @@ -16,7 +16,7 @@ * 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.core.configurators; @@ -42,7 +42,6 @@ import org.dllearner.learningproblems.PosNegInclusionLP; import org.dllearner.learningproblems.PosOnlyDefinitionLP; import org.dllearner.learningproblems.PosOnlyInclusionLP; -import org.dllearner.learningproblems.RoleLearning; import org.dllearner.reasoning.DIGReasoner; import org.dllearner.reasoning.FastInstanceChecker; import org.dllearner.reasoning.FastRetrievalReasoner; @@ -168,16 +167,6 @@ } /** -* @param positiveExamples positive examples -* @param negativeExamples negative examples -* @param reasoningService see ReasoningService -* @return a component ready for initialization RoleLearning -**/ -public static RoleLearning getRoleLearning(ReasoningService reasoningService, Set<String> positiveExamples, Set<String> negativeExamples) { -return RoleLearningConfigurator.getRoleLearning(reasoningService, positiveExamples, negativeExamples); -} - -/** * @param learningProblem see LearningProblem * @param reasoningService see ReasoningService * @throws LearningProblemUnsupportedException see Modified: trunk/src/dl-learner/org/dllearner/core/configurators/Configurator.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/configurators/Configurator.java 2008-09-30 23:11:15 UTC (rev 1331) +++ trunk/src/dl-learner/org/dllearner/core/configurators/Configurator.java 2008-10-01 07:48:46 UTC (rev 1332) @@ -16,7 +16,7 @@ * 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.core.configurators; Modified: trunk/src/dl-learner/org/dllearner/core/configurators/DBpediaNavigationSuggestorConfigurator.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/configurators/DBpediaNavigationSuggestorConfigurator.java 2008-09-30 23:11:15 UTC (rev 1331) +++ trunk/src/dl-learner/org/dllearner/core/configurators/DBpediaNavigationSuggestorConfigurator.java 2008-10-01 07:48:46 UTC (rev 1332) @@ -16,7 +16,7 @@ * 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.core.configurators; Modified: trunk/src/dl-learner/org/dllearner/core/configurators/DIGReasonerConfigurator.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/configurators/DIGReasonerConfigurator.java 2008-09-30 23:11:15 UTC (rev 1331) +++ trunk/src/dl-learner/org/dllearner/core/configurators/DIGReasonerConfigurator.java 2008-10-01 07:48:46 UTC (rev 1332) @@ -16,7 +16,7 @@ * 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.core.configurators; Modified: trunk/src/dl-learner/org/dllearner/core/configurators/ExampleBasedROLComponentConfigurator.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/configurators/ExampleBasedROLComponentConfigurator.java 2008-09-30 23:11:15 UTC (rev 1331) +++ trunk/src/dl-learner/org/dllearner/core/configurators/ExampleBasedROLComponentConfigurator.java 2008-10-01 07:48:46 UTC (rev 1332) @@ -16,7 +16,7 @@ * 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.core.configurators; @@ -216,7 +216,7 @@ /** * useHasValueConstructor specifies whether the hasValue constructor is used in the learning algorithm. * mandatory: false| reinit necessary: true -* default value: true +* default value: false * @return boolean **/ public boolean getUseHasValueConstructor() { @@ -505,7 +505,7 @@ /** * @param useHasValueConstructor specifies whether the hasValue constructor is used in the learning algorithm. * mandatory: false| reinit necessary: true -* default value: true +* default value: false **/ public void setUseHasValueConstructor(boolean useHasValueConstructor) { ComponentManager.getInstance().applyConfigEntry(exampleBasedROLComponent, "useHasValueConstructor", useHasValueConstructor); Modified: trunk/src/dl-learner/org/dllearner/core/configurators/FastInstanceCheckerConfigurator.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/configurators/FastInstanceCheckerConfigurator.java 2008-09-30 23:11:15 UTC (rev 1331) +++ trunk/src/dl-learner/org/dllearner/core/configurators/FastInstanceCheckerConfigurator.java 2008-10-01 07:48:46 UTC (rev 1332) @@ -16,7 +16,7 @@ * 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.core.configurators; Modified: trunk/src/dl-learner/org/dllearner/core/configurators/FastRetrievalReasonerConfigurator.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/configurators/FastRetrievalReasonerConfigurator.java 2008-09-30 23:11:15 UTC (rev 1331) +++ trunk/src/dl-learner/org/dllearner/core/configurators/FastRetrievalReasonerConfigurator.java 2008-10-01 07:48:46 UTC (rev 1332) @@ -16,7 +16,7 @@ * 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.core.configurators; Modified: trunk/src/dl-learner/org/dllearner/core/configurators/GPConfigurator.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/configurators/GPConfigurator.java 2008-09-30 23:11:15 UTC (rev 1331) +++ trunk/src/dl-learner/org/dllearner/core/configurators/GPConfigurator.java 2008-10-01 07:48:46 UTC (rev 1332) @@ -16,7 +16,7 @@ * 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.core.configurators; Modified: trunk/src/dl-learner/org/dllearner/core/configurators/KBFileConfigurator.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/configurators/KBFileConfigurator.java 2008-09-30 23:11:15 UTC (rev 1331) +++ trunk/src/dl-learner/org/dllearner/core/configurators/KBFileConfigurator.java 2008-10-01 07:48:46 UTC (rev 1332) @@ -16,7 +16,7 @@ * 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.core.configurators; Modified: trunk/src/dl-learner/org/dllearner/core/configurators/OWLAPIOntologyConfigurator.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/configurators/OWLAPIOntologyConfigurator.java 2008-09-30 23:11:15 UTC (rev 1331) +++ trunk/src/dl-learner/org/dllearner/core/configurators/OWLAPIOntologyConfigurator.java 2008-10-01 07:48:46 UTC (rev 1332) @@ -16,7 +16,7 @@ * 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.core.configurators; Modified: trunk/src/dl-learner/org/dllearner/core/configurators/OWLAPIReasonerConfigurator.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/configurators/OWLAPIReasonerConfigurator.java 2008-09-30 23:11:15 UTC (rev 1331) +++ trunk/src/dl-learner/org/dllearner/core/configurators/OWLAPIReasonerConfigurator.java 2008-10-01 07:48:46 UTC (rev 1332) @@ -16,7 +16,7 @@ * 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.core.configurators; Modified: trunk/src/dl-learner/org/dllearner/core/configurators/OWLFileConfigurator.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/configurators/OWLFileConfigurator.java 2008-09-30 23:11:15 UTC (rev 1331) +++ trunk/src/dl-learner/org/dllearner/core/configurators/OWLFileConfigurator.java 2008-10-01 07:48:46 UTC (rev 1332) @@ -16,7 +16,7 @@ * 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.core.configurators; Modified: trunk/src/dl-learner/org/dllearner/core/configurators/PosNegDefinitionLPConfigurator.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/configurators/PosNegDefinitionLPConfigurator.java 2008-09-30 23:11:15 UTC (rev 1331) +++ trunk/src/dl-learner/org/dllearner/core/configurators/PosNegDefinitionLPConfigurator.java 2008-10-01 07:48:46 UTC (rev 1332) @@ -16,7 +16,7 @@ * 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.core.configurators; Modified: trunk/src/dl-learner/org/dllearner/core/configurators/PosNegDefinitionLPStrictConfigurator.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/configurators/PosNegDefinitionLPStrictConfigurator.java 2008-09-30 23:11:15 UTC (rev 1331) +++ trunk/src/dl-learner/org/dllearner/core/configurators/PosNegDefinitionLPStrictConfigurator.java 2008-10-01 07:48:46 UTC (rev 1332) @@ -16,7 +16,7 @@ * 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.core.configurators; Modified: trunk/src/dl-learner/org/dllearner/core/configurators/PosNegInclusionLPConfigurator.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/configurators/PosNegInclusionLPConfigurator.java 2008-09-30 23:11:15 UTC (rev 1331) +++ trunk/src/dl-learner/org/dllearner/core/configurators/PosNegInclusionLPConfigurator.java 2008-10-01 07:48:46 UTC (rev 1332) @@ -16,7 +16,7 @@ * 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.core.configurators; Modified: trunk/src/dl-learner/org/dllearner/core/configurators/PosOnlyDefinitionLPConfigurator.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/configurators/PosOnlyDefinitionLPConfigurator.java 2008-09-30 23:11:15 UTC (rev 1331) +++ trunk/src/dl-learner/org/dllearner/core/configurators/PosOnlyDefinitionLPConfigurator.java 2008-10-01 07:48:46 UTC (rev 1332) @@ -16,7 +16,7 @@ * 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.core.configurators; Modified: trunk/src/dl-learner/org/dllearner/core/configurators/PosOnlyInclusionLPConfigurator.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/configurators/PosOnlyInclusionLPConfigurator.java 2008-09-30 23:11:15 UTC (rev 1331) +++ trunk/src/dl-learner/org/dllearner/core/configurators/PosOnlyInclusionLPConfigurator.java 2008-10-01 07:48:46 UTC (rev 1332) @@ -16,7 +16,7 @@ * 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.core.configurators; Modified: trunk/src/dl-learner/org/dllearner/core/configurators/ROLearnerConfigurator.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/configurators/ROLearnerConfigurator.java 2008-09-30 23:11:15 UTC (rev 1331) +++ trunk/src/dl-learner/org/dllearner/core/configurators/ROLearnerConfigurator.java 2008-10-01 07:48:46 UTC (rev 1332) @@ -16,7 +16,7 @@ * 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.core.configurators; Modified: trunk/src/dl-learner/org/dllearner/core/configurators/RandomGuesserConfigurator.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/configurators/RandomGuesserConfigurator.java 2008-09-30 23:11:15 UTC (rev 1331) +++ trunk/src/dl-learner/org/dllearner/core/configurators/RandomGuesserConfigurator.java 2008-10-01 07:48:46 UTC (rev 1332) @@ -16,7 +16,7 @@ * 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.core.configurators; Modified: trunk/src/dl-learner/org/dllearner/core/configurators/SimpleSuggestionLearningAlgorithmConfigurator.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/configurators/SimpleSuggestionLearningAlgorithmConfigurator.java 2008-09-30 23:11:15 UTC (rev 1331) +++ trunk/src/dl-learner/org/dllearner/core/configurators/SimpleSuggestionLearningAlgorithmConfigurator.java 2008-10-01 07:48:46 UTC (rev 1332) @@ -16,7 +16,7 @@ * 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.core.configurators; Modified: trunk/src/dl-learner/org/dllearner/core/configurators/SparqlKnowledgeSourceConfigurator.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/configurators/SparqlKnowledgeSourceConfigurator.java 2008-09-30 23:11:15 UTC (rev 1331) +++ trunk/src/dl-learner/org/dllearner/core/configurators/SparqlKnowledgeSourceConfigurator.java 2008-10-01 07:48:46 UTC (rev 1332) @@ -16,7 +16,7 @@ * 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.core.configurators; @@ -151,7 +151,7 @@ return (Set<String>) ComponentManager.getInstance().getConfigOptionValue(sparqlKnowledgeSource, "objList") ; } /** -* saveExtractedFragment Specifies whether the extracted ontology is written to a file or not. The OWL file is written to the cache dir.. +* saveExtractedFragment Specifies whether the extracted ontology is written to a file or not. The OWL file is written to the cache dir.Some DBpedia URI will make the XML invalid. * mandatory: false| reinit necessary: true * default value: true * @return boolean @@ -363,7 +363,7 @@ reinitNecessary = true; } /** -* @param saveExtractedFragment Specifies whether the extracted ontology is written to a file or not. The OWL file is written to the cache dir.. +* @param saveExtractedFragment Specifies whether the extracted ontology is written to a file or not. The OWL file is written to the cache dir.Some DBpedia URI will make the XML invalid. * mandatory: false| reinit necessary: true * default value: true **/ Deleted: trunk/src/dl-learner/org/dllearner/learningproblems/RoleLearning.java =================================================================== --- trunk/src/dl-learner/org/dllearner/learningproblems/RoleLearning.java 2008-09-30 23:11:15 UTC (rev 1331) +++ trunk/src/dl-learner/org/dllearner/learningproblems/RoleLearning.java 2008-10-01 07:48:46 UTC (rev 1332) @@ -1,178 +0,0 @@ -/** - * Copyright (C) 2007, Jens Lehmann - * - * This file is part of DL-Learner. - * - * DL-Learner is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * DL-Learner is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - */ -package org.dllearner.learningproblems; - -import java.net.URI; -import java.util.Set; -import java.util.SortedSet; - -import org.dllearner.core.ReasoningService; -import org.dllearner.core.Score; -import org.dllearner.core.configurators.RoleLearningConfigurator; -import org.dllearner.core.owl.Description; -import org.dllearner.core.owl.Individual; -import org.dllearner.utilities.datastructures.StringTuple; - -/** - * Here are just some code snippets, which can be used The basic algorithm is - * simple: - * - * input: - * 1. domain or range - * 2. number of instances n choose domain or range of a role - * Positive Examples: get the first n instances of domain or range - * Negative Examples: get the first n instances of range or domain - * The Queries can be found in SPARQLqueryType - * - */ -public class RoleLearning extends PosNegLP implements DefinitionLP { - - private RoleLearningConfigurator configurator; - @Override - public RoleLearningConfigurator getConfigurator(){ - return configurator; - } - - - public RoleLearning(ReasoningService reasoningService) { - super(reasoningService); - } - - public RoleLearning(ReasoningService reasoningService, - SortedSet<Individual> positiveExamples, - SortedSet<Individual> negativeExamples) { - super(reasoningService); - this.configurator = new RoleLearningConfigurator(this); - // TODO sets have to be queried - this.positiveExamples = positiveExamples; - this.negativeExamples = negativeExamples; - } - - /* - * (non-Javadoc) - * - * @see org.dllearner.core.Component#getName() - */ - public static String getName() { - return "role learning"; - } - - // TODO use basic functions - @Override - public int coveredNegativeExamplesOrTooWeak(Description concept) { - return 0; - } - - // TODO use basic functions - @Override - public Score computeScore(Description concept) { - return null; - } - - // can be replaced by a static query, but it also can make use of filters as - // it is done here - // query get a tupels (s,o) for role p - public Set<StringTuple> getTupelsForRole(URI u) { - - // getQuery - /* - * String sparql = sparqlQueryMaker - * .makeRoleQueryUsingFilters(u.toString()); - * - * Set<StringTuple> s = cachedSparql(u, sparql, "subject", "object"); // - * System.out.println(s); return s; - */return null; - } - - // can be replaced by a static query, but it also can make use of filters as - // it is done here - public Set<StringTuple> getTupelsForRole(URI u, boolean domain) { - /* - * // getQuery String sparql = - * sparqlQueryMaker.makeRoleQueryUsingFilters( u.toString(), domain); - * - * Set<StringTuple> s = cachedSparql(u, sparql, "subject", "object"); // - * System.out.println(s); return s; - */ - return null; - } - - public Set<String> getDomainInstancesForRole(String role) { - /* - * URI u = null; try { u = new URI(role); } catch (Exception e) { - * e.printStackTrace(); } Set<StringTuple> t = - * ((TypedSparqlQuery)this.typedSparqlQuery).getTupelsForRole(u, true); - * Set<String> ret = new HashSet<String>(); for (StringTuple one : t) { - * - * ret.add(one.a); } return ret; - */ - return null; - } - - public Set<String> getRangeInstancesForRole(String role) { - /* - * URI u = null; try { u = new URI(role); } catch (Exception e) { - * e.printStackTrace(); } Set<StringTuple> t = - * ((TypedSparqlQuery)this.typedSparqlQuery).getTupelsForRole(u,false); - * Set<String> ret = new HashSet<String>(); for (StringTuple one : t) { - * - * ret.add(one.b); } return ret; - */ - return null; - } - - public void fromKnowledgeSource() { - /* - * if (learnDomain || learnRange) { Set<String> pos = new HashSet<String>(); - * Set<String> neg = new HashSet<String>(); if (learnDomain) { pos = - * m.getDomainInstancesForRole(role); neg = - * m.getRangeInstancesForRole(role); } else if (learnRange) { neg = - * m.getDomainInstancesForRole(role); pos = - * m.getRangeInstancesForRole(role); } // choose 30 - * - * Set<String> tmp = new HashSet<String>(); for (String one : pos) { - * tmp.add(one); if (tmp.size() >= numberOfInstancesUsedForRoleLearning) - * break; } pos = tmp; logger.info("Instances used: " + pos.size()); - * - * tmp = new HashSet<String>(); for (String one : neg) { tmp.add(one); - * if (tmp.size() >= numberOfInstancesUsedForRoleLearning) break; } neg = - * tmp; - * - * instances = new HashSet<String>(); instances.addAll(pos); - * - * instances.addAll(neg); - * - * for (String one : pos) { logger.info("+\"" + one + "\""); } for - * (String one : neg) { logger.info("-\"" + one + "\""); } - */ - /* - * Random r= new Random(); - * - * - * Object[] arr=instances.toArray(); while(instances.size()>=30){ } - */ - /* - * // add the role to the filter(a solution is always EXISTS // - * role.TOP) m.addPredicateFilter(role); // - * System.out.println(instances); // THIS is a workaround - */ - } - -} Modified: trunk/src/dl-learner/org/dllearner/refinementoperators/RhoDRDown.java =================================================================== --- trunk/src/dl-learner/org/dllearner/refinementoperators/RhoDRDown.java 2008-09-30 23:11:15 UTC (rev 1331) +++ trunk/src/dl-learner/org/dllearner/refinementoperators/RhoDRDown.java 2008-10-01 07:48:46 UTC (rev 1332) @@ -35,6 +35,7 @@ import org.apache.log4j.Logger; import org.dllearner.core.ReasoningService; +import org.dllearner.core.config.CommonConfigOptions; import org.dllearner.core.owl.BooleanValueRestriction; import org.dllearner.core.owl.DataRange; import org.dllearner.core.owl.DatatypeProperty; @@ -152,7 +153,7 @@ private int maxNrOfSplits = 10; // data structure for a simple frequent pattern matching preprocessing phase - private int frequencyThreshold = 3; + private int frequencyThreshold = CommonConfigOptions.valueFrequencyThresholdDefault; private Map<ObjectProperty, Map<Individual, Integer>> valueFrequency = new HashMap<ObjectProperty, Map<Individual, Integer>>(); // data structure with identified frequent values private Map<ObjectProperty, Set<Individual>> frequentValues = new HashMap<ObjectProperty, Set<Individual>>(); @@ -181,17 +182,22 @@ // private Map<NamedClass,Map<NamedClass,Boolean>> notABMeaningful = new TreeMap<NamedClass,Map<NamedClass,Boolean>>(); public RhoDRDown(ReasoningService reasoningService) { - this(reasoningService, true, true, true, true, true, true, true, true, true, null); + this(reasoningService, true, true, true, true, true, 3, true, true, true, true, null); } + // TODO constructor which takes a RhoDRDownConfigurator object; + // this should be an interface implemented e.g. by ExampleBasedROLComponentConfigurator; + // the goal is to use the configurator system while still being flexible enough to + // use one refinement operator in several learning algorithms public RhoDRDown(ReasoningService reasoningService, boolean applyAllFilter, boolean applyExistsFilter, boolean useAllConstructor, - boolean useExistsConstructor, boolean useHasValueConstructor, boolean useCardinalityRestrictions,boolean useNegation, boolean useBooleanDatatypes, boolean useDoubleDatatypes, NamedClass startClass) { + boolean useExistsConstructor, boolean useHasValueConstructor, int valueFrequencyThreshold, boolean useCardinalityRestrictions,boolean useNegation, boolean useBooleanDatatypes, boolean useDoubleDatatypes, NamedClass startClass) { this.rs = reasoningService; this.applyAllFilter = applyAllFilter; this.applyExistsFilter = applyExistsFilter; this.useAllConstructor = useAllConstructor; this.useExistsConstructor = useExistsConstructor; this.useHasValueConstructor = useHasValueConstructor; + this.frequencyThreshold = valueFrequencyThreshold; this.useCardinalityRestrictions = useCardinalityRestrictions; this.useNegation = useNegation; this.useBooleanDatatypes = useBooleanDatatypes; Copied: trunk/src/dl-learner/org/dllearner/scripts/RoleLearning.java (from rev 1331, trunk/src/dl-learner/org/dllearner/learningproblems/RoleLearning.java) =================================================================== --- trunk/src/dl-learner/org/dllearner/scripts/RoleLearning.java (rev 0) +++ trunk/src/dl-learner/org/dllearner/scripts/RoleLearning.java 2008-10-01 07:48:46 UTC (rev 1332) @@ -0,0 +1,159 @@ +/** + * Copyright (C) 2007, Jens Lehmann + * + * This file is part of DL-Learner. + * + * DL-Learner is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * DL-Learner is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ +package org.dllearner.scripts; + +import java.net.URI; +import java.util.Set; +import java.util.SortedSet; + +import org.dllearner.core.ReasoningService; +import org.dllearner.core.owl.Individual; +import org.dllearner.utilities.datastructures.StringTuple; + +/** + * Here are just some code snippets, which can be used The basic algorithm is + * simple: + * + * input: + * 1. domain or range + * 2. number of instances n choose domain or range of a role + * Positive Examples: get the first n instances of domain or range + * Negative Examples: get the first n instances of range or domain + * The Queries can be found in SPARQLqueryType + * + */ +public class RoleLearning { + + Set<Individual> positiveExamples; + Set<Individual> negativeExamples; + + public RoleLearning(ReasoningService reasoningService) { +// super(reasoningService); + } + + public RoleLearning(ReasoningService reasoningService, + SortedSet<Individual> positiveExamples, + SortedSet<Individual> negativeExamples) { +// super(reasoningService); +// this.configurator = new RoleLearningConfigurator(this); + // TODO sets have to be queried + this.positiveExamples = positiveExamples; + this.negativeExamples = negativeExamples; + } + + /* + * (non-Javadoc) + * + * @see org.dllearner.core.Component#getName() + */ + public static String getName() { + return "role learning"; + } + + // can be replaced by a static query, but it also can make use of filters as + // it is done here + // query get a tupels (s,o) for role p + public Set<StringTuple> getTupelsForRole(URI u) { + + // getQuery + /* + * String sparql = sparqlQueryMaker + * .makeRoleQueryUsingFilters(u.toString()); + * + * Set<StringTuple> s = cachedSparql(u, sparql, "subject", "object"); // + * System.out.println(s); return s; + */return null; + } + + // can be replaced by a static query, but it also can make use of filters as + // it is done here + public Set<StringTuple> getTupelsForRole(URI u, boolean domain) { + /* + * // getQuery String sparql = + * sparqlQueryMaker.makeRoleQueryUsingFilters( u.toString(), domain); + * + * Set<StringTuple> s = cachedSparql(u, sparql, "subject", "object"); // + * System.out.println(s); return s; + */ + return null; + } + + public Set<String> getDomainInstancesForRole(String role) { + /* + * URI u = null; try { u = new URI(role); } catch (Exception e) { + * e.printStackTrace(); } Set<StringTuple> t = + * ((TypedSparqlQuery)this.typedSparqlQuery).getTupelsForRole(u, true); + * Set<String> ret = new HashSet<String>(); for (StringTuple one : t) { + * + * ret.add(one.a); } return ret; + */ + return null; + } + + public Set<String> getRangeInstancesForRole(String role) { + /* + * URI u = null; try { u = new URI(role); } catch (Exception e) { + * e.printStackTrace(); } Set<StringTuple> t = + * ((TypedSparqlQuery)this.typedSparqlQuery).getTupelsForRole(u,false); + * Set<String> ret = new HashSet<String>(); for (StringTuple one : t) { + * + * ret.add(one.b); } return ret; + */ + return null; + } + + public void fromKnowledgeSource() { + /* + * if (learnDomain || learnRange) { Set<String> pos = new HashSet<String>(); + * Set<String> neg = new HashSet<String>(); if (learnDomain) { pos = + * m.getDomainInstancesForRole(role); neg = + * m.getRangeInstancesForRole(role); } else if (learnRange) { neg = + * m.getDomainInstancesForRole(role); pos = + * m.getRangeInstancesForRole(role); } // choose 30 + * + * Set<String> tmp = new HashSet<String>(); for (String one : pos) { + * tmp.add(one); if (tmp.size() >= numberOfInstancesUsedForRoleLearning) + * break; } pos = tmp; logger.info("Instances used: " + pos.size()); + * + * tmp = new HashSet<String>(); for (String one : neg) { tmp.add(one); + * if (tmp.size() >= numberOfInstancesUsedForRoleLearning) break; } neg = + * tmp; + * + * instances = new HashSet<String>(); instances.addAll(pos); + * + * instances.addAll(neg); + * + * for (String one : pos) { logger.info("+\"" + one + "\""); } for + * (String one : neg) { logger.info("-\"" + one + "\""); } + */ + /* + * Random r= new Random(); + * + * + * Object[] arr=instances.toArray(); while(instances.size()>=30){ } + */ + /* + * // add the role to the filter(a solution is always EXISTS // + * role.TOP) m.addPredicateFilter(role); // + * System.out.println(instances); // THIS is a workaround + */ + } + +} Modified: trunk/src/dl-learner/org/dllearner/scripts/SemanticBibleComparison.java =================================================================== --- trunk/src/dl-learner/org/dllearner/scripts/SemanticBibleComparison.java 2008-09-30 23:11:15 UTC (rev 1331) +++ trunk/src/dl-learner/org/dllearner/scripts/SemanticBibleComparison.java 2008-10-01 07:48:46 UTC (rev 1332) @@ -184,7 +184,7 @@ * * */ - boolean jens=false; + boolean jens=true; if(jens){ conductExperiment(Experiments.SPARQL_10000_CTESTS_SPECIAL_REC2_NOPROP_HASVALUE); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jen...@us...> - 2008-09-26 17:25:57
|
Revision: 1273 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=1273&view=rev Author: jenslehmann Date: 2008-09-26 17:25:48 +0000 (Fri, 26 Sep 2008) Log Message: ----------- implemented hasValue support including simple frequent pattern preprocessing (not working yet) Modified Paths: -------------- trunk/src/dl-learner/org/dllearner/reasoning/FastInstanceChecker.java trunk/src/dl-learner/org/dllearner/reasoning/OWLAPIDescriptionConvertVisitor.java trunk/src/dl-learner/org/dllearner/refinementoperators/RhoDRDown.java trunk/src/dl-learner/org/dllearner/utilities/owl/ConceptComparator.java Added Paths: ----------- trunk/examples/semantic_bible/hasvalue_example.conf Added: trunk/examples/semantic_bible/hasvalue_example.conf =================================================================== --- trunk/examples/semantic_bible/hasvalue_example.conf (rev 0) +++ trunk/examples/semantic_bible/hasvalue_example.conf 2008-09-26 17:25:48 UTC (rev 1273) @@ -0,0 +1,20 @@ +/** + * It should learn ethnicity hasValue Jewish, but does not work for some reason. + */ + +import("../NTNcombined.owl"); + +// reasoner = owlAPIReasoner; +owlAPIReasoner.reasonerType = pellet; + ++"http://semanticbible.org/ns/2006/NTNames#Hezron" ++"http://semanticbible.org/ns/2006/NTNames#Jehoshaphat" ++"http://semanticbible.org/ns/2006/NTNames#Judah" ++"http://semanticbible.org/ns/2006/NTNames#Jorim" ++"http://semanticbible.org/ns/2006/NTNames#Neri" + +-"http://semanticbible.org/ns/2006/NTNames#Hierapolis" +-"http://semanticbible.org/ns/2006/NTNames#Iconium" +-"http://semanticbible.org/ns/2006/NTNames#Joda" +-"http://semanticbible.org/ns/2006/NTNames#JohntheBaptist" +-"http://semanticbible.org/ns/2006/NTNames#Philip" Modified: trunk/src/dl-learner/org/dllearner/reasoning/FastInstanceChecker.java =================================================================== --- trunk/src/dl-learner/org/dllearner/reasoning/FastInstanceChecker.java 2008-09-26 16:30:40 UTC (rev 1272) +++ trunk/src/dl-learner/org/dllearner/reasoning/FastInstanceChecker.java 2008-09-26 17:25:48 UTC (rev 1273) @@ -63,6 +63,7 @@ import org.dllearner.core.owl.ObjectPropertyExpression; import org.dllearner.core.owl.ObjectPropertyHierarchy; import org.dllearner.core.owl.ObjectSomeRestriction; +import org.dllearner.core.owl.ObjectValueRestriction; import org.dllearner.core.owl.SubsumptionHierarchy; import org.dllearner.core.owl.Thing; import org.dllearner.core.owl.Union; @@ -428,6 +429,11 @@ } } return true; + } else if (description instanceof ObjectValueRestriction) { + Individual i = ((ObjectValueRestriction)description).getIndividual(); + ObjectProperty op = (ObjectProperty) ((ObjectValueRestriction)description).getRestrictedPropertyExpression(); + + return opPos.get(op).get(individual).contains(i); } else if (description instanceof BooleanValueRestriction) { DatatypeProperty dp = ((BooleanValueRestriction) description) .getRestrictedPropertyExpresssion(); Modified: trunk/src/dl-learner/org/dllearner/reasoning/OWLAPIDescriptionConvertVisitor.java =================================================================== --- trunk/src/dl-learner/org/dllearner/reasoning/OWLAPIDescriptionConvertVisitor.java 2008-09-26 16:30:40 UTC (rev 1272) +++ trunk/src/dl-learner/org/dllearner/reasoning/OWLAPIDescriptionConvertVisitor.java 2008-09-26 17:25:48 UTC (rev 1273) @@ -36,6 +36,7 @@ import org.dllearner.core.owl.Description; import org.dllearner.core.owl.DescriptionVisitor; import org.dllearner.core.owl.DoubleMinValue; +import org.dllearner.core.owl.Individual; import org.dllearner.core.owl.Intersection; import org.dllearner.core.owl.NamedClass; import org.dllearner.core.owl.Negation; @@ -44,6 +45,7 @@ import org.dllearner.core.owl.ObjectExactCardinalityRestriction; import org.dllearner.core.owl.ObjectMaxCardinalityRestriction; import org.dllearner.core.owl.ObjectMinCardinalityRestriction; +import org.dllearner.core.owl.ObjectProperty; import org.dllearner.core.owl.ObjectSomeRestriction; import org.dllearner.core.owl.ObjectValueRestriction; import org.dllearner.core.owl.SimpleDoubleDataRange; @@ -60,6 +62,7 @@ import org.semanticweb.owl.model.OWLDataRange; import org.semanticweb.owl.model.OWLDataType; import org.semanticweb.owl.model.OWLDescription; +import org.semanticweb.owl.model.OWLIndividual; import org.semanticweb.owl.model.OWLObjectProperty; import org.semanticweb.owl.model.OWLTypedConstant; import org.semanticweb.owl.vocab.OWLRestrictedDataRangeFacetVocabulary; @@ -227,8 +230,10 @@ * @see org.dllearner.core.owl.DescriptionVisitor#visit(org.dllearner.core.owl.ObjectValueRestriction) */ public void visit(ObjectValueRestriction description) { - // TODO Auto-generated method stub - throw new Error("OWLAPIDescriptionConverter: not implemented"); + OWLObjectProperty role = factory.getOWLObjectProperty( + URI.create(((ObjectProperty)description.getRestrictedPropertyExpression()).getName())); + OWLIndividual i = factory.getOWLIndividual(URI.create(description.getIndividual().getName())); + stack.push(factory.getOWLObjectValueRestriction(role, i)); } /* (non-Javadoc) Modified: trunk/src/dl-learner/org/dllearner/refinementoperators/RhoDRDown.java =================================================================== --- trunk/src/dl-learner/org/dllearner/refinementoperators/RhoDRDown.java 2008-09-26 16:30:40 UTC (rev 1272) +++ trunk/src/dl-learner/org/dllearner/refinementoperators/RhoDRDown.java 2008-09-26 17:25:48 UTC (rev 1273) @@ -19,6 +19,7 @@ */ package org.dllearner.refinementoperators; +import java.util.Collection; import java.util.Collections; import java.util.HashMap; import java.util.HashSet; @@ -54,6 +55,7 @@ import org.dllearner.core.owl.ObjectPropertyExpression; import org.dllearner.core.owl.ObjectQuantorRestriction; import org.dllearner.core.owl.ObjectSomeRestriction; +import org.dllearner.core.owl.ObjectValueRestriction; import org.dllearner.core.owl.SubsumptionHierarchy; import org.dllearner.core.owl.Thing; import org.dllearner.core.owl.Union; @@ -148,6 +150,14 @@ private Map<DatatypeProperty,List<Double>> splits = new TreeMap<DatatypeProperty,List<Double>>(); private int maxNrOfSplits = 10; + // experimental support for hasValue + private boolean useHasValue = false; + // data structure for a simple frequent pattern matching preprocessing phase + private int frequencyThreshold = 3; + private Map<ObjectProperty, Map<Individual, Integer>> valueFrequency = new HashMap<ObjectProperty, Map<Individual, Integer>>(); + // data structure with identified frequent values + private Map<ObjectProperty, Set<Individual>> frequentValues = new HashMap<ObjectProperty, Set<Individual>>(); + // staistics public long mComputationTimeNs = 0; public long topComputationTimeNs = 0; @@ -193,7 +203,46 @@ for(ObjectProperty op : rs.getObjectProperties()) { opDomains.put(op, rs.getDomain(op)); opRanges.put(op, rs.getRange(op)); + + if(useHasValue) { + // init + Map<Individual, Integer> opMap = new TreeMap<Individual, Integer>(); + valueFrequency.put(op, opMap); + + // sets ordered by corresponding individual (which we ignore) + Collection<SortedSet<Individual>> fillerSets = rs.getRoleMembers(op).values(); + for(SortedSet<Individual> fillerSet : fillerSets) { + for(Individual i : fillerSet) { +// System.out.println("op " + op + " i " + i); + Integer value = opMap.get(i); + + if(value != null) { + opMap.put(i, value+1); + } else { + opMap.put(i, 1); + } + } + } + + // keep only frequent patterns (TODO it would be slightly + // more efficient if we stop adding to valueFrequency + // after threshold is reached) + Set<Individual> frequentInds = new TreeSet<Individual>(); + for(Individual i : opMap.keySet()) { + if(opMap.get(i) > frequencyThreshold) { + frequentInds.add(i); + } + } + frequentValues.put(op, frequentInds); + + } + } + + // we do not need the temporary set anymore and let the + // garbage collector take care of it + valueFrequency = null; + for(DatatypeProperty dp : rs.getDatatypeProperties()) { dpDomains.put(dp, rs.getDomain(dp)); } @@ -405,6 +454,18 @@ } } + // rule 4: EXISTS r.TOP => EXISTS r.{value} + if(useHasValue && description.getChild(0) instanceof Thing) { + // watch out for frequent patterns + Set<Individual> frequentInds = frequentValues.get(role); + if(frequentInds != null) { + for(Individual ind : frequentInds) { + ObjectValueRestriction ovr = new ObjectValueRestriction(ar, ind); + refinements.add(ovr); + } + } + } + } else if (description instanceof ObjectAllRestriction) { ObjectPropertyExpression role = ((ObjectQuantorRestriction)description).getRole(); Description range = opRanges.get(role); Modified: trunk/src/dl-learner/org/dllearner/utilities/owl/ConceptComparator.java =================================================================== --- trunk/src/dl-learner/org/dllearner/utilities/owl/ConceptComparator.java 2008-09-26 16:30:40 UTC (rev 1272) +++ trunk/src/dl-learner/org/dllearner/utilities/owl/ConceptComparator.java 2008-09-26 17:25:48 UTC (rev 1273) @@ -8,6 +8,7 @@ import org.dllearner.core.owl.DatatypeSomeRestriction; import org.dllearner.core.owl.DoubleMaxValue; import org.dllearner.core.owl.DoubleMinValue; +import org.dllearner.core.owl.Individual; import org.dllearner.core.owl.ObjectAllRestriction; import org.dllearner.core.owl.NamedClass; import org.dllearner.core.owl.Nothing; @@ -17,6 +18,7 @@ import org.dllearner.core.owl.ObjectMinCardinalityRestriction; import org.dllearner.core.owl.ObjectSomeRestriction; import org.dllearner.core.owl.Intersection; +import org.dllearner.core.owl.ObjectValueRestriction; import org.dllearner.core.owl.SimpleDoubleDataRange; import org.dllearner.core.owl.Union; import org.dllearner.core.owl.Negation; @@ -175,8 +177,23 @@ return roleCompare; } else return -1; + } else if(concept1 instanceof ObjectValueRestriction) { + if(concept2.getChildren().size()<1 || concept2 instanceof Negation || concept2 instanceof ObjectSomeRestriction || concept2 instanceof ObjectAllRestriction) + return 1; + else if(concept2 instanceof ObjectValueRestriction) { + int roleCompare = rc.compare(((ObjectValueRestriction)concept1).getRestrictedPropertyExpression(), ((ObjectQuantorRestriction)concept2).getRestrictedPropertyExpression()); + + if(roleCompare == 0) { + Individual value1 = ((ObjectValueRestriction)concept1).getIndividual(); + Individual value2 = ((ObjectValueRestriction)concept2).getIndividual(); + return value1.compareTo(value2); + } else { + return roleCompare; + } + } else + return -1; } else if(concept1 instanceof ObjectMinCardinalityRestriction) { - if(concept2.getChildren().size()<1 || concept2 instanceof Negation || concept2 instanceof ObjectQuantorRestriction) + if(concept2.getChildren().size()<1 || concept2 instanceof Negation || concept2 instanceof ObjectQuantorRestriction || concept2 instanceof ObjectValueRestriction) return 1; // first criterion: object property // second criterion: number @@ -196,7 +213,7 @@ } else return -1; } else if(concept1 instanceof ObjectMaxCardinalityRestriction) { - if(concept2.getChildren().size()<1 || concept2 instanceof Negation || concept2 instanceof ObjectQuantorRestriction || concept2 instanceof ObjectMinCardinalityRestriction) + if(concept2.getChildren().size()<1 || concept2 instanceof Negation || concept2 instanceof ObjectQuantorRestriction || concept2 instanceof ObjectValueRestriction || concept2 instanceof ObjectMinCardinalityRestriction) return 1; // first criterion: object property // second criterion: number This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Jen...@us...> - 2008-10-07 10:29:59
|
Revision: 1347 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=1347&view=rev Author: JensLehmann Date: 2008-10-07 10:27:14 +0000 (Tue, 07 Oct 2008) Log Message: ----------- - example unit tester now tries to continue when exceptions occurr - conf file parser now throws parse exceptions instead of printing them (so they can be caugth by the unit test) Modified Paths: -------------- trunk/examples/krk/complete_no_draw.conf trunk/src/dl-learner/org/dllearner/cli/Start.java trunk/src/dl-learner/org/dllearner/gui/Config.java trunk/src/dl-learner/org/dllearner/parser/ConfParser.java trunk/src/dl-learner/org/dllearner/parser/ConfParserConstants.java trunk/src/dl-learner/org/dllearner/parser/ConfParserTokenManager.java trunk/src/dl-learner/org/dllearner/parser/ParseException.java trunk/src/dl-learner/org/dllearner/parser/SimpleCharStream.java trunk/src/dl-learner/org/dllearner/parser/Token.java trunk/src/dl-learner/org/dllearner/parser/TokenMgrError.java trunk/src/dl-learner/org/dllearner/parser/conf.jj trunk/src/dl-learner/org/dllearner/scripts/CrossValidation.java trunk/src/dl-learner/org/dllearner/scripts/TestValidation.java trunk/src/dl-learner/org/dllearner/test/junit/ExampleTests.java Modified: trunk/examples/krk/complete_no_draw.conf =================================================================== --- trunk/examples/krk/complete_no_draw.conf 2008-10-07 10:05:51 UTC (rev 1346) +++ trunk/examples/krk/complete_no_draw.conf 2008-10-07 10:27:14 UTC (rev 1347) @@ -1,4 +1,8 @@ +/** + * You need to generate the OWL background knowledge file, + * otherwise this example won't work! + */ import("complete_nodraw.owl"); refexamples.ignoredConcepts={ Modified: trunk/src/dl-learner/org/dllearner/cli/Start.java =================================================================== --- trunk/src/dl-learner/org/dllearner/cli/Start.java 2008-10-07 10:05:51 UTC (rev 1346) +++ trunk/src/dl-learner/org/dllearner/cli/Start.java 2008-10-07 10:27:14 UTC (rev 1347) @@ -21,6 +21,7 @@ import java.io.BufferedReader; import java.io.File; +import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStreamReader; import java.net.MalformedURLException; @@ -117,8 +118,10 @@ * Entry point for CLI interface. * * @param args + * @throws ParseException + * @throws FileNotFoundException */ - public static void main(String[] args) throws ComponentInitException { + public static void main(String[] args) throws ComponentInitException, FileNotFoundException, ParseException { File file = new File(args[args.length - 1]); @@ -173,8 +176,10 @@ * @param file * Conf file to read. * @throws ComponentInitException + * @throws ParseException + * @throws FileNotFoundException */ - public Start(File file) throws ComponentInitException { + public Start(File file) throws ComponentInitException, FileNotFoundException, ParseException { String baseDir = file.getParentFile().getPath(); // create component manager instance Modified: trunk/src/dl-learner/org/dllearner/gui/Config.java =================================================================== --- trunk/src/dl-learner/org/dllearner/gui/Config.java 2008-10-07 10:05:51 UTC (rev 1346) +++ trunk/src/dl-learner/org/dllearner/gui/Config.java 2008-10-07 10:27:14 UTC (rev 1347) @@ -20,6 +20,7 @@ package org.dllearner.gui; import java.io.File; +import java.io.FileNotFoundException; import java.util.HashSet; import java.util.LinkedList; import java.util.List; @@ -42,6 +43,7 @@ import org.dllearner.kb.OWLFile; import org.dllearner.kb.sparql.SparqlKnowledgeSource; import org.dllearner.learningproblems.PosNegLP; +import org.dllearner.parser.ParseException; /** * Config save all together used variables: ComponentManager, KnowledgeSource, @@ -130,7 +132,16 @@ // use CLI to load file try { // set all loaded components as active components - Start start = new Start(file); + Start start = null; + try { + start = new Start(file); + } catch (FileNotFoundException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (ParseException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } Set<KnowledgeSource> sources = start.getSources(); if (sources.size() != 1) { gui.getStatusPanel().setExceptionMessage( Modified: trunk/src/dl-learner/org/dllearner/parser/ConfParser.java =================================================================== --- trunk/src/dl-learner/org/dllearner/parser/ConfParser.java 2008-10-07 10:05:51 UTC (rev 1346) +++ trunk/src/dl-learner/org/dllearner/parser/ConfParser.java 2008-10-07 10:27:14 UTC (rev 1347) @@ -5,7 +5,6 @@ import java.util.List; import java.util.LinkedList; import java.util.Map; -import java.util.TreeMap; import java.util.Set; import java.util.HashSet; import java.util.SortedSet; @@ -15,14 +14,14 @@ import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; -import java.io.StringReader; import org.dllearner.Info; import org.dllearner.cli.*; import org.dllearner.utilities.datastructures.*; -public @SuppressWarnings("all") class ConfParser implements ConfParserConstants { +@SuppressWarnings("all") +public class ConfParser implements ConfParserConstants { // examples private SortedSet<String> positiveExamples = new TreeSet<String>(); @@ -122,16 +121,16 @@ } */ - public static ConfParser parseFile(File filename) { + public static ConfParser parseFile(File filename) throws FileNotFoundException, ParseException { ConfParser learner = null; - try { +// try { learner = new ConfParser(new FileInputStream(filename)); learner.Start(); - } catch(FileNotFoundException e) { - e.printStackTrace(); - } catch(ParseException e) { - e.printStackTrace(); - } +// } catch(FileNotFoundException e) { +// e.printStackTrace(); +// } catch(ParseException e) { +// e.printStackTrace(); +// } return learner; } @@ -150,7 +149,7 @@ // System.out.println(args.length); File f = new File(args[args.length-1]); - String baseDir = ""; +// String baseDir = ""; System.out.print("Parsing " + f.getName() + " ... "); long parseStartTime = System.currentTimeMillis(); @@ -159,7 +158,7 @@ ConfParser learner = null; try { learner = new ConfParser(new FileInputStream(args[args.length-1])); - baseDir = f.getParentFile().getPath(); +// baseDir = f.getParentFile().getPath(); } catch(IOException e) { System.err.println(e); System.exit(0); @@ -178,13 +177,13 @@ long parseDuration = System.currentTimeMillis() - parseStartTime; System.out.println("OK (" + parseDuration + " ms)"); - boolean queryMode = false; +// boolean queryMode = false; // solution test mode wird nicht unbedingt gebraucht, da man die covers // gleich standardmäßig beim query mit anzeigen kann // boolean solutionTestMode = false; - if(args.length>1 && args[0].equals("-q")) - queryMode = true; +// if(args.length>1 && args[0].equals("-q")) +// queryMode = true; //if(args.length>1 && args[0].equals("-qt")) { // queryMode = true; @@ -526,85 +525,96 @@ throw new Error("Missing return statement in function"); } - final private boolean jj_2_1(int xla) { + private boolean jj_2_1(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_1(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(0, xla); } } - final private boolean jj_2_2(int xla) { + private boolean jj_2_2(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_2(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(1, xla); } } - final private boolean jj_2_3(int xla) { + private boolean jj_2_3(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_3(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(2, xla); } } - final private boolean jj_2_4(int xla) { + private boolean jj_2_4(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_4(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(3, xla); } } - final private boolean jj_2_5(int xla) { + private boolean jj_2_5(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_5(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(4, xla); } } - final private boolean jj_2_6(int xla) { + private boolean jj_2_6(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_6(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(5, xla); } } - final private boolean jj_2_7(int xla) { + private boolean jj_2_7(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_7(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(6, xla); } } - final private boolean jj_2_8(int xla) { + private boolean jj_2_8(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_8(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(7, xla); } } - final private boolean jj_3R_7() { + private boolean jj_3R_11() { + if (jj_scan_token(STRING)) return true; + return false; + } + + private boolean jj_3_8() { + if (jj_scan_token(27)) return true; + if (jj_scan_token(32)) return true; + return false; + } + + private boolean jj_3R_7() { if (jj_3R_5()) return true; return false; } - final private boolean jj_3_7() { + private boolean jj_3_7() { if (jj_scan_token(26)) return true; if (jj_scan_token(31)) return true; return false; } - final private boolean jj_3R_12() { + private boolean jj_3R_12() { if (jj_scan_token(29)) return true; if (jj_3R_11()) return true; return false; } - final private boolean jj_3R_17() { + private boolean jj_3R_17() { if (jj_3R_11()) return true; return false; } - final private boolean jj_3_6() { + private boolean jj_3_6() { if (jj_scan_token(28)) return true; Token xsp; xsp = jj_scanpos; @@ -623,7 +633,7 @@ return false; } - final private boolean jj_3_5() { + private boolean jj_3_5() { Token xsp; xsp = jj_scanpos; if (jj_3R_13()) { @@ -634,43 +644,43 @@ return false; } - final private boolean jj_3R_19() { + private boolean jj_3R_19() { if (jj_scan_token(NUMBER)) return true; return false; } - final private boolean jj_3R_10() { + private boolean jj_3R_10() { if (jj_3R_11()) return true; return false; } - final private boolean jj_3R_6() { + private boolean jj_3R_6() { if (jj_scan_token(COMMAND_END)) return true; if (jj_3R_5()) return true; return false; } - final private boolean jj_3R_16() { + private boolean jj_3R_16() { if (jj_3R_5()) return true; return false; } - final private boolean jj_3_4() { + private boolean jj_3_4() { if (jj_scan_token(NEG_EX)) return true; return false; } - final private boolean jj_3_3() { + private boolean jj_3_3() { if (jj_scan_token(POS_EX)) return true; return false; } - final private boolean jj_3R_20() { + private boolean jj_3R_20() { if (jj_scan_token(DOUBLE)) return true; return false; } - final private boolean jj_3_2() { + private boolean jj_3_2() { if (jj_3R_5()) return true; if (jj_scan_token(28)) return true; if (jj_3R_11()) return true; @@ -684,12 +694,12 @@ return false; } - final private boolean jj_3R_14() { + private boolean jj_3R_14() { if (jj_3R_5()) return true; return false; } - final private boolean jj_3_1() { + private boolean jj_3_1() { if (jj_3R_5()) return true; Token xsp; xsp = jj_scanpos; @@ -715,76 +725,69 @@ return false; } - final private boolean jj_3R_9() { + private boolean jj_3R_9() { if (jj_3R_20()) return true; return false; } - final private boolean jj_3R_5() { + private boolean jj_3R_5() { if (jj_scan_token(ID)) return true; return false; } - final private boolean jj_3R_15() { + private boolean jj_3R_15() { if (jj_3R_11()) return true; return false; } - final private boolean jj_3R_18() { + private boolean jj_3R_18() { if (jj_3R_5()) return true; return false; } - final private boolean jj_3R_13() { + private boolean jj_3R_13() { if (jj_3R_11()) return true; return false; } - final private boolean jj_3R_8() { + private boolean jj_3R_8() { if (jj_3R_19()) return true; return false; } - final private boolean jj_3R_11() { - if (jj_scan_token(STRING)) return true; - return false; - } - - final private boolean jj_3_8() { - if (jj_scan_token(27)) return true; - if (jj_scan_token(32)) return true; - return false; - } - + /** Generated Token Manager. */ public ConfParserTokenManager token_source; SimpleCharStream jj_input_stream; - public Token token, jj_nt; + /** Current token. */ + public Token token; + /** Next token. */ + public Token jj_nt; private int jj_ntk; private Token jj_scanpos, jj_lastpos; private int jj_la; - public boolean lookingAhead = false; - private boolean jj_semLA; private int jj_gen; final private int[] jj_la1 = new int[13]; static private int[] jj_la1_0; static private int[] jj_la1_1; static { - jj_la1_0(); - jj_la1_1(); + jj_la1_init_0(); + jj_la1_init_1(); } - private static void jj_la1_0() { + private static void jj_la1_init_0() { jj_la1_0 = new int[] {0x1c00,0x100,0x1001000,0x1001000,0x1001000,0x1001000,0x1001000,0x1001000,0x1007000,0x4000000,0x8000000,0x20000000,0x1001000,}; } - private static void jj_la1_1() { + private static void jj_la1_init_1() { jj_la1_1 = new int[] {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,}; } final private JJCalls[] jj_2_rtns = new JJCalls[8]; private boolean jj_rescan = false; private int jj_gc = 0; + /** Constructor with InputStream. */ public ConfParser(java.io.InputStream stream) { this(stream, null); } + /** Constructor with InputStream and supplied encoding */ public ConfParser(java.io.InputStream stream, String encoding) { try { jj_input_stream = new SimpleCharStream(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); } token_source = new ConfParserTokenManager(jj_input_stream); @@ -795,9 +798,11 @@ for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); } + /** Reinitialise. */ public void ReInit(java.io.InputStream stream) { ReInit(stream, null); } + /** Reinitialise. */ public void ReInit(java.io.InputStream stream, String encoding) { try { jj_input_stream.ReInit(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); } token_source.ReInit(jj_input_stream); @@ -808,6 +813,7 @@ for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); } + /** Constructor. */ public ConfParser(java.io.Reader stream) { jj_input_stream = new SimpleCharStream(stream, 1, 1); token_source = new ConfParserTokenManager(jj_input_stream); @@ -818,6 +824,7 @@ for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); } + /** Reinitialise. */ public void ReInit(java.io.Reader stream) { jj_input_stream.ReInit(stream, 1, 1); token_source.ReInit(jj_input_stream); @@ -828,6 +835,7 @@ for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); } + /** Constructor with generated Token Manager. */ public ConfParser(ConfParserTokenManager tm) { token_source = tm; token = new Token(); @@ -837,6 +845,7 @@ for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); } + /** Reinitialise. */ public void ReInit(ConfParserTokenManager tm) { token_source = tm; token = new Token(); @@ -846,7 +855,7 @@ for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); } - final private Token jj_consume_token(int kind) throws ParseException { + private Token jj_consume_token(int kind) throws ParseException { Token oldToken; if ((oldToken = token).next != null) token = token.next; else token = token.next = token_source.getNextToken(); @@ -872,7 +881,7 @@ static private final class LookaheadSuccess extends java.lang.Error { } final private LookaheadSuccess jj_ls = new LookaheadSuccess(); - final private boolean jj_scan_token(int kind) { + private boolean jj_scan_token(int kind) { if (jj_scanpos == jj_lastpos) { jj_la--; if (jj_scanpos.next == null) { @@ -893,6 +902,8 @@ return false; } + +/** Get the next Token. */ final public Token getNextToken() { if (token.next != null) token = token.next; else token = token.next = token_source.getNextToken(); @@ -901,8 +912,9 @@ return token; } +/** Get the specific Token. */ final public Token getToken(int index) { - Token t = lookingAhead ? jj_scanpos : token; + Token t = token; for (int i = 0; i < index; i++) { if (t.next != null) t = t.next; else t = t.next = token_source.getNextToken(); @@ -910,14 +922,14 @@ return t; } - final private int jj_ntk() { + private int jj_ntk() { if ((jj_nt=token.next) == null) return (jj_ntk = (token.next=token_source.getNextToken()).kind); else return (jj_ntk = jj_nt.kind); } - private java.util.Vector<int[]> jj_expentries = new java.util.Vector<int[]>(); + private java.util.List<int[]> jj_expentries = new java.util.ArrayList<int[]>(); private int[] jj_expentry; private int jj_kind = -1; private int[] jj_lasttokens = new int[100]; @@ -932,27 +944,25 @@ for (int i = 0; i < jj_endpos; i++) { jj_expentry[i] = jj_lasttokens[i]; } - boolean exists = false; - for (java.util.Enumeration e = jj_expentries.elements(); e.hasMoreElements();) { - int[] oldentry = (int[])(e.nextElement()); + jj_entries_loop: for (java.util.Iterator it = jj_expentries.iterator(); it.hasNext();) { + int[] oldentry = (int[])(it.next()); if (oldentry.length == jj_expentry.length) { - exists = true; for (int i = 0; i < jj_expentry.length; i++) { if (oldentry[i] != jj_expentry[i]) { - exists = false; - break; + continue jj_entries_loop; } } - if (exists) break; + jj_expentries.add(jj_expentry); + break jj_entries_loop; } } - if (!exists) jj_expentries.addElement(jj_expentry); if (pos != 0) jj_lasttokens[(jj_endpos = pos) - 1] = kind; } } + /** Generate ParseException. */ public ParseException generateParseException() { - jj_expentries.removeAllElements(); + jj_expentries.clear(); boolean[] la1tokens = new boolean[33]; if (jj_kind >= 0) { la1tokens[jj_kind] = true; @@ -974,7 +984,7 @@ if (la1tokens[i]) { jj_expentry = new int[1]; jj_expentry[0] = i; - jj_expentries.addElement(jj_expentry); + jj_expentries.add(jj_expentry); } } jj_endpos = 0; @@ -982,18 +992,20 @@ jj_add_error_token(0, 0); int[][] exptokseq = new int[jj_expentries.size()][]; for (int i = 0; i < jj_expentries.size(); i++) { - exptokseq[i] = jj_expentries.elementAt(i); + exptokseq[i] = jj_expentries.get(i); } return new ParseException(token, exptokseq, tokenImage); } + /** Enable tracing. */ final public void enable_tracing() { } + /** Disable tracing. */ final public void disable_tracing() { } - final private void jj_rescan_token() { + private void jj_rescan_token() { jj_rescan = true; for (int i = 0; i < 8; i++) { try { @@ -1019,7 +1031,7 @@ jj_rescan = false; } - final private void jj_save(int index, int xla) { + private void jj_save(int index, int xla) { JJCalls p = jj_2_rtns[index]; while (p.gen > jj_gen) { if (p.next == null) { p = p.next = new JJCalls(); break; } Modified: trunk/src/dl-learner/org/dllearner/parser/ConfParserConstants.java =================================================================== --- trunk/src/dl-learner/org/dllearner/parser/ConfParserConstants.java 2008-10-07 10:05:51 UTC (rev 1346) +++ trunk/src/dl-learner/org/dllearner/parser/ConfParserConstants.java 2008-10-07 10:27:14 UTC (rev 1347) @@ -1,32 +1,60 @@ /* Generated By:JavaCC: Do not edit this line. ConfParserConstants.java */ package org.dllearner.parser; -public @SuppressWarnings("all") interface ConfParserConstants { +/** + * Token literal values and constants. + * Generated by org.javacc.parser.OtherFilesGen#start() + */ +public interface ConfParserConstants { + + /** End of File. */ int EOF = 0; + /** RegularExpression Id. */ int SINGLE_LINE_COMMENT = 5; + /** RegularExpression Id. */ int FORMAL_COMMENT = 6; + /** RegularExpression Id. */ int MULTI_LINE_COMMENT = 7; + /** RegularExpression Id. */ int COMMAND_END = 8; + /** RegularExpression Id. */ int CONF_END = 9; + /** RegularExpression Id. */ int POS_EX = 10; + /** RegularExpression Id. */ int NEG_EX = 11; + /** RegularExpression Id. */ int ID = 12; + /** RegularExpression Id. */ int NUMBER = 13; + /** RegularExpression Id. */ int DOUBLE = 14; + /** RegularExpression Id. */ int TOP = 15; + /** RegularExpression Id. */ int BOTTOM = 16; + /** RegularExpression Id. */ int AND = 17; + /** RegularExpression Id. */ int OR = 18; + /** RegularExpression Id. */ int EXISTS = 19; + /** RegularExpression Id. */ int ALL = 20; + /** RegularExpression Id. */ int NOT = 21; + /** RegularExpression Id. */ int GE = 22; + /** RegularExpression Id. */ int LE = 23; + /** RegularExpression Id. */ int STRING = 24; + /** Lexical state. */ int DEFAULT = 0; + /** Literal token values. */ String[] tokenImage = { "<EOF>", "\" \"", Modified: trunk/src/dl-learner/org/dllearner/parser/ConfParserTokenManager.java =================================================================== --- trunk/src/dl-learner/org/dllearner/parser/ConfParserTokenManager.java 2008-10-07 10:05:51 UTC (rev 1346) +++ trunk/src/dl-learner/org/dllearner/parser/ConfParserTokenManager.java 2008-10-07 10:27:14 UTC (rev 1347) @@ -4,7 +4,6 @@ import java.util.List; import java.util.LinkedList; import java.util.Map; -import java.util.TreeMap; import java.util.Set; import java.util.HashSet; import java.util.SortedSet; @@ -13,14 +12,18 @@ import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; -import java.io.StringReader; import org.dllearner.Info; import org.dllearner.cli.*; import org.dllearner.utilities.datastructures.*; -public @SuppressWarnings("all") class ConfParserTokenManager implements ConfParserConstants +/** Token Manager. */ +@SuppressWarnings("all") +public class ConfParserTokenManager implements ConfParserConstants { + + /** Debug output. */ public java.io.PrintStream debugStream = System.out; + /** Set debug output. */ public void setDebugStream(java.io.PrintStream ds) { debugStream = ds; } private final int jjStopStringLiteralDfa_0(int pos, long active0) { @@ -38,22 +41,14 @@ { return jjMoveNfa_0(jjStopStringLiteralDfa_0(pos, active0), pos + 1); } -private final int jjStopAtPos(int pos, int kind) +private int jjStopAtPos(int pos, int kind) { jjmatchedKind = kind; jjmatchedPos = pos; return pos + 1; } -private final int jjStartNfaWithStates_0(int pos, int kind, int state) +private int jjMoveStringLiteralDfa0_0() { - jjmatchedKind = kind; - jjmatchedPos = pos; - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { return pos + 1; } - return jjMoveNfa_0(state, pos + 1); -} -private final int jjMoveStringLiteralDfa0_0() -{ switch(curChar) { case 40: @@ -96,7 +91,7 @@ return jjMoveNfa_0(0, 0); } } -private final int jjMoveStringLiteralDfa1_0(long active0) +private int jjMoveStringLiteralDfa1_0(long active0) { try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { @@ -124,7 +119,7 @@ } return jjStartNfa_0(0, active0); } -private final int jjMoveStringLiteralDfa2_0(long old0, long active0) +private int jjMoveStringLiteralDfa2_0(long old0, long active0) { if (((active0 &= old0)) == 0L) return jjStartNfa_0(0, old0); @@ -150,7 +145,7 @@ } return jjStartNfa_0(1, active0); } -private final int jjMoveStringLiteralDfa3_0(long old0, long active0) +private int jjMoveStringLiteralDfa3_0(long old0, long active0) { if (((active0 &= old0)) == 0L) return jjStartNfa_0(1, old0); @@ -168,7 +163,7 @@ } return jjStartNfa_0(2, active0); } -private final int jjMoveStringLiteralDfa4_0(long old0, long active0) +private int jjMoveStringLiteralDfa4_0(long old0, long active0) { if (((active0 &= old0)) == 0L) return jjStartNfa_0(2, old0); @@ -186,7 +181,7 @@ } return jjStartNfa_0(3, active0); } -private final int jjMoveStringLiteralDfa5_0(long old0, long active0) +private int jjMoveStringLiteralDfa5_0(long old0, long active0) { if (((active0 &= old0)) == 0L) return jjStartNfa_0(3, old0); @@ -206,47 +201,16 @@ } return jjStartNfa_0(4, active0); } -private final void jjCheckNAdd(int state) -{ - if (jjrounds[state] != jjround) - { - jjstateSet[jjnewStateCnt++] = state; - jjrounds[state] = jjround; - } -} -private final void jjAddStates(int start, int end) -{ - do { - jjstateSet[jjnewStateCnt++] = jjnextStates[start]; - } while (start++ != end); -} -private final void jjCheckNAddTwoStates(int state1, int state2) -{ - jjCheckNAdd(state1); - jjCheckNAdd(state2); -} -private final void jjCheckNAddStates(int start, int end) -{ - do { - jjCheckNAdd(jjnextStates[start]); - } while (start++ != end); -} -private final void jjCheckNAddStates(int start) -{ - jjCheckNAdd(jjnextStates[start]); - jjCheckNAdd(jjnextStates[start + 1]); -} static final long[] jjbitVec0 = { 0x0L, 0x0L, 0xffffffffffffffffL, 0xffffffffffffffffL }; -private final int jjMoveNfa_0(int startState, int curPos) +private int jjMoveNfa_0(int startState, int curPos) { - int[] nextStates; int startsAt = 0; jjnewStateCnt = 53; int i = 1; jjstateSet[0] = startState; - int j, kind = 0x7fffffff; + int kind = 0x7fffffff; for (;;) { if (++jjround == 0x7fffffff) @@ -254,7 +218,7 @@ if (curChar < 64) { long l = 1L << curChar; - MatchLoop: do + do { switch(jjstateSet[--i]) { @@ -417,7 +381,7 @@ else if (curChar < 128) { long l = 1L << (curChar & 077); - MatchLoop: do + do { switch(jjstateSet[--i]) { @@ -564,7 +528,7 @@ { int i2 = (curChar & 0xff) >> 6; long l2 = 1L << (curChar & 077); - MatchLoop: do + do { switch(jjstateSet[--i]) { @@ -615,11 +579,15 @@ 48, 49, 50, 29, 40, 41, 30, 31, 33, 36, 37, 39, 43, 44, 46, 25, 27, 21, 22, }; + +/** Token literal values. */ public static final String[] jjstrLiteralImages = { "", null, null, null, null, null, null, null, "\56", "\73", "\53", "\55", null, null, null, "\124\117\120", "\102\117\124\124\117\115", "\101\116\104", "\117\122", null, null, null, "\76\75", "\74\75", null, "\75", "\173", "\133", "\50", "\54", "\51", "\175", "\135", }; + +/** Lexer state names. */ public static final String[] lexStateNames = { "DEFAULT", }; @@ -633,15 +601,20 @@ private final int[] jjrounds = new int[53]; private final int[] jjstateSet = new int[106]; protected char curChar; +/** Constructor. */ public ConfParserTokenManager(SimpleCharStream stream){ if (SimpleCharStream.staticFlag) throw new Error("ERROR: Cannot use a static CharStream class with a non-static lexical analyzer."); input_stream = stream; } + +/** Constructor. */ public ConfParserTokenManager(SimpleCharStream stream, int lexState){ this(stream); SwitchTo(lexState); } + +/** Reinitialise parser. */ public void ReInit(SimpleCharStream stream) { jjmatchedPos = jjnewStateCnt = 0; @@ -649,18 +622,22 @@ input_stream = stream; ReInitRounds(); } -private final void ReInitRounds() +private void ReInitRounds() { int i; jjround = 0x80000001; for (i = 53; i-- > 0;) jjrounds[i] = 0x80000000; } + +/** Reinitialise parser. */ public void ReInit(SimpleCharStream stream, int lexState) { ReInit(stream); SwitchTo(lexState); } + +/** Switch to specified lex state. */ public void SwitchTo(int lexState) { if (lexState >= 1 || lexState < 0) @@ -671,14 +648,25 @@ protected Token jjFillToken() { - Token t = Token.newToken(jjmatchedKind); - t.kind = jjmatchedKind; + final Token t; + final String curTokenImage; + final int beginLine; + final int endLine; + final int beginColumn; + final int endColumn; String im = jjstrLiteralImages[jjmatchedKind]; - t.image = (im == null) ? input_stream.GetImage() : im; - t.beginLine = input_stream.getBeginLine(); - t.beginColumn = input_stream.getBeginColumn(); - t.endLine = input_stream.getEndLine(); - t.endColumn = input_stream.getEndColumn(); + curTokenImage = (im == null) ? input_stream.GetImage() : im; + beginLine = input_stream.getBeginLine(); + beginColumn = input_stream.getBeginColumn(); + endLine = input_stream.getEndLine(); + endColumn = input_stream.getEndColumn(); + t = Token.newToken(jjmatchedKind, curTokenImage); + + t.beginLine = beginLine; + t.endLine = endLine; + t.beginColumn = beginColumn; + t.endColumn = endColumn; + return t; } @@ -689,10 +677,9 @@ int jjmatchedPos; int jjmatchedKind; +/** Get the next Token. */ public Token getNextToken() { - int kind; - Token specialToken = null; Token matchedToken; int curPos = 0; @@ -755,4 +742,31 @@ } } +private void jjCheckNAdd(int state) +{ + if (jjrounds[state] != jjround) + { + jjstateSet[jjnewStateCnt++] = state; + jjrounds[state] = jjround; + } } +private void jjAddStates(int start, int end) +{ + do { + jjstateSet[jjnewStateCnt++] = jjnextStates[start]; + } while (start++ != end); +} +private void jjCheckNAddTwoStates(int state1, int state2) +{ + jjCheckNAdd(state1); + jjCheckNAdd(state2); +} + +private void jjCheckNAddStates(int start, int end) +{ + do { + jjCheckNAdd(jjnextStates[start]); + } while (start++ != end); +} + +} Modified: trunk/src/dl-learner/org/dllearner/parser/ParseException.java =================================================================== --- trunk/src/dl-learner/org/dllearner/parser/ParseException.java 2008-10-07 10:05:51 UTC (rev 1346) +++ trunk/src/dl-learner/org/dllearner/parser/ParseException.java 2008-10-07 10:27:14 UTC (rev 1347) @@ -1,4 +1,5 @@ -/* Generated By:JavaCC: Do not edit this line. ParseException.java Version 3.0 */ +/* Generated By:JavaCC: Do not edit this line. ParseException.java Version 4.1 */ +/* JavaCCOptions:KEEP_LINE_COL=null */ package org.dllearner.parser; /** @@ -10,7 +11,8 @@ * You can modify this class to customize your error reporting * mechanisms so long as you retain the public fields. */ -public @SuppressWarnings("all") class ParseException extends Exception { +@SuppressWarnings("all") +public class ParseException extends Exception { /** * This constructor is used by the method "generateParseException" @@ -51,6 +53,7 @@ specialConstructor = false; } + /** Constructor with message. */ public ParseException(String message) { super(message); specialConstructor = false; @@ -120,7 +123,10 @@ retval += tokenImage[0]; break; } + retval += " " + tokenImage[tok.kind]; + retval += " \""; retval += add_escapes(tok.image); + retval += " \""; tok = tok.next; } retval += "\" at line " + currentToken.next.beginLine + ", column " + currentToken.next.beginColumn; @@ -190,3 +196,4 @@ } } +/* JavaCC - OriginalChecksum=635b36f1d3290cdbc6b59e8752e3623d (do not edit this line) */ Modified: trunk/src/dl-learner/org/dllearner/parser/SimpleCharStream.java =================================================================== --- trunk/src/dl-learner/org/dllearner/parser/SimpleCharStream.java 2008-10-07 10:05:51 UTC (rev 1346) +++ trunk/src/dl-learner/org/dllearner/parser/SimpleCharStream.java 2008-10-07 10:27:14 UTC (rev 1347) @@ -1,4 +1,5 @@ -/* Generated By:JavaCC: Do not edit this line. SimpleCharStream.java Version 4.0 */ +/* Generated By:JavaCC: Do not edit this line. SimpleCharStream.java Version 4.1 */ +/* JavaCCOptions:STATIC=false */ package org.dllearner.parser; /** @@ -6,12 +7,14 @@ * contain only ASCII characters (without unicode processing). */ -public @SuppressWarnings("all") class SimpleCharStream +public class SimpleCharStream { +/** Whether parser is static. */ public static final boolean staticFlag = false; int bufsize; int available; int tokenBegin; +/** Position in buffer. */ public int bufpos = -1; protected int bufline[]; protected int bufcolumn[]; @@ -128,6 +131,7 @@ } } +/** Start. */ public char BeginToken() throws java.io.IOException { tokenBegin = -1; @@ -177,6 +181,7 @@ bufcolumn[bufpos] = column; } +/** Read a character. */ public char readChar() throws java.io.IOException { if (inBuf > 0) @@ -216,22 +221,27 @@ return bufline[bufpos]; } + /** Get token end column number. */ public int getEndColumn() { return bufcolumn[bufpos]; } + /** Get token end line number. */ public int getEndLine() { return bufline[bufpos]; } + /** Get token beginning column number. */ public int getBeginColumn() { return bufcolumn[tokenBegin]; } + /** Get token beginning line number. */ public int getBeginLine() { return bufline[tokenBegin]; } +/** Backup a number of characters. */ public void backup(int amount) { inBuf += amount; @@ -239,6 +249,7 @@ bufpos += bufsize; } + /** Constructor. */ public SimpleCharStream(java.io.Reader dstream, int startline, int startcolumn, int buffersize) { @@ -252,16 +263,20 @@ bufcolumn = new int[buffersize]; } + /** Constructor. */ public SimpleCharStream(java.io.Reader dstream, int startline, int startcolumn) { this(dstream, startline, startcolumn, 4096); } + /** Constructor. */ public SimpleCharStream(java.io.Reader dstream) { this(dstream, 1, 1, 4096); } + + /** Reinitialise. */ public void ReInit(java.io.Reader dstream, int startline, int startcolumn, int buffersize) { @@ -281,81 +296,96 @@ bufpos = -1; } + /** Reinitialise. */ public void ReInit(java.io.Reader dstream, int startline, int startcolumn) { ReInit(dstream, startline, startcolumn, 4096); } + /** Reinitialise. */ public void ReInit(java.io.Reader dstream) { ReInit(dstream, 1, 1, 4096); } + /** Constructor. */ public SimpleCharStream(java.io.InputStream dstream, String encoding, int startline, int startcolumn, int buffersize) throws java.io.UnsupportedEncodingException { this(encoding == null ? new java.io.InputStreamReader(dstream) : new java.io.InputStreamReader(dstream, encoding), startline, startcolumn, buffersize); } + /** Constructor. */ public SimpleCharStream(java.io.InputStream dstream, int startline, int startcolumn, int buffersize) { this(new java.io.InputStreamReader(dstream), startline, startcolumn, buffersize); } + /** Constructor. */ public SimpleCharStream(java.io.InputStream dstream, String encoding, int startline, int startcolumn) throws java.io.UnsupportedEncodingException { this(dstream, encoding, startline, startcolumn, 4096); } + /** Constructor. */ public SimpleCharStream(java.io.InputStream dstream, int startline, int startcolumn) { this(dstream, startline, startcolumn, 4096); } + /** Constructor. */ public SimpleCharStream(java.io.InputStream dstream, String encoding) throws java.io.UnsupportedEncodingException { this(dstream, encoding, 1, 1, 4096); } + /** Constructor. */ public SimpleCharStream(java.io.InputStream dstream) { this(dstream, 1, 1, 4096); } + /** Reinitialise. */ public void ReInit(java.io.InputStream dstream, String encoding, int startline, int startcolumn, int buffersize) throws java.io.UnsupportedEncodingException { ReInit(encoding == null ? new java.io.InputStreamReader(dstream) : new java.io.InputStreamReader(dstream, encoding), startline, startcolumn, buffersize); } + /** Reinitialise. */ public void ReInit(java.io.InputStream dstream, int startline, int startcolumn, int buffersize) { ReInit(new java.io.InputStreamReader(dstream), startline, startcolumn, buffersize); } + /** Reinitialise. */ public void ReInit(java.io.InputStream dstream, String encoding) throws java.io.UnsupportedEncodingException { ReInit(dstream, encoding, 1, 1, 4096); } + /** Reinitialise. */ public void ReInit(java.io.InputStream dstream) { ReInit(dstream, 1, 1, 4096); } + /** Reinitialise. */ public void ReInit(java.io.InputStream dstream, String encoding, int startline, int startcolumn) throws java.io.UnsupportedEncodingException { ReInit(dstream, encoding, startline, startcolumn, 4096); } + /** Reinitialise. */ public void ReInit(java.io.InputStream dstream, int startline, int startcolumn) { ReInit(dstream, startline, startcolumn, 4096); } + /** Get token literal value. */ public String GetImage() { if (bufpos >= tokenBegin) @@ -365,6 +395,7 @@ new String(buffer, 0, bufpos + 1); } + /** Get the suffix. */ public char[] GetSuffix(int len) { char[] ret = new char[len]; @@ -381,6 +412,7 @@ return ret; } + /** Reset buffer when finished. */ public void Done() { buffer = null; @@ -437,3 +469,4 @@ } } +/* JavaCC - OriginalChecksum=4dc2726dec9c445d0f0f7d31e4258576 (do not edit this line) */ Modified: trunk/src/dl-learner/org/dllearner/parser/Token.java =================================================================== --- trunk/src/dl-learner/org/dllearner/parser/Token.java 2008-10-07 10:05:51 UTC (rev 1346) +++ trunk/src/dl-learner/org/dllearner/parser/Token.java 2008-10-07 10:27:14 UTC (rev 1347) @@ -1,11 +1,12 @@ -/* Generated By:JavaCC: Do not edit this line. Token.java Version 3.0 */ +/* Generated By:JavaCC: Do not edit this line. Token.java Version 4.1 */ +/* JavaCCOptions:TOKEN_EXTENDS=,KEEP_LINE_COL=null */ package org.dllearner.parser; /** * Describes the input token stream. */ -public @SuppressWarnings("all") class Token { +public class Token { /** * An integer that describes the kind of this token. This numbering @@ -14,12 +15,14 @@ */ public int kind; - /** - * beginLine and beginColumn describe the position of the first character - * of this token; endLine and endColumn describe the position of the - * last character of this token. - */ - public int beginLine, beginColumn, endLine, endColumn; + /** The line number of the first character of this Token. */ + public int beginLine; + /** The column number of the first character of this Token. */ + public int beginColumn; + /** The line number of the last character of this Token. */ + public int endLine; + /** The column number of the last character of this Token. */ + public int endColumn; /** * The string image of the token. @@ -51,6 +54,40 @@ public Token specialToken; /** + * An optional attribute value of the Token. + * Tokens which are not used as syntactic sugar will often contain + * meaningful values that will be used later on by the compiler or + * interpreter. This attribute value is often different from the image. + * Any subclass of Token that actually wants to return a non-null value can + * override this method as appropriate. + */ + public Object getValue() { + return null; + } + + /** + * No-argument constructor + */ + public Token() {} + + /** + * Constructs a new token for the specified Image. + */ + public Token(int kind) + { + this(kind, null); + } + + /** + * Constructs a new token for the specified Image and Kind. + */ + public Token(int kind, String image) + { + this.kind = kind; + this.image = image; + } + + /** * Returns the image. */ public String toString() @@ -63,19 +100,25 @@ * can create and return subclass objects based on the value of ofKind. * Simply add the cases to the switch for all those special cases. * For example, if you have a subclass of Token called IDToken that - * you want to create if ofKind is ID, simlpy add something like : + * you want to create if ofKind is ID, simply add something like : * - * case MyParserConstants.ID : return new IDToken(); + * case MyParserConstants.ID : return new IDToken(ofKind, image); * * to the following switch statement. Then you can cast matchedToken - * variable to the appropriate type and use it in your lexical actions. + * variable to the appropriate type and use sit in your lexical actions. */ - public static final Token newToken(int ofKind) + public static Token newToken(int ofKind, String image) { switch(ofKind) { - default : return new Token(); + default : return new Token(ofKind, image); } } + public static Token newToken(int ofKind) + { + return newToken(ofKind, null); + } + } +/* JavaCC - OriginalChecksum=8d8b4fbd81824dbdd6b91fb215e7f12d (do not edit this line) */ Modified: trunk/src/dl-learner/org/dllearner/parser/TokenMgrError.java =================================================================== --- trunk/src/dl-learner/org/dllearner/parser/TokenMgrError.java 2008-10-07 10:05:51 UTC (rev 1346) +++ trunk/src/dl-learner/org/dllearner/parser/TokenMgrError.java 2008-10-07 10:27:14 UTC (rev 1347) @@ -1,8 +1,12 @@ -/* Generated By:JavaCC: Do not edit this line. TokenMgrError.java Version 3.0 */ +/* Generated By:JavaCC: Do not edit this line. TokenMgrError.java Version 4.1 */ +/* JavaCCOptions: */ package org.dllearner.parser; -public @SuppressWarnings("all") class TokenMgrError extends Error +/** Token Manager Error. */ +@SuppressWarnings("serial") +public class TokenMgrError extends Error { + /* * Ordinals for various reasons why an Error of this type can be thrown. */ @@ -119,15 +123,19 @@ * Constructors of various flavors follow. */ + /** No arg constructor. */ public TokenMgrError() { } + /** Constructor with message and reason. */ public TokenMgrError(String message, int reason) { super(message); errorCode = reason; } + /** Full Constructor. */ public TokenMgrError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar, int reason) { this(LexicalError(EOFSeen, lexState, errorLine, errorColumn, errorAfter, curChar), reason); } } +/* JavaCC - OriginalChecksum=520337036fd46df117e8ba0a007c282e (do not edit this line) */ Modified: trunk/src/dl-learner/org/dllearner/parser/conf.jj =================================================================== --- trunk/src/dl-learner/org/dllearner/parser/conf.jj 2008-10-07 10:05:51 UTC (rev 1346) +++ trunk/src/dl-learner/org/dllearner/parser/conf.jj 2008-10-07 10:27:14 UTC (rev 1347) @@ -34,7 +34,6 @@ import java.util.List; import java.util.LinkedList; import java.util.Map; -import java.util.TreeMap; import java.util.Set; import java.util.HashSet; import java.util.SortedSet; @@ -44,7 +43,6 @@ import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; -import java.io.StringReader; import org.dllearner.Info; @@ -151,16 +149,16 @@ } */ - public static ConfParser parseFile(File filename) { + public static ConfParser parseFile(File filename) throws FileNotFoundException, ParseException { ConfParser learner = null; - try { +// try { learner = new ConfParser(new FileInputStream(filename)); learner.Start(); - } catch(FileNotFoundException e) { - e.printStackTrace(); - } catch(ParseException e) { - e.printStackTrace(); - } +// } catch(FileNotFoundException e) { +// e.printStackTrace(); +// } catch(ParseException e) { +// e.printStackTrace(); +// } return learner; } @@ -179,7 +177,7 @@ // System.out.println(args.length); File f = new File(args[args.length-1]); - String baseDir = ""; +// String baseDir = ""; System.out.print("Parsing " + f.getName() + " ... "); long parseStartTime = System.currentTimeMillis(); @@ -188,7 +186,7 @@ ConfParser learner = null; try { learner = new ConfParser(new FileInputStream(args[args.length-1])); - baseDir = f.getParentFile().getPath(); +// baseDir = f.getParentFile().getPath(); } catch(IOException e) { System.err.println(e); System.exit(0); @@ -207,13 +205,13 @@ long parseDuration = System.currentTimeMillis() - parseStartTime; System.out.println("OK (" + parseDuration + " ms)"); - boolean queryMode = false; +// boolean queryMode = false; // solution test mode wird nicht unbedingt gebraucht, da man die covers // gleich standardmäßig beim query mit anzeigen kann // boolean solutionTestMode = false; - if(args.length>1 && args[0].equals("-q")) - queryMode = true; +// if(args.length>1 && args[0].equals("-q")) +// queryMode = true; //if(args.length>1 && args[0].equals("-qt")) { // queryMode = true; Modified: trunk/src/dl-learner/org/dllearner/scripts/CrossValidation.java =================================================================== --- trunk/src/dl-learner/org/dllearner/scripts/CrossValidation.java 2008-10-07 10:05:51 UTC (rev 1346) +++ trunk/src/dl-learner/org/dllearner/scripts/CrossValidation.java 2008-10-07 10:27:14 UTC (rev 1347) @@ -20,6 +20,7 @@ package org.dllearner.scripts; import java.io.File; +import java.io.FileNotFoundException; import java.text.DecimalFormat; import java.util.Collections; import java.util.HashSet; @@ -42,6 +43,7 @@ import org.dllearner.core.owl.Individual; import org.dllearner.learningproblems.PosNegLP; import org.dllearner.learningproblems.PosOnlyLP; +import org.dllearner.parser.ParseException; import org.dllearner.utilities.Helper; import org.dllearner.utilities.datastructures.Datastructures; import org.dllearner.utilities.statistics.Stat; @@ -112,6 +114,12 @@ } catch (ComponentInitException e) { // TODO Auto-generated catch block e.printStackTrace(); + } catch (FileNotFoundException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (ParseException e) { + // TODO Auto-generated catch block + e.printStackTrace(); } LearningProblem lp = start.getLearningProblem(); @@ -196,6 +204,12 @@ start = new Start(file); } catch (ComponentInitException e) { e.printStackTrace(); + } catch (FileNotFoundException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (ParseException e) { + // TODO Auto-generated catch block + e.printStackTrace(); } lp = start.getLearningProblem(); Set<String> pos = Datastructures.individualSetToStringSet(trainingSetsPos.get(currFold)); Modified: trunk/src/dl-learner/org/dllearner/scripts/TestValidation.java =================================================================== --- trunk/src/dl-learner/org/dllearner/scripts/TestValidation.java 2008-10-07 10:05:51 UTC (rev 1346) +++ trunk/src/dl-learner/org/dllearner/scripts/TestValidation.java 2008-10-07 10:27:14 UTC (rev 1347) @@ -20,6 +20,7 @@ package org.dllearner.scripts; import java.io.File; +import java.io.FileNotFoundException; import java.util.Set; import org.apache.log4j.ConsoleAppender; @@ -33,6 +34,7 @@ import org.dllearner.core.Score; import org.dllearner.core.owl.Description; import org.dllearner.core.owl.Individual; +import org.dllearner.parser.ParseException; /** * @author Jens Lehmann @@ -42,7 +44,7 @@ private static Logger logger = Logger.getRootLogger(); - public static void main(String args[]) throws ComponentInitException { + public static void main(String args[]) throws ComponentInitException, FileNotFoundException, ParseException { // create logger (a simple logger which outputs // its messages to the console) Modified: trunk/src/dl-learner/org/dllearner/test/junit/ExampleTests.java =================================================================== --- trunk/src/dl-learner/org/dllearner/test/junit/ExampleTests.java 2008-10-07 10:05:51 UTC (rev 1346) +++ trunk/src/dl-learner/org/dllearner/test/junit/ExampleTests.java 2008-10-07 10:27:14 UTC (rev 1347) @@ -77,6 +77,10 @@ // to server downtime, lack of features etc., but should still // remain in the example directory Set<String> ignore = new TreeSet<String>(); + // "standard" ignores (no problem to keep those) + ignore.add("./examples/krk/complete_no_draw.conf"); // refers to an OWL file, which has to be auto-generated + + // ignored due to errors ignore.add("./examples/sparql/govtrack.conf"); // HTTP 500 Server error ignore.add("./examples/sparql/musicbrainz.conf"); // HTTP 502 error - NullPointer in extraction ignore.add("./examples/sparql/SKOSTEST_local.conf"); // Out of Memory Error @@ -86,7 +90,8 @@ ignore.add("./examples/family/father_posonly.conf"); // ArrayOutOfBoundsException in Pellet - main problem: pos only not working ignore.add("./examples/sparql/difference/DBPediaSKOS_kohl_vs_angela.conf"); // Pellet: literal cannot be cast to individual ignore.add("./examples/family-benchmark/Aunt.conf"); // did not terminate so far (waited 45 minutes) - + + int failedCounter = 0; for (String path : confFiles.keySet()) { for (String file : confFiles.get(path)) { String conf = path + file + ".conf"; @@ -95,18 +100,31 @@ } else { System.out.println("Testing " + conf + " (time: " + sdf.format(new Date()) + ")."); long startTime = System.nanoTime(); - // start example - Start start = new Start(new File(conf)); - start.start(false); - // test is successful if a concept was learned - assert (start.getLearningAlgorithm().getCurrentlyBestDescription() != null); + boolean success = false; + try { + // start example + Start start = new Start(new File(conf)); + start.start(false); + // test is successful if a concept was learned + assert (start.getLearningAlgorithm().getCurrentlyBestDescription() != null); + start.getReasoningService().releaseKB(); + success = true; + } catch (Exception e) { + // unit test not succesful (exceptions are caught explicitly to find + assert ( false ); + e.printStackTrace(); + failedCounter++; + } long timeNeeded = System.nanoTime() - startTime; - start.getReasoningService().releaseKB(); ComponentManager.getInstance().freeAllComponents(); + if(!success) { + System.out.println("TEST FAILED."); + } System.out.println("Test of " + conf + " completed in " + Helper.prettyPrintNanoSeconds(timeNeeded) + "."); } } } + System.out.println("Finished. " + failedCounter + " tests failed."); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Jen...@us...> - 2008-10-07 13:03:55
|
Revision: 1348 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=1348&view=rev Author: JensLehmann Date: 2008-10-07 13:00:54 +0000 (Tue, 07 Oct 2008) Log Message: ----------- fixed some warnings Modified Paths: -------------- trunk/examples/krk/test_ZERO_against_1to16.conf trunk/src/dl-learner/org/dllearner/core/ComponentManager.java trunk/src/dl-learner/org/dllearner/kb/extraction/InstanceNode.java trunk/src/dl-learner/org/dllearner/scripts/WikipediaCategoryCleaner.java trunk/src/dl-learner/org/dllearner/test/junit/ExampleTests.java trunk/src/dl-learner/org/dllearner/tools/protege/OWLClassDescriptionEditorWithDLLearnerTab.java Modified: trunk/examples/krk/test_ZERO_against_1to16.conf =================================================================== --- trunk/examples/krk/test_ZERO_against_1to16.conf 2008-10-07 10:27:14 UTC (rev 1347) +++ trunk/examples/krk/test_ZERO_against_1to16.conf 2008-10-07 13:00:54 UTC (rev 1348) @@ -1,7 +1,12 @@ /** + * You need to generate the OWL background knowledge file, + * otherwise this example won't work! + */ +/** + **/ Modified: trunk/src/dl-learner/org/dllearner/core/ComponentManager.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/ComponentManager.java 2008-10-07 10:27:14 UTC (rev 1347) +++ trunk/src/dl-learner/org/dllearner/core/ComponentManager.java 2008-10-07 13:00:54 UTC (rev 1348) @@ -42,7 +42,7 @@ import java.util.TreeSet; import org.apache.log4j.Logger; -import org.dllearner.cli.Start; +import org.dllearner.cli.ConfMapper; import org.dllearner.core.config.ConfigEntry; import org.dllearner.core.config.ConfigOption; import org.dllearner.core.config.InvalidConfigOptionValueException; @@ -85,6 +85,8 @@ private static Map<Class<? extends Component>, Map<String, ConfigOption<?>>> componentOptionsByName; private static Map<Class<? extends LearningAlgorithm>, Collection<Class<? extends LearningProblem>>> algorithmProblemsMapping; + private ConfMapper confMapper = new ConfMapper(); + // list of default values of config options // private static Map<ConfigOption<?>,Object> configOptionDefaults; @@ -532,15 +534,8 @@ private String getComponentConfigString(Class<? extends Component> component) { String componentDescription = "component: " + invokeStaticMethod(component, "getName") + " (" + component.getName() + ")"; String str = componentDescription + "\n"; - String cli = Start.getCLIMapping(component.getSuperclass().getSimpleName()+""); - String usage =""; - - Map<Class<? extends Component>, String> m=Start.createComponentPrefixMapping(); - for (Class<? extends Component> c : m.keySet()) { - if(c.getCanonicalName().equals(component.getCanonicalName())) { - usage=m.get(c); - } - } + String cli = confMapper.getComponentTypeString(component); + String usage = confMapper.getComponentString(component); for(int i=0; i<componentDescription.length(); i++) { str += "="; Modified: trunk/src/dl-learner/org/dllearner/kb/extraction/InstanceNode.java =================================================================== --- trunk/src/dl-learner/org/dllearner/kb/extraction/InstanceNode.java 2008-10-07 10:27:14 UTC (rev 1347) +++ trunk/src/dl-learner/org/dllearner/kb/extraction/InstanceNode.java 2008-10-07 13:00:54 UTC (rev 1348) @@ -30,10 +30,8 @@ import org.dllearner.kb.manipulator.Manipulator; import org.dllearner.utilities.datastructures.RDFNodeTuple; import org.dllearner.utilities.owl.OWLVocabulary; -import org.semanticweb.owl.model.OWLAnnotationAxiom; import org.semanticweb.owl.model.OWLAxiom; import org.semanticweb.owl.model.OWLClass; -import org.semanticweb.owl.model.OWLCommentAnnotation; import org.semanticweb.owl.model.OWLDataFactory; import org.semanticweb.owl.model.OWLDataProperty; import org.semanticweb.owl.model.OWLIndividual; Modified: trunk/src/dl-learner/org/dllearner/scripts/WikipediaCategoryCleaner.java =================================================================== --- trunk/src/dl-learner/org/dllearner/scripts/WikipediaCategoryCleaner.java 2008-10-07 10:27:14 UTC (rev 1347) +++ trunk/src/dl-learner/org/dllearner/scripts/WikipediaCategoryCleaner.java 2008-10-07 13:00:54 UTC (rev 1348) @@ -29,7 +29,6 @@ import java.util.SortedSet; import java.util.TreeSet; -import org.apache.log4j.ConsoleAppender; import org.apache.log4j.FileAppender; import org.apache.log4j.Level; import org.apache.log4j.Logger; @@ -249,6 +248,7 @@ Files.createFile(new File(file), content); } + @SuppressWarnings("unused") private static void collectResults(WikipediaCategoryTasks wikiTasks) { //logger.setLevel(Level.DEBUG); SetManipulation.printSet("fullpos", wikiTasks.getFullPositiveSet(), logger); @@ -382,7 +382,7 @@ } - + @SuppressWarnings("unused") private static void printIntermediateResults( SortedSet<String> fullSet, SortedSet<String> correctIndividuals, @@ -427,7 +427,7 @@ e.printStackTrace(); } - ConsoleAppender consoleAppender = new ConsoleAppender(layout); +// ConsoleAppender consoleAppender = new ConsoleAppender(layout); logger.removeAllAppenders(); //logger.addAppender(consoleAppender); logger.addAppender(fileAppender); @@ -448,6 +448,7 @@ } + @SuppressWarnings("unused") private static void findCat(){ String q = "SELECT DISTINCT ?cat WHERE { ?a <http://www.w3.org/2004/02/skos/core#subject> ?cat }"; //System.out.println(q); Modified: trunk/src/dl-learner/org/dllearner/test/junit/ExampleTests.java =================================================================== --- trunk/src/dl-learner/org/dllearner/test/junit/ExampleTests.java 2008-10-07 10:27:14 UTC (rev 1347) +++ trunk/src/dl-learner/org/dllearner/test/junit/ExampleTests.java 2008-10-07 13:00:54 UTC (rev 1348) @@ -79,6 +79,7 @@ Set<String> ignore = new TreeSet<String>(); // "standard" ignores (no problem to keep those) ignore.add("./examples/krk/complete_no_draw.conf"); // refers to an OWL file, which has to be auto-generated + ignore.add("./examples/krk/test_ZERO_against_1to16.conf"); // see above // ignored due to errors ignore.add("./examples/sparql/govtrack.conf"); // HTTP 500 Server error Modified: trunk/src/dl-learner/org/dllearner/tools/protege/OWLClassDescriptionEditorWithDLLearnerTab.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/protege/OWLClassDescriptionEditorWithDLLearnerTab.java 2008-10-07 10:27:14 UTC (rev 1347) +++ trunk/src/dl-learner/org/dllearner/tools/protege/OWLClassDescriptionEditorWithDLLearnerTab.java 2008-10-07 13:00:54 UTC (rev 1348) @@ -49,11 +49,8 @@ /** * Added a new Tab for the DL-Learner GUI. * - * @author Matthew Horridge and Christian Koetteritzsch<br> - * The University Of Manchester<br> - * Bio-Health Informatics Group<br> - * Date: 15-Feb-2007<br> - * <br> + * @author Matthew Horridge + * @author Christian Koetteritzsch */ public class OWLClassDescriptionEditorWithDLLearnerTab extends AbstractOWLFrameSectionRowObjectEditor<OWLDescription> implements This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Jen...@us...> - 2008-10-09 11:07:02
|
Revision: 1350 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=1350&view=rev Author: JensLehmann Date: 2008-10-09 11:06:58 +0000 (Thu, 09 Oct 2008) Log Message: ----------- deleted close ontology bat/shell file Modified Paths: -------------- trunk/src/dl-learner/org/dllearner/Info.java Removed Paths: ------------- trunk/bin/closeOntology trunk/bin/closeOntology.bat Deleted: trunk/bin/closeOntology =================================================================== --- trunk/bin/closeOntology 2008-10-09 06:21:55 UTC (rev 1349) +++ trunk/bin/closeOntology 2008-10-09 11:06:58 UTC (rev 1350) @@ -1 +0,0 @@ -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/bin/closeOntology.bat =================================================================== --- trunk/bin/closeOntology.bat 2008-10-09 06:21:55 UTC (rev 1349) +++ trunk/bin/closeOntology.bat 2008-10-09 11:06:58 UTC (rev 1350) @@ -1 +0,0 @@ -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 Modified: trunk/src/dl-learner/org/dllearner/Info.java =================================================================== --- trunk/src/dl-learner/org/dllearner/Info.java 2008-10-09 06:21:55 UTC (rev 1349) +++ trunk/src/dl-learner/org/dllearner/Info.java 2008-10-09 11:06:58 UTC (rev 1350) @@ -3,6 +3,6 @@ package org.dllearner; public class Info { - public static final String build = "2008-08-20"; + public static final String build = "2008-10-09"; } \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Jen...@us...> - 2008-10-09 12:42:28
|
Revision: 1352 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=1352&view=rev Author: JensLehmann Date: 2008-10-09 12:42:27 +0000 (Thu, 09 Oct 2008) Log Message: ----------- - fixed permissions for GUI shell startup file - removed some GUI sysouts Modified Paths: -------------- trunk/build.xml trunk/src/dl-learner/org/dllearner/gui/RunPanel.java trunk/src/dl-learner/org/dllearner/gui/TreeWindow.java Modified: trunk/build.xml =================================================================== --- trunk/build.xml 2008-10-09 11:40:50 UTC (rev 1351) +++ trunk/build.xml 2008-10-09 12:42:27 UTC (rev 1352) @@ -187,11 +187,13 @@ <include name="${version_dir}/dllearner" /> <include name="${version_dir}/quickstart" /> <include name="${version_dir}/ws" /> + <include name="${version_dir}/gui" /> </tarfileset> <tarfileset dir="release/"> <exclude name="${version_dir}/dllearner"/> <exclude name="${version_dir}/quickstart" /> <exclude name="${version_dir}/ws" /> + <exclude name="${version_dir}/gui" /> </tarfileset> </tar> <delete dir="release"/> Modified: trunk/src/dl-learner/org/dllearner/gui/RunPanel.java =================================================================== --- trunk/src/dl-learner/org/dllearner/gui/RunPanel.java 2008-10-09 11:40:50 UTC (rev 1351) +++ trunk/src/dl-learner/org/dllearner/gui/RunPanel.java 2008-10-09 12:42:27 UTC (rev 1352) @@ -100,10 +100,10 @@ public long getRuntimeNanos() { if(isAlive()) { - System.out.println("ALIVE"); +// System.out.println("ALIVE"); return System.nanoTime() - startTime; } else { - System.out.println("NOT ALIVE"); +// System.out.println("NOT ALIVE"); return endTime - startTime; } } @@ -412,7 +412,7 @@ runButton.setEnabled(true); startGUI.enableTabbedPane(); - System.out.println("TEST"); +// System.out.println("TEST"); // enable tree button if((config.getLearningAlgorithm() instanceof ExampleBasedROLComponent) Modified: trunk/src/dl-learner/org/dllearner/gui/TreeWindow.java =================================================================== --- trunk/src/dl-learner/org/dllearner/gui/TreeWindow.java 2008-10-09 11:40:50 UTC (rev 1351) +++ trunk/src/dl-learner/org/dllearner/gui/TreeWindow.java 2008-10-09 12:42:27 UTC (rev 1352) @@ -72,7 +72,7 @@ // childrens to treeModel Object first = ebNodeModel.getChild(rootNode, 0); - System.out.println("getIndexOfChild: " + ebNodeModel.getIndexOfChild(rootNode, first)); +// System.out.println("getIndexOfChild: " + ebNodeModel.getIndexOfChild(rootNode, first)); // System.out.println("childs2: " + // ebNodeModel.getChildren((ExampleBasedNode) first)); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Jen...@us...> - 2008-10-09 14:04:21
|
Revision: 1356 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=1356&view=rev Author: JensLehmann Date: 2008-10-09 14:04:09 +0000 (Thu, 09 Oct 2008) Log Message: ----------- disallowed all-quantifier in family benchmark problems (causes them to terminate quickly) Modified Paths: -------------- trunk/examples/family-benchmark/Aunt.conf trunk/examples/family-benchmark/Cousin.conf trunk/src/dl-learner/org/dllearner/test/junit/ExampleTests.java Modified: trunk/examples/family-benchmark/Aunt.conf =================================================================== --- trunk/examples/family-benchmark/Aunt.conf 2008-10-09 13:30:37 UTC (rev 1355) +++ trunk/examples/family-benchmark/Aunt.conf 2008-10-09 14:04:09 UTC (rev 1356) @@ -1,5 +1,7 @@ import("family-benchmark.owl"); +// TODO All Quantifier causes "wrong" areas of the search space to be explored +refexamples.useAllConstructor = false; +"http://www.benchmark.org/family#F2F14" +"http://www.benchmark.org/family#F2F12" Modified: trunk/examples/family-benchmark/Cousin.conf =================================================================== --- trunk/examples/family-benchmark/Cousin.conf 2008-10-09 13:30:37 UTC (rev 1355) +++ trunk/examples/family-benchmark/Cousin.conf 2008-10-09 14:04:09 UTC (rev 1356) @@ -1,5 +1,7 @@ import("family-benchmark.owl"); +// TODO All Quantifier causes "wrong" areas of the search space to be explored +refexamples.useAllConstructor = false; +"http://www.benchmark.org/family#F2M13" +"http://www.benchmark.org/family#F2F14" Modified: trunk/src/dl-learner/org/dllearner/test/junit/ExampleTests.java =================================================================== --- trunk/src/dl-learner/org/dllearner/test/junit/ExampleTests.java 2008-10-09 13:30:37 UTC (rev 1355) +++ trunk/src/dl-learner/org/dllearner/test/junit/ExampleTests.java 2008-10-09 14:04:09 UTC (rev 1356) @@ -83,6 +83,9 @@ ignore.add("./examples/krk/test_ZERO_against_1to16.conf"); // see above ignore.add("./examples/semantic_bible/sparqlbible.conf"); // requires local Joseki + // temporarily not working (have a look at those before next release) + ignore.add("./examples/family/father_posonly.conf"); // ArrayOutOfBoundsException in Pellet - main problem: pos only not working/supported + // ignored due to errors (should be fixed; in case of long running problems or // our of memory, it is better to increase the noise parameter and add comments // in the conf file about "optimal" parameters) @@ -90,11 +93,10 @@ ignore.add("./examples/sparql/musicbrainz.conf"); // HTTP 502 error - NullPointer in extraction ignore.add("./examples/sparql/SKOSTEST_local.conf"); // Out of Memory Error ignore.add("./examples/sparql/scrobble.conf"); // HTTP 502 Proxy Error - ignore.add("./examples/family-benchmark/Cousin.conf"); // Out of Memory Error + // ignore.add("./examples/family-benchmark/Cousin.conf"); // Out of Memory Error => disallowing ALL helps (TODO find out details) ignore.add("./examples/sparql/SilentBobWorking2.conf"); // Out of Memory Error - ignore.add("./examples/family/father_posonly.conf"); // ArrayOutOfBoundsException in Pellet - main problem: pos only not working/supported ignore.add("./examples/sparql/difference/DBPediaSKOS_kohl_vs_angela.conf"); // Pellet: literal cannot be cast to individual - ignore.add("./examples/family-benchmark/Aunt.conf"); // did not terminate so far (waited 45 minutes) + // ignore.add("./examples/family-benchmark/Aunt.conf"); // did not terminate so far (waited 45 minutes) => disallowing ALL helps (TODO find out details) ignore.add("./examples/krk/KRK_ZERO_against_1to5_fastInstance.conf"); // Out of Memory Error ignore.add("./examples/semantic_bible/normal_test.conf"); // did not terminate (waited 55 minutes) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jen...@us...> - 2008-10-10 15:44:42
|
Revision: 1361 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=1361&view=rev Author: jenslehmann Date: 2008-10-10 15:44:36 +0000 (Fri, 10 Oct 2008) Log Message: ----------- fixed 3 examples (2 remaining) Modified Paths: -------------- trunk/examples/krk/KRK_ZERO_against_1to5_fastInstance.conf trunk/examples/sparql/difference/DBPediaSKOS_kohl_vs_angela.conf trunk/examples/sparql/govtrack.conf trunk/src/dl-learner/org/dllearner/test/junit/ExampleTests.java Modified: trunk/examples/krk/KRK_ZERO_against_1to5_fastInstance.conf =================================================================== --- trunk/examples/krk/KRK_ZERO_against_1to5_fastInstance.conf 2008-10-10 08:39:29 UTC (rev 1360) +++ trunk/examples/krk/KRK_ZERO_against_1to5_fastInstance.conf 2008-10-10 15:44:36 UTC (rev 1361) @@ -1,22 +1,11 @@ /** -DEBUG - --- loop 22845 started --- -DEBUG - start node: TOP [acc:2,452% h:-0,192 q:0p-1074n (START), he:14 c:9568] -DEBUG - currently best node: ALL "hasPiece".(ALL "fileDistance1"."BKing" AND ALL "fileDistance6"."WRook" AND ALL "fileDistance7"."WKing" AND (EXISTS "fileDistanceLessThan3".(EXISTS "fileDistanceLessThan2".ALL "rankDistance1"."WKing" AND ALL "rankDistance1"."WKing") OR ("WRook" AND EXISTS "hasLowerRankThan".TOP))) [acc:92,461% h:0,124 q:0p-83n (REASONER), he:32 c:14] -DEBUG - next expanded node: ALL "hasPiece".(ALL "fileDistance1"."BKing" AND ALL "fileDistance6"."WRook" AND ALL "fileDistance7"."WKing" AND (EXISTS "fileDistanceLessThan3".(EXISTS "fileDistanceLessThan1".ALL "fileDistanceLessThan4".TOP AND ALL "rankDistance1"."WKing") OR ("WRook" AND EXISTS "hasLowerRankThan".ALL "rankDistance1".BOTTOM))) [acc:92,461% h:0,125 q:0p-83n (REASONER), he:32 c:0] -DEBUG - algorithm runtime 2351s 900ms -DEBUG - size of candidate set: 4247 -DEBUG - subsumption time: 22ms -DEBUG - instance check time: 2036s 942ms -DEBUG - retrieval time: 0ms -DEBUG - properness tests (reasoner/short concept/too weak list): 0/236/4043 -DEBUG - concept tests (reasoner/too weak list/overly general list/redundant concepts): 162475/4043/10296/41312 + * KRK problem. + * We try to distinguish mate positions from those which are mate in 1 to 5. + * DL-Learner will find a solution with 98% accuracy, but not a perfect one (in short time). + * You can experiment with the noise parameter and observe the search tree to find out more. + **/ - -**/ - - - import("KRK_ZERO_against_1to5.owl"); refexamples.ignoredConcepts={ @@ -27,14 +16,11 @@ "http://www.test.de/test#TWO", "http://www.test.de/test#ZERO"}; -//problem = posOnlyDefinition; - algorithm = refexamples; -//algorithm = refinement; -//refinement.heuristic=flexible; reasoner=fastInstanceChecker; refexamples.startClass = "http://www.test.de/test#Game"; -//refexamples.useAllConstructor = false; +refexamples.useAllConstructor = false; +refexamples.noisePercentage = 2; /**ZERO**/ +"http://www.test.de/test#game1" Modified: trunk/examples/sparql/difference/DBPediaSKOS_kohl_vs_angela.conf =================================================================== --- trunk/examples/sparql/difference/DBPediaSKOS_kohl_vs_angela.conf 2008-10-10 08:39:29 UTC (rev 1360) +++ trunk/examples/sparql/difference/DBPediaSKOS_kohl_vs_angela.conf 2008-10-10 15:44:36 UTC (rev 1361) @@ -36,7 +36,7 @@ */ - +// refexamples.ignoredRoles = {"http://dbpedia.org/property/spouse"}; // recursion depth of extraction algorithm sparql.recursionDepth = 1; @@ -48,7 +48,9 @@ "http://dbpedia.org/property/reference", "http://dbpedia.org/property/website", "http://dbpedia.org/property/wikipage", - "http://dbpedia.org/property/wikiPageUsesTemplate"}; + "http://dbpedia.org/property/wikiPageUsesTemplate", + "http://dbpedia.org/property/spouse" +}; // list of ignored objects sparql.objList = { "http://xmlns.com/foaf/0.1/", Modified: trunk/examples/sparql/govtrack.conf =================================================================== --- trunk/examples/sparql/govtrack.conf 2008-10-10 08:39:29 UTC (rev 1360) +++ trunk/examples/sparql/govtrack.conf 2008-10-10 15:44:36 UTC (rev 1361) @@ -1,3 +1,9 @@ +/** + * GovTrack example. It does not produce anything meaningful yet. + * We either need to support datatype properties in owl:hasValue + * or convert some of the datatype properties into object properties, + * e.g. "Democrat" or "Republican" into a class. + */ sparql.recursionDepth = 3; sparql.predefinedEndpoint = "GOVTRACK"; @@ -2,7 +8,11 @@ sparql.useLits = true; +sparql.saveExtractedFragment = true; algorithm = refexamples; -reasoner = owlAPIReasoner; -// reasoner = fastInstanceChecker; +refexamples.ignoredRoles = { "http://www.w3.org/2002/07/owl#sameAs"}; +refexamples.useHasValueConstructor = true; +refexamples.valueFrequencyThreshold = 1; +reasoner = fastInstanceChecker; + import("http://www.govtrack.us/sparql","SPARQL"); Modified: trunk/src/dl-learner/org/dllearner/test/junit/ExampleTests.java =================================================================== --- trunk/src/dl-learner/org/dllearner/test/junit/ExampleTests.java 2008-10-10 08:39:29 UTC (rev 1360) +++ trunk/src/dl-learner/org/dllearner/test/junit/ExampleTests.java 2008-10-10 15:44:36 UTC (rev 1361) @@ -89,15 +89,15 @@ // ignored due to errors (should be fixed; in case of long running problems or // our of memory, it is better to increase the noise parameter and add comments // in the conf file about "optimal" parameters) - ignore.add("./examples/sparql/govtrack.conf"); // HTTP 500 Server error + // ignore.add("./examples/sparql/govtrack.conf"); // HTTP 500 Server error ignore.add("./examples/sparql/musicbrainz.conf"); // HTTP 502 error - NullPointer in extraction //working fine here ignore.add("./examples/sparql/SKOSTEST_local.conf"); // Out of Memory Error ignore.add("./examples/sparql/scrobble.conf"); // HTTP 502 Proxy Error // ignore.add("./examples/family-benchmark/Cousin.conf"); // Out of Memory Error => disallowing ALL helps (TODO find out details) //also working fine ignore.add("./examples/sparql/SilentBobWorking2.conf"); // Out of Memory Error - ignore.add("./examples/sparql/difference/DBPediaSKOS_kohl_vs_angela.conf"); // Pellet: literal cannot be cast to individual + // ignore.add("./examples/sparql/difference/DBPediaSKOS_kohl_vs_angela.conf"); // Pellet: literal cannot be cast to individual // ignore.add("./examples/family-benchmark/Aunt.conf"); // did not terminate so far (waited 45 minutes) => disallowing ALL helps (TODO find out details) - ignore.add("./examples/krk/KRK_ZERO_against_1to5_fastInstance.conf"); // Out of Memory Error + // ignore.add("./examples/krk/KRK_ZERO_against_1to5_fastInstance.conf"); // Out of Memory Error //removed ignore.add("./examples/semantic_bible/normal_test.conf"); // did not terminate (waited 55 minutes) int failedCounter = 0; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jen...@us...> - 2008-10-10 16:38:07
|
Revision: 1363 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=1363&view=rev Author: jenslehmann Date: 2008-10-10 16:37:57 +0000 (Fri, 10 Oct 2008) Log Message: ----------- updated README and INSTALL Modified Paths: -------------- trunk/INSTALL trunk/examples/sparql/README.txt Added Paths: ----------- trunk/examples/krk/README.txt Modified: trunk/INSTALL =================================================================== --- trunk/INSTALL 2008-10-10 16:23:50 UTC (rev 1362) +++ trunk/INSTALL 2008-10-10 16:37:57 UTC (rev 1363) @@ -8,8 +8,6 @@ Running Instructions ==================== -The instructions assume that you have a usable reasoner running (usually a -DIG capable reasoner running on http://localhost:8081). Linux (and other systems) @@ -31,7 +29,6 @@ =========== If you want to run DL-Learner as a Web Service, you can run the scripts "ws" or -"ws.bat". They create an own local webserver running DL-Learner. An example -PHP client is also provided by DL-Learner. It can be downloaded at the -sourceforge.net project website: -http://sourceforge.net/project/showfiles.php?group_id=203619 +"ws.bat". They create an own local webserver running DL-Learner. Some simple +PHP example for using the web service are available at our SVN Repository: +http://dl-learner.svn.sourceforge.net/viewvc/dl-learner/trunk/src/php-examples/ Added: trunk/examples/krk/README.txt =================================================================== --- trunk/examples/krk/README.txt (rev 0) +++ trunk/examples/krk/README.txt 2008-10-10 16:37:57 UTC (rev 1363) @@ -0,0 +1,7 @@ +This directory contains some files for the King-Rook vs. King problem. +See: http://archive.ics.uci.edu/ml/datasets/Chess+(King-Rook+vs.+King) + +To run all experiments, some of the OWL files have to be generated +(contact us for further details), which is the reason why not all +problems in this directory are runnable. We decided not to include the +necessary large OWL files in the DL-Learner release. Modified: trunk/examples/sparql/README.txt =================================================================== --- trunk/examples/sparql/README.txt 2008-10-10 16:23:50 UTC (rev 1362) +++ trunk/examples/sparql/README.txt 2008-10-10 16:37:57 UTC (rev 1363) @@ -1,7 +1,5 @@ -Note: DBpedia is always subject to change, solutions will change over time +Note: DBpedia is always subject to change, so solutions will change over time. -After using the SPARQL Component, a n-triple file is created at: -examples/../cache/ or root/cache -Which contains the used knowledge base. - +When using the SPARQL component, files are written into the directory /cache to +avoid performing the same queries more than once. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jen...@us...> - 2008-10-11 10:22:13
|
Revision: 1366 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=1366&view=rev Author: jenslehmann Date: 2008-10-11 10:22:01 +0000 (Sat, 11 Oct 2008) Log Message: ----------- bug fix for scrobble.conf Modified Paths: -------------- trunk/examples/sparql/scrobble.conf trunk/src/dl-learner/org/dllearner/reasoning/OWLAPIReasoner.java Removed Paths: ------------- trunk/examples/sparql/musicbrainz.conf Deleted: trunk/examples/sparql/musicbrainz.conf =================================================================== --- trunk/examples/sparql/musicbrainz.conf 2008-10-11 09:24:11 UTC (rev 1365) +++ trunk/examples/sparql/musicbrainz.conf 2008-10-11 10:22:01 UTC (rev 1366) @@ -1,48 +0,0 @@ - - -/** - - http://www.govtrack.us/sparql.xpd?query=SELECT * WHERE { <http://www.rdfabout.com/rdf/usgov/congress/people/A000360> ?predicate ?object. FILTER( (!isLiteral(?object))).} - -**/ - -sparql.recursionDepth = 4; -sparql.predefinedEndpoint = "MUSICBRAINZ"; -sparql.predefinedFilter = "YAGO"; - -sparql.useLits=true; - -algorithm = refexamples; -//reasoner = owlAPIReasoner; - reasoner = fastInstanceChecker; - - - refexamples.useAllConstructor = false; - refexamples.useExistsConstructor = true; - refexamples.useCardinalityRestrictions = false; -refexamples.useNegation = false; - -import("http://dbtune.org/musicbrainz/sparql","SPARQL"); - - -/** -sparql.instances = { -"http://zitgist.com/music/artist/a066b730-3809-4b39-a091-2297d40b51db", -"http://zitgist.com/music/artist/cf0f4547-ffbd-4011-98ad-0bec9ba022db" -}; - -+"http://zitgist.com/music/artist/a066b730-3809-4b39-a091-2297d40b51db" --"http://zitgist.com/music/artist/cf0f4547-ffbd-4011-98ad-0bec9ba022db" - - -http://dbtune.org/musicbrainz/resource/track/ -**/ - -sparql.instances = { -"http://dbtune.org/musicbrainz/resource/artist/a066b730-3809-4b39-a091-2297d40b51db", -"http://dbtune.org/musicbrainz/resource/artist/cf0f4547-ffbd-4011-98ad-0bec9ba022db" -}; - -+"http://dbtune.org/musicbrainz/resource/artist/a066b730-3809-4b39-a091-2297d40b51db" --"http://dbtune.org/musicbrainz/resource/artist/cf0f4547-ffbd-4011-98ad-0bec9ba022db" - Modified: trunk/examples/sparql/scrobble.conf =================================================================== --- trunk/examples/sparql/scrobble.conf 2008-10-11 09:24:11 UTC (rev 1365) +++ trunk/examples/sparql/scrobble.conf 2008-10-11 10:22:01 UTC (rev 1366) @@ -19,8 +19,6 @@ sparql.recursionDepth = 3; sparql.predefinedEndpoint = "MUSICBRAINZ"; -// sparql.useLits=true; - algorithm = refexamples; refexamples.useNegation = false; refexamples.useAllConstructor = false; Modified: trunk/src/dl-learner/org/dllearner/reasoning/OWLAPIReasoner.java =================================================================== --- trunk/src/dl-learner/org/dllearner/reasoning/OWLAPIReasoner.java 2008-10-11 09:24:11 UTC (rev 1365) +++ trunk/src/dl-learner/org/dllearner/reasoning/OWLAPIReasoner.java 2008-10-11 10:22:01 UTC (rev 1366) @@ -197,6 +197,7 @@ Set<OWLIndividual> owlIndividuals = new TreeSet<OWLIndividual>(namedObjectComparator); Set<OWLOntology> allImports = new HashSet<OWLOntology>(); + prefixes = new TreeMap<String,String>(); for(KnowledgeSource source : sources) { @@ -204,35 +205,18 @@ URL url=null; if(source instanceof OWLFile){ url = ((OWLFile)source).getURL(); - } - else if(source instanceof SparqlKnowledgeSource) { - source = new OWLAPIOntology(((SparqlKnowledgeSource)source).getOWLAPIOntology()); - //url=((SparqlKnowledgeSource)source).getOntologyFragmentURL(); } try { - if(source instanceof OWLAPIOntology) - { - OWLOntology ontology = ((OWLAPIOntology)source).getOWLOntolgy(); - owlAPIOntologies.add(ontology); - allImports.addAll(manager.getImportsClosure(ontology)); - classes.addAll(ontology.getReferencedClasses()); - owlObjectProperties.addAll(ontology.getReferencedObjectProperties()); - owlDatatypeProperties.addAll(ontology.getReferencedDataProperties()); - owlIndividuals.addAll(ontology.getReferencedIndividuals()); - - // TODO: this obviously works only for exactly one knowledge source - OWLOntologyFormat format = manager.getOntologyFormat(ontology); - if(format instanceof NamespaceOWLOntologyFormat) - { - prefixes = ((NamespaceOWLOntologyFormat)format).getNamespacesByPrefixMap(); - baseURI = prefixes.get(""); - prefixes.remove(""); - } + OWLOntology ontology; + if(source instanceof OWLAPIOntology) { + ontology = ((OWLAPIOntology)source).getOWLOntolgy(); + } else if (source instanceof SparqlKnowledgeSource) { + ontology = ((SparqlKnowledgeSource)source).getOWLAPIOntology(); + } else { + ontology = manager.loadOntologyFromPhysicalURI(url.toURI()); } - else - { - OWLOntology ontology = manager.loadOntologyFromPhysicalURI(url.toURI()); + owlAPIOntologies.add(ontology); allImports.addAll(manager.getImportsClosure(ontology)); classes.addAll(ontology.getReferencedClasses()); @@ -240,17 +224,18 @@ owlDatatypeProperties.addAll(ontology.getReferencedDataProperties()); owlIndividuals.addAll(ontology.getReferencedIndividuals()); - // TODO: this obviously works only for exactly one knowledge source + // if several knowledge sources are included, then we can only + // guarantee that the base URI is from one of those sources (there + // can't be more than one); but we will take care that all prefixes are + // correctly imported OWLOntologyFormat format = manager.getOntologyFormat(ontology); if(format instanceof NamespaceOWLOntologyFormat) { - prefixes = ((NamespaceOWLOntologyFormat)format).getNamespacesByPrefixMap(); + prefixes.putAll(((NamespaceOWLOntologyFormat)format).getNamespacesByPrefixMap()); baseURI = prefixes.get(""); prefixes.remove(""); } - } - } - catch (OWLOntologyCreationException e) { + } catch (OWLOntologyCreationException e) { e.printStackTrace(); } catch (URISyntaxException e) { e.printStackTrace(); @@ -315,12 +300,21 @@ boolean inconsistentOntology = false; try { reasoner.loadOntologies(allImports); + + // OWL API bug: if we test an ontology for consistency, then + // this ontology is automatically used for all subsequent + // reasoning tasks (and all others ignored) + boolean owlAPIbuggy = true; // remove once this problem has been resolved in OWL API + if(!owlAPIbuggy || sources.size() < 2) { for(OWLOntology ont : owlAPIOntologies) { + System.out.println(ont); if(!reasoner.isConsistent(ont)) { inconsistentOntology = true; throw new ComponentInitException("Inconsistent ontologies."); } } + } + if(!inconsistentOntology) { reasoner.classify(); reasoner.realise(); @@ -364,8 +358,10 @@ } datatypeProperties.add(dtp); } - for(OWLIndividual owlIndividual : owlIndividuals) + for(OWLIndividual owlIndividual : owlIndividuals) { individuals.add(new Individual(owlIndividual.getURI().toString())); + } + } /* (non-Javadoc) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ku...@us...> - 2008-10-11 13:35:58
|
Revision: 1368 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=1368&view=rev Author: kurzum Date: 2008-10-11 13:35:40 +0000 (Sat, 11 Oct 2008) Log Message: ----------- Modified Paths: -------------- trunk/doc/configOptions.txt trunk/examples/sparql/difference/DBPediaSKOS_kohl_vs_angela.conf trunk/examples/sparql/scrobble.conf trunk/examples/sparql/scrobble.kb trunk/src/dl-learner/org/dllearner/kb/extraction/ClassNode.java trunk/src/dl-learner/org/dllearner/kb/extraction/Node.java trunk/src/dl-learner/org/dllearner/kb/sparql/SparqlKnowledgeSource.java Modified: trunk/doc/configOptions.txt =================================================================== --- trunk/doc/configOptions.txt 2008-10-11 10:25:09 UTC (rev 1367) +++ trunk/doc/configOptions.txt 2008-10-11 13:35:40 UTC (rev 1368) @@ -7,44 +7,56 @@ component: KB file (org.dllearner.kb.KBFile) ============================================ -CLI usage: import = ; +CLI usage: null = null; -option name: filename -description: pointer to the KB file on local file system -values: class org.dllearner.core.config.StringConfigOption -default value: null -CLI usage: .filename = null; - option name: url description: URL pointer to the KB file -values: class org.dllearner.core.config.StringConfigOption +values: class org.dllearner.core.config.URLConfigOption default value: null -CLI usage: .url = null; +CLI usage: null.url = null; +component: OWL API Ontology (org.dllearner.kb.OWLAPIOntology) +============================================================= + +CLI usage: null = null; + + component: OWL file (org.dllearner.kb.OWLFile) ============================================== -CLI usage: import = ; +CLI usage: null = owlfile; option name: url description: URL pointing to the OWL file -values: class org.dllearner.core.config.StringConfigOption +values: class org.dllearner.core.config.URLConfigOption default value: null -CLI usage: .url = null; +CLI usage: owlfile.url = null; component: SPARQL Endpoint (org.dllearner.kb.sparql.SparqlKnowledgeSource) ========================================================================== -CLI usage: import = sparql; +CLI usage: null = sparql; option name: url description: URL of SPARQL Endpoint -values: class org.dllearner.core.config.StringConfigOption +values: class org.dllearner.core.config.URLConfigOption default value: null CLI usage: sparql.url = null; +option name: cacheDir +description: dir of cache +values: class org.dllearner.core.config.StringConfigOption +default value: cache +CLI usage: sparql.cacheDir = cache; + +option name: useCache +description: If true a Cache is used +values: class org.dllearner.core.config.BooleanConfigOption +default value: true +CLI usage: sparql.useCache = true; + option name: instances description: relevant instances e.g. positive and negative examples in a learning problem values: class org.dllearner.core.config.StringSetConfigOption @@ -54,123 +66,99 @@ option name: recursionDepth description: recursion depth of KB fragment selection values: class org.dllearner.core.config.IntegerConfigOption -default value: 2 -CLI usage: sparql.recursionDepth = 2; +default value: 1 +CLI usage: sparql.recursionDepth = 1; option name: predefinedFilter -description: the mode of the SPARQL Filter -values: class org.dllearner.core.config.IntegerConfigOption +description: the mode of the SPARQL Filter, use one of YAGO,SKOS,YAGOSKOS , YAGOSPECIALHIERARCHY, TEST +values: class org.dllearner.core.config.StringConfigOption default value: null CLI usage: sparql.predefinedFilter = null; option name: predefinedEndpoint -description: the mode of the SPARQL Filter -values: class org.dllearner.core.config.IntegerConfigOption +description: the mode of the SPARQL Filter, use one of DBPEDIA, LOCAL, GOVTRACK, REVYU, MYOPENLINK, FACTBOOK +values: class org.dllearner.core.config.StringConfigOption default value: null CLI usage: sparql.predefinedEndpoint = null; +option name: predefinedManipulator +description: the mode of the Manipulator, use one of STANDARD, DBPEDIA-NAVIGATOR +values: class org.dllearner.core.config.StringConfigOption +default value: null +CLI usage: sparql.predefinedManipulator = null; + option name: predList description: list of all ignored roles values: class org.dllearner.core.config.StringSetConfigOption -default value: null -CLI usage: sparql.predList = null; +default value: [] +CLI usage: sparql.predList = []; option name: objList description: list of all ignored objects values: class org.dllearner.core.config.StringSetConfigOption -default value: null -CLI usage: sparql.objList = null; +default value: [] +CLI usage: sparql.objList = []; -option name: classList -description: list of all ignored classes -values: class org.dllearner.core.config.StringSetConfigOption -default value: null -CLI usage: sparql.classList = null; - -option name: format -description: N-TRIPLES or KB format -values: class org.dllearner.core.config.StringConfigOption -default value: N-TRIPLES -CLI usage: sparql.format = N-TRIPLES; - -option name: dumpToFile -description: Specifies whether the extracted ontology is written to a file or not. +option name: saveExtractedFragment +description: Specifies whether the extracted ontology is written to a file or not. The OWL file is written to the cache dir.Some DBpedia URI will make the XML invalid values: class org.dllearner.core.config.BooleanConfigOption default value: true -CLI usage: sparql.dumpToFile = true; +CLI usage: sparql.saveExtractedFragment = true; -option name: useLits -description: use Literals in SPARQL query -values: class org.dllearner.core.config.BooleanConfigOption -default value: null -CLI usage: sparql.useLits = null; - -option name: getAllSuperClasses -description: If true then all superclasses are retrieved until the most general class (owl:Thing) is reached. -values: class org.dllearner.core.config.BooleanConfigOption -default value: true -CLI usage: sparql.getAllSuperClasses = true; - -option name: learnDomain -description: learns the Domain for a Role -values: class org.dllearner.core.config.BooleanConfigOption -default value: null -CLI usage: sparql.learnDomain = null; - -option name: learnRange -description: learns the Range for a Role -values: class org.dllearner.core.config.BooleanConfigOption -default value: null -CLI usage: sparql.learnRange = null; - -option name: role -description: role to learn Domain/Range from -values: class org.dllearner.core.config.StringConfigOption -default value: null -CLI usage: sparql.role = null; - -option name: blankNodeIdentifier -description: used to identify blanknodes in Tripels -values: class org.dllearner.core.config.StringConfigOption -default value: null -CLI usage: sparql.blankNodeIdentifier = null; - -option name: example -description: example -values: class org.dllearner.core.config.StringTupleListConfigOption -default value: null -CLI usage: sparql.example = null; - option name: replacePredicate description: rule for replacing predicates values: class org.dllearner.core.config.StringTupleListConfigOption -default value: null -CLI usage: sparql.replacePredicate = null; +default value: [] +CLI usage: sparql.replacePredicate = []; option name: replaceObject description: rule for replacing predicates values: class org.dllearner.core.config.StringTupleListConfigOption -default value: null -CLI usage: sparql.replaceObject = null; +default value: [] +CLI usage: sparql.replaceObject = []; option name: breakSuperClassRetrievalAfter description: stops a cyclic hierarchy after specified number of classes values: class org.dllearner.core.config.IntegerConfigOption -default value: null -CLI usage: sparql.breakSuperClassRetrievalAfter = null; +default value: 1000 +CLI usage: sparql.breakSuperClassRetrievalAfter = 1000; -option name: numberOfInstancesUsedForRoleLearning -description: -values: class org.dllearner.core.config.IntegerConfigOption -default value: null -CLI usage: sparql.numberOfInstancesUsedForRoleLearning = null; +option name: useLits +description: use Literals in SPARQL query +values: class org.dllearner.core.config.BooleanConfigOption +default value: true +CLI usage: sparql.useLits = true; +option name: getAllSuperClasses +description: If true then all superclasses are retrieved until the most general class (owl:Thing) is reached. +values: class org.dllearner.core.config.BooleanConfigOption +default value: true +CLI usage: sparql.getAllSuperClasses = true; + option name: closeAfterRecursion description: gets all classes for all instances values: class org.dllearner.core.config.BooleanConfigOption -default value: null -CLI usage: sparql.closeAfterRecursion = null; +default value: true +CLI usage: sparql.closeAfterRecursion = true; +option name: getPropertyInformation +description: gets all types for extracted ObjectProperties +values: class org.dllearner.core.config.BooleanConfigOption +default value: false +CLI usage: sparql.getPropertyInformation = false; + +option name: dissolveBlankNodes +description: determines whether Blanknodes are dissolved. This is a costly function. +values: class org.dllearner.core.config.BooleanConfigOption +default value: true +CLI usage: sparql.dissolveBlankNodes = true; + +option name: useImprovedSparqlTupelAquisitor +description: uses deeply nested SparqlQueries, according to recursion depth, still EXPERIMENTAL +values: class org.dllearner.core.config.BooleanConfigOption +default value: false +CLI usage: sparql.useImprovedSparqlTupelAquisitor = false; + option name: verbosity description: control verbosity of output for this component values: class org.dllearner.core.config.StringConfigOption @@ -180,14 +168,14 @@ option name: defaultGraphURIs description: a list of all default Graph URIs values: class org.dllearner.core.config.StringSetConfigOption -default value: null -CLI usage: sparql.defaultGraphURIs = null; +default value: [] +CLI usage: sparql.defaultGraphURIs = []; option name: namedGraphURIs description: a list of all named Graph URIs values: class org.dllearner.core.config.StringSetConfigOption -default value: null -CLI usage: sparql.namedGraphURIs = null; +default value: [] +CLI usage: sparql.namedGraphURIs = []; ************* @@ -197,7 +185,7 @@ component: DIG reasoner (org.dllearner.reasoning.DIGReasoner) ============================================================= -CLI usage: reasoner = digReasoner; +CLI usage: null = digReasoner; option name: reasonerUrl description: URL of the DIG reasoner @@ -221,7 +209,7 @@ component: fast instance checker (org.dllearner.reasoning.FastInstanceChecker) ============================================================================== -CLI usage: reasoner = fastInstanceChecker; +CLI usage: null = fastInstanceChecker; option name: reasonerType description: FaCT++ or Pellet to dematerialize @@ -229,20 +217,26 @@ default value: pellet CLI usage: fastInstanceChecker.reasonerType = pellet; +option name: defaultNegation +description: Whether to use default negation, i.e. an instance not being in a class means that it is in the negation of the class. +values: class org.dllearner.core.config.BooleanConfigOption +default value: true +CLI usage: fastInstanceChecker.defaultNegation = true; + component: fast retrieval reasoner (org.dllearner.reasoning.FastRetrievalReasoner) ================================================================================== -CLI usage: reasoner = fastRetrieval; +CLI usage: null = fastRetrievalReasoner; component: OWL API reasoner (org.dllearner.reasoning.OWLAPIReasoner) ==================================================================== -CLI usage: reasoner = owlAPIReasoner; +CLI usage: null = owlAPIReasoner; option name: reasonerType -description: FaCT++ or Pellet +description: FaCT++ or Pellet, which means "pellet" or "fact" values: class org.dllearner.core.config.StringConfigOption default value: pellet CLI usage: owlAPIReasoner.reasonerType = pellet; @@ -255,7 +249,7 @@ component: two valued definition learning problem (org.dllearner.learningproblems.PosNegDefinitionLP) ===================================================================================================== -CLI usage: problem = posNegDefinitionLP; +CLI usage: null = posNegDefinitionLP; option name: positiveExamples description: positive examples @@ -272,8 +266,8 @@ option name: useRetrievalForClassficiation description: Specifies whether to use retrieval or instance checks for testing a concept. values: class org.dllearner.core.config.BooleanConfigOption -default value: null -CLI usage: posNegDefinitionLP.useRetrievalForClassficiation = null; +default value: false +CLI usage: posNegDefinitionLP.useRetrievalForClassficiation = false; option name: percentPerLenghtUnit description: describes the reduction in classification accuracy in percent one is willing to accept for reducing the length of the concept by one @@ -284,15 +278,69 @@ option name: useMultiInstanceChecks description: See UseMultiInstanceChecks enum. values: class org.dllearner.core.config.StringConfigOption +default value: twoChecks +CLI usage: posNegDefinitionLP.useMultiInstanceChecks = twoChecks; + + +component: three valued definition learning problem (org.dllearner.learningproblems.PosNegDefinitionLPStrict) +============================================================================================================= + +CLI usage: null = null; + +option name: positiveExamples +description: positive examples +values: class org.dllearner.core.config.StringSetConfigOption default value: null -CLI usage: posNegDefinitionLP.useMultiInstanceChecks = null; +CLI usage: null.positiveExamples = null; +option name: negativeExamples +description: negative examples +values: class org.dllearner.core.config.StringSetConfigOption +default value: null +CLI usage: null.negativeExamples = null; -component: inclusion learning problem (org.dllearner.learningproblems.PosNegInclusionLP) -======================================================================================== +option name: useRetrievalForClassficiation +description: Specifies whether to use retrieval or instance checks for testing a concept. +values: class org.dllearner.core.config.BooleanConfigOption +default value: false +CLI usage: null.useRetrievalForClassficiation = false; -CLI usage: problem = posNegInclusionLP; +option name: percentPerLenghtUnit +description: describes the reduction in classification accuracy in percent one is willing to accept for reducing the length of the concept by one +values: class org.dllearner.core.config.DoubleConfigOption min 0.0 max 1.0 +default value: 0.05 +CLI usage: null.percentPerLenghtUnit = 0.05; +option name: useMultiInstanceChecks +description: See UseMultiInstanceChecks enum. +values: class org.dllearner.core.config.StringConfigOption +default value: twoChecks +CLI usage: null.useMultiInstanceChecks = twoChecks; + +option name: penaliseNeutralExamples +description: if set to true neutral examples are penalised +values: class org.dllearner.core.config.BooleanConfigOption +default value: null +CLI usage: null.penaliseNeutralExamples = null; + +option name: accuracyPenalty +description: penalty for pos/neg examples which are classified as neutral +values: class org.dllearner.core.config.DoubleConfigOption +default value: 1.0 +CLI usage: null.accuracyPenalty = 1.0; + +option name: errorPenalty +description: penalty for pos. examples classified as negative or vice versa +values: class org.dllearner.core.config.DoubleConfigOption +default value: 3.0 +CLI usage: null.errorPenalty = 3.0; + + +component: two valued inclusion learning problem (org.dllearner.learningproblems.PosNegInclusionLP) +=================================================================================================== + +CLI usage: null = posNegInclusionLP; + option name: positiveExamples description: positive examples values: class org.dllearner.core.config.StringSetConfigOption @@ -308,8 +356,8 @@ option name: useRetrievalForClassficiation description: Specifies whether to use retrieval or instance checks for testing a concept. values: class org.dllearner.core.config.BooleanConfigOption -default value: null -CLI usage: posNegInclusionLP.useRetrievalForClassficiation = null; +default value: false +CLI usage: posNegInclusionLP.useRetrievalForClassficiation = false; option name: percentPerLenghtUnit description: describes the reduction in classification accuracy in percent one is willing to accept for reducing the length of the concept by one @@ -320,14 +368,14 @@ option name: useMultiInstanceChecks description: See UseMultiInstanceChecks enum. values: class org.dllearner.core.config.StringConfigOption -default value: null -CLI usage: posNegInclusionLP.useMultiInstanceChecks = null; +default value: twoChecks +CLI usage: posNegInclusionLP.useMultiInstanceChecks = twoChecks; component: positive only definition learning problem (org.dllearner.learningproblems.PosOnlyDefinitionLP) ========================================================================================================= -CLI usage: problem = posOnlyDefinitionLP; +CLI usage: null = posOnlyDefinitionLP; option name: positiveExamples description: positive examples @@ -336,6 +384,18 @@ CLI usage: posOnlyDefinitionLP.positiveExamples = null; +component: pos only inclusion learning problem (org.dllearner.learningproblems.PosOnlyInclusionLP) +================================================================================================== + +CLI usage: null = null; + +option name: positiveExamples +description: positive examples +values: class org.dllearner.core.config.StringSetConfigOption +default value: null +CLI usage: null.positiveExamples = null; + + *********************** * Learning Algorithms * *********************** @@ -343,13 +403,13 @@ component: brute force learning algorithm (org.dllearner.algorithms.BruteForceLearner) ====================================================================================== -CLI usage: algorithm = bruteForce; +CLI usage: null = bruteForce; option name: maxLength description: maximum length of generated concepts values: class org.dllearner.core.config.IntegerConfigOption -default value: null -CLI usage: bruteForce.maxLength = null; +default value: 7 +CLI usage: bruteForce.maxLength = 7; option name: returnType description: Specifies the type which the solution has to belong to (if already) known. This means we inform the learning algorithm that the solution is a subclass of this type. @@ -358,28 +418,214 @@ CLI usage: bruteForce.returnType = null; +component: DBpedia Navigation Suggestor (org.dllearner.algorithms.DBpediaNavigationSuggestor) +============================================================================================= + +CLI usage: null = dbpediaNavigationSuggestor; + +option name: writeSearchTree +description: specifies whether to write a search tree +values: class org.dllearner.core.config.BooleanConfigOption +default value: false +CLI usage: dbpediaNavigationSuggestor.writeSearchTree = false; + +option name: searchTreeFile +description: file to use for the search tree +values: class org.dllearner.core.config.StringConfigOption +default value: log/searchTree.txt +CLI usage: dbpediaNavigationSuggestor.searchTreeFile = log/searchTree.txt; + +option name: replaceSearchTree +description: specifies whether to replace the search tree in the log file after each run or append the new search tree +values: class org.dllearner.core.config.BooleanConfigOption +default value: false +CLI usage: dbpediaNavigationSuggestor.replaceSearchTree = false; + +option name: heuristic +description: specifiy the heuristic to use +values: class org.dllearner.core.config.StringConfigOption +default value: lexicographic +CLI usage: dbpediaNavigationSuggestor.heuristic = lexicographic; + +option name: applyAllFilter +description: usage of equivalence ALL R.C AND ALL R.D = ALL R.(C AND D) +values: class org.dllearner.core.config.BooleanConfigOption +default value: true +CLI usage: dbpediaNavigationSuggestor.applyAllFilter = true; + +option name: applyExistsFilter +description: usage of equivalence EXISTS R.C OR EXISTS R.D = EXISTS R.(C OR D) +values: class org.dllearner.core.config.BooleanConfigOption +default value: true +CLI usage: dbpediaNavigationSuggestor.applyExistsFilter = true; + +option name: useTooWeakList +description: try to filter out too weak concepts without sending them to the reasoner +values: class org.dllearner.core.config.BooleanConfigOption +default value: true +CLI usage: dbpediaNavigationSuggestor.useTooWeakList = true; + +option name: useOverlyGeneralList +description: try to find overly general concept without sending them to the reasoner +values: class org.dllearner.core.config.BooleanConfigOption +default value: true +CLI usage: dbpediaNavigationSuggestor.useOverlyGeneralList = true; + +option name: useShortConceptConstruction +description: shorten concept to see whether they already exist +values: class org.dllearner.core.config.BooleanConfigOption +default value: true +CLI usage: dbpediaNavigationSuggestor.useShortConceptConstruction = true; + +option name: horizontalExpansionFactor +description: horizontal expansion factor (see publication for description) +values: class org.dllearner.core.config.DoubleConfigOption min 0.0 max 1.0 +default value: 0.6 +CLI usage: dbpediaNavigationSuggestor.horizontalExpansionFactor = 0.6; + +option name: improveSubsumptionHierarchy +description: simplify subsumption hierarchy to reduce search space (see publication for description) +values: class org.dllearner.core.config.BooleanConfigOption +default value: true +CLI usage: dbpediaNavigationSuggestor.improveSubsumptionHierarchy = true; + +option name: allowedConcepts +description: concepts the algorithm is allowed to use +values: class org.dllearner.core.config.StringSetConfigOption +default value: null +CLI usage: dbpediaNavigationSuggestor.allowedConcepts = null; + +option name: ignoredConcepts +description: concepts the algorithm must ignore +values: class org.dllearner.core.config.StringSetConfigOption +default value: null +CLI usage: dbpediaNavigationSuggestor.ignoredConcepts = null; + +option name: allowedRoles +description: roles the algorithm is allowed to use +values: class org.dllearner.core.config.StringSetConfigOption +default value: null +CLI usage: dbpediaNavigationSuggestor.allowedRoles = null; + +option name: ignoredRoles +description: roles the algorithm must ignore +values: class org.dllearner.core.config.StringSetConfigOption +default value: null +CLI usage: dbpediaNavigationSuggestor.ignoredRoles = null; + +option name: useAllConstructor +description: specifies whether the universal concept constructor is used in the learning algorithm +values: class org.dllearner.core.config.BooleanConfigOption +default value: true +CLI usage: dbpediaNavigationSuggestor.useAllConstructor = true; + +option name: useExistsConstructor +description: specifies whether the existential concept constructor is used in the learning algorithm +values: class org.dllearner.core.config.BooleanConfigOption +default value: true +CLI usage: dbpediaNavigationSuggestor.useExistsConstructor = true; + +option name: useCardinalityRestrictions +description: specifies whether CardinalityRestrictions is used in the learning algorithm +values: class org.dllearner.core.config.BooleanConfigOption +default value: true +CLI usage: dbpediaNavigationSuggestor.useCardinalityRestrictions = true; + +option name: useHasValueConstructor +description: specifies whether the hasValue constructor is used in the learning algorithm +values: class org.dllearner.core.config.BooleanConfigOption +default value: false +CLI usage: dbpediaNavigationSuggestor.useHasValueConstructor = false; + +option name: valueFrequencyThreshold +description: specifies how often an object must occur as value in order to be considered for hasValue restrictions +values: class org.dllearner.core.config.IntegerConfigOption +default value: 3 +CLI usage: dbpediaNavigationSuggestor.valueFrequencyThreshold = 3; + +option name: useNegation +description: specifies whether negation is used in the learning algorothm +values: class org.dllearner.core.config.BooleanConfigOption +default value: true +CLI usage: dbpediaNavigationSuggestor.useNegation = true; + +option name: useBooleanDatatypes +description: specifies whether boolean datatypes are used in the learning algorothm +values: class org.dllearner.core.config.BooleanConfigOption +default value: true +CLI usage: dbpediaNavigationSuggestor.useBooleanDatatypes = true; + +option name: maxExecutionTimeInSeconds +description: algorithm will stop after specified seconds +values: class org.dllearner.core.config.IntegerConfigOption +default value: 0 +CLI usage: dbpediaNavigationSuggestor.maxExecutionTimeInSeconds = 0; + +option name: minExecutionTimeInSeconds +description: algorithm will run at least specified seconds +values: class org.dllearner.core.config.IntegerConfigOption +default value: 0 +CLI usage: dbpediaNavigationSuggestor.minExecutionTimeInSeconds = 0; + +option name: guaranteeXgoodDescriptions +description: algorithm will run until X good (100%) concept descritpions are found +values: class org.dllearner.core.config.IntegerConfigOption +default value: 1 +CLI usage: dbpediaNavigationSuggestor.guaranteeXgoodDescriptions = 1; + +option name: logLevel +description: determines the logLevel for this component, can be {TRACE, DEBUG, INFO} +values: class org.dllearner.core.config.StringConfigOption +default value: DEBUG +CLI usage: dbpediaNavigationSuggestor.logLevel = DEBUG; + +option name: noisePercentage +description: the (approximated) percentage of noise within the examples +values: class org.dllearner.core.config.DoubleConfigOption min 0.0 max 100.0 +default value: 0.0 +CLI usage: dbpediaNavigationSuggestor.noisePercentage = 0.0; + +option name: startClass +description: the named class which should be used to start the algorithm (GUI: needs a widget for selecting a class) +values: class org.dllearner.core.config.StringConfigOption +default value: null +CLI usage: dbpediaNavigationSuggestor.startClass = null; + +option name: forceRefinementLengthIncrease +description: specifies whether nodes should be expanded until only longer refinements are reached +values: class org.dllearner.core.config.BooleanConfigOption +default value: null +CLI usage: dbpediaNavigationSuggestor.forceRefinementLengthIncrease = null; + + component: random guesser learning algorithm (org.dllearner.algorithms.RandomGuesser) ===================================================================================== -CLI usage: algorithm = random; +CLI usage: null = random; option name: numberOfTrees description: number of randomly generated concepts/trees values: class org.dllearner.core.config.IntegerConfigOption -default value: null -CLI usage: random.numberOfTrees = null; +default value: 5 +CLI usage: random.numberOfTrees = 5; option name: maxDepth description: maximum depth of generated concepts/trees values: class org.dllearner.core.config.IntegerConfigOption -default value: null -CLI usage: random.maxDepth = null; +default value: 5 +CLI usage: random.maxDepth = 5; +component: simple suggestion algorithm (org.dllearner.algorithms.SimpleSuggestionLearningAlgorithm) +=================================================================================================== + +CLI usage: null = null; + + component: genetic programming learning algorithm (org.dllearner.algorithms.gp.GP) ================================================================================== -CLI usage: algorithm = gp; +CLI usage: null = gp; option name: selectionType description: selection type @@ -399,29 +645,35 @@ default value: true CLI usage: gp.elitism = true; -option name: mutationProbablitiy +option name: algorithmType +description: algorithm type +values: class org.dllearner.core.config.StringConfigOption +default value: steadyState +CLI usage: gp.algorithmType = steadyState; + +option name: mutationProbability description: mutation probability values: class org.dllearner.core.config.DoubleConfigOption min 0.0 max 1.0 default value: 0.03 -CLI usage: gp.mutationProbablitiy = 0.03; +CLI usage: gp.mutationProbability = 0.03; -option name: crossoverProbablitiy +option name: crossoverProbability description: crossover probability values: class org.dllearner.core.config.DoubleConfigOption min 0.0 max 1.0 default value: 0.95 -CLI usage: gp.crossoverProbablitiy = 0.95; +CLI usage: gp.crossoverProbability = 0.95; -option name: hillClimbingProbablitiy +option name: hillClimbingProbability description: hill climbing probability values: class org.dllearner.core.config.DoubleConfigOption min 0.0 max 1.0 default value: 0.0 -CLI usage: gp.hillClimbingProbablitiy = 0.0; +CLI usage: gp.hillClimbingProbability = 0.0; -option name: refinementProbablitiy +option name: refinementProbability description: refinement operator probability (values higher than 0 turn this into a hybrid GP algorithm - see publication) values: class org.dllearner.core.config.DoubleConfigOption min 0.0 max 1.0 default value: 0.0 -CLI usage: gp.refinementProbablitiy = 0.0; +CLI usage: gp.refinementProbability = 0.0; option name: numberOfIndividuals description: number of individuals @@ -481,7 +733,7 @@ component: example driven refinement operator based learning algorithm (org.dllearner.algorithms.refexamples.ExampleBasedROLComponent) ====================================================================================================================================== -CLI usage: algorithm = refexamples; +CLI usage: null = refexamples; option name: writeSearchTree description: specifies whether to write a search tree @@ -585,6 +837,18 @@ default value: true CLI usage: refexamples.useExistsConstructor = true; +option name: useHasValueConstructor +description: specifies whether the hasValue constructor is used in the learning algorithm +values: class org.dllearner.core.config.BooleanConfigOption +default value: false +CLI usage: refexamples.useHasValueConstructor = false; + +option name: valueFrequencyThreshold +description: specifies how often an object must occur as value in order to be considered for hasValue restrictions +values: class org.dllearner.core.config.IntegerConfigOption +default value: 3 +CLI usage: refexamples.valueFrequencyThreshold = 3; + option name: useCardinalityRestrictions description: specifies whether CardinalityRestrictions is used in the learning algorithm values: class org.dllearner.core.config.BooleanConfigOption @@ -603,6 +867,12 @@ default value: true CLI usage: refexamples.useBooleanDatatypes = true; +option name: useDoubleDatatypes +description: specifies whether boolean datatypes are used in the learning algorothm +values: class org.dllearner.core.config.BooleanConfigOption +default value: true +CLI usage: refexamples.useDoubleDatatypes = true; + option name: maxExecutionTimeInSeconds description: algorithm will stop after specified seconds values: class org.dllearner.core.config.IntegerConfigOption @@ -621,17 +891,35 @@ default value: 1 CLI usage: refexamples.guaranteeXgoodDescriptions = 1; +option name: maxClassDescriptionTests +description: The maximum number of candidate hypothesis the algorithm is allowed to test (0 = no limit). The algorithm will stop afterwards. (The real number of tests can be slightly higher, because this criterion usually won't be checked after each single test.) +values: class org.dllearner.core.config.IntegerConfigOption +default value: 0 +CLI usage: refexamples.maxClassDescriptionTests = 0; + option name: logLevel description: determines the logLevel for this component, can be {TRACE, DEBUG, INFO} values: class org.dllearner.core.config.StringConfigOption default value: DEBUG CLI usage: refexamples.logLevel = DEBUG; +option name: usePropernessChecks +description: specifies whether to check for equivalence (i.e. discard equivalent refinements) +values: class org.dllearner.core.config.BooleanConfigOption +default value: false +CLI usage: refexamples.usePropernessChecks = false; + +option name: maxPosOnlyExpansion +description: specifies how often a node in the search tree of a posonly learning problem needs to be expanded before it is considered as solution candidate +values: class org.dllearner.core.config.IntegerConfigOption +default value: 4 +CLI usage: refexamples.maxPosOnlyExpansion = 4; + option name: noisePercentage description: the (approximated) percentage of noise within the examples values: class org.dllearner.core.config.DoubleConfigOption min 0.0 max 100.0 -default value: null -CLI usage: refexamples.noisePercentage = null; +default value: 0.0 +CLI usage: refexamples.noisePercentage = 0.0; option name: startClass description: the named class which should be used to start the algorithm (GUI: needs a widget for selecting a class) @@ -639,11 +927,17 @@ default value: null CLI usage: refexamples.startClass = null; +option name: forceRefinementLengthIncrease +description: specifies whether nodes should be expanded until only longer refinements are reached +values: class org.dllearner.core.config.BooleanConfigOption +default value: null +CLI usage: refexamples.forceRefinementLengthIncrease = null; + component: refinement operator based learning algorithm (org.dllearner.algorithms.refinement.ROLearner) ======================================================================================================= -CLI usage: algorithm = refinement; +CLI usage: null = refinement; option name: writeSearchTree description: specifies whether to write a search tree @@ -759,6 +1053,12 @@ default value: true CLI usage: refinement.useNegation = true; +option name: useCardinalityRestrictions +description: specifies whether CardinalityRestrictions is used in the learning algorithm +values: class org.dllearner.core.config.BooleanConfigOption +default value: true +CLI usage: refinement.useCardinalityRestrictions = true; + option name: useBooleanDatatypes description: specifies whether boolean datatypes are used in the learning algorothm values: class org.dllearner.core.config.BooleanConfigOption Modified: trunk/examples/sparql/difference/DBPediaSKOS_kohl_vs_angela.conf =================================================================== --- trunk/examples/sparql/difference/DBPediaSKOS_kohl_vs_angela.conf 2008-10-11 10:25:09 UTC (rev 1367) +++ trunk/examples/sparql/difference/DBPediaSKOS_kohl_vs_angela.conf 2008-10-11 13:35:40 UTC (rev 1368) @@ -87,6 +87,6 @@ /** examples **/ -+"http://dbpedia.org/resource/Helmut_Kohl" --"http://dbpedia.org/resource/Angela_Merkel" +-"http://dbpedia.org/resource/Helmut_Kohl" ++"http://dbpedia.org/resource/Angela_Merkel" Modified: trunk/examples/sparql/scrobble.conf =================================================================== --- trunk/examples/sparql/scrobble.conf 2008-10-11 10:25:09 UTC (rev 1367) +++ trunk/examples/sparql/scrobble.conf 2008-10-11 13:35:40 UTC (rev 1368) @@ -23,15 +23,28 @@ refexamples.useNegation = false; refexamples.useAllConstructor = false; refexamples.useCardinalityRestrictions = false; + +refexamples.writeSearchTree = true; +refexamples.searchTreeFile = "log/searchtree.txt"; +refexamples.replaceSearchTree = true; + reasoner = fastInstanceChecker; import("http://dbtune.org/musicbrainz/sparql","SPARQL"); + // we transform tags to classes sparql.replacePredicate=[( "http://www.holygoat.co.uk/owl/redwood/0.1/tags/taggedWithTag", "http://www.w3.org/1999/02/22-rdf-syntax-ns#type")]; +/* +// some consistency transformation +sparql.replaceObject=[( +"http://dbtune.org/musicbrainz/resource/tag/", +"http://dbtune.org/musicbrainz/resource/tag/tag")]; +*/ + // some background knowledge about the tags ("semantically enriched tag cloud") import("scrobble.kb"); Modified: trunk/examples/sparql/scrobble.kb =================================================================== --- trunk/examples/sparql/scrobble.kb 2008-10-11 10:25:09 UTC (rev 1367) +++ trunk/examples/sparql/scrobble.kb 2008-10-11 13:35:40 UTC (rev 1368) @@ -4,3 +4,12 @@ "http://dbtune.org/musicbrainz/resource/tag/171" = "http://dbtune.org/musicbrainz/resource/tag/237". // progressive rock is rock "http://dbtune.org/musicbrainz/resource/tag/29" SUBCLASSOF "http://dbtune.org/musicbrainz/resource/tag/7". + +//repetition for valid xml by OWL API + +// english implies british +"http://dbtune.org/musicbrainz/resource/tag/tag1391" SUBCLASSOF "http://dbtune.org/musicbrainz/resource/tag/tag171". +// Britain = UK +"http://dbtune.org/musicbrainz/resource/tag/tag171" = "http://dbtune.org/musicbrainz/resource/tag/tag237". +// progressive rock is rock +"http://dbtune.org/musicbrainz/resource/tag/tag29" SUBCLASSOF "http://dbtune.org/musicbrainz/resource/tag/tag7". Modified: trunk/src/dl-learner/org/dllearner/kb/extraction/ClassNode.java =================================================================== --- trunk/src/dl-learner/org/dllearner/kb/extraction/ClassNode.java 2008-10-11 10:25:09 UTC (rev 1367) +++ trunk/src/dl-learner/org/dllearner/kb/extraction/ClassNode.java 2008-10-11 13:35:40 UTC (rev 1368) @@ -178,7 +178,7 @@ OWLLabelAnnotation label = factory.getOWLLabelAnnotation(one.getBPart().getLiteral().getString()); owlAPIOntologyCollector.addAxiom(factory.getOWLEntityAnnotationAxiom(me, label)); }else { - tail(true, "in ontology conversion, no other datatypes, but annotation allowed for class"+" data property is: "+one.getURIString()+" connected with: "+one.getBPart().getNTripleForm()); + tail(true, "in ontology conversion: no other datatypes, but annotation is allowed for classes."+" data property is: "+one.getURIString()+" connected with: "+one.getBPart().getNTripleForm()); } Modified: trunk/src/dl-learner/org/dllearner/kb/extraction/Node.java =================================================================== --- trunk/src/dl-learner/org/dllearner/kb/extraction/Node.java 2008-10-11 10:25:09 UTC (rev 1367) +++ trunk/src/dl-learner/org/dllearner/kb/extraction/Node.java 2008-10-11 13:35:40 UTC (rev 1368) @@ -40,7 +40,7 @@ .getLogger(Node.class); // make sure no information is missed during the transition to OWLAPI - public static final boolean DEBUGTAIL = true; + public static final boolean DEBUGTAIL = false; protected String uri; // protected String type; @@ -114,7 +114,7 @@ public void tail(boolean ignore, String tailmessage){ - String message = "difficult tuple. Subject is: "+ this.getURIString()+" of class"+this.getClass().getSimpleName()+" " + + String message = "difficult tuple. Subject is: "+ this.getURIString()+" of type: "+this.getClass().getSimpleName()+" " + "info: "+tailmessage; if(ignore){ if(DEBUGTAIL){ Modified: trunk/src/dl-learner/org/dllearner/kb/sparql/SparqlKnowledgeSource.java =================================================================== --- trunk/src/dl-learner/org/dllearner/kb/sparql/SparqlKnowledgeSource.java 2008-10-11 10:25:09 UTC (rev 1367) +++ trunk/src/dl-learner/org/dllearner/kb/sparql/SparqlKnowledgeSource.java 2008-10-11 13:35:40 UTC (rev 1368) @@ -59,7 +59,6 @@ import org.dllearner.utilities.JamonMonitorLogger; import org.dllearner.utilities.datastructures.StringTuple; import org.dllearner.utilities.statistics.SimpleClock; -import org.semanticweb.owl.model.OWLAxiom; import org.semanticweb.owl.model.OWLOntology; import com.jamonapi.Monitor; @@ -178,7 +177,7 @@ "Specifies whether the extracted ontology is written to a file or not. " + "The OWL file is written to the cache dir." + "Some DBpedia URI will make the XML invalid", - true, false, true)); + false, false, true)); options.add(new StringTupleListConfigOption("replacePredicate", "rule for replacing predicates", new ArrayList<StringTuple>(), false, true)); options.add(new StringTupleListConfigOption("replaceObject", This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jen...@us...> - 2008-10-13 09:35:56
|
Revision: 1369 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=1369&view=rev Author: jenslehmann Date: 2008-10-13 09:34:50 +0000 (Mon, 13 Oct 2008) Log Message: ----------- beautification of some conf files Modified Paths: -------------- trunk/examples/semantic_bible/woman.conf trunk/examples/sparql/DBPediaYAGOWomanInPolitics.conf trunk/examples/sparql/hierarchy/Hierarchy0DBPediaYAGOChanBrit_monarch.conf trunk/examples/sparql/hierarchy/Hierarchy1DBPediaYAGOChanBrit_pred_Knight.conf trunk/examples/sparql/scrobble.conf trunk/src/dl-learner/org/dllearner/Info.java trunk/src/dl-learner/org/dllearner/test/junit/ExampleTests.java Modified: trunk/examples/semantic_bible/woman.conf =================================================================== --- trunk/examples/semantic_bible/woman.conf 2008-10-11 13:35:40 UTC (rev 1368) +++ trunk/examples/semantic_bible/woman.conf 2008-10-13 09:34:50 UTC (rev 1369) @@ -1,8 +1,7 @@ - /** +/** + * Women in Semantic Bible. */ - -// export("arch.owl"); import("NTNcombined.owl"); algorithm = refexamples; Modified: trunk/examples/sparql/DBPediaYAGOWomanInPolitics.conf =================================================================== --- trunk/examples/sparql/DBPediaYAGOWomanInPolitics.conf 2008-10-11 13:35:40 UTC (rev 1368) +++ trunk/examples/sparql/DBPediaYAGOWomanInPolitics.conf 2008-10-13 09:34:50 UTC (rev 1369) @@ -1,29 +1,19 @@ - /* - * Some woman, that are Politicians - - Note: DBpedia is always subject to change, solutions will change over time - - Solution - http://dbpedia.org/class/yago/Executive110069645 (length 1, depth 1) - http://dbpedia.org/class/yago/CorporateExecutive109966255 (length 1, depth 1) - http://dbpedia.org/class/yago/President110468559 (length 1, depth 1) +/* + * Some woman, who are politicians. + * + * Note: DBpedia is always subject to change. Solutions will change over time. + * + * Solution: + * http://dbpedia.org/class/yago/Executive110069645 + * http://dbpedia.org/class/yago/CorporateExecutive109966255 + * http://dbpedia.org/class/yago/President110468559 */ // SPARQL options - - - -// SPARQL options -//necessary: sparql.recursionDepth = 1; - - -//predefined filter (1 = YAGO based learning) -// 2 = SKOS, more Options are needed then though. replacePredicate, breakSuperClassRetrievalAfter sparql.predefinedFilter = "YAGO"; sparql.predefinedEndpoint = "DBPEDIA"; - import("http://dbpedia.openlinksw.com:8890/sparql","SPARQL"); sparql.instances = { @@ -34,12 +24,10 @@ "http://dbpedia.org/resource/Angela_Merkel", "http://dbpedia.org/resource/Christine_Todd_Whitman"}; - - /** examples **/ +"http://dbpedia.org/resource/Indira_Gandhi" +"http://dbpedia.org/resource/Sonia_Gandhi" -"http://dbpedia.org/resource/Hillary_Rodham_Clinton" -"http://dbpedia.org/resource/Princess_Leia_Organa" -"http://dbpedia.org/resource/Angela_Merkel" --"http://dbpedia.org/resource/Christine_Todd_Whitman" \ No newline at end of file +-"http://dbpedia.org/resource/Christine_Todd_Whitman" Modified: trunk/examples/sparql/hierarchy/Hierarchy0DBPediaYAGOChanBrit_monarch.conf =================================================================== --- trunk/examples/sparql/hierarchy/Hierarchy0DBPediaYAGOChanBrit_monarch.conf 2008-10-11 13:35:40 UTC (rev 1368) +++ trunk/examples/sparql/hierarchy/Hierarchy0DBPediaYAGOChanBrit_monarch.conf 2008-10-13 09:34:50 UTC (rev 1369) @@ -18,19 +18,12 @@ */ -// SPARQL options - - refinement.useAllConstructor = false; //refinement.useExistsConstructor = true; refinement.useNegation = false; -// recursion depth of extraction algorithm +// SPARQL options sparql.recursionDepth = 1; - - -//predefined filter (1 = YAGO based learning) -// 2 = SKOS, more Options are needed then though. replacePredicate, breakSuperClassRetrievalAfter sparql.predefinedFilter = "YAGO"; sparql.predefinedEndpoint = "DBPEDIA"; @@ -48,14 +41,10 @@ }; - - - /** examples **/ +"http://dbpedia.org/resource/Tony_Blair" +"http://dbpedia.org/resource/Margaret_Thatcher" +"http://dbpedia.org/resource/John_Major" - +"http://dbpedia.org/resource/James_Callaghan" -"http://dbpedia.org/resource/Gerhard_Schr%C3%B6der" Modified: trunk/examples/sparql/hierarchy/Hierarchy1DBPediaYAGOChanBrit_pred_Knight.conf =================================================================== --- trunk/examples/sparql/hierarchy/Hierarchy1DBPediaYAGOChanBrit_pred_Knight.conf 2008-10-11 13:35:40 UTC (rev 1368) +++ trunk/examples/sparql/hierarchy/Hierarchy1DBPediaYAGOChanBrit_pred_Knight.conf 2008-10-13 09:34:50 UTC (rev 1369) @@ -1,27 +1,5 @@ - /* -Note: DBpedia is always subject to change, solutions will change over time - - - - - */ - // SPARQL options - -refinement.heuristic = flexible; - -refinement.useAllConstructor = false; -//refinement.useExistsConstructor = true; -refinement.useNegation = false; - -// SPARQL options -//necessary: -// recursion depth of extraction algorithm sparql.recursionDepth = 1; - - -//predefined filter (1 = YAGO based learning) -// 2 = SKOS, more Options are needed then though. replacePredicate, breakSuperClassRetrievalAfter sparql.predefinedFilter = "YAGO"; sparql.predefinedEndpoint = "DBPEDIA"; @@ -32,7 +10,6 @@ ,"http://dbpedia.org/resource/Margaret_Thatcher" ,"http://dbpedia.org/resource/John_Major" - ,"http://dbpedia.org/resource/Harold_Macmillan" ,"http://dbpedia.org/resource/Alec_Douglas-Home" ,"http://dbpedia.org/resource/Liaquat_Ali_Khan" @@ -43,14 +20,11 @@ }; - - /** examples **/ +"http://dbpedia.org/resource/Tony_Blair" +"http://dbpedia.org/resource/Margaret_Thatcher" +"http://dbpedia.org/resource/John_Major" - +"http://dbpedia.org/resource/Harold_Macmillan" +"http://dbpedia.org/resource/Alec_Douglas-Home" -"http://dbpedia.org/resource/Liaquat_Ali_Khan" Modified: trunk/examples/sparql/scrobble.conf =================================================================== --- trunk/examples/sparql/scrobble.conf 2008-10-11 13:35:40 UTC (rev 1368) +++ trunk/examples/sparql/scrobble.conf 2008-10-13 09:34:50 UTC (rev 1369) @@ -24,9 +24,9 @@ refexamples.useAllConstructor = false; refexamples.useCardinalityRestrictions = false; -refexamples.writeSearchTree = true; -refexamples.searchTreeFile = "log/searchtree.txt"; -refexamples.replaceSearchTree = true; +// refexamples.writeSearchTree = true; +// refexamples.searchTreeFile = "log/searchtree.txt"; +// refexamples.replaceSearchTree = true; reasoner = fastInstanceChecker; Modified: trunk/src/dl-learner/org/dllearner/Info.java =================================================================== --- trunk/src/dl-learner/org/dllearner/Info.java 2008-10-11 13:35:40 UTC (rev 1368) +++ trunk/src/dl-learner/org/dllearner/Info.java 2008-10-13 09:34:50 UTC (rev 1369) @@ -3,6 +3,6 @@ package org.dllearner; public class Info { - public static final String build = "2008-10-09"; + public static final String build = "2008-10-13"; } \ No newline at end of file Modified: trunk/src/dl-learner/org/dllearner/test/junit/ExampleTests.java =================================================================== --- trunk/src/dl-learner/org/dllearner/test/junit/ExampleTests.java 2008-10-11 13:35:40 UTC (rev 1368) +++ trunk/src/dl-learner/org/dllearner/test/junit/ExampleTests.java 2008-10-13 09:34:50 UTC (rev 1369) @@ -89,17 +89,18 @@ // ignored due to errors (should be fixed; in case of long running problems or // our of memory, it is better to increase the noise parameter and add comments // in the conf file about "optimal" parameters) + + // problems before latest release (kept to see if errors re-occurr, + // delete before next release) // ignore.add("./examples/sparql/govtrack.conf"); // HTTP 500 Server error - ignore.add("./examples/sparql/musicbrainz.conf"); // HTTP 502 error - NullPointer in extraction //working fine here ignore.add("./examples/sparql/SKOSTEST_local.conf"); // Out of Memory Error - ignore.add("./examples/sparql/scrobble.conf"); // HTTP 502 Proxy Error + // ignore.add("./examples/sparql/scrobble.conf"); // HTTP 502 Proxy Error // ignore.add("./examples/family-benchmark/Cousin.conf"); // Out of Memory Error => disallowing ALL helps (TODO find out details) //also working fine ignore.add("./examples/sparql/SilentBobWorking2.conf"); // Out of Memory Error // ignore.add("./examples/sparql/difference/DBPediaSKOS_kohl_vs_angela.conf"); // Pellet: literal cannot be cast to individual // ignore.add("./examples/family-benchmark/Aunt.conf"); // did not terminate so far (waited 45 minutes) => disallowing ALL helps (TODO find out details) // ignore.add("./examples/krk/KRK_ZERO_against_1to5_fastInstance.conf"); // Out of Memory Error - //removed ignore.add("./examples/semantic_bible/normal_test.conf"); // did not terminate (waited 55 minutes) - + int failedCounter = 0; for (String path : confFiles.keySet()) { for (String file : confFiles.get(path)) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ku...@us...> - 2008-10-13 11:05:29
|
Revision: 1370 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=1370&view=rev Author: kurzum Date: 2008-10-13 11:05:08 +0000 (Mon, 13 Oct 2008) Log Message: ----------- small changes fixed lymphography Modified Paths: -------------- trunk/examples/lymphography/lymphography_Class1.conf trunk/examples/lymphography/lymphography_Class2.conf trunk/examples/lymphography/lymphography_Class3.conf trunk/examples/lymphography/lymphography_Class4.conf trunk/examples/sparql/README.txt trunk/examples/sparql/SKOSTEST_local.conf trunk/examples/sparql/scrobble.conf trunk/src/dl-learner/org/dllearner/kb/extraction/InstanceNode.java Property Changed: ---------------- trunk/examples/sparql/ Modified: trunk/examples/lymphography/lymphography_Class1.conf =================================================================== --- trunk/examples/lymphography/lymphography_Class1.conf 2008-10-13 09:34:50 UTC (rev 1369) +++ trunk/examples/lymphography/lymphography_Class1.conf 2008-10-13 11:05:08 UTC (rev 1370) @@ -17,16 +17,17 @@ */ -refinement.ignoredConcepts = { +algorithm = refexamples; +refexamples.ignoredConcepts = { "http://www.example.org/lymphography#Target1_NormalFind", "http://www.example.org/lymphography#Target2_Metastases", "http://www.example.org/lymphography#Target3_MalignLymph", "http://www.example.org/lymphography#Target4_Fibrosis" }; -refinement.useAllConstructor = false; -refinement.useExistsConstructor = true; -refinement.useNegation = false; +refexamples.useAllConstructor = false; +refexamples.useExistsConstructor = true; +refexamples.useNegation = false; import("lymphography.owl"); /*Class1*/ Modified: trunk/examples/lymphography/lymphography_Class2.conf =================================================================== --- trunk/examples/lymphography/lymphography_Class2.conf 2008-10-13 09:34:50 UTC (rev 1369) +++ trunk/examples/lymphography/lymphography_Class2.conf 2008-10-13 11:05:08 UTC (rev 1370) @@ -15,16 +15,18 @@ a new experimental version of the refinement algorithm) */ -refinement.ignoredConcepts = { +algorithm = refexamples; +refexamples.ignoredConcepts = { "http://www.example.org/lymphography#Target1_NormalFind", "http://www.example.org/lymphography#Target2_Metastases", "http://www.example.org/lymphography#Target3_MalignLymph", "http://www.example.org/lymphography#Target4_Fibrosis" }; -refinement.useAllConstructor = false; -refinement.useExistsConstructor = true; -refinement.useNegation = false; +refexamples.useAllConstructor = false; +refexamples.useExistsConstructor = true; +refexamples.useNegation = false; +refexamples.noisePercentage = 13.0; import("lymphography.owl"); Modified: trunk/examples/lymphography/lymphography_Class3.conf =================================================================== --- trunk/examples/lymphography/lymphography_Class3.conf 2008-10-13 09:34:50 UTC (rev 1369) +++ trunk/examples/lymphography/lymphography_Class3.conf 2008-10-13 11:05:08 UTC (rev 1370) @@ -17,16 +17,18 @@ */ -refinement.ignoredConcepts = { +algorithm = refexamples; +refexamples.ignoredConcepts = { "http://www.example.org/lymphography#Target1_NormalFind", "http://www.example.org/lymphography#Target2_Metastases", "http://www.example.org/lymphography#Target3_MalignLymph", "http://www.example.org/lymphography#Target4_Fibrosis" }; -refinement.useAllConstructor = false; -refinement.useExistsConstructor = true; -refinement.useNegation = false; +refexamples.useAllConstructor = false; +refexamples.useExistsConstructor = true; +refexamples.useNegation = false; +refexamples.noisePercentage = 19.0; import("lymphography.owl"); /*Class3*/ Modified: trunk/examples/lymphography/lymphography_Class4.conf =================================================================== --- trunk/examples/lymphography/lymphography_Class4.conf 2008-10-13 09:34:50 UTC (rev 1369) +++ trunk/examples/lymphography/lymphography_Class4.conf 2008-10-13 11:05:08 UTC (rev 1370) @@ -15,6 +15,8 @@ a new experimental version of the refinement algorithm) */ +algorithm = refexamples; + refexamples.ignoredConcepts = { "http://www.example.org/lymphography#Target1_NormalFind", "http://www.example.org/lymphography#Target2_Metastases", @@ -23,8 +25,8 @@ }; refexamples.useAllConstructor = false; -refexamples.useExistsConstructor = false; -refexamples.useNegation = true; +refexamples.useExistsConstructor = true; +refexamples.useNegation = false; import("lymphography.owl"); Property changes on: trunk/examples/sparql ___________________________________________________________________ Added: svn:ignore + musicbrainz.conf Modified: trunk/examples/sparql/README.txt =================================================================== --- trunk/examples/sparql/README.txt 2008-10-13 09:34:50 UTC (rev 1369) +++ trunk/examples/sparql/README.txt 2008-10-13 11:05:08 UTC (rev 1370) @@ -3,3 +3,29 @@ When using the SPARQL component, files are written into the directory /cache to avoid performing the same queries more than once. + + +***predefined Filters +all predefined filters remove references to hompage, etc during the extraction +YAGO allows yago, +SKOS allows skos, +YAGOSKOS, allows yago and skos, +YAGOONLY allows yago classes only, no skos , no umbel + +***predefined Endpoints +List of values available for +sparql.predefinedEndpoint("DBPEDIA"); (replace DBPEDIA) +Most of them are not used in any examples, but are available. +DBPEDIA the global DBpedia endpoint http://dbpedia.openlinksw.com:8890/sparql +LOCALDBPEDIA a local mirror of DBpedia running at aksw.org http://139.18.2.37:8890/sparql +LOCALJOSECKI a local joseki store, url pointing at "http://localhost:2020/books" +LOCALJOSEKIBIBLE a local joseki store, url pointing at "http://localhost:2020/bible" +GOVTRACK www.govtrack.us | sparql: http://www.rdfabout.com/sparql +MUSICBRAINZ http://dbtune.org/musicbrainz/sparql +SPARQLETTE +SWCONFERENCE +REVYU +MYOPENLINK +FACTBOOK +DBLP + Modified: trunk/examples/sparql/SKOSTEST_local.conf =================================================================== --- trunk/examples/sparql/SKOSTEST_local.conf 2008-10-13 09:34:50 UTC (rev 1369) +++ trunk/examples/sparql/SKOSTEST_local.conf 2008-10-13 11:05:08 UTC (rev 1370) @@ -1,16 +1,20 @@ /** - * Some people from Greece. + * Some people which are/were Prime Ministers of the UK and some random negative Examples. * Note: DBpedia is always subject to change, solutions will change over time - * Possible Solution: - * Theorist OR (Mathematician AND Physicist) + * Possible Solutions: + +1: (http://dbpedia.org/class/yago/PrimeMinistersOfTheUnitedKingdom OR EXISTS http://dbpedia.org/property/termStart.TOP) (length 5, depth 3) +2: (http://dbpedia.org/class/yago/LeadersOfTheBritishConservativeParty OR EXISTS http://dbpedia.org/property/termStart.TOP) (length 5, depth 3) + * */ // SPARQL options sparql.recursionDepth = 1; -//predefined filter (1 = YAGO based learning) + +//for a list of predefined Filters and Endpoints see examples/sparql/README.txt sparql.predefinedFilter = "YAGO"; sparql.predefinedEndpoint = "LOCALDBPEDIA"; @@ -65,4 +69,4 @@ +"http://dbpedia.org/resource/Anthony_Eden" +"http://dbpedia.org/resource/Anthony_Eden_hat" +"http://dbpedia.org/resource/Archibald_Primrose%2C_5th_Earl_of_Rosebery" -+"http://dbpedia.org/resource/Arthur_Balfour" \ No newline at end of file ++"http://dbpedia.org/resource/Arthur_Balfour" Modified: trunk/examples/sparql/scrobble.conf =================================================================== --- trunk/examples/sparql/scrobble.conf 2008-10-13 09:34:50 UTC (rev 1369) +++ trunk/examples/sparql/scrobble.conf 2008-10-13 11:05:08 UTC (rev 1370) @@ -18,6 +18,7 @@ sparql.recursionDepth = 3; sparql.predefinedEndpoint = "MUSICBRAINZ"; +sparql.saveExtractedFragment = true; algorithm = refexamples; refexamples.useNegation = false; Modified: trunk/src/dl-learner/org/dllearner/kb/extraction/InstanceNode.java =================================================================== --- trunk/src/dl-learner/org/dllearner/kb/extraction/InstanceNode.java 2008-10-13 09:34:50 UTC (rev 1369) +++ trunk/src/dl-learner/org/dllearner/kb/extraction/InstanceNode.java 2008-10-13 11:05:08 UTC (rev 1370) @@ -90,7 +90,13 @@ }else if(tuple.b.isAnon()){ @SuppressWarnings("unused") RDFBlankNode n = (RDFBlankNode) tuple.b; - logger.warn("encountered Bnode in InstanceNode"+ this +"in tuple" + tuple); + if(tuple.a.toString().equals(OWLVocabulary.RDF_TYPE)){ + logger.warn("blanknodes for instances not implemented yet (rare frequency). e.g. (instance rdf:type (A and B)"+" " + this+ " in tuple "+tuple); + } + else{ + logger.warn("encountered Bnode in InstanceNode "+ this +" in tuple " + tuple); + logger.warn("In OWL-DL the subject of an object property assertion must be an instance (not a class). Triple will be ignored."); + } return null; // basically : if p is rdf:type then o is a class This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jen...@us...> - 2008-10-13 12:34:53
|
Revision: 1374 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=1374&view=rev Author: jenslehmann Date: 2008-10-13 12:34:43 +0000 (Mon, 13 Oct 2008) Log Message: ----------- added configurable Xmx value to build script Modified Paths: -------------- trunk/bin/dllearner trunk/bin/dllearner.bat trunk/bin/gui trunk/bin/gui.bat trunk/bin/quickstart trunk/bin/quickstart.bat trunk/bin/ws trunk/bin/ws.bat trunk/build.xml Modified: trunk/bin/dllearner =================================================================== --- trunk/bin/dllearner 2008-10-13 11:58:54 UTC (rev 1373) +++ trunk/bin/dllearner 2008-10-13 12:34:43 UTC (rev 1374) @@ -1 +1,2 @@ -java -cp .:./lib/dig1.1-xmlbeans.jar:./lib/fact/FaCTpp-OWLAPI-v1.1.11.jar:./lib/jamon-2.7.jar:./lib/jena/antlr-2.7.5.jar:./lib/jena/arq.jar:./lib/jena/commons-logging-1.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/log4j.jar:./lib/mysql/mysql-connector-java-5.1.6-bin.jar:./lib/ore-tool/swingx-0.9.2.jar:./lib/owlapi/owlapi-bin.jar:./lib/pellet/aterm-java-1.6.jar:./lib/pellet/pellet.jar:./lib/pellet/relaxngDatatype.jar:./lib/pellet/xsdlib.jar:./lib/protege/org.protege.editor.core.application.jar:./lib/protege/org.protege.editor.owl.jar:./lib/xbean.jar:./lib/dllearner.jar org.dllearner.cli.Start $@ \ No newline at end of file +#!/bin/bash +java -Xmx512m -cp .:./lib/dig1.1-xmlbeans.jar:./lib/fact/FaCTpp-OWLAPI-v1.1.11.jar:./lib/jamon-2.7.jar:./lib/jena/antlr-2.7.5.jar:./lib/jena/arq.jar:./lib/jena/commons-logging-1.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/log4j.jar:./lib/mysql/mysql-connector-java-5.1.6-bin.jar:./lib/ore-tool/swingx-0.9.2.jar:./lib/owlapi/owlapi-bin.jar:./lib/pellet/aterm-java-1.6.jar:./lib/pellet/pellet.jar:./lib/pellet/relaxngDatatype.jar:./lib/pellet/xsdlib.jar:./lib/protege/org.protege.editor.core.application.jar:./lib/protege/org.protege.editor.owl.jar:./lib/xbean.jar:./lib/dllearner.jar org.dllearner.cli.Start $@ \ No newline at end of file Modified: trunk/bin/dllearner.bat =================================================================== --- trunk/bin/dllearner.bat 2008-10-13 11:58:54 UTC (rev 1373) +++ trunk/bin/dllearner.bat 2008-10-13 12:34:43 UTC (rev 1374) @@ -1 +1 @@ -java -Xmx1024m -cp .;.\lib\dig1.1-xmlbeans.jar;.\lib\fact\FaCTpp-OWLAPI-v1.1.11.jar;.\lib\jamon-2.7.jar;.\lib\jena\antlr-2.7.5.jar;.\lib\jena\arq.jar;.\lib\jena\commons-logging-1.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\log4j.jar;.\lib\mysql\mysql-connector-java-5.1.6-bin.jar;.\lib\ore-tool\swingx-0.9.2.jar;.\lib\owlapi\owlapi-bin.jar;.\lib\pellet\aterm-java-1.6.jar;.\lib\pellet\pellet.jar;.\lib\pellet\relaxngDatatype.jar;.\lib\pellet\xsdlib.jar;.\lib\protege\org.protege.editor.core.application.jar;.\lib\protege\org.protege.editor.owl.jar;.\lib\xbean.jar;.\lib\dllearner.jar org.dllearner.cli.Start %* \ No newline at end of file +java -Xmx512m -cp .;.\lib\dig1.1-xmlbeans.jar;.\lib\fact\FaCTpp-OWLAPI-v1.1.11.jar;.\lib\jamon-2.7.jar;.\lib\jena\antlr-2.7.5.jar;.\lib\jena\arq.jar;.\lib\jena\commons-logging-1.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\log4j.jar;.\lib\mysql\mysql-connector-java-5.1.6-bin.jar;.\lib\ore-tool\swingx-0.9.2.jar;.\lib\owlapi\owlapi-bin.jar;.\lib\pellet\aterm-java-1.6.jar;.\lib\pellet\pellet.jar;.\lib\pellet\relaxngDatatype.jar;.\lib\pellet\xsdlib.jar;.\lib\protege\org.protege.editor.core.application.jar;.\lib\protege\org.protege.editor.owl.jar;.\lib\xbean.jar;.\lib\dllearner.jar org.dllearner.cli.Start %* \ No newline at end of file Modified: trunk/bin/gui =================================================================== --- trunk/bin/gui 2008-10-13 11:58:54 UTC (rev 1373) +++ trunk/bin/gui 2008-10-13 12:34:43 UTC (rev 1374) @@ -1 +1,2 @@ -java -cp .:./lib/dig1.1-xmlbeans.jar:./lib/fact/FaCTpp-OWLAPI-v1.1.11.jar:./lib/jamon-2.7.jar:./lib/jena/antlr-2.7.5.jar:./lib/jena/arq.jar:./lib/jena/commons-logging-1.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/log4j.jar:./lib/mysql/mysql-connector-java-5.1.6-bin.jar:./lib/ore-tool/swingx-0.9.2.jar:./lib/owlapi/owlapi-bin.jar:./lib/pellet/aterm-java-1.6.jar:./lib/pellet/pellet.jar:./lib/pellet/relaxngDatatype.jar:./lib/pellet/xsdlib.jar:./lib/protege/org.protege.editor.core.application.jar:./lib/protege/org.protege.editor.owl.jar:./lib/xbean.jar:./lib/dllearner.jar org.dllearner.gui.StartGUI $@ \ No newline at end of file +#!/bin/bash +java -Xmx512m -cp .:./lib/dig1.1-xmlbeans.jar:./lib/fact/FaCTpp-OWLAPI-v1.1.11.jar:./lib/jamon-2.7.jar:./lib/jena/antlr-2.7.5.jar:./lib/jena/arq.jar:./lib/jena/commons-logging-1.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/log4j.jar:./lib/mysql/mysql-connector-java-5.1.6-bin.jar:./lib/ore-tool/swingx-0.9.2.jar:./lib/owlapi/owlapi-bin.jar:./lib/pellet/aterm-java-1.6.jar:./lib/pellet/pellet.jar:./lib/pellet/relaxngDatatype.jar:./lib/pellet/xsdlib.jar:./lib/protege/org.protege.editor.core.application.jar:./lib/protege/org.protege.editor.owl.jar:./lib/xbean.jar:./lib/dllearner.jar org.dllearner.gui.StartGUI $@ \ No newline at end of file Modified: trunk/bin/gui.bat =================================================================== --- trunk/bin/gui.bat 2008-10-13 11:58:54 UTC (rev 1373) +++ trunk/bin/gui.bat 2008-10-13 12:34:43 UTC (rev 1374) @@ -1 +1 @@ -java -cp .;.\lib\dig1.1-xmlbeans.jar;.\lib\fact\FaCTpp-OWLAPI-v1.1.11.jar;.\lib\jamon-2.7.jar;.\lib\jena\antlr-2.7.5.jar;.\lib\jena\arq.jar;.\lib\jena\commons-logging-1.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\log4j.jar;.\lib\mysql\mysql-connector-java-5.1.6-bin.jar;.\lib\ore-tool\swingx-0.9.2.jar;.\lib\owlapi\owlapi-bin.jar;.\lib\pellet\aterm-java-1.6.jar;.\lib\pellet\pellet.jar;.\lib\pellet\relaxngDatatype.jar;.\lib\pellet\xsdlib.jar;.\lib\protege\org.protege.editor.core.application.jar;.\lib\protege\org.protege.editor.owl.jar;.\lib\xbean.jar;.\lib\dllearner.jar org.dllearner.gui.StartGUI %* \ No newline at end of file +java -Xmx512m -cp .;.\lib\dig1.1-xmlbeans.jar;.\lib\fact\FaCTpp-OWLAPI-v1.1.11.jar;.\lib\jamon-2.7.jar;.\lib\jena\antlr-2.7.5.jar;.\lib\jena\arq.jar;.\lib\jena\commons-logging-1.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\log4j.jar;.\lib\mysql\mysql-connector-java-5.1.6-bin.jar;.\lib\ore-tool\swingx-0.9.2.jar;.\lib\owlapi\owlapi-bin.jar;.\lib\pellet\aterm-java-1.6.jar;.\lib\pellet\pellet.jar;.\lib\pellet\relaxngDatatype.jar;.\lib\pellet\xsdlib.jar;.\lib\protege\org.protege.editor.core.application.jar;.\lib\protege\org.protege.editor.owl.jar;.\lib\xbean.jar;.\lib\dllearner.jar org.dllearner.gui.StartGUI %* \ No newline at end of file Modified: trunk/bin/quickstart =================================================================== --- trunk/bin/quickstart 2008-10-13 11:58:54 UTC (rev 1373) +++ trunk/bin/quickstart 2008-10-13 12:34:43 UTC (rev 1374) @@ -1 +1,2 @@ -java -cp .:./lib/dig1.1-xmlbeans.jar:./lib/fact/FaCTpp-OWLAPI-v1.1.11.jar:./lib/jamon-2.7.jar:./lib/jena/antlr-2.7.5.jar:./lib/jena/arq.jar:./lib/jena/commons-logging-1.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/log4j.jar:./lib/mysql/mysql-connector-java-5.1.6-bin.jar:./lib/ore-tool/swingx-0.9.2.jar:./lib/owlapi/owlapi-bin.jar:./lib/pellet/aterm-java-1.6.jar:./lib/pellet/pellet.jar:./lib/pellet/relaxngDatatype.jar:./lib/pellet/xsdlib.jar:./lib/protege/org.protege.editor.core.application.jar:./lib/protege/org.protege.editor.owl.jar:./lib/xbean.jar:./lib/dllearner.jar org.dllearner.cli.QuickStart \ No newline at end of file +#!/bin/bash +java -Xmx512m -cp .:./lib/dig1.1-xmlbeans.jar:./lib/fact/FaCTpp-OWLAPI-v1.1.11.jar:./lib/jamon-2.7.jar:./lib/jena/antlr-2.7.5.jar:./lib/jena/arq.jar:./lib/jena/commons-logging-1.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/log4j.jar:./lib/mysql/mysql-connector-java-5.1.6-bin.jar:./lib/ore-tool/swingx-0.9.2.jar:./lib/owlapi/owlapi-bin.jar:./lib/pellet/aterm-java-1.6.jar:./lib/pellet/pellet.jar:./lib/pellet/relaxngDatatype.jar:./lib/pellet/xsdlib.jar:./lib/protege/org.protege.editor.core.application.jar:./lib/protege/org.protege.editor.owl.jar:./lib/xbean.jar:./lib/dllearner.jar org.dllearner.cli.QuickStart \ No newline at end of file Modified: trunk/bin/quickstart.bat =================================================================== --- trunk/bin/quickstart.bat 2008-10-13 11:58:54 UTC (rev 1373) +++ trunk/bin/quickstart.bat 2008-10-13 12:34:43 UTC (rev 1374) @@ -1 +1 @@ -java -Xmx1024m -cp .;.\lib\dig1.1-xmlbeans.jar;.\lib\fact\FaCTpp-OWLAPI-v1.1.11.jar;.\lib\jamon-2.7.jar;.\lib\jena\antlr-2.7.5.jar;.\lib\jena\arq.jar;.\lib\jena\commons-logging-1.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\log4j.jar;.\lib\mysql\mysql-connector-java-5.1.6-bin.jar;.\lib\ore-tool\swingx-0.9.2.jar;.\lib\owlapi\owlapi-bin.jar;.\lib\pellet\aterm-java-1.6.jar;.\lib\pellet\pellet.jar;.\lib\pellet\relaxngDatatype.jar;.\lib\pellet\xsdlib.jar;.\lib\protege\org.protege.editor.core.application.jar;.\lib\protege\org.protege.editor.owl.jar;.\lib\xbean.jar;.\lib\dllearner.jar org.dllearner.cli.QuickStart \ No newline at end of file +java -Xmx512m -cp .;.\lib\dig1.1-xmlbeans.jar;.\lib\fact\FaCTpp-OWLAPI-v1.1.11.jar;.\lib\jamon-2.7.jar;.\lib\jena\antlr-2.7.5.jar;.\lib\jena\arq.jar;.\lib\jena\commons-logging-1.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\log4j.jar;.\lib\mysql\mysql-connector-java-5.1.6-bin.jar;.\lib\ore-tool\swingx-0.9.2.jar;.\lib\owlapi\owlapi-bin.jar;.\lib\pellet\aterm-java-1.6.jar;.\lib\pellet\pellet.jar;.\lib\pellet\relaxngDatatype.jar;.\lib\pellet\xsdlib.jar;.\lib\protege\org.protege.editor.core.application.jar;.\lib\protege\org.protege.editor.owl.jar;.\lib\xbean.jar;.\lib\dllearner.jar org.dllearner.cli.QuickStart \ No newline at end of file Modified: trunk/bin/ws =================================================================== --- trunk/bin/ws 2008-10-13 11:58:54 UTC (rev 1373) +++ trunk/bin/ws 2008-10-13 12:34:43 UTC (rev 1374) @@ -1 +1,2 @@ -java -cp .:./lib/dig1.1-xmlbeans.jar:./lib/fact/FaCTpp-OWLAPI-v1.1.11.jar:./lib/jamon-2.7.jar:./lib/jena/antlr-2.7.5.jar:./lib/jena/arq.jar:./lib/jena/commons-logging-1.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/log4j.jar:./lib/mysql/mysql-connector-java-5.1.6-bin.jar:./lib/ore-tool/swingx-0.9.2.jar:./lib/owlapi/owlapi-bin.jar:./lib/pellet/aterm-java-1.6.jar:./lib/pellet/pellet.jar:./lib/pellet/relaxngDatatype.jar:./lib/pellet/xsdlib.jar:./lib/protege/org.protege.editor.core.application.jar:./lib/protege/org.protege.editor.owl.jar:./lib/xbean.jar:./lib/dllearner.jar org.dllearner.server.DLLearnerWSStart $@ \ No newline at end of file +#!/bin/bash +java -Xmx512m -cp .:./lib/dig1.1-xmlbeans.jar:./lib/fact/FaCTpp-OWLAPI-v1.1.11.jar:./lib/jamon-2.7.jar:./lib/jena/antlr-2.7.5.jar:./lib/jena/arq.jar:./lib/jena/commons-logging-1.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/log4j.jar:./lib/mysql/mysql-connector-java-5.1.6-bin.jar:./lib/ore-tool/swingx-0.9.2.jar:./lib/owlapi/owlapi-bin.jar:./lib/pellet/aterm-java-1.6.jar:./lib/pellet/pellet.jar:./lib/pellet/relaxngDatatype.jar:./lib/pellet/xsdlib.jar:./lib/protege/org.protege.editor.core.application.jar:./lib/protege/org.protege.editor.owl.jar:./lib/xbean.jar:./lib/dllearner.jar org.dllearner.server.DLLearnerWSStart $@ \ No newline at end of file Modified: trunk/bin/ws.bat =================================================================== --- trunk/bin/ws.bat 2008-10-13 11:58:54 UTC (rev 1373) +++ trunk/bin/ws.bat 2008-10-13 12:34:43 UTC (rev 1374) @@ -1 +1 @@ -java -cp .;.\lib\dig1.1-xmlbeans.jar;.\lib\fact\FaCTpp-OWLAPI-v1.1.11.jar;.\lib\jamon-2.7.jar;.\lib\jena\antlr-2.7.5.jar;.\lib\jena\arq.jar;.\lib\jena\commons-logging-1.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\log4j.jar;.\lib\mysql\mysql-connector-java-5.1.6-bin.jar;.\lib\ore-tool\swingx-0.9.2.jar;.\lib\owlapi\owlapi-bin.jar;.\lib\pellet\aterm-java-1.6.jar;.\lib\pellet\pellet.jar;.\lib\pellet\relaxngDatatype.jar;.\lib\pellet\xsdlib.jar;.\lib\protege\org.protege.editor.core.application.jar;.\lib\protege\org.protege.editor.owl.jar;.\lib\xbean.jar;.\lib\dllearner.jar org.dllearner.server.DLLearnerWSStart %* \ No newline at end of file +java -Xmx512m -cp .;.\lib\dig1.1-xmlbeans.jar;.\lib\fact\FaCTpp-OWLAPI-v1.1.11.jar;.\lib\jamon-2.7.jar;.\lib\jena\antlr-2.7.5.jar;.\lib\jena\arq.jar;.\lib\jena\commons-logging-1.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\log4j.jar;.\lib\mysql\mysql-connector-java-5.1.6-bin.jar;.\lib\ore-tool\swingx-0.9.2.jar;.\lib\owlapi\owlapi-bin.jar;.\lib\pellet\aterm-java-1.6.jar;.\lib\pellet\pellet.jar;.\lib\pellet\relaxngDatatype.jar;.\lib\pellet\xsdlib.jar;.\lib\protege\org.protege.editor.core.application.jar;.\lib\protege\org.protege.editor.owl.jar;.\lib\xbean.jar;.\lib\dllearner.jar org.dllearner.server.DLLearnerWSStart %* \ No newline at end of file Modified: trunk/build.xml =================================================================== --- trunk/build.xml 2008-10-13 11:58:54 UTC (rev 1373) +++ trunk/build.xml 2008-10-13 12:34:43 UTC (rev 1374) @@ -15,6 +15,10 @@ <property name="release_tmp_dir" value="release/${version_dir}" /> <property name="release_php_client_tmp_dir" value="release/php-client-${today}" /> + <!-- other settings --> + <!-- maximum amount of allocated memory in startup scripts --> + <property name ="max_memory" value="512" /> + <!-- set up classpath --> <path id="classpath"> <pathelement location="."/> @@ -257,14 +261,14 @@ <map from="${removeprefix}" to="."/> </pathconvert> - <echo file="bin/quickstart.bat" message="java -Xmx1024m -cp ${pathStringWin} org.dllearner.cli.QuickStart"/> - <echo file="bin/dllearner.bat" message="java -Xmx1024m -cp ${pathStringWin} org.dllearner.cli.Start %*"/> - <echo file="bin/ws.bat" message="java -cp ${pathStringWin} org.dllearner.server.DLLearnerWSStart %*"/> - <echo file="bin/gui.bat" message="java -cp ${pathStringWin} org.dllearner.gui.StartGUI %*"/> - <echo file="bin/quickstart" message="#!/bin/bash${line.separator}java -cp ${pathStringUnix} org.dllearner.cli.QuickStart"/> - <echo file="bin/dllearner" message="#!/bin/bash${line.separator}java -cp ${pathStringUnix} org.dllearner.cli.Start $@"/> - <echo file="bin/ws" message="#!/bin/bash${line.separator}java -cp ${pathStringUnix} org.dllearner.server.DLLearnerWSStart $@"/> - <echo file="bin/gui" message="#!/bin/bash${line.separator}java -cp ${pathStringUnix} org.dllearner.gui.StartGUI $@"/> + <echo file="bin/quickstart.bat" message="java -Xmx${max_memory}m -cp ${pathStringWin} org.dllearner.cli.QuickStart"/> + <echo file="bin/dllearner.bat" message="java -Xmx${max_memory}m -cp ${pathStringWin} org.dllearner.cli.Start %*"/> + <echo file="bin/ws.bat" message="java -Xmx${max_memory}m -cp ${pathStringWin} org.dllearner.server.DLLearnerWSStart %*"/> + <echo file="bin/gui.bat" message="java -Xmx${max_memory}m -cp ${pathStringWin} org.dllearner.gui.StartGUI %*"/> + <echo file="bin/quickstart" message="#!/bin/bash${line.separator}java -Xmx${max_memory}m -cp ${pathStringUnix} org.dllearner.cli.QuickStart"/> + <echo file="bin/dllearner" message="#!/bin/bash${line.separator}java -Xmx${max_memory}m -cp ${pathStringUnix} org.dllearner.cli.Start $@"/> + <echo file="bin/ws" message="#!/bin/bash${line.separator}java -Xmx${max_memory}m -cp ${pathStringUnix} org.dllearner.server.DLLearnerWSStart $@"/> + <echo file="bin/gui" message="#!/bin/bash${line.separator}java -Xmx${max_memory}m -cp ${pathStringUnix} org.dllearner.gui.StartGUI $@"/> </target> <!-- generate Javadoc --> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |