public class Morphology
Morphology computes the base form of English words, by removing just
inflections (not derivational morphology). That is, it only does noun
plurals, pronoun case, and verb endings, and not things like comparative adjectives
or derived nominals. It is based on a finite-state
transducer implemented by John Carroll et al., written in flex and publicly
See: http://www.informatics.susx.ac.uk/research/nlp/carroll/morph.html .
There are several ways of invoking Morphology. One is by calling the static
WordTag stemStatic(String word, String tag) or
WordTag stemStatic(WordTag wordTag).
If we have created a Morphology object already we can use the methods
WordTag stem(String word, string tag) or WordTag stem(WordTag wordTag).
Another way of using Morphology is to run it on an input file by running
java Morphology filename. In this case, POS tags MUST be
separated from words by an underscore ("_").
Note that a single instance of Morphology is not thread-safe, as
the underlying lexer object is not built to be re-entrant. One thing that
you can do to get around this is build a new Morphology object for
each set of calls to the Morphology. For example, the
MorphaAnnotator builds a Morphology for each document it annotates.
The other approach is to use the synchronized methods in this class.