File size: 1,913 Bytes
6f3ebfa
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
package org.maltparser.parser;

import org.maltparser.core.exception.MaltChainedException;
import org.maltparser.core.syntaxgraph.DependencyStructure;
import org.maltparser.parser.history.HistoryNode;
/**

 * @author Johan Hall

 *

 */
public abstract class ParserConfiguration {
	protected HistoryNode historyNode;

	
	/**

	 * Creates a parser configuration

	 */
	public ParserConfiguration() {
		setHistoryNode(null);
	}

	public HistoryNode getHistoryNode() {
		return historyNode;
	}

	public void setHistoryNode(HistoryNode historyNode) {
		this.historyNode = historyNode;
	}
	
	/**

	 * Sets the dependency structure

	 * 

	 * @param dependencyStructure a dependency structure

	 * @throws MaltChainedException

	 */
	public abstract void setDependencyGraph(DependencyStructure dependencyStructure) throws MaltChainedException;
	/**

	 * Returns true if the parser configuration is in a terminal state, otherwise false.

	 * 

	 * @return true if the parser configuration is in a terminal state, otherwise false.

	 * @throws MaltChainedException

	 */
	public abstract boolean isTerminalState() throws MaltChainedException;
	/**

	 * Returns the dependency structure

	 * 

	 * @return the dependency structure

	 */
	public abstract DependencyStructure getDependencyGraph();
	/**

	 * Clears the parser configuration

	 * 

	 * @throws MaltChainedException

	 */
	public abstract void clear() throws MaltChainedException;
	
//	/**
//	 * Initialize the parser configuration with the same state as the parameter config
//	 * 
//	 * @param config a parser configuration
//	 * @throws MaltChainedException
//	 */
//	public abstract void initialize(ParserConfiguration config) throws MaltChainedException;
	/**

	 * Initialize the parser configuration

	 * 

	 * @throws MaltChainedException

	 */
	public abstract void initialize() throws MaltChainedException;
}