Problems installing out-of-the-box FL 4.0 version on Windows

Submitted by carlesg on Thu, 07/21/2016 - 14:37

We were working with Freeling 3.1, but we think 4.0 can offer more power to our analysis. So I tried to install the out-of-the-box version of Freeling 4.0, to use it from Java running on Windows.

I download and unzip the file. I have tried to use the analyzer demo bat, but it complies about "The procedure entry point gzdirect could not be located in the dynamic link library zlib.dll". I don't see the zlib.dll library in the FL lib directory neither bin directory (but it was a similar dll on 3.1\bin directory). But it is on freeling-4.0-win32\dependencies\zlib\lib\x86\zlib.dll .
Is an installation problem, or is something with the software I use in my computer?

I would like to use freeling from a java program.
I also don't find the freeling_javaAPI.dll in the FL lib directory neither bin directory (but it was on 3.1\bin directory).
I can't neither find the freeling.jar.
Where are they?

The analyzer.bat script takes care of properly defining paths so the zlib.dll in "dependencies" folder is used.
The error about "entry point gzdirect" suggests some version mismatch... It may be you have some other version of zlib installed somewhere and the loader is locating it instead of the one in "dependencies"

Regarding the Java API, it is not provided with the binary package. You need to generate it using SWIG as described in APIs/Java/README in the soruce package.

I have tried to generate the JNI DLL to acces Freeling API on MSVC.
SWIG generation is OK. The compiling of cpp is fine, but the linker complains about some unresolved external symbols.
It seems that the only functions with error has something to do with the semgraph object (or semgraph_extract object).
I am linking the java API with the lib file that is in (\lib\libfreeling.lib.

May be there is some difference between the original java include (which was used to generate the cpp file with SWIG) and the final lib ?
May be there is some different version of these files?

Linker error messages:

fatal error LNK1120: 48 unresolved externals
freeling_javaAPI.obj : error LNK2001: unresolved external symbol "public: void __thiscall freeling::semgraph_extract::extract(class freeling::document &)const " (?extract@semgraph_extract@freeling@@QBEXAAVdocument@2@@Z)
freeling_javaAPI.obj : error LNK2001: unresolved external symbol "public: class std::basic_string,class std::allocator > __thiscall freeling::semgraph::SG_frame::get_id(void)const " (?get_id@SG_frame@semgraph@freeling@@QBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@XZ)
freeling_javaAPI.obj : error LNK2001: unresolved external symbol "public: __thiscall freeling::semgraph::SG_frame::~SG_frame(void)" (??1SG_frame@semgraph@freeling@@QAE@XZ)

It seems the semgraph classes were missing exportation for windows libraries.

There are two ways to solve this:

  1. If you don't need semgraph class, just remove all semgraph classes you'll find inside "namespace semgraph" in APIs/common/freeling.i, and rebuild the API.
  2. If you want to use those classes, get the fixed version of src/include/freeling/morfo/semgraph.h and src/include/freeling/morfo/semgraph_extract.h and rebuild freeling library.


Tue, 07/26/2016 - 14:44

In reply to by lluisp

We need SemGraph classes, so we have tried to regenerate everything.

When we are done, Analyzer.exe stops wroking, with this error (before compiling, it works):

analyzer.exe -f ..\data\config\es.cfg
CONFIG_FILE: Opening of unknown section in file C:\projectes\NLPSearch\freeling-4.0-win32\data/es/probabilitats.dat

May be that the source files from are incompatible with the config files in (I use these ones to config) ? Which is best, the files from or from ?