<commit_before>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Parser
{
    public class ParseTree<T>
    {
    }
}<commit_msg>ParseTree completed.<commit_after>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Parser
{
    /// <summary>
    /// Represents a parse tree.
    /// </summary>
    /// <typeparam name="T"></typeparam>
    public class ParseTree<T>
    {
        /// <summary>
        /// Represents a Branch in a parse tree.
        /// </summary>
        public class ParseTreebranch
        {
            /// <summary>
            /// Gets the list of children of this branch.
            /// </summary>
            public List<ParseTreebranch> Children
            {
                get;
                internal set;
            }

            /// <summary>
            /// Gets the parent tree that contains this branch.
            /// </summary>
            public ParseTree<T> ParentTree
            {
                get;
                internal set;
            }

            /// <summary>
            /// Gets the parent branch of this branch.
            /// </summary>
            public ParseTreebranch Parent
            {
                get;
                internal set;
            }

            /// <summary>
            /// Gets or sets the value contained by this branch.
            /// </summary>
            public T Value
            {
                get;
                set;
            }

            private ParseTreebranch(T value, ParseTree<T> tree)
            {
                this.Value = value;
                this.ParentTree = tree;
            }

            public ParseTreebranch(T value, ParseTreebranch parent)
            {
                this.Value = value;
                this.Parent = parent;
                this.ParentTree = parent.ParentTree;
            }

            public ParseTreebranch(T value)
            {
                this.Value = value;
            }
        }

        /// <summary>
        /// Gets the root element of this tree.
        /// </summary>
        public ParseTreebranch Root
        {
            get;
            private set;
        }   

        public ParseTree(ParseTreebranch rootBranch)
        {
            this.Root = rootBranch;
            this.Root.ParentTree = this;
        }
    }
}
{'fraction_non_alphanumeric': 0.09386733416770963, 'fraction_numerical': 0.0, 'mean_word_length': 1.0761904761904761, 'pattern_counts': {'":': 0, '<': 24, '<?xml version=': 0, '>': 24, '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': '4396874', 'n_tokens_mistral': 592, 'n_tokens_neox': 572, 'n_words': 157}