eu.clarin.weblicht.wlfxb.tc.xb
Class ConstituentParsingLayerStored

java.lang.Object
  extended by eu.clarin.weblicht.wlfxb.tc.xb.TextCorpusLayerStoredAbstract
      extended by eu.clarin.weblicht.wlfxb.tc.xb.ConstituentParsingLayerStored
All Implemented Interfaces:
ConstituentParsingLayer, TextCorpusLayer

public class ConstituentParsingLayerStored
extends TextCorpusLayerStoredAbstract
implements ConstituentParsingLayer

Author:
Yana Panchenko

Field Summary
static String XML_NAME
           
 
Constructor Summary
protected ConstituentParsingLayerStored()
           
protected ConstituentParsingLayerStored(String tagset)
           
protected ConstituentParsingLayerStored(TextCorpusLayersConnector connector)
           
 
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)
           
 boolean isEmpty()
           
protected  void setLayersConnector(TextCorpusLayersConnector connector)
          Should not be used directly by users.
 int size()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

XML_NAME

public static final String XML_NAME
See Also:
Constant Field Values
Constructor Detail

ConstituentParsingLayerStored

protected ConstituentParsingLayerStored()

ConstituentParsingLayerStored

protected ConstituentParsingLayerStored(String tagset)

ConstituentParsingLayerStored

protected ConstituentParsingLayerStored(TextCorpusLayersConnector connector)
Method Detail

setLayersConnector

protected void setLayersConnector(TextCorpusLayersConnector connector)
Description copied from class: TextCorpusLayerStoredAbstract
Should not be used directly by users. Should be extended by all implementations of TextCorpusLayers, as they might depend on other layers and therefore be able to get referenced/referencing information.

Specified by:
setLayersConnector in class TextCorpusLayerStoredAbstract

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface TextCorpusLayer

size

public int size()
Specified by:
size in interface TextCorpusLayer

getTagset

public String getTagset()
Specified by:
getTagset in interface ConstituentParsingLayer

getParse

public ConstituentParse getParse(int index)
Specified by:
getParse in interface ConstituentParsingLayer

getParseRoot

public Constituent getParseRoot(int index)
Specified by:
getParseRoot in interface ConstituentParsingLayer

getTokens

public Token[] getTokens(ConstituentParse parse)
Specified by:
getTokens in interface ConstituentParsingLayer

getTokens

public Token[] getTokens(Constituent constituent)
Specified by:
getTokens in interface ConstituentParsingLayer

getConstituent

public Constituent getConstituent(ConstituentReference cref)
Description copied from interface: ConstituentParsingLayer
Gets the Constituent reference by this ConstituentReference object

Specified by:
getConstituent in interface ConstituentParsingLayer

createConstituent

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

Specified by:
createConstituent in interface ConstituentParsingLayer

createConstituent

public Constituent createConstituent(String category,
                                     String edge,
                                     List<Constituent> children)
Specified by:
createConstituent in interface ConstituentParsingLayer

createConstituent

public Constituent createConstituent(String category,
                                     List<Constituent> children,
                                     String id)
Specified by:
createConstituent in interface ConstituentParsingLayer

createConstituent

public Constituent createConstituent(String category)
Description copied from interface: ConstituentParsingLayer
Creates non-terminal constituent with the given category, children should be added later

Specified by:
createConstituent in interface ConstituentParsingLayer

createConstituent

public Constituent createConstituent(String category,
                                     String edge)
Specified by:
createConstituent in interface ConstituentParsingLayer

createConstituent

public Constituent createConstituent(String category,
                                     String edge,
                                     String id)
Specified by:
createConstituent in interface ConstituentParsingLayer

createConstituent

public Constituent createConstituent(String category,
                                     String edge,
                                     List<Constituent> children,
                                     String id)
Specified by:
createConstituent in interface ConstituentParsingLayer

addChild

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

Specified by:
addChild in interface ConstituentParsingLayer

addSecondaryEdgeChild

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

Specified by:
addSecondaryEdgeChild in interface ConstituentParsingLayer

createTerminalConstituent

public Constituent createTerminalConstituent(String category,
                                             List<Token> tokens)
Description copied from interface: ConstituentParsingLayer
Creates terminal constituent with the given category and tokens

Specified by:
createTerminalConstituent in interface ConstituentParsingLayer

createTerminalConstituent

public Constituent createTerminalConstituent(String category,
                                             String edge,
                                             List<Token> tokens)
Specified by:
createTerminalConstituent in interface ConstituentParsingLayer

createTerminalConstituent

public Constituent createTerminalConstituent(String category,
                                             List<Token> tokens,
                                             String id)
Specified by:
createTerminalConstituent in interface ConstituentParsingLayer

createTerminalConstituent

public Constituent createTerminalConstituent(String category,
                                             Token token)
Description copied from interface: ConstituentParsingLayer
Creates terminal constituent with the given category and token

Specified by:
createTerminalConstituent in interface ConstituentParsingLayer

createTerminalConstituent

public Constituent createTerminalConstituent(String category,
                                             String edge,
                                             Token token)
Specified by:
createTerminalConstituent in interface ConstituentParsingLayer

createTerminalConstituent

public Constituent createTerminalConstituent(String category,
                                             String edge,
                                             Token token,
                                             String id)
Specified by:
createTerminalConstituent in interface ConstituentParsingLayer

createTerminalConstituent

public Constituent createTerminalConstituent(String category,
                                             String edge,
                                             List<Token> tokens,
                                             String id)
Specified by:
createTerminalConstituent in interface ConstituentParsingLayer

addParse

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

Specified by:
addParse in interface ConstituentParsingLayer

toString

public String toString()
Overrides:
toString in class Object


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