eu.clarin.weblicht.wlfxb.tc.api
Interface ConstituentParsingLayer

All Superinterfaces:
TextCorpusLayer
All Known Implementing Classes:
ConstituentParsingLayerStored

public interface ConstituentParsingLayer
extends TextCorpusLayer

The ConstituentParsingLayer layer represents phrase structure parsing annotations on sentence tokens. The layer specifies the tagset used for phrase structure categories. The parsed structure is a tree, where the terminal nodes reference tokens, and non-terminal nodes are composed of other nodes. Optionally, the nodes can include incoming edge labels. Additionally, secondary edges can be specified by referencing target nodes.

Author:
Yana Panchenko

Method Summary
 Constituent addChild(Constituent parent, Constituent child)
          Adds constituent child to a parent constituent.
 ConstituentParse addParse(Constituent root)
          Creates sentence parse with the given constituent root.
 Constituent addSecondaryEdgeChild(Constituent parent, Constituent child, String edgeLabel)
          Adds secondary edge child to a constituent.
 Constituent createConstituent(String category)
          Creates non-terminal constituent with the given category, children should be added later
 Constituent createConstituent(String category, List<Constituent> children)
          Creates non-terminal constituent with the given category and constituent children.
 Constituent createConstituent(String category, List<Constituent> children, String id)
           
 Constituent createConstituent(String category, String edge)
           
 Constituent createConstituent(String category, String edge, List<Constituent> children)
           
 Constituent createConstituent(String category, String edge, List<Constituent> children, String id)
           
 Constituent createConstituent(String category, String edge, String id)
           
 Constituent createTerminalConstituent(String category, List<Token> tokens)
          Creates terminal constituent with the given category and tokens
 Constituent createTerminalConstituent(String category, List<Token> tokens, String id)
           
 Constituent createTerminalConstituent(String category, String edge, List<Token> tokens)
           
 Constituent createTerminalConstituent(String category, String edge, List<Token> tokens, String id)
           
 Constituent createTerminalConstituent(String category, String edge, Token token)
           
 Constituent createTerminalConstituent(String category, String edge, Token token, String id)
           
 Constituent createTerminalConstituent(String category, Token token)
          Creates terminal constituent with the given category and token
 Constituent getConstituent(ConstituentReference cref)
          Gets the Constituent reference by this ConstituentReference object
 ConstituentParse getParse(int index)
           
 Constituent getParseRoot(int index)
           
 String getTagset()
           
 Token[] getTokens(Constituent constituent)
           
 Token[] getTokens(ConstituentParse parse)
           
 
Methods inherited from interface eu.clarin.weblicht.wlfxb.tc.api.TextCorpusLayer
isEmpty, size
 

Method Detail

getTagset

String getTagset()

getParse

ConstituentParse getParse(int index)

getParseRoot

Constituent getParseRoot(int index)

getTokens

Token[] getTokens(ConstituentParse parse)

getTokens

Token[] getTokens(Constituent constituent)

createConstituent

Constituent createConstituent(String category,
                              List<Constituent> children)
Creates non-terminal constituent with the given category and constituent children. Children should have been created by the same ConstituentParsingLayer object before


createConstituent

Constituent createConstituent(String category,
                              String edge,
                              List<Constituent> children)

createConstituent

Constituent createConstituent(String category,
                              List<Constituent> children,
                              String id)

createConstituent

Constituent createConstituent(String category,
                              String edge,
                              List<Constituent> children,
                              String id)

createConstituent

Constituent createConstituent(String category)
Creates non-terminal constituent with the given category, children should be added later


createConstituent

Constituent createConstituent(String category,
                              String edge)

createConstituent

Constituent createConstituent(String category,
                              String edge,
                              String id)

addChild

Constituent addChild(Constituent parent,
                     Constituent child)
Adds constituent child to a parent constituent. Both child and parent constituent should have been created by the same ConstituentParsingLayer object before


addSecondaryEdgeChild

Constituent addSecondaryEdgeChild(Constituent parent,
                                  Constituent child,
                                  String edgeLabel)
Adds secondary edge child to a constituent. Both child and parent constituent should have been created by the same ConstituentParsingLayer object before


getConstituent

Constituent getConstituent(ConstituentReference cref)
Gets the Constituent reference by this ConstituentReference object


createTerminalConstituent

Constituent createTerminalConstituent(String category,
                                      List<Token> tokens)
Creates terminal constituent with the given category and tokens


createTerminalConstituent

Constituent createTerminalConstituent(String category,
                                      String edge,
                                      List<Token> tokens)

createTerminalConstituent

Constituent createTerminalConstituent(String category,
                                      List<Token> tokens,
                                      String id)

createTerminalConstituent

Constituent createTerminalConstituent(String category,
                                      String edge,
                                      List<Token> tokens,
                                      String id)

createTerminalConstituent

Constituent createTerminalConstituent(String category,
                                      Token token)
Creates terminal constituent with the given category and token


createTerminalConstituent

Constituent createTerminalConstituent(String category,
                                      String edge,
                                      Token token)

createTerminalConstituent

Constituent createTerminalConstituent(String category,
                                      String edge,
                                      Token token,
                                      String id)

addParse

ConstituentParse addParse(Constituent root)
Creates sentence parse with the given constituent root. Root should have been created by the same ConstituentParsingLayer object before



Copyright © 2013 Department of Linguistics, Tübingen University. All Rights Reserved.