私はC#言語でopennlpツールを使用しています。私は次のコードを書きました:
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);
しかし、次の行でTypeInitializationExceptionが発生しました。
SentenceModel model = new SentenceModel(modelInpStream);
例外メッセージ:
TypeInitializationException was unhandled
The type initializer for 'java.nio.charset.StandardCharsets' threw an exception.