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.core.syntaxgraph
Interface TokenStructure

All Superinterfaces:
  LabeledStructure, Structure

All Known Subinterfaces:
  DependencyStructure, PhraseStructure

All Known Implementing Classes:
  DependencyGraph, MappablePhraseStructureGraph, PhraseStructureGraph, Sentence

    public interface TokenStructure

extends Structure, LabeledStructure

Author:
  Johan Hall

Method Summary
`TokenNode` | `addTokenNode()` Adds a token node with index n + 1, where n is the index of the last token node.
`TokenNode` | `addTokenNode(int index)` Adds a token node with index index.
`int` | `getHighestTokenIndex()` Returns the index of the last token node.
`int` | `getSentenceID()` Returns the sentence ID
`SortedSet<Integer>` | `getTokenIndices()` Returns a sorted set of integers {s,...
`TokenNode` | `getTokenNode(int index)` Returns the token node with index index.
`boolean` | `hasTokens()` Returns true if the token structure (sentence) has any token nodes, otherwise false.
`int` | `nTokenNode()` Returns the number of token nodes in the token structure (sentence).
`void` | `setSentenceID(int sentenceID)` Sets the sentence ID

Methods inherited from interface org.maltparser.core.syntaxgraph.Structure
`clear`

Methods inherited from interface org.maltparser.core.syntaxgraph.LabeledStructure
`addLabel, checkInLabelSet, checkOutNewLabelSet, getSymbolTables, setSymbolTables`

Method Detail

### addTokenNode

    TokenNode addTokenNode()
                           throws MaltChainedException

  Adds a token node with index n + 1, where n is the index of the last token node.

  Returns:
    the added token node.
  Throws:
    `MaltChainedException`

### addTokenNode

    TokenNode addTokenNode(int index)
                           throws MaltChainedException

  Adds a token node with index index.

  Parameters:
    `index` - the index of the token node.
  Returns:
    the added token node.
  Throws:
    `MaltChainedException`

### getTokenNode

    TokenNode getTokenNode(int index)

  Returns the token node with index index.

  Parameters:
    `index` - the index of the token node.
  Returns:
    a token node with index index.
  Throws:
    `MaltChainedException`

### nTokenNode

    int nTokenNode()

  Returns the number of token nodes in the token structure (sentence).

  Returns:
    the number of token nodes in the token structure (sentence).

### getTokenIndices

    SortedSet<Integer> getTokenIndices()

  Returns a sorted set of integers {s,...,n}, where each index i identifies a token node. Index s is the first token node and index n is the last token node.

  Returns:
    a sorted set of integers {s,...,n}.

### getHighestTokenIndex

    int getHighestTokenIndex()

  Returns the index of the last token node.

  Returns:
    the index of the last token node.

### hasTokens

    boolean hasTokens()

  Returns true if the token structure (sentence) has any token nodes, otherwise false.

  Returns:
    true if the token structure (sentence) has any token nodes, otherwise false.

### getSentenceID

    int getSentenceID()

  Returns the sentence ID

  Returns:
    the sentence ID

### setSentenceID

    void setSentenceID(int sentenceID)

  Sets the sentence ID

  Parameters:
    `sentenceID` - a sentence ID

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.