public OpenNLPTextSplitter(ILogger <OpenNLPTextSplitter> log,
                            ILexiconConfig configuration,
                            ICachedDocumentsSource cache,
                            ISentenceTokenizerFactory tokenizerFactory,
                            ISentenceRepairHandler repairHandler,
                            IEnumerable <INamedEntityRecognition> neResolver)
     : base(log, cache)
 {
     this.log           = log ?? throw new ArgumentNullException(nameof(log));
     this.configuration = configuration ?? throw new ArgumentNullException(nameof(configuration));
     this.repairHandler = repairHandler ?? throw new ArgumentNullException(nameof(repairHandler));
     this.neResolver    = neResolver;
     log.LogDebug("Creating with resource path: {0}", configuration.Resources);
     tokenizer        = TreebankWordTokenizer.Tokenizer;
     sentenceSplitter = tokenizerFactory.Create(true, false);
     LoadModels();
 }
        public OpenNLPTextSplitter(ILogger <OpenNLPTextSplitter> log,
                                   ILexiconConfiguration configuration,
                                   ICachedDocumentsSource cache,
                                   ISentenceTokenizerFactory tokenizerFactory,
                                   ISentenceRepairHandler repairHandler)
            : base(log, cache)
        {
            if (configuration == null)
            {
                throw new ArgumentNullException(nameof(configuration));
            }

            this.log           = log ?? throw new ArgumentNullException(nameof(log));
            this.repairHandler = repairHandler ?? throw new ArgumentNullException(nameof(repairHandler));
            log.LogDebug("Creating with resource path: {0}", configuration.ResourcePath);
            tokenizer        = TreebankWordTokenizer.Tokenizer;
            sentenceSplitter = tokenizerFactory.Create(true, false);
            LoadModels(configuration.ResourcePath);
        }