<commit_before>#-----------------------------------------------------------------------
# TITLE:
#   vardiff.tcl
#
# AUTHOR:
#   <NAME>
#
# DESCRIPTION:
#   Variable difference base class
#
#-----------------------------------------------------------------------

oo::class create ::athena::vardiff {
    meta type *            ;# Type is undefined; subclasses should override.
    meta category "???"    ;# PMESII category is undefined; subclasses 
                            # should override.
    meta normfunc 1.0      ;# Default normalization function
    meta afactors {}       ;# A factors, used to relate scores of different 
                            # types

    variable comp          ;# comparison object
    variable keydict       ;# Key dictionary
    variable val1          ;# Value from case 1
    variable val2          ;# Value from case 2
    variable gotInputs     ;# 1 if we've computed diffs, and 0 otherwise.
    variable iscores       ;# Array of scores by vardiff object for
                            # significant inputs.

    # Transient variables, used during input scoring.
    variable byType        ;# Array of input vardiffs by vartype.
    variable valueCache    ;# Array of value lists by vartype.

    # constructor comp_ keydict_ val1_ val2_
    #
    # comp_     - The comparison(n) object that owns this difference.
    # keydict_  - A dictionary of variable keys and values.
    # val1_     - The value of the variable for the first scenario/time
    #             pair
    # val2_     - The value of the variable for the second scenario/time
    #             pair.
    #
    # Saves the inputs into instance variables.

    constructor {comp_ keydict_ val1_ val2_} {
        set comp      $comp_
        set keydict   $keydict_
        set val1      $val1_
        set val2      $val2_
        set gotInputs 0
    }

    # name
    #
    # Computes the variable name from the variable type and the 
    # key dictionary.

    method name {} {
        set prefix [lindex [split [my type] .] 0]

        dict for {key val} $keydict {
            append prefix .$val
        }
        return $prefix
    }<commit_msg>athena(n): vardiff name includes "/" again<commit_after>#-----------------------------------------------------------------------
# TITLE:
#   vardiff.tcl
#
# AUTHOR:
#   <NAME>
#
# DESCRIPTION:
#   Variable difference base class
#
#-----------------------------------------------------------------------

oo::class create ::athena::vardiff {
    meta type *            ;# Type is undefined; subclasses should override.
    meta category "???"    ;# PMESII category is undefined; subclasses 
                            # should override.
    meta normfunc 1.0      ;# Default normalization function
    meta afactors {}       ;# A factors, used to relate scores of different 
                            # types

    variable comp          ;# comparison object
    variable keydict       ;# Key dictionary
    variable val1          ;# Value from case 1
    variable val2          ;# Value from case 2
    variable gotInputs     ;# 1 if we've computed diffs, and 0 otherwise.
    variable iscores       ;# Array of scores by vardiff object for
                            # significant inputs.

    # Transient variables, used during input scoring.
    variable byType        ;# Array of input vardiffs by vartype.
    variable valueCache    ;# Array of value lists by vartype.

    # constructor comp_ keydict_ val1_ val2_
    #
    # comp_     - The comparison(n) object that owns this difference.
    # keydict_  - A dictionary of variable keys and values.
    # val1_     - The value of the variable for the first scenario/time
    #             pair
    # val2_     - The value of the variable for the second scenario/time
    #             pair.
    #
    # Saves the inputs into instance variables.

    constructor {comp_ keydict_ val1_ val2_} {
        set comp      $comp_
        set keydict   $keydict_
        set val1      $val1_
        set val2      $val2_
        set gotInputs 0
    }

    # name
    #
    # Computes the variable name from the variable type and the 
    # key dictionary.

    method name {} {
        set prefix [lindex [split [my type] .] 0]

        dict for {key val} $keydict {
            append prefix /$val
        }
        return $prefix
    }
{'fraction_non_alphanumeric': 0.1269257300528857, 'fraction_numerical': 0.009197516670498965, 'mean_word_length': 1.4871355060034306, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '476294', 'n_tokens_mistral': 1154, 'n_tokens_neox': 1100, 'n_words': 426}