GithubHelp home page GithubHelp logo

smartdataanalytics / dl-learner Goto Github PK

View Code? Open in Web Editor NEW
150.0 34.0 33.0 249.98 MB

A tool for supervised Machine Learning in OWL and Description Logics

Home Page: http://dl-learner.org

License: GNU General Public License v3.0

Shell 0.24% Makefile 0.26% CSS 0.24% HTML 3.15% Java 73.13% TeX 0.67% Prolog 18.33% Forth 0.77% Brainfuck 1.12% PHP 0.42% Perl 0.01% Lex 0.88% Gnuplot 0.01% Roff 0.77% Dockerfile 0.01%
web-ontology-language machine-learning machine-learning-library machine-learning-api semantic-web

dl-learner's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dl-learner's Issues

Add support for bagging

As DL-Learner contains several different learning algorithms, support for bagging[1] could be an interesting feature. We still would have to figure out how to aggregate several CEs...

[1] An Empirical Evaluation of Bagging in Inductive Logic Programming. Dutra et al. Proceedings of the Twelfth International Conference on Inductive Logic Programming, pp. 48--65, Sydney, Australia.

Completion of documentation

@JensLehmann @patrickwestphal @SimonBin
In order to have a complete and up-to-date documentation, all available components need to be annotated. For instance, several heuristics do not have an annotation, thus, they do not occur in the current documentation. Moreover, all config options should be described.

Calc Splits via Min/Max/Avg

For large number of individuals, retrieving complete list may be inefficient for Sparql. Could try Min/Max and then distribution estimation via binary splits & sparql Count

[Bug] Missing warning for positives that are negatives [sf#66]

Reported by kurzum on 2010-08-25 13:47 UTC
In general, if you assign the same instance as positive and negative example (e.g. by mistake)
there is no warning or error message, which is direly needed.
It is quite a common copy and paste mistake and takes forever, if there is no warning.

Refactor DL-Learner to use builder pattern or similar

Alternatively throw exceptions in all public methods, whether they are pre-init or post-init methods. Or research other options to stop incorrect DL-Learner usage (by which I mean: calling set Methods after .init or calling methods before .init has been done) Sample exception I added for some specific case in RhoDRDown: https://github.com/AKSW/DL-Learner/blob/94da38d7c1e1adc8ee7613c1938a3a550a0d4a23/components-core/src/main/java/org/dllearner/refinementoperators/RhoDRDown.java#L472

[Bug] Rest interface [sf#69]

Reported by wormsbee on 2012-11-06 10:18 UTC
curl --data-urlencode [email protected] "http://localhost:9099/interfaces/rest"

{"learningresult":{"error":"An error occured: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'alg': Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'learningProblem' of bean class [org.dllearner.algorithms.ocel.OCEL]: Bean property 'learningProblem' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?","stacktrace":org.springframework.beans.NotWritablePropertyException: Invalid property 'learningProblem' of bean class [org.dllearner.algorithms.ocel.OCEL]: Bean property 'learningProblem' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?,"success":"0"}}

Ignored concepts/properties not taken into account by refinement operator

Problem:

Class expression learning algorithms derived from AbstractCELA allow to set classes and object/data properties that should be ignored during learning. Those ignored entities are only considered during the initialization of the hierarchies in
initClassHierarchy()
initObjectPropertyHierarchy()
initDataPropertyHierarchy()

Those hierarchy objects are put into the refinement operator. The problem is that for some tasks only the underlying reasoner is used:

if(useNumericDatatypes) {
            Set<OWLDataProperty> numericDPs = reasoner.getNumericDataProperties();

or

if(useDataHasValueConstructor) {
            Set<OWLDataProperty> stringDPs = reasoner.getStringDatatypeProperties();

and even in the init() method.

This can lead to solutions that can contain ignored entities, thus, should not be returned and also cause a larger search space than necessary.

[Bug] error in Description object [sf#51]

Reported by kurzum on 2010-02-16 21:53 UTC
run
examples/testCaseSPARQLDescription
add in ROLlearner2
SparqlQueryDescriptionConvertVisitor visit = new SparqlQueryDescriptionConvertVisitor();
String sparqlQuery = visit.getSparqlQuery(ed.getDescription().toKBSyntaxString());
and
String sparqlQuery = visit.getSparqlQuery(ed.getDescription());

Pellet ConcurrentModificationException

(reproducible on a private ontology)

Caused by: java.util.ConcurrentModificationException
        at java.util.HashMap$HashIterator.nextNode(HashMap.java:1429)
        at java.util.HashMap$KeyIterator.next(HashMap.java:1453)
        at com.clarkparsia.pellet.rules.ContinuousRulesStrategy.applyRuleBindings(ContinuousRulesStrategy.java:147)
        at com.clarkparsia.pellet.rules.ContinuousRulesStrategy.complete(ContinuousRulesStrategy.java:254)
        at org.mindswap.pellet.ABox.isConsistent(ABox.java:1423)
        at org.mindswap.pellet.ABox.isConsistent(ABox.java:1260)
        at org.mindswap.pellet.KnowledgeBase.consistency(KnowledgeBase.java:2017)
        at org.mindswap.pellet.KnowledgeBase.isConsistent(KnowledgeBase.java:2089)
        at com.clarkparsia.pellet.owlapiv3.PelletReasoner.isConsistent(PelletReasoner.java:849)
        at org.dllearner.reasoning.OWLAPIReasoner.init(OWLAPIReasoner.java:246)

changing for( PartialBinding ruleBinding : partialBindings ) to for( PartialBinding ruleBinding : new HashSet(partialBindings) ) on com.clarkparsia.pellet.rules.ContinuousRulesStrategy line 147 only results in

Caused by: java.lang.OutOfMemoryError: GC overhead limit exceeded
        at org.mindswap.pellet.EdgeList.<init>(EdgeList.java:80)
        at org.mindswap.pellet.EdgeList.<init>(EdgeList.java:76)
        at org.mindswap.pellet.EdgeList.getEdges(EdgeList.java:202)
        at org.mindswap.pellet.Individual.getRNeighborEdges(Individual.java:678)
        at com.clarkparsia.pellet.rules.TrivialSatisfactionHelpers$TestProperty.check(TrivialSatisfactionHelpers.java:317)
        at com.clarkparsia.pellet.rules.TrivialSatisfactionHelpers$TestIndividualProperty.check(TrivialSatisfactionHelpers.java:295)
        at com.clarkparsia.pellet.rules.TrivialSatisfactionHelpers.isAtomTrue(TrivialSatisfactionHelpers.java:402)
        at com.clarkparsia.pellet.rules.ContinuousRulesStrategy.createDisjunctionsFromBinding(ContinuousRulesStrategy.java:410)
        at com.clarkparsia.pellet.rules.ContinuousRulesStrategy.applyRuleBindings(ContinuousRulesStrategy.java:224)
        at com.clarkparsia.pellet.rules.ContinuousRulesStrategy.complete(ContinuousRulesStrategy.java:331)
        at org.mindswap.pellet.ABox.isConsistent(ABox.java:1423)
        at org.mindswap.pellet.ABox.isConsistent(ABox.java:1260)
        at org.mindswap.pellet.KnowledgeBase.consistency(KnowledgeBase.java:1989)
        at org.mindswap.pellet.KnowledgeBase.isConsistent(KnowledgeBase.java:2061)
        at com.clarkparsia.pellet.owlapiv3.PelletReasoner.isConsistent(PelletReasoner.java:849)
        at org.dllearner.reasoning.OWLAPIReasoner.init(OWLAPIReasoner.java:246)

Distinguishing of frequency thresholds in refinement operator

Currently, there is only one option to set the frequency threshold of properties values used e.g. in hasValue hypotheses, i.e. we cannot set different values for the values of object properties (OWL individuals) and data properties (OWL literals).

Suggestion:

frequencyThreshold =>

  1. dataHasValueFrequencyThreshold
  2. objectHasValueFrequencyThreshold

or something else

Important: We have to adapt examples/conf files too after renaming was done

[Feature] unit test for consistency of property editors [sf#44]

Reported by jenslehmann on 2011-08-18 08:31 UTC
There should be a unit test for the various implementations of the PropertyEditor interface in DL-Learner, which checks whether setAsText and getAsText are consistent, i.e. first calling setAsTest(String) and then getAsText should result in the same string for all editors and all valid strings.

Max. cardinality checking broken in ClosedWorldReasoner

It looks like getting individuals for a class expression with a max. cardinality restriction doesn't work correctly.

Data

p(s, o0)
p(s, o1)
p(s, o2)
p(s, o3)
p(s, o4)
A(s)
C(o0)
C(o1)
C(o2)
C(o3)
C(o4)

Query

A ⊓ (≤ 2 p.C)

Result of reasoner.getIndividuals

[s]

Proper OWL2 EL profile learning support

In OWL2 EL only the following constructs are supported(see http://www.w3.org/TR/owl2-profiles/#OWL_2_EL):

  • existential quantification to a class expression (ObjectSomeValuesFrom) or a data range (DataSomeValuesFrom)
  • existential quantification to an individual (ObjectHasValue) or a literal (DataHasValue)
  • self-restriction (ObjectHasSelf)
  • enumerations involving a single individual (ObjectOneOf) or a single literal (DataOneOf)
  • intersection of classes (ObjectIntersectionOf) and data ranges (DataIntersectionOf)

The basic EL learning algorithm ELTL only supports a subset of the constructs above, i.e. everything seems to be correct. On the other hand, we should add support for DataSomeValuesFrom and DataHasValue.

A special case is (ELTL + disjunctive) which also uses disjunction of class expression, i.e. solution might not be fit to OWL2 EL. Moreover, support for DataSomeValuesFrom was recently added. The problem here is that only a particular set of datatypes is supported (which is necessary to obtain the desired computational properties):

  • rdf:PlainLiteral
  • rdf:XMLLiteral
  • rdfs:Literal
  • owl:real
  • owl:rational
  • xsd:decimal
  • xsd:integer
  • xsd:nonNegativeInteger
  • xsd:string
  • xsd:normalizedString
  • xsd:token
  • xsd:Name
  • xsd:NCName
  • xsd:NMTOKEN
  • xsd:hexBinary
  • xsd:base64Binary
  • xsd:anyURI
  • xsd:dateTime
  • xsd:dateTimeStamp

This means, that e.g. xsd:double can not be used and it's not clear how to handle such cases.

[Bug] JavaCC throws an Error [sf#65]

Reported by kurzum on 2010-08-19 13:17 UTC
in:
public class TokenMgrError extends Error
This eror is sometimes not caught and transformed to the checked Exception.
So effectively, if an Application uses
try{} catch (ParseException e) {}
the error can still run through and wreck the application

[ERROR] org.dllearner.parser.TokenMgrError: Lexical error at line 1, column 8. Encountered: "a" (97), after : "F"
[ERROR] at org.dllearner.parser.KBParserTokenManager.getNextToken(parser:KBParserTokenManager.java):1309)
[ERROR] at org.dllearner.parser.KBParser.jj_ntk(parser:KBParser.java):1219)
[ERROR] at org.dllearner.parser.KBParser.Concept(parser:KBParser.java):425)
[ERROR] at org.dllearner.parser.KBParser.TBoxEquiv(parser:KBParser.java):267)
[ERROR] at org.dllearner.parser.KBParser.parseConcept(parser:KBParser.java):30)
[ERROR] at org.nlp2rdf.navigator.server.store.LogicalRelationStrategy.add(LogicalRelationStrategy.java:132)
[ERROR] at org.nlp2rdf.navigator.server.store.LogicalRelationStrategy.update(LogicalRelationStrategy.java:154)
[ERROR] at org.nlp2rdf.navigator.server.store.Store.saveConcept(Store.java:39)

Error executing CLI after release build on develop branch

Since several dependencies (e.g. com/davidsoergel/dsutils/1.051/dsutils-1.051, com/davidsoergel/conja/1.061/conja-1.061) were introduced with the SemKernel component that require com.google.collections:google-collections calling e.g. bin/cli after running the buildRelease.sh script will cause the following error:

patrick@oklasos:/tmp/dll_trials/dllearner-1.0 $ bin/cli examples/father.conf 
DL-Learner command line interface
Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@7494e528: startup date [Sat Mar 28 18:11:26 CET 2015]; root of context hierarchy
Loading XML bean definitions from URL [jar:file:/tmp/dll_trials/dllearner-1.0/lib/interfaces-1.1-SNAPSHOT.jar!/org/dllearner/configuration/spring/bean-post-processor-configuration.xml]
Exception in thread "main" java.lang.NoSuchMethodError: com.google.common.base.Platform.systemNanoTime()J
    at com.google.common.base.Ticker$1.read(Ticker.java:60)
    at com.google.common.base.Stopwatch.start(Stopwatch.java:162)
    at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3523)
    at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2319)
    at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2282)
    at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2197)
    at com.google.common.cache.LocalCache.get(LocalCache.java:3937)
    at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3941)
    at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4824)
    at org.semanticweb.owlapi.model.IRI.cache(IRI.java:348)
    at org.semanticweb.owlapi.model.IRI.<init>(IRI.java:369)
    at org.semanticweb.owlapi.model.IRI.create(IRI.java:269)
    at org.semanticweb.owlapi.vocab.OWLRDFVocabulary.<init>(OWLRDFVocabulary.java:356)
    at org.semanticweb.owlapi.vocab.OWLRDFVocabulary.<clinit>(OWLRDFVocabulary.java:62)
    at uk.ac.manchester.cs.owl.owlapi.OWLObjectImpl.<clinit>(OWLObjectImpl.java:87)
    at org.dllearner.core.AbstractCELA.<clinit>(AbstractCELA.java:74)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:264)
    at org.dllearner.core.AnnComponentManager.<init>(AnnComponentManager.java:117)
    at org.dllearner.core.AnnComponentManager.getInstance(AnnComponentManager.java:142)
    at org.dllearner.confparser3.ConfParserConfiguration.getClass(ConfParserConfiguration.java:76)
    at org.dllearner.configuration.spring.ConfigurationBasedBeanDefinitionRegistryPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationBasedBeanDefinitionRegistryPostProcessor.java:48)
    at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:619)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:461)
    at org.dllearner.configuration.spring.DefaultApplicationContextBuilder.buildApplicationContext(DefaultApplicationContextBuilder.java:60)
    at org.dllearner.cli.CLI.main(CLI.java:259)

Similar errors were already reported, e.g. here or here.

Concurrent modification in PCELOE algorithm

I am trying to run PCELOE (Parallel version of CELOE) algorithm but it gives java concurrent modification error.

A snippet of the log is:
Caused by: java.util.ConcurrentModificationException
at java.util.TreeMap$NavigableSubMap$SubMapIterator.prevEntry(TreeMap.java:1714)
at java.util.TreeMap$NavigableSubMap$DescendingSubMapKeyIterator.next(TreeMap.java:1818)
at org.dllearner.algorithms.celoe.PCELOE.getNextNodeToExpand(PCELOE.java:503)
at org.dllearner.algorithms.celoe.PCELOE.access$200(PCELOE.java:65)
at org.dllearner.algorithms.celoe.PCELOE$PCELOEWorker.run(PCELOE.java:1138)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)

[Bug] if no examples are set PosNegLP throws a Nullpointer. [sf#67]

Reported by kurzum on 2011-04-14 06:10 UTC
if no examples are set PosNegLP throws a Nullpointer, but it should actually throw a ComponentInitexception.

Additionally, there is no warning, when the pos and negative Examples overlap:
PosNegLPStandard lp = cm.learningProblem(PosNegLPStandard.class, rc);
lp.setPositiveExamples(posExamples);
lp.setNegativeExamples(posExamples);
silently continues.

WARN [main] (DBpediaClassLearnerCELOE.java:94) -
java.lang.NullPointerException
at org.dllearner.utilities.Helper.union(Helper.java:263)
at org.dllearner.learningproblems.PosNegLP.init(PosNegLP.java:137)
at org.dllearner.learningproblems.PosNegLPStandard.init(PosNegLPStandard.java:87)
at org.dllearner.scripts.improveWikipedia.DBpediaClassLearnerCELOE.learnClass(DBpediaClassLearnerCELOE.java:144)
at org.dllearner.scripts.improveWikipedia.DBpediaClassLearnerCELOE.learnAllClasses(DBpediaClassLearnerCELOE.java:83)
at org.dllearner.scripts.improveWikipedia.DBpediaClassLearnerCELOE.main(DBpediaClassLearnerCELOE.java:74)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:115)

Errors running bin/enrichment

Running the enrichment executable on DBpedia live gives me several errors like this one:

$ bin/enrichment -e http://live.dbpedia.org/sparql -g http://dbpedia.org -r http://dbpedia.org/ontology/currency
<http://dbpedia.org/ontology/currency> appears to be an object property. Running appropriate algorithms.

Processing property http://dbpedia.org/ontology/currency
Learning of EquivalentObjectProperties axioms ...
Learning 
of EquivalentObjectProperties axioms 
failed.
 ... EquivalentObjectProperties axioms finished
ERROR - An error occurred while generating EquivalentObjectProperties axioms for object property http://dbpedia.org/ontology/currency
java.lang.RuntimeException: Query Execution failed, even with retries.
    at org.aksw.jena_sparql_api.retry.core.QueryExecutionRetry.doTry(QueryExecutionRetry.java:57)
    at org.aksw.jena_sparql_api.retry.core.QueryExecutionRetry.execSelect(QueryExecutionRetry.java:83)
    at org.dllearner.core.AbstractAxiomLearningAlgorithm.executeSelectQuery(AbstractAxiomLearningAlgorithm.java:469)
    at org.dllearner.algorithms.properties.ObjectPropertyHierarchyAxiomLearner.run(ObjectPropertyHierarchyAxiomLearner.java:114)
    at org.dllearner.algorithms.properties.PropertyAxiomLearner.learnAxioms(PropertyAxiomLearner.java:97)
    at org.dllearner.core.AbstractAxiomLearningAlgorithm.start(AbstractAxiomLearningAlgorithm.java:251)
    at org.dllearner.algorithms.properties.MultiPropertyAxiomLearner.applyAlgorithm(MultiPropertyAxiomLearner.java:300)
    at org.dllearner.algorithms.properties.MultiPropertyAxiomLearner.lambda$start$0(MultiPropertyAxiomLearner.java:157)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.util.concurrent.ExecutionException: java.lang.RuntimeException: java.lang.RuntimeException: org.apache.jena.query.QueryExecException: HTTP QueryExecution has been closed
    at com.google.common.util.concurrent.AbstractFuture.getDoneValue(AbstractFuture.java:476)
    at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:455)
    at com.google.common.util.concurrent.AbstractFuture$TrustedFuture.get(AbstractFuture.java:79)
    at org.aksw.jena_sparql_api.retry.core.QueryExecutionRetry.doTry(QueryExecutionRetry.java:54)
    ... 12 more
Caused by: java.lang.RuntimeException: java.lang.RuntimeException: org.apache.jena.query.QueryExecException: HTTP QueryExecution has been closed
    at org.aksw.jena_sparql_api.cache.core.QueryExecutionCacheEx.doCacheResultSet(QueryExecutionCacheEx.java:98)
    at org.aksw.jena_sparql_api.cache.core.QueryExecutionCacheEx.execSelect(QueryExecutionCacheEx.java:210)
    at org.aksw.jena_sparql_api.core.QueryExecutionDecoratorBase.execSelect(QueryExecutionDecoratorBase.java:140)
    at org.aksw.jena_sparql_api.delay.core.QueryExecutionDelay.execSelect(QueryExecutionDelay.java:42)
    at org.aksw.jena_sparql_api.core.QueryExecutionDecoratorBase.execSelect(QueryExecutionDecoratorBase.java:140)
    at org.aksw.jena_sparql_api.retry.core.QueryExecutionRetry.access$101(QueryExecutionRetry.java:23)
    at org.aksw.jena_sparql_api.retry.core.QueryExecutionRetry$2.call(QueryExecutionRetry.java:86)
    at org.aksw.jena_sparql_api.retry.core.QueryExecutionRetry$2.call(QueryExecutionRetry.java:83)
    at com.nurkiewicz.asyncretry.AsyncRetryExecutor$2.call(AsyncRetryExecutor.java:72)
    at com.nurkiewicz.asyncretry.SyncRetryJob.run(SyncRetryJob.java:22)
    at com.nurkiewicz.asyncretry.RetryJob.run(RetryJob.java:96)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
    ... 3 more
Caused by: java.lang.RuntimeException: org.apache.jena.query.QueryExecException: HTTP QueryExecution has been closed
    at org.aksw.jena_sparql_api.http.HttpExceptionUtils.makeHumanFriendly(HttpExceptionUtils.java:17)
    at org.aksw.jena_sparql_api.http.QueryExecutionHttpWrapper.wrapException(QueryExecutionHttpWrapper.java:69)
    at org.aksw.jena_sparql_api.http.QueryExecutionHttpWrapper.execSelect(QueryExecutionHttpWrapper.java:26)
    at org.aksw.jena_sparql_api.cache.core.QueryExecutionCacheEx.doCacheResultSet(QueryExecutionCacheEx.java:76)
    ... 17 more
Caused by: org.apache.jena.query.QueryExecException: HTTP QueryExecution has been closed
    at org.apache.jena.sparql.engine.http.QueryEngineHTTP.checkNotClosed(QueryEngineHTTP.java:534)
    at org.apache.jena.sparql.engine.http.QueryEngineHTTP.execSelect(QueryEngineHTTP.java:350)
    at org.aksw.jena_sparql_api.http.QueryExecutionHttpWrapper$1.get(QueryExecutionHttpWrapper.java:29)
    at org.aksw.jena_sparql_api.http.QueryExecutionHttpWrapper$1.get(QueryExecutionHttpWrapper.java:26)
    at org.aksw.jena_sparql_api.http.QueryExecutionHttpWrapper.wrapException(QueryExecutionHttpWrapper.java:55)
    ... 19 more

Operator initialized twice when explicitly defined in configuration file

Having a configuration like

prefixes = [ ("ex","http://ex.com/") ]
ks.type = "OWL File"
ks.fileName = "kb.owl"

reasoner.type = "cwr"
reasoner.sources = {ks}

lp.type = "posNegStandard"
lp.reasoner = reasoner
lp.positiveExamples = {"ex:p1"}
lp.negativeExamples = {"ex:n1"}

op.type = "rho"
op.useHasValueConstructor = true

alg.type = "celoe"
alg.maxExecutionTimeInSeconds = 60
alg.reasoner = reasoner

will result in a RuntimeException:

Caused by: java.lang.NullPointerException
	at org.dllearner.refinementoperators.RhoDRDown.init(RhoDRDown.java:356)
	at org.dllearner.algorithms.celoe.CELOE.init(CELOE.java:313)
	at org.dllearner.configuration.spring.ComponentInitializationBeanPostProcessor.postProcessBeforeInitialization(ComponentInitializationBeanPostProcessor.java:35)

The main problem seems to be that the operator's init() is called twice in CELOE:

if (operator == null) {
    // we use a default operator and inject the class hierarchy for now
    operator = new RhoDRDown();
    ((CustomStartRefinementOperator) operator).setStartClass(startClass);
    ((ReasoningBasedRefinementOperator) operator).setReasoner(reasoner);
}
if (operator instanceof CustomHierarchyRefinementOperator) {
    ((CustomHierarchyRefinementOperator) operator).setClassHierarchy(classHierarchy);
    ((CustomHierarchyRefinementOperator) operator).setObjectPropertyHierarchy(objectPropertyHierarchy);
    ((CustomHierarchyRefinementOperator) operator).setDataPropertyHierarchy(datatypePropertyHierarchy);
}
operator.init();

We would have to check whether operator is already initialized an use the clone constructor to make the hierarchy settings and use/re-initialize the clone afterwards.

[Feature] AutoSPARQL: no repetition of query trees [sf#43]

Reported by jenslehmann on 2010-12-13 10:50 UTC
When a user is asked as question about whether a resource r is in the result set, then the query tree corresponding to r should not be the same as some query tree corresponding to a resource r' for which a question has been asked previously.

Add support for someonly (copied from sf.net)

The learning algorithms should have the option that universal quantifiers for a role r are only used in learned expressions when there is a role filler for r - essentially using "someOnly" i.e. a combination of universal and existential quantifiers.

Build fails with NoClassDefFound for unife.bundle.bdd.BDDFactory2

When I run mvn clean install on the top level project, the build fails in the components-ext module with the following message (excerpt):

Tests run: 3, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 30.852 sec <<< FAILURE! - in org.dllearner.algorithms.probabilistic.structure.unife.leap.LEAPTest
testCase1(org.dllearner.algorithms.probabilistic.structure.unife.leap.LEAPTest)  Time elapsed: 10.306 sec  <<< ERROR!
java.lang.ExceptionInInitializerError: null
    at unife.bundle.bdd.BDDFactory2.<clinit>(BDDFactory2.java:61)
    at unife.edge.EDGE.init(EDGE.java:846)
    at org.dllearner.algorithms.probabilistic.parameter.unife.edge.EDGE.start(EDGE.java:96)
    at org.dllearner.algorithms.probabilistic.structure.unife.leap.LEAP.greedySearch(LEAP.java:212)
    at org.dllearner.algorithms.probabilistic.structure.unife.leap.LEAP.start(LEAP.java:103)
    at org.dllearner.algorithms.probabilistic.structure.unife.leap.LEAPTest.testCase1(LEAPTest.java:93)

testCase2(org.dllearner.algorithms.probabilistic.structure.unife.leap.LEAPTest)  Time elapsed: 10.28 sec  <<< ERROR!
java.lang.NoClassDefFoundError: Could not initialize class unife.bundle.bdd.BDDFactory2
    at unife.edge.EDGE.init(EDGE.java:846)
    at org.dllearner.algorithms.probabilistic.parameter.unife.edge.EDGE.start(EDGE.java:96)
    at org.dllearner.algorithms.probabilistic.structure.unife.leap.LEAP.greedySearch(LEAP.java:212)
    at org.dllearner.algorithms.probabilistic.structure.unife.leap.LEAP.start(LEAP.java:103)
    at org.dllearner.algorithms.probabilistic.structure.unife.leap.LEAPTest.testCase2(LEAPTest.java:125)


Results :

Tests in error: 
  LEAPTest.testCase1:93 » ExceptionInInitializer
  LEAPTest.testCase2:125 » NoClassDefFound Could not initialize class unife.bund...

Tests run: 5, Failures: 0, Errors: 2, Skipped: 0

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] DL Learner Parent Pom .............................. SUCCESS [  0.687 s]
[INFO] DL Learner Core Components ......................... SUCCESS [02:34 min]
[INFO] components-ext ..................................... FAILURE [ 57.257 s]
[INFO] dllearner-interfaces ............................... SKIPPED
[INFO] interfaces-ext ..................................... SKIPPED
[INFO] Executable scripts ................................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 03:32 min
[INFO] Finished at: 2016-10-13T21:14:18+02:00
[INFO] Final Memory: 69M/888M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.18.1:test (default-test) on project components-ext: There are test failures.

Is there a missing (external) dependency? bundle-2.2.jar is in my Maven local repository.

SPARQLReasonerTest error

AbstractRequirement ⊓ Requirement ⊓ Resource

1385 [CELOE] - more accurate (15.62%) class expression found after 384ms: Requirement
Exception in thread "main" java.lang.NullPointerException
    at org.dllearner.reasoning.SPARQLReasoner.getDatatype(SPARQLReasoner.java:2391)
    at org.dllearner.refinementoperators.RhoDRDown.computeM(RhoDRDown.java:1260)
    at org.dllearner.refinementoperators.RhoDRDown.computeTopRefinements(RhoDRDown.java:1058)
    at org.dllearner.refinementoperators.RhoDRDown.computeTopRefinements(RhoDRDown.java:1050)

Not being able to assign object of N-triples as a positive example

Hello,

I would like to employ DL-Learner in order to learn class expression of my positive example. To this end, the subset of dbpedia 2016-10 is being used as one may very well see in the below.

screen shot 2018-07-13 at 15 58 22

I would like to know why it is not possible to assign predicate or object of N-triples as positive examples.

ks.fileName = "spring_KnowledgeBase.owl"
reasoner.type = "closed world reasoner"
reasoner.sources = {ks}
lp.type = "posonlylp"
lp.positiveExamples ={ some URIs}
alg.type = "celoe"
alg.maxExecutionTimeInSeconds = 1

Any suggestion appreciated :)

[Bug] NullPointer when running enrichment script [sf#70]

Reported by jenslehmann on 2013-03-07 16:08 UTC
Running the the enrichment script in SVN with the following parameters results in a NullPointer (and also timeouts):

-e http://live.dbpedia.org/sparql -r http://dbpedia.org/ontology/language --maxExecutionTimeInSeconds 30

java.lang.NullPointerException
at org.dllearner.core.owl.ObjectProperty.compareTo(ObjectProperty.java:71)
at org.dllearner.core.owl.ObjectProperty.compareTo(ObjectProperty.java:1)
at java.util.TreeMap.put(TreeMap.java:560)
at java.util.TreeSet.add(TreeSet.java:255)
at org.dllearner.kb.sparql.SPARQLTasks.getAllObjectProperties(SPARQLTasks.java:685)
at org.dllearner.algorithms.properties.DisjointObjectPropertyAxiomLearner.start(DisjointObjectPropertyAxiomLearner.java:102)
at org.dllearner.cli.Enrichment.applyLearningAlgorithm(Enrichment.java:506)
at org.dllearner.cli.Enrichment.runObjectPropertyAlgorithms(Enrichment.java:382)
at org.dllearner.cli.Enrichment.start(Enrichment.java:347)
at org.dllearner.cli.Enrichment.main(Enrichment.java:918)

Update PHP Examples

Some of the PHP examples to show the web service feature need to be refactored.

Location: ./php-examples

The problem is in the Utitlities.php file, which includes some HTTP library that does not exist in the examples folder.

A solution would be to replace it by

a) some more common lib which is accessible via standard PHP package manager
b) add the lib file to the php-examples folder

OWL API 5 Support

We already use Java 8 so we should move to OWL API 5 and benefit from its improvements as well.

This means we also have to update the reasoner dependencies. Currently, there are OWL API 5 compatible implementations for:

  • Pellet
  • HermiT
  • JFact

┆Issue is synchronized with this Trello card by Unito

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.