Package 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
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)-
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
-
-