Back to LanguageTool Homepage - Privacy - Imprint

C# Support


(MorphingDragon) #1

I'm trying to bring LanguageTool into C# but I'm having issues getting IKVM to pick up all the class files.

Has anyone else done this successfully? Or is there a standalone JAR floating around somewhere?


(Daniel Naber) #2

I guess you found this page already? http://wiki.languagetool.org/ikvm -
does that help?


(MorphingDragon) #3

When I try to run it through Mono as those instructions say, Mono crashes.

C:\Users\Robbie Litchfield\Documents\COMP539\LanguageTool-2.2>mono "C:\Users\Rob
bie Litchfield\Documents\COMP539\ikvm-7.2.4630.5\bin\ikvm.exe" -target:library -
r:"C:\Users\Robbie Litchfield\Documents\COMP539\ikvm-7.2.4630.5\bin\IKVM.OpenJDK
.Core.dll" libs/###morfologik.lib###
Thread 00001F28 is not attached to the JIT.
* Assertion at debugger-agent.c:4626, condition `tls' not met

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.


(Daniel Naber) #4

The command may be a bit misleading, I think you will need to replace
"###morfologik.lib###" with the name of that lib. Actually, LanguageTool
makes use of more libraries now, so there are actually more commands you
will need to execute (one for each JAR file)? But I'm just guessing.


(MorphingDragon) #5

Are those jars in lib all I need to run LanguageTool? Do they contain all the dictionaries?


(Daniel Naber) #6

You actually also need the files in the "org" directory. It contains the
grammar rules and dictionaries.


(MorphingDragon) #7

I've made a little progress. I've gotten it to make a dll by running this command in the root of the extracted folder. However it still can't find most of the classes it wants.

C:\Users\Robbie Litchfield\Documents\COMP539\Assignment 4\LanguageTool-2.2> ikvmc -target:library -r:IKVM.OpenJDK.Core.dll -r:IKVM.OpenJDK.Util.dll -r:IKVM.OpenJDK.Text.dll -recurse:libs*.jar -out:languagetool-2.2.dll

The output is here:
http://pastebin.com/cv25gTKX


(Daniel Naber) #8

Maybe deleting languagetool-gui-commons.jar from libs/ might help, as it
contains GUI-related classes you probably don't need I guess. Also, you
need everything in the "org" directory.


(MorphingDragon) #9

A dll is being created now that I can link with a project. However it throws an exception whenever any LT class is created.

I may just go to another toolkit.