<commit_before>﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using CM3D2.YATranslator.Hook;
using Mono.Cecil;
using Mono.Cecil.Cil;
using Mono.Cecil.Inject;

namespace CM3D2.YATranslator.Sybaris.Patcher
{
    public static class YATranslatorPatcher
    {
        public static readonly string[] TargetAssemblyNames = {"Assembly-CSharp.dll", "UnityEngine.UI.dll"};
        private const string HOOK_NAME = "CM3D2.YATranslator.Hook";

        private static readonly Dictionary<string, Action<AssemblyDefinition, AssemblyDefinition>> Patchers =
                new Dictionary<string, Action<AssemblyDefinition, AssemblyDefinition>>
                {
                    {"Assembly-CSharp", PatchAssemblyCSharp},
                    {"UnityEngine.UI", PatchUi}
                };

        private const string SYBARIS_MANAGED_DIR = @"..\Plugins\Managed";

        public static void Patch(AssemblyDefinition assembly)
        {<commit_msg>Changed Hook path to support Sybaris 2<commit_after>﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using CM3D2.YATranslator.Hook;
using Mono.Cecil;
using Mono.Cecil.Cil;
using Mono.Cecil.Inject;

namespace CM3D2.YATranslator.Sybaris.Patcher
{
    public static class YATranslatorPatcher
    {
        public static readonly string[] TargetAssemblyNames = {"Assembly-CSharp.dll", "UnityEngine.UI.dll"};
        private const string HOOK_NAME = "CM3D2.YATranslator.Hook";

        private static readonly Dictionary<string, Action<AssemblyDefinition, AssemblyDefinition>> Patchers =
                new Dictionary<string, Action<AssemblyDefinition, AssemblyDefinition>>
                {
                    {"Assembly-CSharp", PatchAssemblyCSharp},
                    {"UnityEngine.UI", PatchUi}
                };

        private const string SYBARIS_MANAGED_DIR = @".";

        public static void Patch(AssemblyDefinition assembly)
        {
{'fraction_non_alphanumeric': 0.0901394422310757, 'fraction_numerical': 0.006474103585657371, 'mean_word_length': 3.0833333333333335, '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': '7317810', 'n_tokens_mistral': 592, 'n_tokens_neox': 551, 'n_words': 127}