Using other languages' models with this port
njfm0001 opened this issue · 1 comments
njfm0001 commented
I would like to know how to use bin files from the OpenNLP official site to make it work with this port.
AlexPoint commented
To use the bin files for other languages, you should use the generic classes (or create specific classes for a given language) and pass the appropriate bin files to the constructor.
For instance, for sentence detection:
var modelPath = "path/to/de-sent.bin";
var sentenceDetector = new MaximumEntropySentenceDetector(new SharpEntropy.GisModel(new SharpEntropy.IO.BinaryGisModelReader(modelPath)));
var sentences = sentenceDetector.SentenceDetect(paragraph);