<commit_before>﻿using System;
using Autofac;
using Wikiled.Sentiment.Analysis.Processing;
using Wikiled.Sentiment.Text.Configuration;
using Wikiled.Sentiment.Text.Parser;

namespace Wikiled.Sentiment.Analysis.Containers
{
    public class ContainerHelper : IContainerHelper
    {
        public ContainerHelper(IContainer container)
        {
            Container = container ?? throw new ArgumentNullException(nameof(container));
        }

        public IContainer Container { get; }

        public SentimentContext Context => (SentimentContext)Container.Resolve<ISentimentContext>();

        public ITextSplitter GetTextSplitter()
        {
            return Container.Resolve<ITextSplitter>();
        }

        public IWordsHandler GetDataLoader()
        {
            return Container.Resolve<IWordsHandler>();
        }

        public ITestingClient GetTesting(string path = null)
        {
            throw new NotImplementedException();
        }

        public ITrainingClient GetTraining(string path)
        {
            throw new NotImplementedException();
        }<commit_msg>Fixing client resolution<commit_after>﻿using System;
using Autofac;
using Wikiled.Sentiment.Analysis.Processing;
using Wikiled.Sentiment.Text.Configuration;
using Wikiled.Sentiment.Text.Parser;

namespace Wikiled.Sentiment.Analysis.Containers
{
    public class ContainerHelper : IContainerHelper
    {
        public ContainerHelper(IContainer container)
        {
            Container = container ?? throw new ArgumentNullException(nameof(container));
        }

        public IContainer Container { get; }

        public SentimentContext Context => (SentimentContext)Container.Resolve<ISentimentContext>();

        public ITextSplitter GetTextSplitter()
        {
            return Container.Resolve<ITextSplitter>();
        }

        public IWordsHandler GetDataLoader()
        {
            return Container.Resolve<IWordsHandler>();
        }

        public ITestingClient GetTesting(string path = null)
        {
            return Container.Resolve<ITestingClient>(new NamedParameter("svmPath", path));
        }

        public ITrainingClient GetTraining(string path)
        {
            return Container.Resolve<ITrainingClient>(new NamedParameter("svmPath", path));
        }
{'fraction_non_alphanumeric': 0.08, 'fraction_numerical': 0.0, 'mean_word_length': 2.7783251231527095, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6273476', 'n_tokens_mistral': 574, 'n_tokens_neox': 558, 'n_words': 118}