SmartDataAnalytics / DL-Learner

A tool for supervised Machine Learning in OWL and Description Logics
http://dl-learner.org
GNU General Public License v3.0
152 stars 34 forks source link

Question: command line error #79

Open sunyi000 opened 4 years ago

sunyi000 commented 4 years ago

Hi, I'm new to dllearner and I was trying to use dllearner commandline cli to run my own ontology.

I have got an error below. 'op' is a controlled vocabulary created and available locally.

java.lang.RuntimeException: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'op': Unsatisfied dependency expressed through method 'setReasoner' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'reasoner': Initialization of bean failed; nested exception is java.lang.RuntimeException: java.lang.NullPointerException: entity cannot be null

I tried to debug the ontology, but it looks fine without issue. (Protege say it is coherent and consistent)

I have spent a long time trying to debug but could not find out why.

Any pointers are much appreciated.

Thank you

SimonBin commented 4 years ago

hi @sunyi000 can you tell us more about your command line and config file? what command line did you use? what is the content of the your config file? maybe you have not configured a reasoner?

sunyi000 commented 4 years ago

thank you @SimonBin

It is my very first attempt to use dllearner. I just download it and used the 'cli' utility in dllearner-1.4.0's bin folder.

I used the father_oe_inv.conf as the template and just changing the values for my own ontology.

I noticed the reasoner in that file is {ks} but not sure what does it mean..basically I wanted to use pallet reasoner.

Thanks again for your help. Probably I will need more reading on dllearner :)

SimonBin commented 4 years ago

can you first verify, does the original father_oe_inv.conf work :-)

if it does, you have to understand better the config. we can better help you if you show your config. you can also look at some more conf files and/or refer the configOptions documentation

sunyi000 commented 4 years ago

yes the original father_oe_inv.conf works..

I'm trying different config options and hopefully to find out what was wrong...

my conf file looks like below.. thanks

// declare some prefixes to use as abbreviations
prefixes = [ ("wo","file:///home/ubuntu/water-data/water-training/") ]

// knowledge source definition
ks.type = "OWL File"
ks.fileName = "water.ttl"

// reasoner
reasoner.type = "closed world reasoner"
reasoner.sources = { ks }

// learning problem
lp.type = "clp"
lp.classToDescribe = "wo:IndustryDischarge"
accuracyMethod.type = "fmeasure"

// refinement operator
op.type = "rho"
op.useInverse = true
op.useHasValueConstructor = true

// create learning algorithm to run
alg.type = "celoe"
alg.writeSearchTree = true
alg.replaceSearchTree = true
alg.searchTreeFile = "/tmp/celoe-water.txt"
SimonBin commented 4 years ago

the immediate cause for the error you get, is that the ssn and sosa ontologies define anonymous foaf:Agent instances, and pellet will error out with this error when encountering anonymous (blank node) individuals.