<commit_before>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Versioning;
using System.Text;
using Comparers;
using EqualityComparers;

namespace FrameworkProfiles
{
    public static class NugetTargets
    {
        private static readonly Dictionary<FrameworkName, string> KnownNugetTargets = new Dictionary<FrameworkName, string>
        {
            { new FrameworkName("Silverlight,Version=v4.0"), "sl4" },
            { new FrameworkName("Silverlight,Version=v5.0"), "sl5" },
            { new FrameworkName("Silverlight,Version=v4.0,Profile=WindowsPhone*"), "wp7" },
            { new FrameworkName("Silverlight,Version=v4.0,Profile=WindowsPhone7*"), "wp71" },
        };

        private static readonly Dictionary<string, string> KnownNugetPlatforms = new Dictionary<string, string>
        {
            { ".NETFramework", "net" },
            { "WindowsPhone", "wp" },
            { "WindowsPhoneApp", "wpa" },
            { ".NETCore", "win" },
            { "MonoAndroid", "MonoAndroid" },
            { "MonoTouch", "MonoTouch" },
        };

        public static string GetNugetTarget(FrameworkProfile profile)
        {
            string result;
            if (KnownNugetTargets.TryGetValue(profile.Name, out result))
                return result;
            string platform;
            if (!KnownNugetPlatforms.TryGetValue(profile.Name.Identifier, out platform))
                return null;
            var version = profile.Name.Version.ToString();
            while (version.EndsWith(".0"))
                version = version.Substring(0, version.Length - 2);

            // This is dangerous if any version number goes >= 10, but hey, that's NuGet's problem...
            return platform + version.Replace(".", string.Empty);
        }
    }
}<commit_msg>Changed "win" NuGet target to "netcore", which correctly matches the version numbers.<commit_after>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Versioning;
using System.Text;
using Comparers;
using EqualityComparers;

namespace FrameworkProfiles
{
    public static class NugetTargets
    {
        private static readonly Dictionary<FrameworkName, string> KnownNugetTargets = new Dictionary<FrameworkName, string>
        {
            { new FrameworkName("Silverlight,Version=v4.0"), "sl4" },
            { new FrameworkName("Silverlight,Version=v5.0"), "sl5" },
            { new FrameworkName("Silverlight,Version=v4.0,Profile=WindowsPhone*"), "wp7" },
            { new FrameworkName("Silverlight,Version=v4.0,Profile=WindowsPhone7*"), "wp71" },
        };

        private static readonly Dictionary<string, string> KnownNugetPlatforms = new Dictionary<string, string>
        {
            { ".NETFramework", "net" },
            { "WindowsPhone", "wp" },
            { "WindowsPhoneApp", "wpa" },
            { ".NETCore", "netcore" },
            { "MonoAndroid", "MonoAndroid" },
            { "MonoTouch", "MonoTouch" },
        };

        public static string GetNugetTarget(FrameworkProfile profile)
        {
            string result;
            if (KnownNugetTargets.TryGetValue(profile.Name, out result))
                return result;
            string platform;
            if (!KnownNugetPlatforms.TryGetValue(profile.Name.Identifier, out platform))
                return null;
            var version = profile.Name.Version.ToString();
            while (version.EndsWith(".0"))
                version = version.Substring(0, version.Length - 2);

            // This is dangerous if any version number goes >= 10, but hey, that's NuGet's problem...
            return platform + version.Replace(".", string.Empty);
        }
    }
}
{'fraction_non_alphanumeric': 0.11802575107296137, 'fraction_numerical': 0.0101931330472103, 'mean_word_length': 2.4623955431754876, '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': '959266', 'n_tokens_mistral': 1035, 'n_tokens_neox': 977, 'n_words': 231}