HeidelTime / heideltime

A multilingual, cross-domain temporal tagger developed at the Database Systems Research Group at Heidelberg University.
GNU General Public License v3.0
342 stars 67 forks source link

GATE #58

Closed mnavasloro closed 7 years ago

mnavasloro commented 7 years ago

Hi,

I'm trying to use HeidelTime in GATE, but I get this error: "HeidelTimeWrapper could not be initialized. Something wrong with the setup?"

I've tried changing the three parameters (file, language, type of document) but I keep getting the same message... should I do any previous step for initializing HeidelTime? Where are the instructions if this was the case? I find nothing in GATEs documentation and I have no problem with other plugins.

Thank you very much and best regards,

María

JannikStroetgen commented 7 years ago

Dear Maria,

The GATE-Time plugin is more or less hosted and managed by the GATE people. Some time ago I wrote a readme on how to use HeidelTime within GATE. I hope that this readme is helpful for you, but I am pretty sure that this is not the final readme for the final GATE-Time plugin.

Anyway, I attached this readme - and let's ask some "GATE people", e.g., @greenwoodma and @leondz, so that they can point you to the required information in case the readme does not help.

Please keep me posted.

Thanks, Jannik

readme-heideltime-gate-wrapper-2016-03-21.pdf

greenwoodma commented 7 years ago

@mnavasloro Could you possibly provide the full stacktrace that is displayed when it fails as that might help me pin down where the problem is happening

mnavasloro commented 7 years ago

Hi,

Thank you for your responses.

The stack when trying to create a new Processing Resource is the following:

GATE 8.4.1 build 5753 started at Thu Aug 24 10:07:08 CEST 2017
and using Java 1.8.0_131 Oracle Corporation on Windows 7 amd64 6.1.
ago 24, 2017 10:07:48 AM de.unihd.dbs.heideltime.standalone.HeidelTimeStandalone initialize
INFORMACI�N: HeidelTimeStandalone initialized with language english
ago 24, 2017 10:07:48 AM de.unihd.dbs.heideltime.standalone.HeidelTimeStandalone readConfigFile
INFORMACI�N: trying to read in file C:\Program Files\GATE_Developer_8.4.1\plugins\Tagger_GATE-Time\config.props
java.lang.NullPointerException
    at de.unihd.dbs.uima.annotator.heideltime.resources.NormalizationManager.readNormalizationResources(NormalizationManager.java:98)
    at de.unihd.dbs.uima.annotator.heideltime.resources.NormalizationManager.<init>(NormalizationManager.java:67)
    at de.unihd.dbs.uima.annotator.heideltime.resources.NormalizationManager.getInstance(NormalizationManager.java:76)
    at de.unihd.dbs.uima.annotator.heideltime.HeidelTime.initialize(HeidelTime.java:153)
    at de.unihd.dbs.heideltime.standalone.HeidelTimeStandalone.initialize(HeidelTimeStandalone.java:236)
    at de.unihd.dbs.heideltime.standalone.HeidelTimeStandalone.initialize(HeidelTimeStandalone.java:204)
    at de.unihd.dbs.heideltime.standalone.HeidelTimeStandalone.initialize(HeidelTimeStandalone.java:191)
    at de.unihd.dbs.heideltime.standalone.HeidelTimeStandalone.<init>(HeidelTimeStandalone.java:144)
    at de.mpii.nlp.gate.heideltime.HeideltimeWrapper.init(HeideltimeWrapper.java:185)
    at gate.Factory.createResource(Factory.java:432)
    at gate.gui.NewResourceDialog$4.run(NewResourceDialog.java:270)
    at java.lang.Thread.run(Unknown Source)
Aug 24, 2017 10:07:50 AM de.unihd.dbs.heideltime.standalone.HeidelTimeStandalone initialize
WARNING: HeidelTime could not be initialized
Aug 24, 2017 10:07:50 AM de.unihd.dbs.heideltime.standalone.HeidelTimeStandalone initialize
INFO: JCas factory initialized
java.lang.NullPointerException
    at de.unihd.dbs.uima.annotator.heideltime.resources.NormalizationManager.readNormalizationResources(NormalizationManager.java:98)
    at de.unihd.dbs.uima.annotator.heideltime.resources.NormalizationManager.<init>(NormalizationManager.java:67)
    at de.unihd.dbs.uima.annotator.heideltime.resources.NormalizationManager.getInstance(NormalizationManager.java:76)
    at de.unihd.dbs.uima.annotator.heideltime.HeidelTime.initialize(HeidelTime.java:153)
    at de.mpii.nlp.gate.heideltime.HeideltimeWrapper.init(HeideltimeWrapper.java:190)
    at gate.Factory.createResource(Factory.java:432)
    at gate.gui.NewResourceDialog$4.run(NewResourceDialog.java:270)
    at java.lang.Thread.run(Unknown Source)
Aug 24, 2017 10:07:50 AM de.mpii.nlp.gate.heideltime.HeideltimeWrapper init
WARNING: HeidelTime could not be initialized
com.thoughtworks.xstream.InitializationException: HeidelTimeWrapper could not be initialized. Something wrong with the setup?
    at de.mpii.nlp.gate.heideltime.HeideltimeWrapper.init(HeideltimeWrapper.java:195)
    at gate.Factory.createResource(Factory.java:432)
    at gate.gui.NewResourceDialog$4.run(NewResourceDialog.java:270)
    at java.lang.Thread.run(Unknown Source)

I've additionally tested HeidelTime standalone and it works properly via shell, so both previously needed installations and the config.props file look correct.

Best,

María

greenwoodma commented 7 years ago

@mnavasloro from a brief bit of testing it looks as if the problem arises because the path to the config.props file has a space in it (I can reproduce the error on my machine even under Ubuntu if I put the plugin folder into a directory structure where one folder name contains a space). As yet I'm not quite sure why or how that happens, but I know there are a few places where both GATE and HeidelTime convert from URLs to File objects and back again so in one of those places there is probably something fishy going on. I'll look into fixing this, but in the mean time just move either GATE or the plugin into a folder path without spaces in it and everything should work...... fingers crossed.

mnavasloro commented 7 years ago

Perfect, that was the problem indeed!

I had tried just moving the config.props file (I'd already faced the space-in-the-path problem), but it didn't work, either moving the plugin folder: I had to reinstall GATE in another place, but it works now, thank you very much!

María

JannikStroetgen commented 7 years ago

Thank you, @greenwoodma !