Package eu.clarin.weblicht.wlfxb.tc.xb
Class ConstituentParsingLayerStored
- java.lang.Object
-
- eu.clarin.weblicht.wlfxb.tc.xb.TextCorpusLayerStoredAbstract
-
- eu.clarin.weblicht.wlfxb.tc.xb.ConstituentParsingLayerStored
-
- All Implemented Interfaces:
ConstituentParsingLayer,TextCorpusLayer
public class ConstituentParsingLayerStored extends TextCorpusLayerStoredAbstract implements ConstituentParsingLayer
- Author:
- Yana Panchenko
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedConstituentParsingLayerStored()protectedConstituentParsingLayerStored(TextCorpusLayersConnector connector)protectedConstituentParsingLayerStored(String tagset)
-
Method Summary
Modifier and Type Method Description ConstituentaddChild(Constituent parent, Constituent child)Adds constituent child to a parent constituent.ConstituentParseaddParse(Constituent root)Creates sentence parse with the given constituent root.ConstituentaddSecondaryEdgeChild(Constituent parent, Constituent child, String edgeLabel)Adds secondary edge child to a constituent.ConstituentcreateConstituent(String category)Creates non-terminal constituent with the given category, children should be added laterConstituentcreateConstituent(String category, String edge)ConstituentcreateConstituent(String category, String edge, String id)ConstituentcreateConstituent(String category, String edge, List<Constituent> children)ConstituentcreateConstituent(String category, String edge, List<Constituent> children, String id)ConstituentcreateConstituent(String category, List<Constituent> children)Creates non-terminal constituent with the given category and constituent children.ConstituentcreateConstituent(String category, List<Constituent> children, String id)ConstituentcreateTerminalConstituent(String category, Token token)Creates terminal constituent with the given category and tokenConstituentcreateTerminalConstituent(String category, String edge, Token token)ConstituentcreateTerminalConstituent(String category, String edge, Token token, String id)ConstituentcreateTerminalConstituent(String category, String edge, List<Token> tokens)ConstituentcreateTerminalConstituent(String category, String edge, List<Token> tokens, String id)ConstituentcreateTerminalConstituent(String category, List<Token> tokens)Creates terminal constituent with the given category and tokensConstituentcreateTerminalConstituent(String category, List<Token> tokens, String id)ConstituentgetConstituent(ConstituentReference cref)Gets the Constituent reference by this ConstituentReference objectConstituentParsegetParse(int index)ConstituentgetParseRoot(int index)StringgetTagset()Token[]getTokens(Constituent constituent)Token[]getTokens(ConstituentParse parse)booleanisEmpty()protected voidsetLayersConnector(TextCorpusLayersConnector connector)Should not be used directly by users.intsize()StringtoString()
-
-
-
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:TextCorpusLayerStoredAbstractShould 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:
setLayersConnectorin classTextCorpusLayerStoredAbstract
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfaceTextCorpusLayer
-
size
public int size()
- Specified by:
sizein interfaceTextCorpusLayer
-
getTagset
public String getTagset()
- Specified by:
getTagsetin interfaceConstituentParsingLayer
-
getParse
public ConstituentParse getParse(int index)
- Specified by:
getParsein interfaceConstituentParsingLayer
-
getParseRoot
public Constituent getParseRoot(int index)
- Specified by:
getParseRootin interfaceConstituentParsingLayer
-
getTokens
public Token[] getTokens(ConstituentParse parse)
- Specified by:
getTokensin interfaceConstituentParsingLayer
-
getTokens
public Token[] getTokens(Constituent constituent)
- Specified by:
getTokensin interfaceConstituentParsingLayer
-
getConstituent
public Constituent getConstituent(ConstituentReference cref)
Description copied from interface:ConstituentParsingLayerGets the Constituent reference by this ConstituentReference object- Specified by:
getConstituentin interfaceConstituentParsingLayer
-
createConstituent
public Constituent createConstituent(String category, List<Constituent> children)
Description copied from interface:ConstituentParsingLayerCreates non-terminal constituent with the given category and constituent children. Children should have been created by the same ConstituentParsingLayer object before- Specified by:
createConstituentin interfaceConstituentParsingLayer
-
createConstituent
public Constituent createConstituent(String category, String edge, List<Constituent> children)
- Specified by:
createConstituentin interfaceConstituentParsingLayer
-
createConstituent
public Constituent createConstituent(String category, List<Constituent> children, String id)
- Specified by:
createConstituentin interfaceConstituentParsingLayer
-
createConstituent
public Constituent createConstituent(String category)
Description copied from interface:ConstituentParsingLayerCreates non-terminal constituent with the given category, children should be added later- Specified by:
createConstituentin interfaceConstituentParsingLayer
-
createConstituent
public Constituent createConstituent(String category, String edge)
- Specified by:
createConstituentin interfaceConstituentParsingLayer
-
createConstituent
public Constituent createConstituent(String category, String edge, String id)
- Specified by:
createConstituentin interfaceConstituentParsingLayer
-
createConstituent
public Constituent createConstituent(String category, String edge, List<Constituent> children, String id)
- Specified by:
createConstituentin interfaceConstituentParsingLayer
-
addChild
public Constituent addChild(Constituent parent, Constituent child)
Description copied from interface:ConstituentParsingLayerAdds constituent child to a parent constituent. Both child and parent constituent should have been created by the same ConstituentParsingLayer object before- Specified by:
addChildin interfaceConstituentParsingLayer
-
addSecondaryEdgeChild
public Constituent addSecondaryEdgeChild(Constituent parent, Constituent child, String edgeLabel)
Description copied from interface:ConstituentParsingLayerAdds secondary edge child to a constituent. Both child and parent constituent should have been created by the same ConstituentParsingLayer object before- Specified by:
addSecondaryEdgeChildin interfaceConstituentParsingLayer
-
createTerminalConstituent
public Constituent createTerminalConstituent(String category, List<Token> tokens)
Description copied from interface:ConstituentParsingLayerCreates terminal constituent with the given category and tokens- Specified by:
createTerminalConstituentin interfaceConstituentParsingLayer
-
createTerminalConstituent
public Constituent createTerminalConstituent(String category, String edge, List<Token> tokens)
- Specified by:
createTerminalConstituentin interfaceConstituentParsingLayer
-
createTerminalConstituent
public Constituent createTerminalConstituent(String category, List<Token> tokens, String id)
- Specified by:
createTerminalConstituentin interfaceConstituentParsingLayer
-
createTerminalConstituent
public Constituent createTerminalConstituent(String category, Token token)
Description copied from interface:ConstituentParsingLayerCreates terminal constituent with the given category and token- Specified by:
createTerminalConstituentin interfaceConstituentParsingLayer
-
createTerminalConstituent
public Constituent createTerminalConstituent(String category, String edge, Token token)
- Specified by:
createTerminalConstituentin interfaceConstituentParsingLayer
-
createTerminalConstituent
public Constituent createTerminalConstituent(String category, String edge, Token token, String id)
- Specified by:
createTerminalConstituentin interfaceConstituentParsingLayer
-
createTerminalConstituent
public Constituent createTerminalConstituent(String category, String edge, List<Token> tokens, String id)
- Specified by:
createTerminalConstituentin interfaceConstituentParsingLayer
-
addParse
public ConstituentParse addParse(Constituent root)
Description copied from interface:ConstituentParsingLayerCreates sentence parse with the given constituent root. Root should have been created by the same ConstituentParsingLayer object before- Specified by:
addParsein interfaceConstituentParsingLayer
-
-