今、私は次のコードを持っています:
SentenceModel sd_model = null;
try {
sd_model = new SentenceModel(new FileInputStream(
"opennlp/models/english/sentdetect/en-sent.bin"));
} catch (InvalidFormatException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
SentenceDetectorME mSD = new SentenceDetectorME(sd_model);
String param = "This is a good senttence.I'm very happy. Who can tell me the truth.And go to school.";
String[] sents = mSD.sentDetect(param);
for(String sent : sents){
System.out.println(sent);
}
しかし、私は次の結果を得ました:
This is a good senttence.I'm very happy.
Who can tell me the truth.And go to school.
絶対に、これは私たちが望んでいるものではありません。どうすれば問題を解決できますか? ありがとう。