dkpro / dkpro-similarity

Word and text similarity measures
https://dkpro.github.io/dkpro-similarity
Other
53 stars 22 forks source link

ResourceFactory returns a null instance #9

Closed nicolaierbs closed 9 years ago

nicolaierbs commented 9 years ago

Original issue 9 created by dkpro on 2013-03-29T06:52:10.000Z:

I am trying to use similarity measures based on WordNet and Wiktionary. I have followed the instructions under "Lexical Semantic Resources for Word Aggregation Measures" on the page https://code.google.com/p/dkpro-similarity-asl/wiki/SettingUpTheResources. I have verified that the $DKPRO_HOME is set correctly and three files are downloaded and stored as explained in the page.

In my sample java program, (file attached) I imported import de.tudarmstadt.ukp.dkpro.lexsemresource.core.ResourceFactory;

and instantiated ResourceFactory with both constructers ResourceFactory rf = ResourceFactory.getInstance(); ResourceFactory rf = new ResourceFactory("/home/priya/dkpro/de.tudarmstadt.ukp.dkpro.lexsemresource.core.ResourceFactory/resources.xml");

Both the methods dont throw any error during instantiation. But when we access the methods, we the error org.springframework.beans.factory.BeanDefinitionStoreException

However we are able to access the variables ENV_DKPRO_HOME and CONFIG_FILE of the ResourceFactory class.

What steps will reproduce the problem? 1.Inside main() instantiate ResourceFactory

  1. returned instance throws org.springframework.beans.factory.BeanDefinitionStoreException on calling methods get("wiktionary", "en") and getAll();
  2. No error on accessing the variables ENV_DKPRO_HOME and CONFIG_FILE

What is the expected output? What do you see instead? The expected output is valid instance which is bound to the specified resource.

What version of the product are you using? On what operating system? dkpro = Downloaded on March 20,2013. So version as of March 20,2013. Configured Maven for full access to the UKP Maven Repository OS = Ubuntu 12.04 LTS

Please provide any additional information below. Please find attached the java source. Pasting the ouptput here ------------------------------<output>------------------------------------ log4j:WARN No appenders could be found for logger (org.springframework.core.env.StandardEnvironment). log4j:WARN Please initialize the log4j system properly. log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info. Exception -- org.springframework.beans.factory.BeanDefinitionStoreException ------------------------------------------------</output>----------------- Is there anything missing in my setup? I had initially reported the issue in https://code.google.com/p/dkpro-core-asl/issues/detail?id=125 and was redirected to this forum.

nicolaierbs commented 9 years ago

Comment #1 originally posted by dkpro on 2013-09-17T09:43:40.000Z:

Closing the issue. Please re-open if the problem appears again.