I'm using opennlp tool in C# language. I wrote the following code:
string modelpath = @"D:\models\en-sent.bin";
java.io.FileInputStream modelInpStream = new java.io.FileInputStream(modelpath);
SentenceModel model = new SentenceModel(modelInpStream);
SentenceDetectorME sentenceDetector = new SentenceDetectorME(model);
but it caused a TypeInitializationException in the line:
SentenceModel model = new SentenceModel(modelInpStream);
the Exception message:
TypeInitializationException was unhandled
The type initializer for 'java.nio.charset.StandardCharsets' threw an exception.
Assuming you used the IKVM code to convert the openNLP jar files to .Net, you should just need to include the IKVM Charsets dll as well in your project for this to work.