Example #1
0
        static void ParseCorpus(string corpusDir, string outFile)
        {
            var corpusStats      = new CorpusStats(corpusDir);
            var featureExtractor = new FeatureExtractor(corpusStats);

            File.WriteAllLines(Path.Combine(corpusDir, outFile),
                               Directory.GetFiles(corpusDir)
                               .SelectMany(featureExtractor.ExtractFeatures)
                               .Select(x => x.First().ToString("F0") + " " + FeaturesToString(x.Skip(1))));
        }
Example #2
0
 public FeatureExtractor(CorpusStats corpusStats)
 {
     this.corpusStats = corpusStats;
 }