Freeling with C# Projects

Submitted by mauroscout on Fri, 05/17/2019 - 18:47
Forums

I am using the freeling command "analize.bat" inside in my project en C# de Microsoft Visual Studio 2015 under Windows 10 on 64 bits plataform, when running the sentence analyze.bat -f en.cfg --lang en locale en_US.utf8 --inplv text --outlv dep --mode doc --output xml --loc --numb --date --quant < FT923-5089.txt > FT923-5089.xml Windows show me this error:

(X) Debug Assertion Failed!

Program C:\Windows\system32\MSVCP1400.dll File C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\list
Line:210

Expression: list iterator not dereferencable

For information on how you program can cause an assertion failure, see the Visual C++ documentation on assert.

(Press Retry to debug the application)

Cancel Retry Ignore

Thanks.

Thanks for the information.  However, without more information, it is not much useful:

What was the input text?  Did analyzer crash after processing some sentences, or while loading the modules?

Also, your command line options seem wrong:  "locale" should be "--locale"

The values you are providing for "--locale" "--inplv" are the default, so you don't need to write them.  The same with "--loc", "--numb", "--date" and "--qant":  They are on by default, you don't need to set them.
Regarding "--mode doc", it only makes sense if you are using WSD or coreferences, which you are not, so it will only make freeling try to load all you input file, which may cause some problems if it is a large file.

Please start with a default command, e.g. "analyze -f en.cfg <FT923-5089.txt > FT923-5089.out"
If that works, add "--output xml". 
If that works, add "--outlv dep"
etc

In this way, you can spot where the problem is.

 

Moreover, if you are running "analyzer.bat" from your C# code, be aware that it will load all freeling modules every time, introducing a huge overhead.

For this kind of use, it would be wiser to use analyzer "server" mode. See the user manual about how to do so.