Error using Freeling API


I am trying to create a spanish PoS tagger using Freeling for Gate. But when I try to run it in Gate I receive this error.

java.lang.UnsatisfiedLinkError: edu.upc.freeling.freelingJNI.new_HmmTagger__SWIG_1(Ljava/lang/String;ZJ)J
at edu.upc.freeling.freelingJNI.new_HmmTagger__SWIG_1(Native Method)
at edu.upc.freeling.HmmTagger.(
at gate.FreelingSpanishPOS.init(
at gate.Factory.createResource(
at gate.gui.NewResourceDialog$

I know that is an error inside Gate, But i think this is very related with freeling and his API.

Thanks in advance

We don't provide Gate integration, so I can't tell where the error may be.

You should diagnose where the problem comes from:
- Make sure the JAva API is properly built. Did you build it yourself or you got it built?
- Make sure the Java API works properly outside gate (use example in the APIs folder)
- If all that works, the problem is in Gate integration. My first guess would be that FreeLing API jar is missing from the classpath, but it could be a number of other things.

javilm's picture

Hello, thanks in advantage for your support.
I built the API by myself, even after this error ,I built it again, but the same error was shown. I will try your other recommendations to clearify if the error is caused by Gate or by Freeling.

Thank you!

Once the API is built, can you compile and run the program that is in APIs/java folder?

javilm's picture

Hello lluisp.

Yes, I run the program in eclipse and also with the console and it runs without problems.

So, the problem is GATE integration.
When you integrate FreeLing in GATE, I guess you wrote a wrapper. Make sure the wrapper works outside of GATE.
If it does, make sure you configure your GATE environment to have the right CLASSPATHS and PATHS to locate the API jar and library.