bioinformatics-ua / gimli

Gimli is now part of Neji.
https://github.com/BMDSoftware/neji
14 stars 6 forks source link

invoking .launch() on a parser instance throws #1

Closed jimpil closed 11 years ago

jimpil commented 11 years ago

I'm sorry to be the first to report a problem but it seems that whenever I call parser.launch() the following exception (+stack trace) is thrown:

IOException error=2, No such file or directory java.lang.UNIXProcess.forkAndExec (UNIXProcess.java:-2) java.lang.UNIXProcess. (UNIXProcess.java:135) java.lang.ProcessImpl.start (ProcessImpl.java:130) java.lang.ProcessBuilder.start (ProcessBuilder.java:1021) pt.ua.tm.gimli.external.wrapper.ProcessConnector.create (ProcessConnector.java:64) pt.ua.tm.gimli.external.wrapper.Parser.launch (Parser.java:68)

I am on latest Java from Oracle: java version "1.7.0_15" Java(TM) SE Runtime Environment (build 1.7.0_15-b03) Java HotSpot(TM) 64-Bit Server VM (build 23.7-b01, mixed mode)

any ideas on your end? just started playing around with gimli and it loks great...thanks for your work on this... :)

davidcampos commented 11 years ago

Hi Dimitrios, No problem at all, the issues section is exactly for that! :)

That error indicates that Gimli is not able to find GDep.

Please check if you have GDep on gimli/resources/tools/gdep. If you have not downloaded the complete tool, you can download the tools (http://bioinformatics.ua.pt/support/gimli/doc/index.html#download) and extract the file in the "gimli/resources/" folder.

Please tell me if you solved the problem, and if you have any further issues. Best regards, David Campos

jimpil commented 11 years ago

Hi David,

this is not the problem...I am using maven to pull in gimli1.0.1.jar which includes the GDep parser...I can confirm this because I can indeed call the constructor and get back an instance of type: "GDepParser pt.ua.tm.gimli.external.gdep.GDepParser@70888f88"

in any case, I can see someone else is having the same issue so it's probably worth investigating further...

cheers,

ps:sorry for how the package name looks, markdown drives me crazy at times!

davidcampos commented 11 years ago

Hi Dimitrios, Are you using Windows? Unfortunately the integration of Gimli with GDep does not support Windows yet, since we need to use a BAT file. Such integration is scheduled for the next minor release. I will give you feedback when such integration is implemented.

Best regards, David Campos

jimpil commented 11 years ago

I've not used Windows in almost 8 years! I am on Ubuntu 12.10 java7 u15 & clojure 1.5...not that you would care about clojure - I'm just letting you know that I'm calling your code from Clojure instead of Java, albeit that shouldn't make any difference...

In a previous post you suggested to extract tools under gimli/resources/. What folder is this? I was quite happy to discover that gimli does not use java.util.Properties to specify directories for the models and such. Whatever model I need to create during runtime I only need to know where it is and nothing more. no properties non-sense (like GATE for example). So, what folder is your suggestion referring to?

thanks a lot for taking the time :)

ps: Doesn't the jar deployed on maven contain GDep parser? How am I able to get an instance of it?

davidcampos commented 11 years ago

Hi Dimitrios, The GDep wrapper classes are already integrated in the distributed jar. However, the tool have to be downloaded from http://bioinformatics.ua.pt/support/gimli/doc/index.html#download, on sub-section "4. Resources", you can download the tools. You have extract that compressed file in a "resources" folder in the root of your project. By default, Gimli assumes that GDep is available in a folder like "<_your project_>/resources/tools/gdep". This can be configured, however it is not yet available on this version of Gimli. If you want to see how things should be organized, you can download the executable version of Gimli http://bioinformatics.ua.pt/support/gimli/gimli-1.0.1.zip.

Please tell me if you solved your problem. Best regards, David Campos

jimpil commented 11 years ago

aaa ok! that did the trick...I should have figured out that that's what you meant "resources"... anyway, yes this solves the problem and GDep launches just fine... :)

I was trying to work through this example : http://bioinformatics.ua.pt/support/gimli/doc/index.html (ctrl+f and type "With version 1.0.1, on-demand annotation of raw sentences is much simpler:"). THis is the example I was working on and as you can see there all the other models are loaded manually. This is what kept me from figuring out what was happening and the stack trace was not helpful at all!

thanks again, and I'll let you know if I run into anything else... :)

cheers,

davidcampos commented 11 years ago

Cool! :) Nice to see the problem solved. Probably I should put that clear in the documentation page. Thanks for your help! Please tell me if you need any further help. Cheers.

jimpil commented 11 years ago

Are you using getResource() or just a File() passing a hardcoded string? I'm not able to find the relevant bit in your code - any chance you remember? If you did it the proper way (getResource()) users should be able to bypass putting the models under their source project by specifying a couple of more resource-paths when the JVM starts.

unfortunately, I just moved the models out and tried to do just that and failed again, which makes me suspicious that you've hardcoded the path... any chance you could check?

jimpil commented 11 years ago

I'm sorry to bombard you with questions but I just noticed there is a 676MB file under tools called 'genia.mod'...is this needed for the parser? If it's not I may be able to afford leaving the models under my project but if it is indeed needed there is no way I can have a 700MB project folder! I need to find another way...

davidcampos commented 11 years ago

The "genia.mod" file is required to run GDep. If your are worried about your SCM, you can ignore the resources folder. Unfortunately, GDep models can't be moved, since GDep (http://people.ict.usc.edu/~sagae/parser/gdep/) was not implemented by me and I made just simple changes and wrapped its usage. GDep path is configured on pt.ua.tm.gimli.config.Constants. You can add a new constructor to accept the GDep absolute path. Cheers,