Package org.fnlp.ml.classifier.struct.inf

Examples of org.fnlp.ml.classifier.struct.inf.HigherOrderViterbi


    HammingLoss loss = new HammingLoss();
    if (standard) {
      inference = new LinearViterbi(templets, labels.size());
      update = new LinearViterbiPAUpdate((LinearViterbi) inference, loss);
    } else {
      inference = new HigherOrderViterbi(templets, labels.size());
      update = new HigherOrderViterbiPAUpdate(templets, labels.size(), true);
    }

    OnlineTrainer trainer;
View Full Code Here


    HammingLoss loss = new HammingLoss();
    if (standard) {
      inference = new LinearViterbi(templets, labels.size());
      update = new LinearViterbiPAUpdate((LinearViterbi) inference, loss);
    } else {
      inference = new HigherOrderViterbi(templets, labels.size());
      update = new HigherOrderViterbiPAUpdate(templets, labels.size(), true);
    }

    OnlineTrainer trainer = new OnlineTrainer(inference, update, loss,
        features.size(), iterNum, c1);
View Full Code Here

    seg = new CWSTagger("./models/seg.m");
    cl = seg.getClassifier();
    int ysize = cl.getAlphabetFactory().getLabelSize();
    LinearViterbi vit = (LinearViterbi) cl.getInferencer();
    System.out.println(cl.getAlphabetFactory().getFeatureSize());
    HigherOrderViterbi inferencer = new HigherOrderViterbi(vit.getTemplets(), ysize);
    inferencer.setWeights(vit.getWeights());
    cl.setInferencer(inferencer);


    dict = MyCollection.loadSet("./data/FNLPDATA/all.dict", true);
View Full Code Here

TOP

Related Classes of org.fnlp.ml.classifier.struct.inf.HigherOrderViterbi

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.