001package org.maltparser.parser;
002
003import org.maltparser.core.exception.MaltChainedException;
004import org.maltparser.core.symbol.SymbolTableHandler;
005import org.maltparser.core.syntaxgraph.DependencyStructure;
006import org.maltparser.parser.guide.OracleGuide;
007/**
008 * @author Johan Hall
009 *
010 */
011public abstract class Trainer extends ParsingAlgorithm {
012        /**
013         * Creates a parser trainer
014         * 
015         * @param manager a reference to the single malt configuration
016         * @throws MaltChainedException
017         */
018        public Trainer(DependencyParserConfig manager, SymbolTableHandler symbolTableHandler) throws MaltChainedException {
019                super(manager, symbolTableHandler);
020        }
021        
022        /**
023         * Trains a parser using the gold-standard dependency graph and returns a parsed dependency graph
024         * 
025         * @param goldDependencyGraph a old-standard dependency graph
026         * @param parseDependencyGraph a empty dependency graph
027         * @return a parsed dependency graph
028         * @throws MaltChainedException
029         */
030        public abstract DependencyStructure parse(DependencyStructure goldDependencyGraph, DependencyStructure parseDependencyGraph) throws MaltChainedException;
031        /**
032         * Returns the oracle guide.
033         * 
034         * @return the oracle guide.
035         */
036        public abstract OracleGuide getOracleGuide();
037        public abstract void train() throws MaltChainedException;
038        
039}