<commit_before>﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Text.RegularExpressions;
using System.Xml;
using JetBrains.Util;

namespace ApiParser
{
    public static class Program
    {
        private static readonly List<(string, Version)> DocVersions = new List<(string, Version)>
        {
            // These folders need to live in the runtime folder
            // Can't redistribute, sorry. See README.md
            ("Documentation-5.0.4f1", new Version(5, 0)),
            ("Documentation-5.1.5f1", new Version(5, 1)),
            ("Documentation-5.2.5f1", new Version(5, 2)),
            ("Documentation-5.3.8f2", new Version(5, 3)),
            ("Documentation-5.4.6f3", new Version(5, 4)),
            ("Documentation-5.5.5f1", new Version(5, 5)),
            ("Documentation-5.6.3f1", new Version(5, 6)),
            ("Documentation-2017.1.2f1", new Version(2017, 1)),
            ("Documentation-2017.2.0f2", new Version(2017, 2)),
            ("Documentation-2017.3.1f1", new Version(2017, 3)),
            ("Documentation-2017.4.6f1", new Version(2017, 4)),
            ("Documentation-2018.1.6f1", new Version(2018, 1))
        };

        public static void Main(string[] args)
        {
            args = new[] {@"C:\work\resharper-unity\resharper\src\resharper-unity\api.xml", "2018.2.2f1"};
            if (args.Length != 1 && args.Length != 2)
            {
                Console.WriteLine("Usage: ApiParser.exe docsFolder");
                Console.WriteLine("       ApiParser.exe apiXmlPath version");
                Console.WriteLine();
                Console.WriteLine("  docsFolder - folder that contains all versions of Unity docs");
                Console.WriteLine("  apiXmlPath - location of api.xml to read and merge into");
                Console.WriteLine("  version - version of Unity to read docs from. Must be installed in standard Unity Hub location");
                Console.WriteLine();
                Console.WriteLine("Note that the output file is written to the current directory");
                return;
            }

            var stopwatch = Stopwatch.StartNew();
<commit_msg>hardcode removed<commit_after>﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Text.RegularExpressions;
using System.Xml;
using JetBrains.Util;

namespace ApiParser
{
    public static class Program
    {
        private static readonly List<(string, Version)> DocVersions = new List<(string, Version)>
        {
            // These folders need to live in the runtime folder
            // Can't redistribute, sorry. See README.md
            ("Documentation-5.0.4f1", new Version(5, 0)),
            ("Documentation-5.1.5f1", new Version(5, 1)),
            ("Documentation-5.2.5f1", new Version(5, 2)),
            ("Documentation-5.3.8f2", new Version(5, 3)),
            ("Documentation-5.4.6f3", new Version(5, 4)),
            ("Documentation-5.5.5f1", new Version(5, 5)),
            ("Documentation-5.6.3f1", new Version(5, 6)),
            ("Documentation-2017.1.2f1", new Version(2017, 1)),
            ("Documentation-2017.2.0f2", new Version(2017, 2)),
            ("Documentation-2017.3.1f1", new Version(2017, 3)),
            ("Documentation-2017.4.6f1", new Version(2017, 4)),
            ("Documentation-2018.1.6f1", new Version(2018, 1))
        };

        public static void Main(string[] args)
        {
            if (args.Length != 1 && args.Length != 2)
            {
                Console.WriteLine("Usage: ApiParser.exe docsFolder");
                Console.WriteLine("       ApiParser.exe apiXmlPath version");
                Console.WriteLine();
                Console.WriteLine("  docsFolder - folder that contains all versions of Unity docs");
                Console.WriteLine("  apiXmlPath - location of api.xml to read and merge into");
                Console.WriteLine("  version - version of Unity to read docs from. Must be installed in standard Unity Hub location");
                Console.WriteLine();
                Console.WriteLine("Note that the output file is written to the current directory");
                return;
            }

            var stopwatch = Stopwatch.StartNew();

{'fraction_non_alphanumeric': 0.12572706935123043, 'fraction_numerical': 0.04809843400447427, 'mean_word_length': 2.2211815561959654, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 3}, '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': '2065043', 'n_tokens_mistral': 1354, 'n_tokens_neox': 1223, 'n_words': 345}