Package org.fnlp.train.seg

Source Code of org.fnlp.train.seg.SegRunFinal

package org.fnlp.train.seg;

import org.fnlp.train.tag.ModelOptimization;
import org.fnlp.util.MyFiles;

public class SegRunFinal {


  public static void main(String[] args) throws Exception {   


    String datapath = "../data";
    String model = "../models/seg.m";
    String templates = "../data/template-seg";

    //合并训练文件

    String allfile = datapath + "/FNLPDATA/all.seg"
    String testfile = datapath + "/FNLPDATA/test.seg"
    String trainfile = datapath + "/FNLPDATA/train.seg";


   
   
     
    MyFiles.combine(allfile, trainfile,testfile);
    SegTrain seg;


    seg = new SegTrain();
    seg.model = model;
    seg.train = allfile;
    seg.templateFile = templates;
    seg.iterNum = 100;
    seg.c = 0.01f;
    seg.train();   

    /////////////////////////////////////////
    float thres = 0.001f;

    ModelOptimization op = new ModelOptimization(thres);
    op.optimizeTag(model);


  }


}
TOP

Related Classes of org.fnlp.train.seg.SegRunFinal

TOP
Copyright © 2018 www.massapi.com. 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.