public ExtendedWords(ILexiconConfiguration path) { if (path == null) { throw new ArgumentNullException(nameof(path)); } resourcesPath = Path.Combine(path.LexiconPath, "Repair"); ReadIdioms(); ReadSlang(); }
public SentenceRepairHandler(ILexiconConfiguration path, IWordsDictionary dictionary) { if (path == null) { throw new ArgumentNullException(nameof(path)); } cleanup = new EmojyCleanup(); cleanup.NormalizeText = false; resourcesPath = Path.Combine(path.LexiconPath, "Repair"); this.dictionary = dictionary ?? throw new ArgumentNullException(nameof(dictionary)); Load(); }
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); }
public WordsHandler(ILexiconConfiguration config, IExtendedWords extended) { this.config = config ?? throw new ArgumentNullException(nameof(config)); this.extended = extended ?? throw new ArgumentNullException(nameof(extended)); sentimentData = new SentimentDataHolder(); }