Documentation of 'smile.nlp.pos.HMMPOSTagger' Java class
HMMPOSTagger
smile.nlp.pos

Class HMMPOSTagger

  • All Implemented Interfaces:
    java.io.Serializable, POSTagger


    public class HMMPOSTagger
    extends java.lang.Object
    implements POSTagger, java.io.Serializable
    Part-of-speech tagging with hidden Markov model.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor and Description
      HMMPOSTagger()
      Constructor.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      static HMMPOSTagger getDefault()
      Returns the default English POS tagger.
      static HMMPOSTagger learn(java.lang.String[][] sentences, PennTreebankPOS[][] labels)
      Learns an HMM POS tagger by maximum likelihood estimation.
      static void load(java.lang.String dir, java.util.List<java.lang.String[]> sentences, java.util.List<PennTreebankPOS[]> labels)
      Load training data from a corpora.
      static void main(java.lang.String[] argvs)
      Train the default model on WSJ and BROWN datasets.
      PennTreebankPOS[] tag(java.lang.String[] sentence)
      Tags the sentence in the form of a sequence of words
      static void walkin(java.io.File dir, java.util.List<java.io.File> files)
      Recursive function to descend into the directory tree and find all the files that end with ".POS"
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • HMMPOSTagger

        public HMMPOSTagger()
        Constructor. Creates an empty model. For Serialization only.
    • Method Detail

      • getDefault

        public static HMMPOSTagger getDefault()
        Returns the default English POS tagger.
        Returns:
        the default English POS tagger
      • tag

        public PennTreebankPOS[] tag(java.lang.String[] sentence)
        Description copied from interface: POSTagger
        Tags the sentence in the form of a sequence of words
        Specified by:
        tag in interface POSTagger
      • learn

        public static HMMPOSTagger learn(java.lang.String[][] sentences,
                                         PennTreebankPOS[][] labels)
        Learns an HMM POS tagger by maximum likelihood estimation.
      • load

        public static void load(java.lang.String dir,
                                java.util.List<java.lang.String[]> sentences,
                                java.util.List<PennTreebankPOS[]> labels)
        Load training data from a corpora.
        Parameters:
        dir - a file object defining the top directory
      • walkin

        public static void walkin(java.io.File dir,
                                  java.util.List<java.io.File> files)
        Recursive function to descend into the directory tree and find all the files that end with ".POS"
        Parameters:
        dir - a file object defining the top directory
      • main

        public static void main(java.lang.String[] argvs)
        Train the default model on WSJ and BROWN datasets.

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.