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

## org.maltparser.core.syntaxgraph.reader
Class NegraReader

    java.lang.Object
      org.maltparser.core.syntaxgraph.reader.NegraReader

All Implemented Interfaces:
  SyntaxGraphReader

    public class NegraReader

extends Object
implements SyntaxGraphReader

Author:
  Johan Hall

Constructor Summary
`NegraReader()`

Method Summary
`void` | `close()` Closes the file or the input stream.
`String` | `getCharsetName()`
`DataFormatInstance` | `getDataFormatInstance()` Returns the input data format instance
`String` | `getFileName()`
`int` | `getFormatVersion()`
`int` | `getIterationCounter()`
`int` | `getNIterations()`
`String` | `getOptions()` Returns a string representation of the reader specific options.
`BufferedReader` | `getReader()`
`int` | `getSentenceCount()` Returns the current number of the sentence.
`URL` | `getUrl()`
`void` | `open(InputStream is, String charsetName)` Opens an input stream
`void` | `open(String fileName, String charsetName)` Opens a file for read only
`void` | `open(URL url, String charsetName)` Opens an URL for read only
`void` | `readEpilog()` Reads the end of the file, after all sentences have been processed,
`void` | `readProlog()` Cause the syntax graph reader to read the beginning of the file (such as header information)
`boolean` | `readSentence(TokenStructure syntaxGraph)` Reads a sentence (token structure, dependency structure or/and phrase structure)
`void` | `setCharsetName(String charsetName)`
`void` | `setDataFormatInstance(DataFormatInstance inputDataFormatInstance)` Sets the input data format instance
`void` | `setFileName(String fileName)`
`void` | `setFormatVersion(int formatVersion)`
`void` | `setNIterations(int iterations)`
`void` | `setOptions(String optionString)` Sets the reader specific options.
`void` | `setReader(BufferedReader reader)`
`void` | `setSentenceCount(int sentenceCount)`
`void` | `setUrl(URL url)`

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

Constructor Detail

### NegraReader

    public NegraReader()

Method Detail

### open

    public void open(String fileName,
                     String charsetName)
              throws MaltChainedException

  Description copied from interface: `SyntaxGraphReader`
  Opens a file for read only

  Specified by:
    `open` in interface `SyntaxGraphReader`
  Parameters:
    `fileName` - the file name of the file
    `charsetName` - the name of the character encoding set
  Throws:
    `MaltChainedException`

### open

    public void open(URL url,
                     String charsetName)
              throws MaltChainedException

  Description copied from interface: `SyntaxGraphReader`
  Opens an URL for read only

  Specified by:
    `open` in interface `SyntaxGraphReader`
  Parameters:
    `url` - the URL of the resource
    `charsetName` - the name of the character encoding set
  Throws:
    `MaltChainedException`

### open

    public void open(InputStream is,
                     String charsetName)
              throws MaltChainedException

  Description copied from interface: `SyntaxGraphReader`
  Opens an input stream

  Specified by:
    `open` in interface `SyntaxGraphReader`
  Parameters:
    `is` - an input stream
    `charsetName` - the name of the character encoding set
  Throws:
    `MaltChainedException`

### readProlog

    public void readProlog()
                    throws MaltChainedException

  Description copied from interface: `SyntaxGraphReader`
  Cause the syntax graph reader to read the beginning of the file (such as header information)

  Specified by:
    `readProlog` in interface `SyntaxGraphReader`
  Throws:
    `MaltChainedException`

### readSentence

    public boolean readSentence(TokenStructure syntaxGraph)
                         throws MaltChainedException

  Description copied from interface: `SyntaxGraphReader`
  Reads a sentence (token structure, dependency structure or/and phrase structure)

  Specified by:
    `readSentence` in interface `SyntaxGraphReader`
  Parameters:
    `syntaxGraph` - a syntax graph (token structure, dependency structure or/and phrase structure)
  Returns:
    true if there is more sentences to be processed, otherwise false.
  Throws:
    `MaltChainedException`

### readEpilog

    public void readEpilog()
                    throws MaltChainedException

  Description copied from interface: `SyntaxGraphReader`
  Reads the end of the file, after all sentences have been processed,

  Specified by:
    `readEpilog` in interface `SyntaxGraphReader`
  Throws:
    `MaltChainedException`

### getReader

    public BufferedReader getReader()

### setReader

    public void setReader(BufferedReader reader)

### getSentenceCount

    public int getSentenceCount()

  Description copied from interface: `SyntaxGraphReader`
  Returns the current number of the sentence.

  Specified by:
    `getSentenceCount` in interface `SyntaxGraphReader`
  Returns:
    the current number of the sentence.

### setSentenceCount

    public void setSentenceCount(int sentenceCount)

### getFormatVersion

    public int getFormatVersion()

### setFormatVersion

    public void setFormatVersion(int formatVersion)

### getDataFormatInstance

    public DataFormatInstance getDataFormatInstance()

  Description copied from interface: `SyntaxGraphReader`
  Returns the input data format instance

  Specified by:
    `getDataFormatInstance` in interface `SyntaxGraphReader`
  Returns:
    the input data format instance

### setDataFormatInstance

    public void setDataFormatInstance(DataFormatInstance inputDataFormatInstance)

  Description copied from interface: `SyntaxGraphReader`
  Sets the input data format instance

  Specified by:
    `setDataFormatInstance` in interface `SyntaxGraphReader`
  Parameters:
    `inputDataFormatInstance` - an input data format instance

### getOptions

    public String getOptions()

  Description copied from interface: `SyntaxGraphReader`
  Returns a string representation of the reader specific options.

  Specified by:
    `getOptions` in interface `SyntaxGraphReader`
  Returns:
    a string representation of the reader specific options.

### setOptions

    public void setOptions(String optionString)
                    throws MaltChainedException

  Description copied from interface: `SyntaxGraphReader`
  Sets the reader specific options.

  Specified by:
    `setOptions` in interface `SyntaxGraphReader`
  Parameters:
    `optionString` - a string representation of the reader specific options
  Throws:
    `MaltChainedException`

### getFileName

    public String getFileName()

### setFileName

    public void setFileName(String fileName)

### getUrl

    public URL getUrl()

### setUrl

    public void setUrl(URL url)

### getCharsetName

    public String getCharsetName()

### setCharsetName

    public void setCharsetName(String charsetName)

### getNIterations

    public int getNIterations()

  Specified by:
    `getNIterations` in interface `SyntaxGraphReader`

### setNIterations

    public void setNIterations(int iterations)

  Specified by:
    `setNIterations` in interface `SyntaxGraphReader`

### getIterationCounter

    public int getIterationCounter()

  Specified by:
    `getIterationCounter` in interface `SyntaxGraphReader`

### close

    public void close()
               throws MaltChainedException

  Description copied from interface: `SyntaxGraphReader`
  Closes the file or the input stream.

  Specified by:
    `close` in interface `SyntaxGraphReader`
  Throws:
    `MaltChainedException`

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

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