opennlp with netbeans is not giving output
How to use opennlp with netbeans. I made a small program as given in
apache document but it is not working. I have set path to the opennlp bin
as stated in the apache document but still i m not geting an output. it is
not able to find .bin and hence SentenceModel model. package sp;
public class Sp {
public static void main(String[] args) throws
FileNotFoundException {
InputStream modelIn ;
modelIn = new
FileInputStream("en-token.bin");
try {
SentenceModel model = new
SentenceModel(modelIn);
}
finally {
if (modelIn != null) {
try {
modelIn.close();
}
catch (IOException e) {
}
}
}
}
}
No comments:
Post a Comment