Exemple #1
0
        private static void AddOrOverwriteWordCountFeature(ZoneTree tree)
        {
            var leafWalker = new BreadthFirstWalkerFactory().CreateLeafWalker();

            tree.Accept(new FeatureExtractionVisitor <Zone>(TOKENS_FEATURE_NAME, new Tokens(_naturalLanguageProcessor)), leafWalker);
            tree.Accept(new FeatureExtractionVisitor <Zone>(WORD_COUNT_FEATURE_NAME, new WordCount(TOKENS_FEATURE_NAME)), leafWalker);
        }
Exemple #2
0
 /// <summary>
 /// Runs the post processing steps
 /// </summary>
 /// <param name="tree">The zone tree</param>
 private void RunPostProcessingSteps(ZoneTree tree)
 {
     foreach (var step in this.PostProcessingSteps)
     {
         tree.Accept(step);
     }
 }