Skip to content
This repository has been archived by the owner on Jan 18, 2024. It is now read-only.

Errors when running OpenEphrya inside Eclipse #4

Open
roschler opened this issue Jun 27, 2015 · 3 comments
Open

Errors when running OpenEphrya inside Eclipse #4

roschler opened this issue Jun 27, 2015 · 3 comments

Comments

@roschler
Copy link

I am able to run OpenEphyra on my Linux box. As expected, the Bing searches are failing because I need to provide a BING_AZURE_ID in BingAzureKM.java.

However, I am getting the following error messages when I try to run/debug OpenEphyra as a full Java application:

Creating tokenizer...
Creating stemmer...
Could not create tokenizer.
Creating POS tagger...
Could not create OpenNLP POS tagger.
Creating chunker...
Could not create chunker.
Creating NE taggers...
...loading lists

Ending with a NullPointerException:

Exception in thread "main" java.lang.NullPointerException
at java.util.ComparableTimSort.sort(ComparableTimSort.java:146)
at java.util.Arrays.sort(Arrays.java:472)
at info.ephyra.nlp.NETagger.loadListTaggers(NETagger.java:130)
at info.ephyra.answerselection.filters.WebTermImportanceFilter.main(WebTermImportanceFilter.java:821)

Any ideas on what I need to change to get this going? I feel like I'm pretty close since the app can do all the things above properly when I run the pre-compiled version using OpenEphyra.sh. The above only happens when I run/debug from within Eclipse.

@roschler
Copy link
Author

Making progress. It's taken me a while to get back into using Eclipse. It turns out the current working directory was pointing at the location of my Project workspace instead of the main OpenEphrya directory (which is OpenEphyra). Since the NLP data files are using relative paths they wouldn't load of course until this was fixed.

Now I'm having an ArrayIndexOutOfBounds Exception fire off on this line:

TRECTarget[] targets = TREC13To16Parser.loadTargets(args[0]);

I'm assuming this is because args[0] is empty and loadTargets() is expecting a file name. However, I checked the contents of OpenEphyra.sh and I don't see it using any command line arguments when it launches the app with this java command line:

java -Xms512m -Xmx1024m info.ephyra.OpenEphyra

What file name should I supply as a target to the loadTargets() method in WebTermImportanceFilter.java?

@roschler
Copy link
Author

Looks like I had one last hurdle to overcome. There are two classes with main() methods in them (two runnable "main" targets): OpenEphyra and WebTermImportanceFilter. When you open the OpenEphyra project in Eclipse, default target is WebTermImportanceFilter and not OpenEphyra. I went into Run -> Run Configurations and changed the run target to OpenEphyra and everything began to work. (Note to others trying to get OpenEphyra running. Remember to put your Bing Search API key into the source code. You can get one from the Azure Data Market. Look for the string BING_AZURE_ID in the source code).

I hope my play-by-play in getting OpenEphyra running helps someone else.

If anyone knows the best paper on OpenEphyra that can help me tune my results in speed and accuracy, please leave the URL here. Right now a query takes about 15 seconds to complete. Obviously on a busy server with thousands of users that's going to problem. Even for a single user I believe most users would expect an answer faster than that.

Also, I asked a relatively simple question "What is a dog?". And the answer selected only had a score of 0.114106245 and went to a web page about dog breeds. I would think with such a straightforward question a better answer would be available?

@TScottJ
Copy link
Owner

TScottJ commented Sep 16, 2015

Hi @roschler - sorry for chiming in late, I've not worked on this project for over a year. I do recall running into similar problems with Eclipse as you've experienced...when I get a chance, I'll dig out my build VM and see if I can jog my memory on what the secret sauce was for getting it to work.

Cheers!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants