<commit_before>﻿using System;
using Common.Logging;
using Noobot.Core;
using Noobot.Core.Configuration;
using Noobot.Core.DependencyResolution;

namespace Noobot.Runner
{
    /// <summary>
    /// NoobotHost is required due to TopShelf.
    /// </summary>
    public class NoobotHost
    {
        private readonly IConfigReader _configReader;
        private readonly ILog _logger;
        private INoobotCore _noobotCore;

        /// <summary>
        /// Default constructor will use the default ConfigReader from Core.Configuration 
        /// and look for the config.json file inside a sub directory called 'configuration' with the current directory. 
        /// </summary>
        public NoobotHost() : this(new ConfigReader()) { }
        public NoobotHost(IConfigReader configReader)
        {
            _configReader = configReader;
            _logger = LogManager.GetLogger(GetType());
        }

        public void Start()
        {
            IContainerFactory containerFactory = new ContainerFactory(new ConfigurationBase(), _configReader, _logger);
            INoobotContainer container = containerFactory.CreateContainer();
            _noobotCore = container.GetNoobotCore();<commit_msg>Revert "Update comment to reflect possible config.json path"<commit_after>﻿using System;
using Common.Logging;
using Noobot.Core;
using Noobot.Core.Configuration;
using Noobot.Core.DependencyResolution;

namespace Noobot.Runner
{
    /// <summary>
    /// NoobotHost is required due to TopShelf.
    /// </summary>
    public class NoobotHost
    {
        private readonly IConfigReader _configReader;
        private readonly ILog _logger;
        private INoobotCore _noobotCore;

        /// <summary>
        /// Default constructor will use the default ConfigReader from Core.Configuration 
        /// and look for the configuration file at .\configuration\config.json
        /// </summary>
        public NoobotHost() : this(new ConfigReader()) { }
        public NoobotHost(IConfigReader configReader)
        {
            _configReader = configReader;
            _logger = LogManager.GetLogger(GetType());
        }

        public void Start()
        {
            IContainerFactory containerFactory = new ContainerFactory(new ConfigurationBase(), _configReader, _logger);
            INoobotContainer container = containerFactory.CreateContainer();
            _noobotCore = container.GetNoobotCore();
{'fraction_non_alphanumeric': 0.08439687114038699, 'fraction_numerical': 0.0, 'mean_word_length': 2.6486486486486487, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, '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': '3928769', 'n_tokens_mistral': 626, 'n_tokens_neox': 617, 'n_words': 172}