<commit_before>﻿using System;
using System.Collections.Generic;
using osu_StreamCompanion.Code.Core.DataTypes;
using osu_StreamCompanion.Code.Interfaces;
using osu_StreamCompanion.Code.Modules.MapDataParsers.Parser1;

namespace osu_StreamCompanion.Code.Modules.MapDataGetters.FileMap
{
    public class FileMapDataGetter : IModule, IMapDataGetter,IDisposable
    {
        public bool Started { get; set; }
        private readonly FileMapManager _fileMapManager = new FileMapManager();
        private ILogger _logger;

        public void Start(ILogger logger)
        {
            _logger = logger;
            Started = true;
        }

        public void SetNewMap(MapSearchResult map)
        {
            var ingamePatterns = new List<string>();
            foreach (var s in map.FormatedStrings)
            {
                var name = $"SC-{s.Name}";
                if (s.ShowInOsu)
                {
                    ingamePatterns.Add(name);
                }
                string valueToWrite = (s.SaveEvent & map.Action) != 0 ? s.GetFormatedPattern() : "    ";
                if (s.ShowInOsu)
                {
                    var configName = "conf-" + name;
                    var valueName = "value-" + name;
                    var config = $"{s.XPosition} {s.YPosition} {s.Color.R} {s.Color.G} {s.Color.B} {s.FontName.Replace(' ','/')} {s.FontSize}";
                    _fileMapManager.Write(configName, config);
                    if (!s.IsMemoryFormat)
                        _fileMapManager.Write(valueName, valueToWrite);
                }

                if (!s.IsMemoryFormat)
                    _fileMapManager.Write(name, valueToWrite);
            }
            _fileMapManager.Write("Sc-ingamePatterns", string.Join(" ", ingamePatterns)+" ");
        }

        public void Dispose()
        {
            _fileMapManager.Write("Sc-ingamePatterns", " ");

        }
    }
}<commit_msg>Fix !lb! token in ingameOverlay<commit_after>﻿using System;
using System.Collections.Generic;
using osu_StreamCompanion.Code.Core.DataTypes;
using osu_StreamCompanion.Code.Interfaces;
using osu_StreamCompanion.Code.Modules.MapDataParsers.Parser1;

namespace osu_StreamCompanion.Code.Modules.MapDataGetters.FileMap
{
    public class FileMapDataGetter : IModule, IMapDataGetter,IDisposable
    {
        public bool Started { get; set; }
        private readonly FileMapManager _fileMapManager = new FileMapManager();
        private ILogger _logger;

        public void Start(ILogger logger)
        {
            _logger = logger;
            Started = true;
        }

        public void SetNewMap(MapSearchResult map)
        {
            var ingamePatterns = new List<string>();
            foreach (var s in map.FormatedStrings)
            {
                var name = $"SC-{s.Name}";
                if (s.ShowInOsu)
                {
                    ingamePatterns.Add(name);
                }
                string valueToWrite = (s.SaveEvent & map.Action) != 0 ? s.GetFormatedPattern() : "    ";
                if (s.ShowInOsu)
                {
                    var configName = "conf-" + name;
                    var valueName = "value-" + name;
                    var config = $"{s.XPosition} {s.YPosition} {s.Color.R} {s.Color.G} {s.Color.B} {s.FontName.Replace(' ','/')} {s.FontSize}";
                    _fileMapManager.Write(configName, config);
                    if (!s.IsMemoryFormat)
                        _fileMapManager.Write(valueName, valueToWrite.Replace("\r", ""));
                }

                if (!s.IsMemoryFormat)
                    _fileMapManager.Write(name, valueToWrite);
            }
            _fileMapManager.Write("Sc-ingamePatterns", string.Join(" ", ingamePatterns)+" ");
        }

        public void Dispose()
        {
            _fileMapManager.Write("Sc-ingamePatterns", " ");

        }
    }
}
{'fraction_non_alphanumeric': 0.10835040983606557, 'fraction_numerical': 0.0010245901639344263, 'mean_word_length': 1.738429172510519, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '2373081', 'n_tokens_mistral': 1155, 'n_tokens_neox': 1100, 'n_words': 204}