MaltParser 1.2

org.maltparser.parser
Class SingleMalt

java.lang.Object
  extended by org.maltparser.parser.SingleMalt
All Implemented Interfaces:
Configuration, DependencyParserConfig, Guidable

public class SingleMalt
extends Object
implements DependencyParserConfig, Guidable


Field Summary
protected  ConfigurationDir configDir
           
protected  org.apache.log4j.Logger configLogger
           
protected  long endTime
           
protected  Guide guide
           
static int LEARN
           
protected  int mode
           
protected  int optionContainerIndex
           
static int PARSE
           
protected  ParsingAlgorithm parsingAlgorithm
           
protected  ConfigurationRegistry registry
           
protected  long startTime
           
protected  SymbolTableHandler symbolTableHandler
           
 
Constructor Summary
SingleMalt()
           
 
Method Summary
 void checkOptionDependency()
           
 org.apache.log4j.Logger getConfigLogger()
           
 ConfigurationDir getConfigurationDir()
           
 Guide getGuide()
          Returns the guide
 int getMode()
           
 OptionManager getOptionManager()
           
 Object getOptionValue(String optiongroup, String optionname)
           
 String getOptionValueString(String optiongroup, String optionname)
           
 ParsingAlgorithm getParsingAlgorithm()
          Returns the parsing algorithm in use
 ConfigurationRegistry getRegistry()
           
 SymbolTableHandler getSymbolTables()
          Returns the list of symbol tables
 org.apache.log4j.Logger initConfigLogger(String logfile, String level)
          Initialize the configuration logger
 void initGuide()
           
 void initialize(int containerIndex, DataFormatInstance dataFormatInstance, ConfigurationDir configDir, int mode)
           
protected  void initParsingAlgorithm()
          Initialize the parsing algorithm
 void oracleParse(DependencyStructure goldGraph, DependencyStructure oracleGraph)
           
 void parse(DependencyStructure graph)
           
 void predict(GuideUserAction action)
          This method is used during parsing.
 boolean predictFromKBestList(GuideUserAction action)
          This method is used during parsing.
 void process(Object[] arguments)
           
 void setConfigLogger(org.apache.log4j.Logger logger)
           
 void setConfigurationDir(ConfigurationDir configDir)
           
 void setInstance(GuideUserAction action)
          This method is used during learning.
 void setRegistry(ConfigurationRegistry registry)
           
 void terminate(Object[] arguments)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LEARN

public static final int LEARN
See Also:
Constant Field Values

PARSE

public static final int PARSE
See Also:
Constant Field Values

configDir

protected ConfigurationDir configDir

configLogger

protected org.apache.log4j.Logger configLogger

optionContainerIndex

protected int optionContainerIndex

parsingAlgorithm

protected ParsingAlgorithm parsingAlgorithm

guide

protected Guide guide

mode

protected int mode

registry

protected ConfigurationRegistry registry

symbolTableHandler

protected SymbolTableHandler symbolTableHandler

startTime

protected long startTime

endTime

protected long endTime
Constructor Detail

SingleMalt

public SingleMalt()
Method Detail

initialize

public void initialize(int containerIndex,
                       DataFormatInstance dataFormatInstance,
                       ConfigurationDir configDir,
                       int mode)
                throws MaltChainedException
Throws:
MaltChainedException

initParsingAlgorithm

protected void initParsingAlgorithm()
                             throws MaltChainedException
Initialize the parsing algorithm

Throws:
MaltChainedException

initGuide

public void initGuide()
               throws MaltChainedException
Throws:
MaltChainedException

process

public void process(Object[] arguments)
             throws MaltChainedException
Throws:
MaltChainedException

parse

public void parse(DependencyStructure graph)
           throws MaltChainedException
Specified by:
parse in interface DependencyParserConfig
Throws:
MaltChainedException

oracleParse

public void oracleParse(DependencyStructure goldGraph,
                        DependencyStructure oracleGraph)
                 throws MaltChainedException
Specified by:
oracleParse in interface DependencyParserConfig
Throws:
MaltChainedException

terminate

public void terminate(Object[] arguments)
               throws MaltChainedException
Throws:
MaltChainedException

initConfigLogger

public org.apache.log4j.Logger initConfigLogger(String logfile,
                                                String level)
                                         throws MaltChainedException
Initialize the configuration logger

Returns:
the configuration logger
Throws:
MaltChainedException

getConfigLogger

public org.apache.log4j.Logger getConfigLogger()
Specified by:
getConfigLogger in interface Configuration

setConfigLogger

public void setConfigLogger(org.apache.log4j.Logger logger)
Specified by:
setConfigLogger in interface Configuration

getConfigurationDir

public ConfigurationDir getConfigurationDir()
Specified by:
getConfigurationDir in interface Configuration

setConfigurationDir

public void setConfigurationDir(ConfigurationDir configDir)
Specified by:
setConfigurationDir in interface Configuration

getMode

public int getMode()

getRegistry

public ConfigurationRegistry getRegistry()
Specified by:
getRegistry in interface Configuration

setRegistry

public void setRegistry(ConfigurationRegistry registry)

getOptionValue

public Object getOptionValue(String optiongroup,
                             String optionname)
                      throws MaltChainedException
Specified by:
getOptionValue in interface Configuration
Throws:
MaltChainedException

getOptionValueString

public String getOptionValueString(String optiongroup,
                                   String optionname)
                            throws MaltChainedException
Specified by:
getOptionValueString in interface Configuration
Throws:
MaltChainedException

getOptionManager

public OptionManager getOptionManager()
                               throws MaltChainedException
Throws:
MaltChainedException

getSymbolTables

public SymbolTableHandler getSymbolTables()
Returns the list of symbol tables

Specified by:
getSymbolTables in interface Configuration
Returns:
the list of symbol tables

getParsingAlgorithm

public ParsingAlgorithm getParsingAlgorithm()
Returns the parsing algorithm in use

Specified by:
getParsingAlgorithm in interface DependencyParserConfig
Returns:
the parsing algorithm in use

getGuide

public Guide getGuide()
Returns the guide

Specified by:
getGuide in interface DependencyParserConfig
Returns:
the guide

checkOptionDependency

public void checkOptionDependency()
                           throws MaltChainedException
Throws:
MaltChainedException

setInstance

public void setInstance(GuideUserAction action)
                 throws MaltChainedException
This method is used during learning. Currently, the MaltParserConfiguration redirect the instance to the guide. Maybe in the future this method will be re-implemented to add some interesting things or maybe not.

Specified by:
setInstance in interface Guidable
Parameters:
action -
Throws:
MaltChainedException

predictFromKBestList

public boolean predictFromKBestList(GuideUserAction action)
                             throws MaltChainedException
This method is used during parsing. Currently, the MaltParserConfiguration redirect the request to the guide. Maybe in the future this method will be re-implemented to add some interesting things or maybe not.

Specified by:
predictFromKBestList in interface Guidable
Throws:
MaltChainedException

predict

public void predict(GuideUserAction action)
             throws MaltChainedException
This method is used during parsing. Currently, the MaltParserConfiguration redirect the request to the guide. Maybe in the future this method will be re-implemented to add some interesting things or maybe not.

Specified by:
predict in interface Guidable
Throws:
MaltChainedException

MaltParser 1.2

Copyright 2007-2008 Johan Hall, Jens Nilsson and Joakim Nivre.