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