<commit_before>﻿using System;

namespace Dyna.Core.Entities
{
    /// <summary>
    /// A constraint restricting a variable's possible bound values.
    /// </summary>
    public class Constraint
    {
        /// <summary>
        /// Initialize a constraint with an expression.
        /// </summary>
        /// <param name="theExpression">Binary expression expressing the constraint.</param>
        public Constraint(BinaryExpression theExpression)
        {
            if (theExpression == null)
                throw new ArgumentNullException("theExpression");
            this.Expression = theExpression;
        }

        /// <summary>
        /// Initialize a constraint with a raw constraint expression.
        /// </summary>
        /// <param name="rawExpression">Raw text expression expressing the constraint.</param>
        public Constraint(string rawExpression)
        {
            if (string.IsNullOrWhiteSpace(rawExpression))
                throw new ArgumentException("rawExpression");
            this.Expression = ConstraintGrammar.Parse(rawExpression);
        }

        /// <summary>
        /// Gets or sets the constraint name.
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// Gets or sets the constraint expression.
        /// </summary>
        public BinaryExpression Expression { get; set; }

        /// <summary>
        /// Gets or sets the model the constraint is a part of.
        /// </summary>
        public Model Model { get; set; }

        /// <summary>
        /// Parse the raw expression text.
        /// </summary>
        /// <param name="expressionText">Raw constraint expression.</param>
        public static Constraint ParseExpression(string expressionText)
        {
            if (string.IsNullOrWhiteSpace(expressionText))
                throw new ArgumentException("expressionText");
            return new Constraint(ConstraintGrammar.Parse(expressionText));
        }
    }
}
<commit_msg>Fixes code comment for Constraint entity.<commit_after>﻿using System;

namespace Dyna.Core.Entities
{
    /// <summary>
    /// A constraint restricts a variable's possible values.
    /// </summary>
    public class Constraint
    {
        /// <summary>
        /// Initialize a constraint with an expression.
        /// </summary>
        /// <param name="theExpression">Binary expression expressing the constraint.</param>
        public Constraint(BinaryExpression theExpression)
        {
            if (theExpression == null)
                throw new ArgumentNullException("theExpression");
            this.Expression = theExpression;
        }

        /// <summary>
        /// Initialize a constraint with a raw constraint expression.
        /// </summary>
        /// <param name="rawExpression">Raw text expression expressing the constraint.</param>
        public Constraint(string rawExpression)
        {
            if (string.IsNullOrWhiteSpace(rawExpression))
                throw new ArgumentException("rawExpression");
            this.Expression = ConstraintGrammar.Parse(rawExpression);
        }

        /// <summary>
        /// Gets or sets the constraint name.
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// Gets or sets the constraint expression.
        /// </summary>
        public BinaryExpression Expression { get; set; }

        /// <summary>
        /// Gets or sets the model the constraint is a part of.
        /// </summary>
        public Model Model { get; set; }

        /// <summary>
        /// Parse the raw expression text.
        /// </summary>
        /// <param name="expressionText">Raw constraint expression.</param>
        public static Constraint ParseExpression(string expressionText)
        {
            if (string.IsNullOrWhiteSpace(expressionText))
                throw new ArgumentException("expressionText");
            return new Constraint(ConstraintGrammar.Parse(expressionText));
        }
    }
}

{'fraction_non_alphanumeric': 0.10674698795180723, 'fraction_numerical': 0.0, 'mean_word_length': 1.7490066225165564, 'pattern_counts': {'":': 0, '<': 43, '<?xml version=': 0, '>': 43, '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': '3730137', 'n_tokens_mistral': 951, 'n_tokens_neox': 919, 'n_words': 278}