public class SingleMalt extends java.lang.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 java.lang.Class<?>[] |
paramTypes |
static int |
PARSE |
protected ParsingAlgorithm |
parsingAlgorithm |
protected PropagationManager |
propagationManager |
protected long |
startTime |
protected SymbolTableHandler |
symbolTableHandler |
Constructor and Description |
---|
SingleMalt() |
Modifier and Type | Method and Description |
---|---|
void |
checkOptionDependency() |
ParsingAlgorithm |
getAlgorithm() |
java.io.OutputStreamWriter |
getAppendOutputStreamWriter(java.lang.String fileName) |
java.lang.Object |
getConfigFileEntryObject(java.lang.String fileName) |
java.lang.String |
getConfigFileEntryString(java.lang.String fileName) |
java.net.URL |
getConfigFileEntryURL(java.lang.String fileName) |
org.apache.log4j.Logger |
getConfigLogger() |
ConfigurationDir |
getConfigurationDir() |
DataFormatInstance |
getDataFormatInstance() |
FeatureModelManager |
getFeatureModelManager() |
java.io.File |
getFile(java.lang.String fileName) |
ClassifierGuide |
getGuide()
Returns the guide
|
java.io.InputStream |
getInputStreamFromConfigFileEntry(java.lang.String fileName) |
java.io.InputStreamReader |
getInputStreamReader(java.lang.String fileName) |
int |
getMode() |
OptionManager |
getOptionManager() |
java.lang.Object |
getOptionValue(java.lang.String optiongroup,
java.lang.String optionname) |
java.lang.String |
getOptionValueString(java.lang.String optiongroup,
java.lang.String optionname) |
java.io.OutputStreamWriter |
getOutputStreamWriter(java.lang.String fileName) |
AbstractParserFactory |
getParserFactory() |
PropagationManager |
getPropagationManager() |
SymbolTableHandler |
getSymbolTables()
Returns the list of symbol tables
|
org.apache.log4j.Logger |
initConfigLogger(java.lang.String logfile,
java.lang.String level)
Initialize the configuration logger
|
protected void |
initFeatureSystem() |
void |
initialize(int containerIndex,
DataFormatInstance dataFormatInstance,
SymbolTableHandler symbolTableHandler,
ConfigurationDir configDir,
int mode) |
protected void |
initParsingAlgorithm()
Initialize the parsing algorithm
|
boolean |
isLoggerDebugEnabled() |
boolean |
isLoggerInfoEnabled() |
void |
logDebugMessage(java.lang.String message) |
void |
logErrorMessage(java.lang.String message) |
void |
logInfoMessage(char character) |
void |
logInfoMessage(java.lang.String message) |
void |
oracleParse(DependencyStructure goldGraph,
DependencyStructure oracleGraph) |
void |
parse(DependencyStructure graph) |
void |
process(java.lang.Object[] arguments) |
void |
setConfigLogger(org.apache.log4j.Logger logger) |
void |
setConfigurationDir(ConfigurationDir configDir) |
void |
terminate(java.lang.Object[] arguments) |
void |
train() |
void |
writeInfoToConfigFile(java.lang.String message) |
public static final java.lang.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(java.lang.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(java.lang.Object[] arguments) throws MaltChainedException
MaltChainedException
public org.apache.log4j.Logger initConfigLogger(java.lang.String logfile, java.lang.String level) throws MaltChainedException
MaltChainedException
public boolean isLoggerInfoEnabled()
isLoggerInfoEnabled
in interface Configuration
public boolean isLoggerDebugEnabled()
isLoggerDebugEnabled
in interface Configuration
public void logErrorMessage(java.lang.String message)
logErrorMessage
in interface Configuration
public void logInfoMessage(java.lang.String message)
logInfoMessage
in interface Configuration
public void logInfoMessage(char character)
logInfoMessage
in interface Configuration
public void logDebugMessage(java.lang.String message)
logDebugMessage
in interface Configuration
public void writeInfoToConfigFile(java.lang.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 java.io.OutputStreamWriter getOutputStreamWriter(java.lang.String fileName) throws MaltChainedException
getOutputStreamWriter
in interface Configuration
MaltChainedException
public java.io.OutputStreamWriter getAppendOutputStreamWriter(java.lang.String fileName) throws MaltChainedException
getAppendOutputStreamWriter
in interface Configuration
MaltChainedException
public java.io.InputStreamReader getInputStreamReader(java.lang.String fileName) throws MaltChainedException
getInputStreamReader
in interface Configuration
MaltChainedException
public java.io.InputStream getInputStreamFromConfigFileEntry(java.lang.String fileName) throws MaltChainedException
getInputStreamFromConfigFileEntry
in interface Configuration
MaltChainedException
public java.net.URL getConfigFileEntryURL(java.lang.String fileName) throws MaltChainedException
getConfigFileEntryURL
in interface Configuration
MaltChainedException
public java.io.File getFile(java.lang.String fileName) throws MaltChainedException
getFile
in interface Configuration
MaltChainedException
public java.lang.Object getConfigFileEntryObject(java.lang.String fileName) throws MaltChainedException
getConfigFileEntryObject
in interface Configuration
MaltChainedException
public java.lang.String getConfigFileEntryString(java.lang.String fileName) throws MaltChainedException
getConfigFileEntryString
in interface Configuration
MaltChainedException
public int getMode()
public java.lang.Object getOptionValue(java.lang.String optiongroup, java.lang.String optionname) throws MaltChainedException
getOptionValue
in interface Configuration
MaltChainedException
public java.lang.String getOptionValueString(java.lang.String optiongroup, java.lang.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-2017 Johan Hall, Jens Nilsson and Joakim Nivre.