<commit_before>﻿namespace TAUtil.Tdf
{
    using System.Collections.Generic;

    public class TdfNodeAdapter : ITdfNodeAdapter
    {
        private readonly Stack<TdfNode> nodeStack = new Stack<TdfNode>();

        public TdfNodeAdapter()
        {
            this.RootNode = new TdfNode();
            this.nodeStack.Push(this.RootNode);
        }

        public TdfNode RootNode { get; private set; }

        public void BeginBlock(string name)
        {
            name = name.ToLowerInvariant();
            TdfNode n = new TdfNode(name);
            this.nodeStack.Peek().Keys[name] = n;
            this.nodeStack.Push(n);
        }

        public void AddProperty(string name, string value)
        {
            name = name.ToLowerInvariant();
            value = value.ToLowerInvariant();
            this.nodeStack.Peek().Entries[name] = value;
        }

        public void EndBlock()<commit_msg>Revert "Make all strings in loaded TdfNodes lowercase"<commit_after>﻿namespace TAUtil.Tdf
{
    using System.Collections.Generic;

    public class TdfNodeAdapter : ITdfNodeAdapter
    {
        private readonly Stack<TdfNode> nodeStack = new Stack<TdfNode>();

        public TdfNodeAdapter()
        {
            this.RootNode = new TdfNode();
            this.nodeStack.Push(this.RootNode);
        }

        public TdfNode RootNode { get; private set; }

        public void BeginBlock(string name)
        {
            TdfNode n = new TdfNode(name);
            this.nodeStack.Peek().Keys[name] = n;
            this.nodeStack.Push(n);
        }

        public void AddProperty(string name, string value)
        {
            this.nodeStack.Peek().Entries[name] = value;
        }

        public void EndBlock()
{'fraction_non_alphanumeric': 0.09729418537708694, 'fraction_numerical': 0.0, 'mean_word_length': 1.976027397260274, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '1754160', 'n_tokens_mistral': 498, 'n_tokens_neox': 483, 'n_words': 108}