Package cc.mallet.fst

Examples of cc.mallet.fst.CRF.addFullyConnectedStates()


    Alphabet outputAlphabet = new Alphabet();
    CRF crf = new CRF(inputAlphabet, outputAlphabet);
    String[] stateNames = new String[numStates];
    for (int i = 0; i < numStates; i++)
      stateNames[i] = "state" + i;
    crf.addFullyConnectedStates(stateNames);
    CRFTrainerByLabelLikelihood crft = new CRFTrainerByLabelLikelihood(crf);
    Optimizable.ByGradientValue mcrf = crft
        .getOptimizableCRF(new InstanceList(null));
    TestOptimizable.testGetSetParameters(mcrf);
  }
View Full Code Here


    CRF crf = new CRF(inputAlphabet, outputAlphabet);

    String[] stateNames = new String[numStates];
    for (int i = 0; i < numStates; i++)
      stateNames[i] = "state" + i;
    crf.addFullyConnectedStates(stateNames);

    crf.setWeightsDimensionDensely();
    crf.getState(0).setInitialWeight(1.0);
    crf.getState(1).setInitialWeight(Transducer.IMPOSSIBLE_WEIGHT);
    crf.getState(0).setFinalWeight(0.0);
View Full Code Here

    CRF crf = new CRF(inputAlphabet, outputAlphabet);

    String[] stateNames = new String[numStates];
    for (int i = 0; i < numStates; i++)
      stateNames[i] = "state" + i;
    crf.addFullyConnectedStates(stateNames);

    crf.setWeightsDimensionDensely();
    crf.getState(0).setInitialWeight(1.0);
    crf.getState(1).setInitialWeight(Transducer.IMPOSSIBLE_WEIGHT);
    crf.getState(0).setFinalWeight(0.0);
View Full Code Here

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.