示例#1
0
  @Before
  public void setUp() {
    String args =
        "-modelType dmv "
            + "-Options.stage1.numIters 60 "
            + "-numThreads 1 "
            + "-inputLists "
            //                    + "../wsj/train/ "
            //                    + "wsjLists/unsupervised-train-wsj "
            + "../wsj/3.0/conll/wsj-10-noP-dev.deps "
            //                    + "-inputFileExt mrg "
            //                    + "-inputFormat mrg "
            + "-examplesInSingleFile "
            + "-inputFormat conll "
            + "-dontOutputParams "
            //                    + "-maxExampleLength 10 "
            //                    + "-removePunctuation "
            + "-connlTagPos 3 "
            + "-connlHeadPos 6 "
            + "-useTagsAsWords";

    /*initialisation procedure from Induction class*/
    Options opts = new Options();
    Execution.init(args.split(" "), new Object[] {opts}); // parse input params
    model = new GenerativeDMVModel(opts);
    model.readExamples();
    model.logStats();
    model.preInit();
    model.init(InitType.uniformz, null, "stage1");
    opts.outputIterFreq = opts.stage1.numIters;
    lopts = opts.stage1;
    name = "stage1";
  }