Package eu.clarin.weblicht.wlfxb.tc.xb
Class SentencesLayerStored
- java.lang.Object
-
- eu.clarin.weblicht.wlfxb.tc.xb.TextCorpusLayerStoredAbstract
-
- eu.clarin.weblicht.wlfxb.tc.xb.SentencesLayerStored
-
- All Implemented Interfaces:
SentencesLayer
,TextCorpusLayer
public class SentencesLayerStored extends TextCorpusLayerStoredAbstract implements SentencesLayer
- Author:
- Yana Panchenko
-
-
Field Summary
Fields Modifier and Type Field Description protected Boolean
charOffsets
protected List<SentenceStored>
sentences
static String
XML_NAME
-
Constructor Summary
Constructors Modifier Constructor Description protected
SentencesLayerStored()
protected
SentencesLayerStored(TextCorpusLayersConnector connector)
protected
SentencesLayerStored(Boolean hasCharOffsets)
-
Method Summary
Modifier and Type Method Description Sentence
addSentence(List<Token> sentenceTokens)
Sentence
addSentence(List<Token> sentenceTokens, int start, int end)
Sentence
addSentence(List<Token> sentenceTokens, Integer start, Integer end)
protected void
beforeMarshal(Marshaller m)
Sentence
getSentence(int index)
Sentence
getSentence(Token token)
Token[]
getTokens(Sentence sentence)
boolean
hasCharOffsets()
boolean
isEmpty()
protected void
setLayersConnector(TextCorpusLayersConnector connector)
Should not be used directly by users.int
size()
String
toString()
-
-
-
Field Detail
-
XML_NAME
public static final String XML_NAME
- See Also:
- Constant Field Values
-
sentences
protected List<SentenceStored> sentences
-
charOffsets
protected Boolean charOffsets
-
-
Constructor Detail
-
SentencesLayerStored
protected SentencesLayerStored()
-
SentencesLayerStored
protected SentencesLayerStored(Boolean hasCharOffsets)
-
SentencesLayerStored
protected SentencesLayerStored(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 classTextCorpusLayerStoredAbstract
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interfaceTextCorpusLayer
-
size
public int size()
- Specified by:
size
in interfaceTextCorpusLayer
-
hasCharOffsets
public boolean hasCharOffsets()
- Specified by:
hasCharOffsets
in interfaceSentencesLayer
-
getSentence
public Sentence getSentence(int index)
- Specified by:
getSentence
in interfaceSentencesLayer
-
getSentence
public Sentence getSentence(Token token)
- Specified by:
getSentence
in interfaceSentencesLayer
-
getTokens
public Token[] getTokens(Sentence sentence)
- Specified by:
getTokens
in interfaceSentencesLayer
-
addSentence
public Sentence addSentence(List<Token> sentenceTokens)
- Specified by:
addSentence
in interfaceSentencesLayer
-
addSentence
public Sentence addSentence(List<Token> sentenceTokens, int start, int end)
- Specified by:
addSentence
in interfaceSentencesLayer
-
beforeMarshal
protected void beforeMarshal(Marshaller m)
-
-