/** Add a group of states that are fully connected with each other, * with parameters equal zero, and labels on their out-going arcs * the same name as their destination state names. */ public void addFullyConnectedStates (String[] stateNames) { for (int i = 0; i < stateNames.length; i++) addState (stateNames[i], stateNames); }
/** Default gives separate parameters to each transition. */ public void addState (String name, double initialWeight, double finalWeight, String[] destinationNames, String[] labelNames) { assert (destinationNames.length == labelNames.length); String[] weightNames = new String[labelNames.length]; for (int i = 0; i < labelNames.length; i++) weightNames[i] = name + "->" + destinationNames[i] + ":" + labelNames[i]; this.addState (name, initialWeight, finalWeight, destinationNames, labelNames, weightNames); }
public void addState (String name, double initialWeight, double finalWeight, String[] destinationNames, String[] labelNames, String[] weightNames) { String[][] newWeightNames = new String[weightNames.length][1]; for (int i = 0; i < weightNames.length; i++) newWeightNames[i][0] = weightNames[i]; this.addState (name, initialWeight, finalWeight, destinationNames, labelNames, newWeightNames); }
/** Add a group of states that are fully connected with each other, * with parameters equal zero, and labels on their out-going arcs * the same name as their destination state names. */ public void addFullyConnectedStates (String[] stateNames) { for (int i = 0; i < stateNames.length; i++) addState (stateNames[i], stateNames); }
public void addState (String name, double initialWeight, double finalWeight, String[] destinationNames, String[] labelNames, String[] weightNames) { String[][] newWeightNames = new String[weightNames.length][1]; for (int i = 0; i < weightNames.length; i++) newWeightNames[i][0] = weightNames[i]; this.addState (name, initialWeight, finalWeight, destinationNames, labelNames, newWeightNames); }
/** Default gives separate parameters to each transition. */ public void addState (String name, double initialWeight, double finalWeight, String[] destinationNames, String[] labelNames) { assert (destinationNames.length == labelNames.length); String[] weightNames = new String[labelNames.length]; for (int i = 0; i < labelNames.length; i++) weightNames[i] = name + "->" + destinationNames[i] + ":" + labelNames[i]; this.addState (name, initialWeight, finalWeight, destinationNames, labelNames, weightNames); }
public void addState (String name, double initialWeight, double finalWeight, String[] destinationNames, String[] labelNames, String[] weightNames) { String[][] newWeightNames = new String[weightNames.length][1]; for (int i = 0; i < weightNames.length; i++) newWeightNames[i][0] = weightNames[i]; this.addState (name, initialWeight, finalWeight, destinationNames, labelNames, newWeightNames); }
/** Default gives separate parameters to each transition. */ public void addState (String name, double initialWeight, double finalWeight, String[] destinationNames, String[] labelNames) { assert (destinationNames.length == labelNames.length); String[] weightNames = new String[labelNames.length]; for (int i = 0; i < labelNames.length; i++) weightNames[i] = name + "->" + destinationNames[i] + ":" + labelNames[i]; this.addState (name, initialWeight, finalWeight, destinationNames, labelNames, weightNames); }
/** Add a state with parameters equal zero, and labels on out-going arcs the same name as their destination state names. */ public void addState (String name, String[] destinationNames) { this.addState (name, 0, 0, destinationNames, destinationNames); }
/** Add a group of states that are fully connected with each other, * with parameters equal zero, and labels on their out-going arcs * the same name as their destination state names. */ public void addFullyConnectedStates (String[] stateNames) { for (int i = 0; i < stateNames.length; i++) addState (stateNames[i], stateNames); }
/** Add a state with parameters equal zero, and labels on out-going arcs the same name as their destination state names. */ public void addState (String name, String[] destinationNames) { this.addState (name, 0, 0, destinationNames, destinationNames); }
/** Add a state with parameters equal zero, and labels on out-going arcs the same name as their destination state names. */ public void addState (String name, String[] destinationNames) { this.addState (name, 0, 0, destinationNames, destinationNames); }
public void addSelfTransitioningStateForAllLabels (String name) { String[] labels = new String[outputAlphabet.size()]; String[] destinationNames = new String[outputAlphabet.size()]; // This is assuming the the entries in the outputAlphabet are Strings! for (int i = 0; i < outputAlphabet.size(); i++) { logger.fine ("CRF: outputAlphabet.lookup class = "+ outputAlphabet.lookupObject(i).getClass().getName()); labels[i] = (String) outputAlphabet.lookupObject(i); destinationNames[i] = name; } addState (name, 0.0, 0.0, destinationNames, labels); }
public void addSelfTransitioningStateForAllLabels (String name) { String[] labels = new String[outputAlphabet.size()]; String[] destinationNames = new String[outputAlphabet.size()]; // This is assuming the the entries in the outputAlphabet are Strings! for (int i = 0; i < outputAlphabet.size(); i++) { logger.info ("CRF: outputAlphabet.lookup class = "+ outputAlphabet.lookupObject(i).getClass().getName()); labels[i] = (String) outputAlphabet.lookupObject(i); destinationNames[i] = name; } addState (name, 0.0, 0.0, destinationNames, labels); }
public void addSelfTransitioningStateForAllLabels (String name) { String[] labels = new String[outputAlphabet.size()]; String[] destinationNames = new String[outputAlphabet.size()]; // This is assuming the the entries in the outputAlphabet are Strings! for (int i = 0; i < outputAlphabet.size(); i++) { logger.info ("CRF: outputAlphabet.lookup class = "+ outputAlphabet.lookupObject(i).getClass().getName()); labels[i] = (String) outputAlphabet.lookupObject(i); destinationNames[i] = name; } addState (name, 0.0, 0.0, destinationNames, labels); }
public void addFullyConnectedStatesForBiLabels () { String[] labels = new String[outputAlphabet.size()]; // This is assuming the the entries in the outputAlphabet are Strings! for (int i = 0; i < outputAlphabet.size(); i++) { logger.info ("CRF: outputAlphabet.lookup class = "+ outputAlphabet.lookupObject(i).getClass().getName()); labels[i] = (String) outputAlphabet.lookupObject(i); } for (int i = 0; i < labels.length; i++) { for (int j = 0; j < labels.length; j++) { String[] destinationNames = new String[labels.length]; for (int k = 0; k < labels.length; k++) destinationNames[k] = labels[j]+LABEL_SEPARATOR+labels[k]; addState (labels[i]+LABEL_SEPARATOR+labels[j], 0.0, 0.0, destinationNames, labels); } } }
public void addFullyConnectedStatesForBiLabels () { String[] labels = new String[outputAlphabet.size()]; // This is assuming the the entries in the outputAlphabet are Strings! for (int i = 0; i < outputAlphabet.size(); i++) { logger.info ("CRF: outputAlphabet.lookup class = "+ outputAlphabet.lookupObject(i).getClass().getName()); labels[i] = (String) outputAlphabet.lookupObject(i); } for (int i = 0; i < labels.length; i++) { for (int j = 0; j < labels.length; j++) { String[] destinationNames = new String[labels.length]; for (int k = 0; k < labels.length; k++) destinationNames[k] = labels[j]+LABEL_SEPARATOR+labels[k]; addState (labels[i]+LABEL_SEPARATOR+labels[j], 0.0, 0.0, destinationNames, labels); } } }
public void addStartState (String name) { for (int i = 0; i < numStates (); i++) parameters.initialWeights[i] = IMPOSSIBLE_WEIGHT; String[] dests = new String [numStates()]; for (int i = 0; i < dests.length; i++) dests[i] = getState(i).getName(); addState (name, 0, 0.0, dests, dests); // initialWeight of 0.0 }
public void addStartState (String name) { for (int i = 0; i < numStates (); i++) parameters.initialWeights[i] = IMPOSSIBLE_WEIGHT; String[] dests = new String [numStates()]; for (int i = 0; i < dests.length; i++) dests[i] = getState(i).getName(); addState (name, 0, 0.0, dests, dests); // initialWeight of 0.0 }
public void addStartState (String name) { for (int i = 0; i < numStates (); i++) parameters.initialWeights[i] = IMPOSSIBLE_WEIGHT; String[] dests = new String [numStates()]; for (int i = 0; i < dests.length; i++) dests[i] = getState(i).getName(); addState (name, 0, 0.0, dests, dests); // initialWeight of 0.0 }