Package eu.clarin.weblicht.wlfxb.tc.api
Interface TextStructureLayer
-
- All Superinterfaces:
TextCorpusLayer
- All Known Implementing Classes:
TextStructureLayerStored
public interface TextStructureLayer extends TextCorpusLayer
The TextStructureLayer preserves the original structure of a written text. Within the layer, a token sequence can be annotated as belonging to some text structure element, such as to a page, a paragraph, a line, a title, etc. textspan element represents text structure annotation on a token sequence. The token sequence is specified by start token id and end token id. The type of the text structure element is specified by the corresponding attribute.- Author:
- Yana Panchenko
-
-
Method Summary
Modifier and Type Method Description TextSpan
addSpan(TextSpan parentSpan, Token spanStart, Token spanEnd, String type)
TextSpan
addSpan(TextSpan parentSpan, Token spanStart, Token spanEnd, String type, int startChar, int endChar)
TextSpan
addSpan(TextSpan parentSpan, Token spanStart, Token spanEnd, String type, String value)
TextSpan
addSpan(Token spanStart, Token spanEnd, String type)
TextSpan
addSpan(Token spanStart, Token spanEnd, String type, int startChar, int endChar)
TextSpan
addSpan(Token spanStart, Token spanEnd, String type, String value)
TextSpan
getSpan(int index)
TextSpan
getSpan(Token token, String type)
List<TextSpan>
getSpans(Token token)
List<TextSpan>
getSpans(String type)
Token[]
getTokens(TextSpan span)
-
Methods inherited from interface eu.clarin.weblicht.wlfxb.tc.api.TextCorpusLayer
isEmpty, size
-
-
-
-
Method Detail
-
getSpan
TextSpan getSpan(int index)
-
addSpan
TextSpan addSpan(TextSpan parentSpan, Token spanStart, Token spanEnd, String type) throws WLFormatException
- Throws:
WLFormatException
-
addSpan
TextSpan addSpan(TextSpan parentSpan, Token spanStart, Token spanEnd, String type, int startChar, int endChar) throws WLFormatException
- Throws:
WLFormatException
-
addSpan
TextSpan addSpan(TextSpan parentSpan, Token spanStart, Token spanEnd, String type, String value) throws WLFormatException
- Throws:
WLFormatException
-
-