edu.stanford.nlp.ie.hmm
Class ContextTrainer
java.lang.Object
|
+--edu.stanford.nlp.ie.hmm.ContextTrainer
- public class ContextTrainer
- extends Object
Trains a context HMM on the contexts of the given target states,
representing each target state as atomic. This utility trains on the
entire given training data and builds an HMM with one background state and
then transitions between it and the various target states in a potentially
fully connected model. This will work well on data which is dense with
states (bibliographic entries, addresses, ...), but doesn't do detailed
state context modeling (in terms of prefix and suffix style background
states) of the kind needed to do well on loosely structured natural
language data.
Method Summary |
static void |
main(String[] args)
This is a command line utility that builds a serialized extractor
for the context of a field. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
main
public static void main(String[] args)
- This is a command line utility that builds a serialized extractor
for the context of a field.
The usage is:
java ContextTrainer [-ct] trainingFile hmmFile targetField ...
or
java ContextTrainer -cc trainingFile targetField ...
The first usage is the standard one for training a Context HMM.
It saves the built hmm in a file hmmFile.
The second usage just checks that isolateContext works by printing
the first few documents, with target states replaced by a state token.
- Parameters:
args
- Command line arguments, as above.
Stanford NLP Group