public string[] SplitSentences(string paragraph) { if (mSentenceDetector == null) { mSentenceDetector = new OpenNLP.Tools.SentenceDetect.EnglishMaximumEntropySentenceDetector(mModelPath + "EnglishSD.nbin"); } return(mSentenceDetector.SentenceDetect(paragraph)); }
public string[] SplitSentences(string paragraph) { if (mSentenceDetector == null) { mSentenceDetector = new EnglishMaximumEntropySentenceDetector(mModelPath + "EnglishSD.nbin"); } return mSentenceDetector.SentenceDetect(paragraph); }
public bool LoadModel(string model) { try { _openNLPSentenceDetector = new OpenNLP.Tools.SentenceDetect.EnglishMaximumEntropySentenceDetector(model); _isMaxentModelLoaded = true; return true; } catch (Exception e) { System.Console.WriteLine("Unable to Load the Maxent model" + e.ToString()); _isMaxentModelLoaded = false; return false; } }