Missing files for WordNet

140 views
Skip to first unread message

Axel Schulz

unread,
Jul 17, 2014, 7:48:15 AM7/17/14
to dkpro-simil...@googlegroups.com
Hi,

we try to use the WordNet implementation. However, whenever initializing WordNet, some files are not found such as "adj.dat". The errors we get are attached below.
Please also find attached our configuration for WordNet. The file is referenced in the resources.xml. Furthermore, we use WordNet V3.

Thanks in advance,

Axel

------

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'wordnet-en' defined in URL [file:/D:/DKPro/de.tudarmstadt.ukp.dkpro.lexsemresource.core.ResourceFactory/resources.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [de.tudarmstadt.ukp.dkpro.lexsemresource.wordnet.WordNetResource]: Constructor threw exception; nested exception is de.tudarmstadt.ukp.dkpro.lexsemresource.exception.LexicalSemanticResourceException: net.didion.jwnl.JWNLException: Unable to install net.didion.jwnl.dictionary.FileBackedDictionary

at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:288)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1035)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:939)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)

at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)

at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)

at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1109)

at de.tudarmstadt.ukp.dkpro.lexsemresource.core.ResourceFactory.get(ResourceFactory.java:126)

at de.tudarmstadt.tk.mugc.prototype.features.similarity.lsr.wordnet.SimilarityMetricResnik.initialize(SimilarityMetricResnik.java:72)

at de.tudarmstadt.tk.mugc.prototype.features.similarity.lsr.wordnet.SimilarityMetricResnik.getSimilarity(SimilarityMetricResnik.java:46)

at de.tudarmstadt.tk.mugc.prototype.features.similarity.IdfSimilarityDFE.extract(IdfSimilarityDFE.java:94)

at de.tudarmstadt.ukp.dkpro.tc.core.util.TaskUtils.getSingleInstance(TaskUtils.java:327)

at de.tudarmstadt.ukp.dkpro.tc.core.task.uima.ExtractFeaturesConnector.process(ExtractFeaturesConnector.java:114)

at org.apache.uima.analysis_component.JCasAnnotator_ImplBase.process(JCasAnnotator_ImplBase.java:48)

at org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.callAnalysisComponentProcess(PrimitiveAnalysisEngine_impl.java:378)

at org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.processAndOutputNewCASes(PrimitiveAnalysisEngine_impl.java:298)

at org.apache.uima.analysis_engine.impl.AnalysisEngineImplBase.process(AnalysisEngineImplBase.java:267)

at de.tudarmstadt.ukp.dkpro.lab.uima.engine.simple.SimpleExecutionEngine.run(SimpleExecutionEngine.java:141)

at de.tudarmstadt.ukp.dkpro.lab.task.impl.BatchTask.runNewExecution(BatchTask.java:350)

at de.tudarmstadt.ukp.dkpro.lab.task.impl.BatchTask.executeConfiguration(BatchTask.java:255)

at de.tudarmstadt.ukp.dkpro.lab.task.impl.BatchTask.execute(BatchTask.java:185)

at de.tudarmstadt.ukp.dkpro.tc.weka.task.BatchTaskTrainTest.execute(BatchTaskTrainTest.java:86)

at de.tudarmstadt.ukp.dkpro.lab.engine.impl.ExecutableTaskEngine.run(ExecutableTaskEngine.java:55)

at de.tudarmstadt.tk.mugc.prototype.pipeline.manualCV.FoldWorker.compute(FoldWorker.java:55)

at de.tudarmstadt.tk.mugc.prototype.pipeline.manualCV.FoldWorker.compute(FoldWorker.java:1)

at java.util.concurrent.RecursiveTask.exec(Unknown Source)

at java.util.concurrent.ForkJoinTask.doExec(Unknown Source)

at java.util.concurrent.ForkJoinWorkerThread.execTask(Unknown Source)

at java.util.concurrent.ForkJoinPool.scan(Unknown Source)

at java.util.concurrent.ForkJoinPool.work(Unknown Source)

at java.util.concurrent.ForkJoinWorkerThread.run(Unknown Source)

Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [de.tudarmstadt.ukp.dkpro.lexsemresource.wordnet.WordNetResource]: Constructor threw exception; nested exception is de.tudarmstadt.ukp.dkpro.lexsemresource.exception.LexicalSemanticResourceException: net.didion.jwnl.JWNLException: Unable to install net.didion.jwnl.dictionary.FileBackedDictionary

at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:162)

at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:110)

at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:280)

... 33 more

Caused by: de.tudarmstadt.ukp.dkpro.lexsemresource.exception.LexicalSemanticResourceException: net.didion.jwnl.JWNLException: Unable to install net.didion.jwnl.dictionary.FileBackedDictionary

at de.tudarmstadt.ukp.dkpro.lexsemresource.wordnet.WordNetResource.<init>(WordNetResource.java:90)

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)

at java.lang.reflect.Constructor.newInstance(Unknown Source)

at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:147)

... 35 more

Caused by: net.didion.jwnl.JWNLException: Unable to install net.didion.jwnl.dictionary.FileBackedDictionary

at net.didion.jwnl.util.factory.Element.install(Element.java:34)

at net.didion.jwnl.JWNL.initialize(JWNL.java:157)

at de.tudarmstadt.ukp.dkpro.lexsemresource.wordnet.WordNetResource.<init>(WordNetResource.java:81)

... 40 more

Caused by: net.didion.jwnl.JWNLException: The properties file must specify a dictionary path

at net.didion.jwnl.util.factory.AbstractValueParam.create(AbstractValueParam.java:34)

at net.didion.jwnl.dictionary.FileBackedDictionary.install(FileBackedDictionary.java:100)

at net.didion.jwnl.util.factory.Element.install(Element.java:32)

... 42 more

Caused by: net.didion.jwnl.JWNLException: Could not create a file manager

at de.tudarmstadt.ukp.dkpro.lexsemresource.wordnet.util.UkpFileManagerImpl.create(UkpFileManagerImpl.java:148)

at net.didion.jwnl.util.factory.AbstractValueParam.create(AbstractValueParam.java:32)

... 44 more

Caused by: java.io.FileNotFoundException: D:\DKPro\LexSemResources\WordNet_3x\dict\adj.dat (Das System kann die angegebene Datei nicht finden)

at java.io.RandomAccessFile.open(Native Method)

at java.io.RandomAccessFile.<init>(Unknown Source)

at net.didion.jwnl.princeton.file.PrincetonRandomAccessDictionaryFile.openFile(PrincetonRandomAccessDictionaryFile.java:76)

at de.tudarmstadt.ukp.dkpro.lexsemresource.wordnet.util.UkpRandomAccessDictionaryFile.open(UkpRandomAccessDictionaryFile.java:118)

at net.didion.jwnl.dictionary.file.DictionaryCatalog.open(DictionaryCatalog.java:46)

at net.didion.jwnl.dictionary.file.DictionaryCatalogSet.open(DictionaryCatalogSet.java:34)

at de.tudarmstadt.ukp.dkpro.lexsemresource.wordnet.util.UkpFileManagerImpl.<init>(UkpFileManagerImpl.java:107)

at de.tudarmstadt.ukp.dkpro.lexsemresource.wordnet.util.UkpFileManagerImpl.create(UkpFileManagerImpl.java:146)

... 45 more
wordnet_properties.xml

Torsten Zesch

unread,
Jul 17, 2014, 8:17:20 AM7/17/14
to dkpro-simil...@googlegroups.com
Hi Axel,

this is caused by the underlying LSR WordNet wrapper.
This wrapper has been causing problems for a while, but I don't have an easy solution.
Do you have another version of the JWNL library on the class path?
What Wordnet version are you using?

There is a plan to replace it with a more robust wrapper from DKPro Toolbox, but I am not sure when we will be able to implement that.

-Torsten
Message has been deleted

Raihan Ul Islam

unread,
Jul 18, 2014, 4:27:55 AM7/18/14
to dkpro-simil...@googlegroups.com
Hi 

Currently we have only on maven dependency of jwnl as you can see in the attachment.
Still we are getting the previous error. Any suggestion will be very helpfull

Thanks
Raihan
jwnl.jpg

Torsten Zesch

unread,
Jul 18, 2014, 4:36:48 AM7/18/14
to Raihan Ul Islam, DKPro Similarity Users
DKPro LSR Wordnet resource includes
<dependency>
<groupId>net.didion.jwnl</groupId>
<artifactId>jwnl</artifactId>
<version>1.4.0.rc2</version>
</dependency>

The problems are likely to be caused by the two different versions of
JWNL being on the class path.

-Torsten
> --
> You received this message because you are subscribed to the Google Groups
> "DKPro Similarity Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to dkpro-similarity-...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Raihan Ul Islam

unread,
Jul 18, 2014, 4:54:21 AM7/18/14
to dkpro-simil...@googlegroups.com
Hi Torsten,

Thanks for your valuable suggestion. I excluded the old version of jwnl from maven dependency. Now the problem is solved.

Best Regards
Raihan
Reply all
Reply to author
Forward
0 new messages