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 StackSwapLazyFactory extends StackFactory {
013            public StackSwapLazyFactory(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                    return new NonProjective();
022            }
023            
024            public OracleGuide makeOracleGuide(GuideUserHistory history) throws MaltChainedException {
025                    if (manager.getConfigLogger().isInfoEnabled()) {
026                            manager.getConfigLogger().info("  Oracle               : Swap-Lazy\n");
027                    }
028                    return new SwapLazyOracle(manager, history);
029            }
030    }