Class WordStemmer

  • All Implemented Interfaces:
    TreeVisitor

    public class WordStemmer
    extends Object
    implements TreeVisitor
    Stems the Words in a Tree using Morphology.
    Author:
    Huy Nguyen (htnguyen@cs.stanford.edu)
    • Constructor Detail

      • WordStemmer

        public WordStemmer()
    • Method Detail

      • visitTree

        public void visitTree​(Tree t)
        Description copied from interface: TreeVisitor
        Does whatever one needs to do to a particular parse tree.
        Specified by:
        visitTree in interface TreeVisitor
        Parameters:
        t - A tree. Classes implementing this interface can assume that the tree passed in is not null.
      • main

        public static void main​(String[] args)
        Reads, stems, and prints the trees in the file.
        Parameters:
        args - Usage: WordStemmer file