Package sequence

Examples of sequence.OneYwithXFeatureFunction


  public static LinearTagger trainPerceptron(boolean doAveraging,
      int numIters, ArrayList<SequenceInstance> train, Alphabet xA,
      Alphabet yA) {
    Perceptron p = new Perceptron(doAveraging, numIters, xA, yA,
        new OneYwithXFeatureFunction(xA, yA));
    LinearTagger h = p.batchTrain(train);
    return h;
  }
View Full Code Here


    return h;
  }

  public static LinearTagger trainCRF(ArrayList<SequenceInstance> train,
      Alphabet xA, Alphabet yA) {
    CRF crf = new CRF(10, xA, yA, new OneYwithXFeatureFunction(xA, yA));
    LinearTagger h = crf.batchTrain(train);
    return h;
  }
View Full Code Here

  }

  private LinearTagger trainCRF(ArrayList<SequenceInstance> data,
      Alphabet xA, Alphabet yA) {

    CRF crf = new CRF(10, xA, yA, new OneYwithXFeatureFunction(xA, yA));
    return crf.batchTrain(data);
  }
View Full Code Here

  @SuppressWarnings("unused")
  private LinearTagger trainPerceptron(ArrayList<SequenceInstance> data,
      Alphabet xA, Alphabet yA, int numIters, boolean doAveraging) {

    Perceptron perceptron = new Perceptron(doAveraging, numIters, xA, yA,
        new OneYwithXFeatureFunction(xA, yA));
    return perceptron.batchTrain(data);
  }
View Full Code Here

TOP

Related Classes of sequence.OneYwithXFeatureFunction

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.