Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
wlfxb - a library for creating and processing of TCF data streams. Copyright (C) Yana Panchenko. This file is part of wlfxb. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see <>.
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.

Yana Panchenko
public interface TextStructureLayer extends TextCorpusLayer {
    public TextSpan getSpan(int index);
    public List<TextSpangetSpans(Token token);
    //public TextSpan getSpan(Token token, TextSpanType type);
    public TextSpan getSpan(Token tokenString type);
    //public List<TextSpan> getSpans(TextSpanType type);
    public List<TextSpangetSpans(String type);
    public Token[] getTokens(TextSpan span);
    //public TextSpan addSpan(Token spanStart, Token spanEnd, TextSpanType type);
    public TextSpan addSpan(Token spanStartToken spanEndString type);
    public TextSpan addSpan(Token spanStartToken spanEndString typeString value);
    public TextSpan addSpan(TextSpan parentSpanToken spanStartToken spanEndString typethrows WLFormatException;
    public TextSpan addSpan(TextSpan parentSpanToken spanStartToken spanEndString typeString valuethrows WLFormatException;
New to GrepCode? Check out our FAQ X