<commit_before>//----------------------------------------------------------------------------//
//                                                                            //
//                             E v a l u a t o r                              //
//                                                                            //
//  Copyright (C) <NAME> 2000-2006. All rights reserved.               //
//  This software is released under the terms of the GNU General Public       //
//  License. Please contact the author at <EMAIL>           //
//  to report bugs & suggestions.                                             //
//----------------------------------------------------------------------------//
//
package omr.glyph;

import omr.Main;

import omr.constant.Constant;
import omr.constant.ConstantSet;

import omr.math.Moments;
import omr.math.NeuralNetwork;

import omr.score.ScoreConstants;

import omr.sheet.Scale;
import omr.sheet.Sheet;
import omr.sheet.SystemInfo;

import omr.util.Logger;

import java.io.File;
import java.util.Comparator;
import java.util.List;

/**
 * Class <code>Evaluator</code> is an abstract class that gathers data and
 * processing common to any evaluator working on glyph characteristics to infer
 * glyph shape.
 *
 * @author <NAME>
 * @version $Id$
 */
public abstract class Evaluator
{
    //~ Static fields/initializers ---------------------------------------------

    private static final Constants                constants = new Constants();
    private static final Logger                   logger = Logger.getLogger(
        Evaluator.class);

    /** Extension used by evaluator backup files */
    private static final String BACKUP_EXTENSION = ".def";

    /**
     * Number of useful moments : {@value}
     */
    public static final int inMoments = 10;

    /**
     * Number of useful input parameters : nb of moments +
     * stemNumber, hasLedger, pitchPosition = {@value}
     */
    public static final int inSize = inMoments + 3;

    /**
     * Number of shapes to differentiate : {@value}
     */
    public static final int outSize = Shape.LastPhysicalShape.ordinal() + 1;

    /**
     * A special evaluation array, used to report NOISE
     */
    static final Evaluation[] noiseEvaluations = {
                                                     new Evaluation(
        Shape.NOISE,
        0d)
                                                 };

    /**
     * An Evaluation comparator in increasing order, where smaller grade value
     * means better interpretation
     */
    protected static final Comparator<Evaluation> comparator = new Comparator<Evaluation>() {
        public int compare (Evaluation e1,
                            Evaluation e2)
        {
            if (e1.grade < e2.grade) {
                return -1;
            }

            if (e1.grade > e2.grade) {
                return +1;
            }

            return 0;<commit_msg>Removed an @value on a non-constant field<commit_after>//----------------------------------------------------------------------------//
//                                                                            //
//                             E v a l u a t o r                              //
//                                                                            //
//  Copyright (C) <NAME> 2000-2006. All rights reserved.               //
//  This software is released under the terms of the GNU General Public       //
//  License. Please contact the author at <EMAIL>           //
//  to report bugs & suggestions.                                             //
//----------------------------------------------------------------------------//
//
package omr.glyph;

import omr.Main;

import omr.constant.Constant;
import omr.constant.ConstantSet;

import omr.math.Moments;
import omr.math.NeuralNetwork;

import omr.score.ScoreConstants;

import omr.sheet.Scale;
import omr.sheet.Sheet;
import omr.sheet.SystemInfo;

import omr.util.Logger;

import java.io.File;
import java.util.Comparator;
import java.util.List;

/**
 * Class <code>Evaluator</code> is an abstract class that gathers data and
 * processing common to any evaluator working on glyph characteristics to infer
 * glyph shape.
 *
 * @author <NAME>
 * @version $Id$
 */
public abstract class Evaluator
{
    //~ Static fields/initializers ---------------------------------------------

    private static final Constants                constants = new Constants();
    private static final Logger                   logger = Logger.getLogger(
        Evaluator.class);

    /** Extension used by evaluator backup files */
    private static final String BACKUP_EXTENSION = ".def";

    /**
     * Number of useful moments : {@value}
     */
    public static final int inMoments = 10;

    /**
     * Number of useful input parameters : nb of moments +
     * stemNumber, hasLedger, pitchPosition = {@value}
     */
    public static final int inSize = inMoments + 3;

    /**
     * Number of shapes to differentiate
     */
    public static final int outSize = Shape.LastPhysicalShape.ordinal() + 1;

    /**
     * A special evaluation array, used to report NOISE
     */
    static final Evaluation[] noiseEvaluations = {
                                                     new Evaluation(
        Shape.NOISE,
        0d)
                                                 };

    /**
     * An Evaluation comparator in increasing order, where smaller grade value
     * means better interpretation
     */
    protected static final Comparator<Evaluation> comparator = new Comparator<Evaluation>() {
        public int compare (Evaluation e1,
                            Evaluation e2)
        {
            if (e1.grade < e2.grade) {
                return -1;
            }

            if (e1.grade > e2.grade) {
                return +1;
            }

            return 0;
{'fraction_non_alphanumeric': 0.14892536808258588, 'fraction_numerical': 0.007446268404129294, 'mean_word_length': 1.240333586050038, 'pattern_counts': {'":': 0, '<': 19, '<?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': 30, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7299922', 'n_tokens_mistral': 1429, 'n_tokens_neox': 1335, 'n_words': 454}