Search in sources :

Example 1 with TransitionSystem

use of com.joliciel.talismane.parser.TransitionSystem in project talismane by joliciel-informatique.

the class DependencyLabelSetFeature method checkInternal.

@Override
public FeatureResult<List<WeightedOutcome<String>>> checkInternal(ParseConfigurationWrapper context, RuntimeEnvironment env) {
    TransitionSystem transitionSystem = TalismaneSession.get(sessionId).getTransitionSystem();
    List<WeightedOutcome<String>> resultList = new ArrayList<WeightedOutcome<String>>();
    for (String label : transitionSystem.getDependencyLabelSet().getDependencyLabels()) {
        resultList.add(new WeightedOutcome<String>(label, 1.0));
    }
    return this.generateResult(resultList);
}
Also used : TransitionSystem(com.joliciel.talismane.parser.TransitionSystem) ArrayList(java.util.ArrayList) WeightedOutcome(com.joliciel.talismane.utils.WeightedOutcome)

Aggregations

TransitionSystem (com.joliciel.talismane.parser.TransitionSystem)1 WeightedOutcome (com.joliciel.talismane.utils.WeightedOutcome)1 ArrayList (java.util.ArrayList)1