Ejemplo n.º 1
0
        static void fiveB(Dict dict)
        {
            Folds folds = new Folds("wikipediatypoclean.txt");
            // Validate with hill climbing
            crossValidation(dict, folds, 30, true);

            // Validate without hill climbing
            crossValidation(dict, folds, 30, false);
        }
Ejemplo n.º 2
0
        static void crossValidation(Dict dict, Folds folds, int numFolds, bool useClimbing)
        {
            folds.makeN(numFolds);

            int foldNum = 0;
            foreach (Fold fold in folds.folds)
            {
                foldNum++;
                Console.WriteLine("Running against fold " + foldNum);
                validateFold(dict, fold, useClimbing);
            }
        }
Ejemplo n.º 3
0
        static void fiveA(Dict dict)
        {
            Folds folds;

            Console.WriteLine("Wikipedia typo clean:");
            folds = new Folds("wikipediatypoclean.txt");
            validateFirstTypos(dict, folds, 30);

            Console.WriteLine("Wikipedia typo:");
            folds = new Folds("wikipediatypo.txt");
            validateFirstTypos(dict, folds, 30);

            Console.WriteLine("Synthetic data:");
            folds = new Folds("syntheticdata.txt");
            validateFirstTypos(dict, folds, 30);
        }
Ejemplo n.º 4
0
        static void validateFirstTypos(Dict dict, Folds folds, int numTypos)
        {
            folds.makeWithSizeN(numTypos);

            validateFold(dict, folds.folds[0], true);
        }