Package org.maltparserx.parser.algorithm.nivre

Source Code of org.maltparserx.parser.algorithm.nivre.NivreArcStandardFactory

package org.maltparserx.parser.algorithm.nivre;

import org.maltparserx.core.exception.MaltChainedException;
import org.maltparserx.parser.Algorithm;
import org.maltparserx.parser.TransitionSystem;
import org.maltparserx.parser.guide.OracleGuide;
import org.maltparserx.parser.history.GuideUserHistory;
/**
* @author Johan Hall
*
*/
public class NivreArcStandardFactory extends NivreFactory {
  public NivreArcStandardFactory(Algorithm algorithm) {
    super(algorithm);
  }
 
  public TransitionSystem makeTransitionSystem() throws MaltChainedException {
    if (manager.getConfigLogger().isInfoEnabled()) {
      manager.getConfigLogger().info("  Transition system    : Arc-Standard\n");
    }
    TransitionSystem ts = new ArcStandard();
    ts.setPropagationManager(manager.getPropagationManager());
    return ts;
  }
 
  public OracleGuide makeOracleGuide(GuideUserHistory history) throws MaltChainedException {
    if (manager.getConfigLogger().isInfoEnabled()) {
      manager.getConfigLogger().info("  Oracle               : Arc-Standard\n");
    }
    return new ArcStandardOracle(manager, history);
  }
}
TOP

Related Classes of org.maltparserx.parser.algorithm.nivre.NivreArcStandardFactory

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.