public class SingleMalt extends Object implements DependencyParserConfig
Modifier and Type | Field and Description |
---|---|
protected ConfigurationDir |
configDir |
protected org.apache.log4j.Logger |
configLogger |
protected DataFormatInstance |
dataFormatInstance |
protected long |
endTime |
protected FeatureModelManager |
featureModelManager |
static int |
LEARN |
protected int |
mode |
protected int |
nIterations |
protected int |
optionContainerIndex |
static Class<?>[] |
paramTypes |
static int |
PARSE |
protected ParsingAlgorithm |
parsingAlgorithm |
protected PropagationManager |
propagationManager |
protected long |
startTime |
protected SymbolTableHandler |
symbolTableHandler |
Constructor and Description |
---|
SingleMalt() |
public static final Class<?>[] paramTypes
public static final int LEARN
public static final int PARSE
protected ConfigurationDir configDir
protected org.apache.log4j.Logger configLogger
protected int optionContainerIndex
protected ParsingAlgorithm parsingAlgorithm
protected int mode
protected SymbolTableHandler symbolTableHandler
protected DataFormatInstance dataFormatInstance
protected FeatureModelManager featureModelManager
protected long startTime
protected long endTime
protected int nIterations
protected PropagationManager propagationManager
public SingleMalt()
public void initialize(int containerIndex, DataFormatInstance dataFormatInstance, SymbolTableHandler symbolTableHandler, ConfigurationDir configDir, int mode) throws MaltChainedException
MaltChainedException
protected void initParsingAlgorithm() throws MaltChainedException
MaltChainedException
protected void initFeatureSystem() throws MaltChainedException
MaltChainedException
public AbstractParserFactory getParserFactory()
getParserFactory
in interface DependencyParserConfig
public FeatureModelManager getFeatureModelManager()
getFeatureModelManager
in interface DependencyParserConfig
public void process(Object[] arguments) throws MaltChainedException
MaltChainedException
public void parse(DependencyStructure graph) throws MaltChainedException
parse
in interface DependencyParserConfig
MaltChainedException
public void oracleParse(DependencyStructure goldGraph, DependencyStructure oracleGraph) throws MaltChainedException
oracleParse
in interface DependencyParserConfig
MaltChainedException
public void train() throws MaltChainedException
MaltChainedException
public void terminate(Object[] arguments) throws MaltChainedException
MaltChainedException
public org.apache.log4j.Logger initConfigLogger(String logfile, String level) throws MaltChainedException
MaltChainedException
public boolean isLoggerInfoEnabled()
isLoggerInfoEnabled
in interface Configuration
public boolean isLoggerDebugEnabled()
isLoggerDebugEnabled
in interface Configuration
public void logErrorMessage(String message)
logErrorMessage
in interface Configuration
public void logInfoMessage(String message)
logInfoMessage
in interface Configuration
public void logInfoMessage(char character)
logInfoMessage
in interface Configuration
public void logDebugMessage(String message)
logDebugMessage
in interface Configuration
public void writeInfoToConfigFile(String message) throws MaltChainedException
writeInfoToConfigFile
in interface Configuration
MaltChainedException
public org.apache.log4j.Logger getConfigLogger()
public void setConfigLogger(org.apache.log4j.Logger logger)
public ConfigurationDir getConfigurationDir()
public void setConfigurationDir(ConfigurationDir configDir)
public OutputStreamWriter getOutputStreamWriter(String fileName) throws MaltChainedException
getOutputStreamWriter
in interface Configuration
MaltChainedException
public OutputStreamWriter getAppendOutputStreamWriter(String fileName) throws MaltChainedException
getAppendOutputStreamWriter
in interface Configuration
MaltChainedException
public InputStreamReader getInputStreamReader(String fileName) throws MaltChainedException
getInputStreamReader
in interface Configuration
MaltChainedException
public InputStream getInputStreamFromConfigFileEntry(String fileName) throws MaltChainedException
getInputStreamFromConfigFileEntry
in interface Configuration
MaltChainedException
public URL getConfigFileEntryURL(String fileName) throws MaltChainedException
getConfigFileEntryURL
in interface Configuration
MaltChainedException
public File getFile(String fileName) throws MaltChainedException
getFile
in interface Configuration
MaltChainedException
public Object getConfigFileEntryObject(String fileName) throws MaltChainedException
getConfigFileEntryObject
in interface Configuration
MaltChainedException
public String getConfigFileEntryString(String fileName) throws MaltChainedException
getConfigFileEntryString
in interface Configuration
MaltChainedException
public int getMode()
public Object getOptionValue(String optiongroup, String optionname) throws MaltChainedException
getOptionValue
in interface Configuration
MaltChainedException
public String getOptionValueString(String optiongroup, String optionname) throws MaltChainedException
getOptionValueString
in interface Configuration
MaltChainedException
public OptionManager getOptionManager() throws MaltChainedException
MaltChainedException
public SymbolTableHandler getSymbolTables()
getSymbolTables
in interface Configuration
public DataFormatInstance getDataFormatInstance()
getDataFormatInstance
in interface DependencyParserConfig
public PropagationManager getPropagationManager()
getPropagationManager
in interface DependencyParserConfig
public ParsingAlgorithm getAlgorithm()
public ClassifierGuide getGuide()
public void checkOptionDependency() throws MaltChainedException
MaltChainedException
Copyright 2007-2014 Johan Hall, Jens Nilsson and Joakim Nivre.