Пример #1
0
        public static void runNewsClassifierDerivation(string inFile, string outDirectory, int count, int iterations)
        {
            //Load the database:
            DiscreteSeriesDatabase <string> data = getNewsDataset(inFile, count);
            //data = data.SplitDatabase (.1).Item1;


            IEnumerable <Tuple <string, IEventSeriesProbabalisticClassifier <string> > > classifiers = TextClassifierFactory.NewsTestClassifiers().Concat(TextClassifierFactory.NewsTestAdvancedClassifiers().Skip(1));
            IFeatureSynthesizer <string> synth = new CompoundFeatureSynthesizer <string>("author", new IFeatureSynthesizer <string>[] {
                new VarKmerFrequencyFeatureSynthesizer <string>("author", 3, 2, 60, 0.7, false),
                new VarKmerFrequencyFeatureSynthesizer <string>("location", 3, 3, 50, 1, false),
                new VarKmerFrequencyFeatureSynthesizer <string>("gender", 3, 8, 50, 10, false),
                new DateValueFeatureSynthesizer("date"),
                new LatinLanguageFeatureSynthesizer("author")
            });

            WriteupGenerator.ProduceClassifierComparisonWriteup <string>("Classifier Comparison Analysis on Ekantipur News Articles", "Cyrus Cousins with Shirish Pokharel", 20, 20, outDirectory, classifiers.ToArray(), "News", data, "author", iterations, new[] { "author", "location", "date", "gender" }, synth);
        }