1
私はC#言語でopennlpツールを使用しています。 私は、次のコードを書いた:TypeInitializationExceptionが処理されていません
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.
Umm、これはJavaではないC#ですか?実際にSharpNLPを使用している場合を除きますか? – Yuck