Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| MaltParser 1.5
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.maltparser.parser
Class Algorithm

    java.lang.Object
      org.maltparser.parser.Algorithm

Direct Known Subclasses:
  Parser, Trainer

    public abstract class Algorithm

extends Object

Author:
  Johan Hall

Field Summary
`protected ClassifierGuide` | `classifierGuide`
`protected ParserConfiguration` | `currentParserConfiguration`
`protected boolean` | `diagnostics`
`protected BufferedWriter` | `diaWriter`
`protected DependencyParserConfig` | `manager`
`protected ParserState` | `parserState`

Constructor Summary
`Algorithm(DependencyParserConfig manager)` Creates a parsing algorithm

Method Summary
`void` | `closeDiaWriter()`
`protected void` | `copyDynamicInput(DependencyStructure source, DependencyStructure target)`
`protected void` | `copyEdges(DependencyStructure source, DependencyStructure target)` Copies the edges of the source dependency structure to the target dependency structure
`ParserConfiguration` | `getCurrentParserConfiguration()` Returns the current active parser configuration
`BufferedWriter` | `getDiaWriter()`
`ClassifierGuide` | `getGuide()` Returns the classifier guide.
`DependencyParserConfig` | `getManager()` Returns the single malt configuration
`ParserState` | `getParserState()` Returns the parser state
`protected void` | `initParserState(int k)`
`boolean` | `isDiagnostics()`
`protected AbstractParserFactory` | `makeParserFactory()` Creates a parser factory specified by the --singlemalt-parsing_algorithm option
`void` | `openDiaWriter(String fileName)`
`protected void` | `setCurrentParserConfiguration(ParserConfiguration currentParserConfiguration)` Sets the current parser configuration
`void` | `setDiagnostics(boolean diagnostics)`
`void` | `setGuide(ClassifierGuide guide)` Sets the classifier guide
`void` | `setManager(DependencyParserConfig manager)` Sets the single malt configuration
`protected void` | `setParserState(ParserState parserState)` Sets the parser state
`abstract void` | `terminate()`
`void` | `writeToDiaFile(String message)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### manager

    protected DependencyParserConfig manager

### classifierGuide

    protected ClassifierGuide classifierGuide

### parserState

    protected ParserState parserState

### currentParserConfiguration

    protected ParserConfiguration currentParserConfiguration

### diagnostics

    protected boolean diagnostics

### diaWriter

    protected BufferedWriter diaWriter

Constructor Detail

### Algorithm

    public Algorithm(DependencyParserConfig manager)
              throws MaltChainedException

  Creates a parsing algorithm

  Parameters:
    `manager` - a reference to the single malt configuration
  Throws:
    `MaltChainedException`

Method Detail

### terminate

    public abstract void terminate()
                            throws MaltChainedException

  Throws:
    `MaltChainedException`

### isDiagnostics

    public boolean isDiagnostics()

### setDiagnostics

    public void setDiagnostics(boolean diagnostics)

### getDiaWriter

    public BufferedWriter getDiaWriter()

### writeToDiaFile

    public void writeToDiaFile(String message)
                        throws MaltChainedException

  Throws:
    `MaltChainedException`

### closeDiaWriter

    public void closeDiaWriter()
                        throws MaltChainedException

  Throws:
    `MaltChainedException`

### openDiaWriter

    public void openDiaWriter(String fileName)
                       throws MaltChainedException

  Throws:
    `MaltChainedException`

### getGuide

    public ClassifierGuide getGuide()

  Returns the classifier guide.

  Returns:
    the classifier guide

### setGuide

    public void setGuide(ClassifierGuide guide)

  Sets the classifier guide

  Parameters:
    `guide` - a classifier guide

### getCurrentParserConfiguration

    public ParserConfiguration getCurrentParserConfiguration()

  Returns the current active parser configuration

  Returns:
    the current active parser configuration

### setCurrentParserConfiguration

    protected void setCurrentParserConfiguration(ParserConfiguration currentParserConfiguration)

  Sets the current parser configuration

  Parameters:
    `currentParserConfiguration` - a parser configuration

### getParserState

    public ParserState getParserState()

  Returns the parser state

  Returns:
    the parser state

### setParserState

    protected void setParserState(ParserState parserState)

  Sets the parser state

  Parameters:
    `parserState` - a parser state

### makeParserFactory

    protected AbstractParserFactory makeParserFactory()
                                               throws MaltChainedException

  Creates a parser factory specified by the --singlemalt-parsing_algorithm option

  Returns:
    a parser factory
  Throws:
    `MaltChainedException`

### initParserState

    protected void initParserState(int k)
                            throws MaltChainedException

  Throws:
    `MaltChainedException`

### getManager

    public DependencyParserConfig getManager()

  Returns the single malt configuration

  Returns:
    the single malt configuration

### setManager

    public void setManager(DependencyParserConfig manager)

  Sets the single malt configuration

  Parameters:
    `manager` - a single malt configuration

### copyEdges

    protected void copyEdges(DependencyStructure source,
                             DependencyStructure target)
                      throws MaltChainedException

  Copies the edges of the source dependency structure to the target dependency structure

  Parameters:
    `source` - a source dependency structure
    `target` - a target dependency structure
  Throws:
    `MaltChainedException`

### copyDynamicInput

    protected void copyDynamicInput(DependencyStructure source,
                                    DependencyStructure target)
                             throws MaltChainedException

  Throws:
    `MaltChainedException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| MaltParser 1.5
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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