    001    package org.maltparser.parser.algorithm.stack;
    002
    003    import org.maltparser.core.exception.MaltChainedException;
    004    import org.maltparser.parser.Algorithm;
    005    import org.maltparser.parser.TransitionSystem;
    006    import org.maltparser.parser.guide.OracleGuide;
    007    import org.maltparser.parser.history.GuideUserHistory;
    008    /**
    009     * @author Johan Hall
    010     *
    011     */
    012    public class StackSwapEagerFactory extends StackFactory {
    013            public StackSwapEagerFactory(Algorithm algorithm) {
    014                    super(algorithm);
    015            }
    016
    017            public TransitionSystem makeTransitionSystem() throws MaltChainedException {
    018                    if (manager.getConfigLogger().isInfoEnabled()) {
    019                            manager.getConfigLogger().info("  Transition system    : Non-Projective\n");
    020                    }
    021                    TransitionSystem ts = new NonProjective();
    022                    ts.setPropagationManager(manager.getPropagationManager());
    023                    return ts;
    024            }
    025
    026            public OracleGuide makeOracleGuide(GuideUserHistory history) throws MaltChainedException {
    027                    if (manager.getConfigLogger().isInfoEnabled()) {
    028                            manager.getConfigLogger().info("  Oracle               : Swap-Eager\n");
    029                    }
    030                    return new SwapEagerOracle(manager, history);
    031            }
    032    }