<commit_before>﻿using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.Language.StandardClassification;
using Microsoft.VisualStudio.Text;
using Microsoft.VisualStudio.Text.Classification;

namespace Paket.VisualStudio.IntelliSense.Classifier
{
    internal class PaketDependenciesClassifier : IClassifier
    {
        private readonly IClassificationType keyword, comment;

        private static readonly HashSet<string> validKeywords = new HashSet<string>
        {
            "source", "nuget", "github", "gist", "http",
            "content", "reference", "redirects", "group"
        };

        public static IEnumerable<string> ValidKeywords
        {
            get { return validKeywords; }
        }

        internal PaketDependenciesClassifier(IClassificationTypeRegistryService registry)
        {
            keyword = registry.GetClassificationType(PredefinedClassificationTypeNames.Keyword);
            comment = registry.GetClassificationType(PredefinedClassificationTypeNames.Comment);
        }

        public IList<ClassificationSpan> GetClassificationSpans(SnapshotSpan span)
        {
            IList<ClassificationSpan> spans = new List<ClassificationSpan>();

            string text = span.GetText();
            int index = text.IndexOf("#", StringComparison.Ordinal);

            if (index > -1)
            {
                var result = new SnapshotSpan(span.Snapshot, span.Start + index, text.Length - index);
                spans.Add(new ClassificationSpan(result, comment));
            }

            if (index == -1 || index > 0)<commit_msg>Adds strategy as keyword<commit_after>﻿using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.Language.StandardClassification;
using Microsoft.VisualStudio.Text;
using Microsoft.VisualStudio.Text.Classification;

namespace Paket.VisualStudio.IntelliSense.Classifier
{
    internal class PaketDependenciesClassifier : IClassifier
    {
        private readonly IClassificationType keyword, comment;

        private static readonly HashSet<string> validKeywords = new HashSet<string>
        {
            "source", "nuget", "github", "gist", "http",
            "content", "reference", "redirects", "group",
            "strategy"
        };

        public static IEnumerable<string> ValidKeywords
        {
            get { return validKeywords; }
        }

        internal PaketDependenciesClassifier(IClassificationTypeRegistryService registry)
        {
            keyword = registry.GetClassificationType(PredefinedClassificationTypeNames.Keyword);
            comment = registry.GetClassificationType(PredefinedClassificationTypeNames.Comment);
        }

        public IList<ClassificationSpan> GetClassificationSpans(SnapshotSpan span)
        {
            IList<ClassificationSpan> spans = new List<ClassificationSpan>();

            string text = span.GetText();
            int index = text.IndexOf("#", StringComparison.Ordinal);

            if (index > -1)
            {
                var result = new SnapshotSpan(span.Snapshot, span.Start + index, text.Length - index);
                spans.Add(new ClassificationSpan(result, comment));
            }

            if (index == -1 || index > 0)
{'fraction_non_alphanumeric': 0.08974749011256465, 'fraction_numerical': 0.0018253726802555522, 'mean_word_length': 2.7577142857142856, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 19, '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': '6101435', 'n_tokens_mistral': 835, 'n_tokens_neox': 801, 'n_words': 177}