/// <summary> /// Gets the context generator. /// </summary> /// <returns>ISentenceContextGenerator.</returns> public virtual ISentenceContextGenerator GetContextGenerator() { var f = new Factory(); var abbreviations = AbbreviationDictionary != null ? AbbreviationDictionary.ToList() : new List<string>(); if (EOSCharacters != null && EOSCharacters.Length > 0) { return f.CreateSentenceContextGenerator(abbreviations, EOSCharacters); } return f.CreateSentenceContextGenerator(LanguageCode, abbreviations); }
/// <summary> /// Gets the end of sentence scanner. /// </summary> /// <returns>IEndOfSentenceScanner.</returns> public IEndOfSentenceScanner GetEndOfSentenceScanner() { var f = new Factory(); if (EOSCharacters != null && EOSCharacters.Length > 0) { return f.CreateEndOfSentenceScanner(EOSCharacters); } return f.CreateEndOfSentenceScanner(LanguageCode); }