Package eu.clarin.weblicht.wlfxb.tc.xb
Class TextCorpusStored
- java.lang.Object
-
- eu.clarin.weblicht.wlfxb.tc.xb.TextCorpusStored
-
- All Implemented Interfaces:
TextCorpus
- Direct Known Subclasses:
TextCorpusStreamed
,TextCorpusStreamedWithReplaceableLayers
public class TextCorpusStored extends Object implements TextCorpus
- Author:
- Yana Panchenko
-
-
Field Summary
Fields Modifier and Type Field Description protected String
lang
protected TextCorpusLayerStoredAbstract[]
layersInOrder
static String
XML_NAME
static String
XML_NAMESPACE
-
Constructor Summary
Constructors Constructor Description TextCorpusStored(String language)
-
Method Summary
Modifier and Type Method Description protected void
afterUnmarshal(Unmarshaller u, Object parent)
static TextCorpusStored
compose(String lang, TextCorpusLayerStoredAbstract... layers)
Composes the layers into one document.protected void
connectLayers()
LexicalSemanticsLayer
createAntonymyLayer()
Creates empty antonymy layer in this TextCorpus.ChunksLayer
createChunksLayer(String entitiesType)
Creates emptyChunksLayer
with the given tagset for named entity types in this TextCorpus.ConstituentParsingLayer
createConstituentParsingLayer(String tagset)
Creates emptyConstituentParsingLayer
with the given tagset in this TextCorpus.DependencyParsingLayer
createDependencyParsingLayer(boolean multipleGovernorsPossible, boolean emptyTokensPossible)
Creates emptyDependencyParsingLayer
in this TextCorpus.DependencyParsingLayer
createDependencyParsingLayer(String tagset, boolean multipleGovernorsPossible, boolean emptyTokensPossible)
Creates emptyDependencyParsingLayer
with the given tagset in this TextCorpus.DiscourseConnectivesLayer
createDiscourseConnectivesLayer()
Creates emptyDiscourseConnectivesLayer
in this TextCorpus.DiscourseConnectivesLayer
createDiscourseConnectivesLayer(String typesTagset)
Creates emptyDiscourseConnectivesLayer
in this TextCorpus.GeoLayer
createGeoLayer(String source, GeoLongLatFormat coordFormat)
Creates emptyGeoLayer
in this TextCorpus.GeoLayer
createGeoLayer(String source, GeoLongLatFormat coordFormat, GeoCapitalFormat capitalFormat)
GeoLayer
createGeoLayer(String source, GeoLongLatFormat coordFormat, GeoContinentFormat continentFormat)
GeoLayer
createGeoLayer(String source, GeoLongLatFormat coordFormat, GeoContinentFormat continentFormat, GeoCapitalFormat capitalFormat)
GeoLayer
createGeoLayer(String source, GeoLongLatFormat coordFormat, GeoContinentFormat continentFormat, GeoCountryFormat countryFormat)
GeoLayer
createGeoLayer(String source, GeoLongLatFormat coordFormat, GeoContinentFormat continentFormat, GeoCountryFormat countryFormat, GeoCapitalFormat capitalFormat)
Creates emptyGeoLayer
in this TextCorpus.GeoLayer
createGeoLayer(String source, GeoLongLatFormat coordFormat, GeoCountryFormat countryFormat)
GeoLayer
createGeoLayer(String source, GeoLongLatFormat coordFormat, GeoCountryFormat countryFormat, GeoCapitalFormat capitalFormat)
LexicalSemanticsLayer
createHyperonymyLayer()
Creates empty hyperonymy layer in this TextCorpus.LexicalSemanticsLayer
createHyponymyLayer()
Creates empty hyponymy layer in this TextCorpus.LemmasLayer
createLemmasLayer()
Creates emptyLemmasLayer
in this TextCorpus.MatchesLayer
createMatchesLayer(String queryLanguage, String queryString)
Creates empty MatchesLayer layers of this TextCorpus, ready to be filled in with the corpus match annotations.MorphologyLayer
createMorphologyLayer()
Creates emptyMorphologyLayer
in this TextCorpus.MorphologyLayer
createMorphologyLayer(boolean hasSegmentation)
Creates emptyMorphologyLayer
in this TextCorpus.MorphologyLayer
createMorphologyLayer(boolean hasSegmentation, boolean hasCharOffsets)
Creates emptyMorphologyLayer
in this TextCorpus.MorphologyLayer
createMorphologyLayer(String tagset)
Creates emptyMorphologyLayer
in this TextCorpus.MorphologyLayer
createMorphologyLayer(String tagset, boolean hasSegmentation)
Creates emptyMorphologyLayer
in this TextCorpus.MorphologyLayer
createMorphologyLayer(String tagset, boolean hasSegmentation, boolean hasCharOffsets)
Creates emptyMorphologyLayer
in this TextCorpus.NamedEntitiesLayer
createNamedEntitiesLayer(String entitiesType)
Creates emptyNamedEntitiesLayer
with the given tagset for named entity types in this TextCorpus.OrthographyLayer
createOrthographyLayer()
Creates emptyOrthographyLayer
in this TextCorpus.PhoneticsLayer
createPhotenicsLayer(String alphabet)
Creates emptyPhoneticsLayer
with the given alphabet for phonetic transcriptions in this TextCorpus.PosTagsLayer
createPosTagsLayer(String tagset)
Creates emptyPosTagsLayer
with the given tagset in this TextCorpus.ReferencesLayer
createReferencesLayer(String typetagset, String reltagset, String externalReferencesSource)
Creates empty references layers of this TextCorpus, ready to be filled in with the references data.RelationsLayer
createRelationsLayer(String type)
SentencesLayer
createSentencesLayer()
Creates emptySentencesLayer
in this TextCorpus.SentencesLayer
createSentencesLayer(boolean hasCharOffsets)
Creates emptySentencesLayer
in this TextCorpus.LexicalSemanticsLayer
createSynonymyLayer()
Creates empty synonymy layer in this TextCorpus.TextLayer
createTextLayer()
Creates emptyTextLayer
in this TextCorpus.TextSourceLayer
createTextSourceLayer()
Creates emptyTextSourceLayer
in this TextCorpus.TextStructureLayer
createTextStructureLayer()
Creates emptyTextStructureLayer
in this TextCorpus.TokensLayer
createTokensLayer()
Creates emptyTokensLayer
in this TextCorpus.TokensLayer
createTokensLayer(boolean hasCharOffsets)
Creates emptyTokensLayer
in this TextCorpus.TopologicalFieldsLayer
createTopologicalFieldsLayer(String tagset)
Creates emptyTopologicalFieldsLayer
with the given tagset in this TextCorpus.WordSensesLayer
createWordSensesLayer(String source)
Creates emptyWordSensesLayer
in this TextCorpus.WordSplittingLayer
createWordSplittingLayer(String type)
Creates emptyWordSplittingLayer
with the given type of the splitting in this TextCorpus.AntonymyLayerStored
getAntonymyLayer()
Gets antonymy layer of this TextCorpus.ChunksLayerStored
getChunksLayer()
Gets chunks layer of this TextCorpus.ConstituentParsingLayerStored
getConstituentParsingLayer()
Gets constituent parsing layer of this TextCorpus.DependencyParsingLayerStored
getDependencyParsingLayer()
Gets dependency parsing layer of this TextCorpus.DiscourseConnectivesLayerStored
getDiscourseConnectivesLayer()
Gets discourse connectives layer of this TextCorpus.GeoLayerStored
getGeoLayer()
Gets geo layer of this TextCorpus.HyperonymyLayerStored
getHyperonymyLayer()
Gets hyperonymy layer of this TextCorpus.HyponymyLayerStored
getHyponymyLayer()
Gets hyponymy layer of this TextCorpus.String
getLanguage()
Gets the language of the text/tokens in this TextCorpus.List<TextCorpusLayer>
getLayers()
Gets all annotation layers of this TextCorpus.LemmasLayerStored
getLemmasLayer()
Gets lemmas layer of this TextCorpus.MatchesLayerStored
getMatchesLayer()
Gets matches layer of this TextCorpus.MorphologyLayerStored
getMorphologyLayer()
Gets morphology layer of this TextCorpus.NamedEntitiesLayerStored
getNamedEntitiesLayer()
Gets named entities layer of this TextCorpus.OrthographyLayerStored
getOrthographyLayer()
Gets orthography layer of this TextCorpus.PhoneticsLayerStored
getPhoneticsLayer()
Gets phonetics layer of this TextCorpus.PosTagsLayerStored
getPosTagsLayer()
Gets part-of-speech layer of this TextCorpus.ReferencesLayerStored
getReferencesLayer()
Gets references layer of this TextCorpus.RelationsLayerStored
getRelationsLayer()
SentencesLayerStored
getSentencesLayer()
Gets sentences layer of this TextCorpus.SynonymyLayerStored
getSynonymyLayer()
Gets synonymy layer of this TextCorpus.TextLayerStored
getTextLayer()
Gets text layer of this TextCorpus.TextSourceLayerStored
getTextSourceLayer()
Gets textSource layer of this TextSource.TextStructureLayerStored
getTextStructureLayer()
Gets text structure layer of this TextCorpus.TokensLayerStored
getTokensLayer()
Gets tokens layer of this TextCorpus.TopologicalFieldsLayerStored
getTopologicalFieldsLayer()
Gets topological fields layer of this TextCorpus.WordSensesLayerStored
getWordSensesLayer()
Gets word senses layer of this TextCorpus.WordSplittingLayerStored
getWordSplittingLayer()
Gets word splitting layer of this TextCorpus.protected void
setAntonymyLayer(AntonymyLayerStored layer)
protected void
setChunksLayer(ChunksLayerStored layer)
protected void
setConstituentParsingLayer(ConstituentParsingLayerStored layer)
protected void
setDependencyParsingLayer(DependencyParsingLayerStored layer)
protected void
setDiscourseConnectivesLayer(DiscourseConnectivesLayerStored layer)
protected void
setGeoLayer(GeoLayerStored layer)
protected void
setHyperonymyLayer(HyperonymyLayerStored layer)
protected void
setHyponymyLayer(HyponymyLayerStored layer)
protected void
setLemmasLayer(LemmasLayerStored layer)
protected void
setMatchesLayer(MatchesLayerStored layer)
protected void
setMorphologyLayer(MorphologyLayerStored layer)
protected void
setNamedEntitiesLayer(NamedEntitiesLayerStored layer)
protected void
setOrthographyLayer(OrthographyLayerStored layer)
protected void
setPhoneticsLayer(PhoneticsLayerStored layer)
protected void
setPosTagsLayer(PosTagsLayerStored layer)
protected void
setReferencesLayer(ReferencesLayerStored layer)
protected void
setRelationsLayer(RelationsLayerStored layer)
protected void
setSentencesLayer(SentencesLayerStored layer)
protected void
setSynonymyLayer(SynonymyLayerStored layer)
protected void
setTextLayer(TextLayerStored layer)
protected void
setTextSourceLayer(TextSourceLayerStored layer)
protected void
setTextStructureLayer(TextStructureLayerStored layer)
protected void
setTokensLayer(TokensLayerStored layer)
protected void
setTopologicalFieldsLayer(TopologicalFieldsLayerStored layer)
protected void
setWordSensesLayer(WordSensesLayerStored layer)
protected void
setWordSplittingLayer(WordSplittingLayerStored layer)
String
toString()
-
-
-
Field Detail
-
XML_NAME
public static final String XML_NAME
- See Also:
- Constant Field Values
-
XML_NAMESPACE
public static final String XML_NAMESPACE
- See Also:
- Constant Field Values
-
lang
protected String lang
-
layersInOrder
protected TextCorpusLayerStoredAbstract[] layersInOrder
-
-
Constructor Detail
-
TextCorpusStored
public TextCorpusStored(String language)
-
-
Method Detail
-
getLanguage
public String getLanguage()
Description copied from interface:TextCorpus
Gets the language of the text/tokens in this TextCorpus.- Specified by:
getLanguage
in interfaceTextCorpus
- Returns:
- language of TextCorpus.
-
getLayers
public List<TextCorpusLayer> getLayers()
Description copied from interface:TextCorpus
Gets all annotation layers of this TextCorpus.- Specified by:
getLayers
in interfaceTextCorpus
- Returns:
- annotations layers.
-
createTextLayer
public TextLayer createTextLayer()
Description copied from interface:TextCorpus
Creates emptyTextLayer
in this TextCorpus.- Specified by:
createTextLayer
in interfaceTextCorpus
- Returns:
- annotation layer that has been created.
-
createTokensLayer
public TokensLayer createTokensLayer()
Description copied from interface:TextCorpus
Creates emptyTokensLayer
in this TextCorpus.- Specified by:
createTokensLayer
in interfaceTextCorpus
- Returns:
- annotation layer that has been created.
-
createTokensLayer
public TokensLayer createTokensLayer(boolean hasCharOffsets)
Description copied from interface:TextCorpus
Creates emptyTokensLayer
in this TextCorpus.- Specified by:
createTokensLayer
in interfaceTextCorpus
- Parameters:
hasCharOffsets
- true if theToken
objects in this TokensLayer will contain character offset in text information, false otherwise.- Returns:
- annotation layer that has been created.
-
createLemmasLayer
public LemmasLayer createLemmasLayer()
Description copied from interface:TextCorpus
Creates emptyLemmasLayer
in this TextCorpus.- Specified by:
createLemmasLayer
in interfaceTextCorpus
- Returns:
- annotation layer that has been created.
-
createPosTagsLayer
public PosTagsLayer createPosTagsLayer(String tagset)
Description copied from interface:TextCorpus
Creates emptyPosTagsLayer
with the given tagset in this TextCorpus.- Specified by:
createPosTagsLayer
in interfaceTextCorpus
- Parameters:
tagset
- of the part-of-speech annotations.- Returns:
- annotation layer that has been created.
-
createTopologicalFieldsLayer
public TopologicalFieldsLayer createTopologicalFieldsLayer(String tagset)
Description copied from interface:TextCorpus
Creates emptyTopologicalFieldsLayer
with the given tagset in this TextCorpus.- Specified by:
createTopologicalFieldsLayer
in interfaceTextCorpus
- Parameters:
tagset
- of the topological fields.- Returns:
- annotation layer that has been created.
-
createSentencesLayer
public SentencesLayer createSentencesLayer()
Description copied from interface:TextCorpus
Creates emptySentencesLayer
in this TextCorpus.- Specified by:
createSentencesLayer
in interfaceTextCorpus
- Returns:
- annotation layer that has been created.
-
createSentencesLayer
public SentencesLayer createSentencesLayer(boolean hasCharOffsets)
Description copied from interface:TextCorpus
Creates emptySentencesLayer
in this TextCorpus.- Specified by:
createSentencesLayer
in interfaceTextCorpus
- Parameters:
hasCharOffsets
- true if theSentence
objects in this SentencesLayer will contain character offset in text information, false otherwise.- Returns:
- annotation layer that has been created.
-
createConstituentParsingLayer
public ConstituentParsingLayer createConstituentParsingLayer(String tagset)
Description copied from interface:TextCorpus
Creates emptyConstituentParsingLayer
with the given tagset in this TextCorpus.- Specified by:
createConstituentParsingLayer
in interfaceTextCorpus
- Parameters:
tagset
- of the parsing annotations.- Returns:
- annotation layer that has been created.
-
createDependencyParsingLayer
public DependencyParsingLayer createDependencyParsingLayer(String tagset, boolean multipleGovernorsPossible, boolean emptyTokensPossible)
Description copied from interface:TextCorpus
Creates emptyDependencyParsingLayer
with the given tagset in this TextCorpus.- Specified by:
createDependencyParsingLayer
in interfaceTextCorpus
- Parameters:
tagset
- of the functions between dependent and governor.multipleGovernorsPossible
- true if a dependent can be governed by more than 1 governor, false otherwise.emptyTokensPossible
- true if dependency annotations can contain empty tokens.- Returns:
- annotation layer that has been created.
-
createDependencyParsingLayer
public DependencyParsingLayer createDependencyParsingLayer(boolean multipleGovernorsPossible, boolean emptyTokensPossible)
Description copied from interface:TextCorpus
Creates emptyDependencyParsingLayer
in this TextCorpus.- Specified by:
createDependencyParsingLayer
in interfaceTextCorpus
- Parameters:
multipleGovernorsPossible
- true if a dependent can be governed by more than 1 governor, false otherwise.emptyTokensPossible
- true if dependency annotations can contain empty tokens.- Returns:
- annotation layer that has been created.
-
createMorphologyLayer
public MorphologyLayer createMorphologyLayer()
Description copied from interface:TextCorpus
Creates emptyMorphologyLayer
in this TextCorpus.- Specified by:
createMorphologyLayer
in interfaceTextCorpus
- Returns:
- annotation layer that has been created.
-
createMorphologyLayer
public MorphologyLayer createMorphologyLayer(String tagset)
Description copied from interface:TextCorpus
Creates emptyMorphologyLayer
in this TextCorpus.- Specified by:
createMorphologyLayer
in interfaceTextCorpus
- Parameters:
tagset
- of the morphology annotations contain- Returns:
- annotation layer that has been created.
-
createMorphologyLayer
public MorphologyLayer createMorphologyLayer(boolean hasSegmentation)
Description copied from interface:TextCorpus
Creates emptyMorphologyLayer
in this TextCorpus.- Specified by:
createMorphologyLayer
in interfaceTextCorpus
- Parameters:
hasSegmentation
- true if morphology annotations contain segmentation analysis.- Returns:
- annotation layer that has been created.
-
createMorphologyLayer
public MorphologyLayer createMorphologyLayer(String tagset, boolean hasSegmentation)
Description copied from interface:TextCorpus
Creates emptyMorphologyLayer
in this TextCorpus.- Specified by:
createMorphologyLayer
in interfaceTextCorpus
- Parameters:
tagset
- of the morphology annotations containhasSegmentation
- true if morphology annotations contain segmentation analysis.- Returns:
- annotation layer that has been created.
-
createMorphologyLayer
public MorphologyLayer createMorphologyLayer(boolean hasSegmentation, boolean hasCharOffsets)
Description copied from interface:TextCorpus
Creates emptyMorphologyLayer
in this TextCorpus.- Specified by:
createMorphologyLayer
in interfaceTextCorpus
- Parameters:
hasSegmentation
- true if morphology annotations contain segmentation analysis.hasCharOffsets
- true if theMorphologyAnalysis
objects in this layer will contain character offset for segmentation within the token information, false otherwise.- Returns:
- annotation layer that has been created.
-
createMorphologyLayer
public MorphologyLayer createMorphologyLayer(String tagset, boolean hasSegmentation, boolean hasCharOffsets)
Description copied from interface:TextCorpus
Creates emptyMorphologyLayer
in this TextCorpus.- Specified by:
createMorphologyLayer
in interfaceTextCorpus
- Parameters:
tagset
- of the morphology annotations containhasSegmentation
- true if morphology annotations contain segmentation analysis.hasCharOffsets
- true if theMorphologyAnalysis
objects in this layer will contain character offset for segmentation within the token information, false otherwise.- Returns:
- annotation layer that has been created.
-
createNamedEntitiesLayer
public NamedEntitiesLayer createNamedEntitiesLayer(String entitiesType)
Description copied from interface:TextCorpus
Creates emptyNamedEntitiesLayer
with the given tagset for named entity types in this TextCorpus.- Specified by:
createNamedEntitiesLayer
in interfaceTextCorpus
- Parameters:
entitiesType
- tagset of the named entity annotations.- Returns:
- annotation layer that has been created.
-
createChunksLayer
public ChunksLayer createChunksLayer(String entitiesType)
Description copied from interface:TextCorpus
Creates emptyChunksLayer
with the given tagset for named entity types in this TextCorpus.- Specified by:
createChunksLayer
in interfaceTextCorpus
- Parameters:
entitiesType
- tagset of the chunk annotations.- Returns:
- annotation layer that has been created.
-
createReferencesLayer
public ReferencesLayer createReferencesLayer(String typetagset, String reltagset, String externalReferencesSource)
Description copied from interface:TextCorpus
Creates empty references layers of this TextCorpus, ready to be filled in with the references data.- Specified by:
createReferencesLayer
in interfaceTextCorpus
- Parameters:
typetagset
- tagset for the mention type values of the references (should be null if no types are defined)reltagset
- tagset for relation values between the references (should be null if no relations are defined)externalReferencesSource
- name of external source (should be null if entities from the external source are not referenced)- Returns:
- annotation layer that has been created.
-
createRelationsLayer
public RelationsLayer createRelationsLayer(String type)
- Specified by:
createRelationsLayer
in interfaceTextCorpus
-
createMatchesLayer
public MatchesLayer createMatchesLayer(String queryLanguage, String queryString)
Description copied from interface:TextCorpus
Creates empty MatchesLayer layers of this TextCorpus, ready to be filled in with the corpus match annotations.- Specified by:
createMatchesLayer
in interfaceTextCorpus
- Parameters:
queryLanguage
- language of the query used to extract corpus matches from a corpus.queryString
- the query used to extract corpus matches from a corpus.- Returns:
- annotation layer that has been created.
-
createWordSplittingLayer
public WordSplittingLayer createWordSplittingLayer(String type)
Description copied from interface:TextCorpus
Creates emptyWordSplittingLayer
with the given type of the splitting in this TextCorpus.- Specified by:
createWordSplittingLayer
in interfaceTextCorpus
- Parameters:
type
- of the splitting, e.g. hyphenation.- Returns:
- annotation layer that has been created.
-
createPhotenicsLayer
public PhoneticsLayer createPhotenicsLayer(String alphabet)
Description copied from interface:TextCorpus
Creates emptyPhoneticsLayer
with the given alphabet for phonetic transcriptions in this TextCorpus.- Specified by:
createPhotenicsLayer
in interfaceTextCorpus
- Parameters:
alphabet
- of the phonetic transcription annotations.- Returns:
- annotation layer that has been created.
-
createGeoLayer
public GeoLayer createGeoLayer(String source, GeoLongLatFormat coordFormat)
Description copied from interface:TextCorpus
Creates emptyGeoLayer
in this TextCorpus.- Specified by:
createGeoLayer
in interfaceTextCorpus
- Parameters:
source
- of the geographical coordinates.coordFormat
- format of the geographical coordinates.- Returns:
- annotation layer that has been created.
-
createGeoLayer
public GeoLayer createGeoLayer(String source, GeoLongLatFormat coordFormat, GeoContinentFormat continentFormat)
-
createGeoLayer
public GeoLayer createGeoLayer(String source, GeoLongLatFormat coordFormat, GeoContinentFormat continentFormat, GeoCountryFormat countryFormat)
-
createGeoLayer
public GeoLayer createGeoLayer(String source, GeoLongLatFormat coordFormat, GeoContinentFormat continentFormat, GeoCapitalFormat capitalFormat)
-
createGeoLayer
public GeoLayer createGeoLayer(String source, GeoLongLatFormat coordFormat, GeoCountryFormat countryFormat)
-
createGeoLayer
public GeoLayer createGeoLayer(String source, GeoLongLatFormat coordFormat, GeoCountryFormat countryFormat, GeoCapitalFormat capitalFormat)
-
createGeoLayer
public GeoLayer createGeoLayer(String source, GeoLongLatFormat coordFormat, GeoCapitalFormat capitalFormat)
-
createGeoLayer
public GeoLayer createGeoLayer(String source, GeoLongLatFormat coordFormat, GeoContinentFormat continentFormat, GeoCountryFormat countryFormat, GeoCapitalFormat capitalFormat)
Description copied from interface:TextCorpus
Creates emptyGeoLayer
in this TextCorpus.- Specified by:
createGeoLayer
in interfaceTextCorpus
- Parameters:
source
- of the geographical coordinates.coordFormat
- format of the geographical coordinates.continentFormat
- format of the continent (in case no continent is specified should be null).countryFormat
- format of the country (in case no country is specified should be null).capitalFormat
- format of the capital (in case no capital is specified should be null).- Returns:
- annotation layer that has been created.
-
createSynonymyLayer
public LexicalSemanticsLayer createSynonymyLayer()
Description copied from interface:TextCorpus
Creates empty synonymy layer in this TextCorpus.- Specified by:
createSynonymyLayer
in interfaceTextCorpus
- Returns:
- annotation layer that has been created.
-
createAntonymyLayer
public LexicalSemanticsLayer createAntonymyLayer()
Description copied from interface:TextCorpus
Creates empty antonymy layer in this TextCorpus.- Specified by:
createAntonymyLayer
in interfaceTextCorpus
- Returns:
- annotation layer that has been created.
-
createHyponymyLayer
public LexicalSemanticsLayer createHyponymyLayer()
Description copied from interface:TextCorpus
Creates empty hyponymy layer in this TextCorpus.- Specified by:
createHyponymyLayer
in interfaceTextCorpus
- Returns:
- annotation layer that has been created.
-
createHyperonymyLayer
public LexicalSemanticsLayer createHyperonymyLayer()
Description copied from interface:TextCorpus
Creates empty hyperonymy layer in this TextCorpus.- Specified by:
createHyperonymyLayer
in interfaceTextCorpus
- Returns:
- annotation layer that has been created.
-
createOrthographyLayer
public OrthographyLayer createOrthographyLayer()
Description copied from interface:TextCorpus
Creates emptyOrthographyLayer
in this TextCorpus.- Specified by:
createOrthographyLayer
in interfaceTextCorpus
- Returns:
- annotation layer that has been created.
-
createTextStructureLayer
public TextStructureLayer createTextStructureLayer()
Description copied from interface:TextCorpus
Creates emptyTextStructureLayer
in this TextCorpus.- Specified by:
createTextStructureLayer
in interfaceTextCorpus
- Returns:
- annotation layer that has been created.
-
createDiscourseConnectivesLayer
public DiscourseConnectivesLayer createDiscourseConnectivesLayer()
Description copied from interface:TextCorpus
Creates emptyDiscourseConnectivesLayer
in this TextCorpus.- Specified by:
createDiscourseConnectivesLayer
in interfaceTextCorpus
- Returns:
- annotation layer that has been created.
-
createDiscourseConnectivesLayer
public DiscourseConnectivesLayer createDiscourseConnectivesLayer(String typesTagset)
Description copied from interface:TextCorpus
Creates emptyDiscourseConnectivesLayer
in this TextCorpus.- Specified by:
createDiscourseConnectivesLayer
in interfaceTextCorpus
- Parameters:
typesTagset
- tagset used to label semantic types of the connectives- Returns:
- annotation layer that has been created.
-
createWordSensesLayer
public WordSensesLayer createWordSensesLayer(String source)
Description copied from interface:TextCorpus
Creates emptyWordSensesLayer
in this TextCorpus.- Specified by:
createWordSensesLayer
in interfaceTextCorpus
- Parameters:
source
- from where the word senses are taken- Returns:
- annotation layer that has been created.
-
createTextSourceLayer
public TextSourceLayer createTextSourceLayer()
Description copied from interface:TextCorpus
Creates emptyTextSourceLayer
in this TextCorpus.- Specified by:
createTextSourceLayer
in interfaceTextCorpus
- Returns:
- annotation layer that has been created.
-
setTextLayer
protected void setTextLayer(TextLayerStored layer)
-
getTextLayer
public TextLayerStored getTextLayer()
Description copied from interface:TextCorpus
Gets text layer of this TextCorpus.- Specified by:
getTextLayer
in interfaceTextCorpus
- Returns:
- annotation layer containing text.
-
setTokensLayer
protected void setTokensLayer(TokensLayerStored layer)
-
getTokensLayer
public TokensLayerStored getTokensLayer()
Description copied from interface:TextCorpus
Gets tokens layer of this TextCorpus.- Specified by:
getTokensLayer
in interfaceTextCorpus
- Returns:
- annotation layer containing tokens.
-
setSentencesLayer
protected void setSentencesLayer(SentencesLayerStored layer)
-
getSentencesLayer
public SentencesLayerStored getSentencesLayer()
Description copied from interface:TextCorpus
Gets sentences layer of this TextCorpus.- Specified by:
getSentencesLayer
in interfaceTextCorpus
- Returns:
- layer containing sentence boundary annotations on
Token
objects fromTokensLayer
.
-
setLemmasLayer
protected void setLemmasLayer(LemmasLayerStored layer)
-
getLemmasLayer
public LemmasLayerStored getLemmasLayer()
Description copied from interface:TextCorpus
Gets lemmas layer of this TextCorpus.- Specified by:
getLemmasLayer
in interfaceTextCorpus
- Returns:
- layer containing lemma annotations on
Token
objects fromTokensLayer
.
-
setPosTagsLayer
protected void setPosTagsLayer(PosTagsLayerStored layer)
-
getPosTagsLayer
public PosTagsLayerStored getPosTagsLayer()
Description copied from interface:TextCorpus
Gets part-of-speech layer of this TextCorpus.- Specified by:
getPosTagsLayer
in interfaceTextCorpus
- Returns:
- layer containing part-of-speech annotations on
Token
objects fromTokensLayer
.
-
setTopologicalFieldsLayer
protected void setTopologicalFieldsLayer(TopologicalFieldsLayerStored layer)
-
getTopologicalFieldsLayer
public TopologicalFieldsLayerStored getTopologicalFieldsLayer()
Description copied from interface:TextCorpus
Gets topological fields layer of this TextCorpus.- Specified by:
getTopologicalFieldsLayer
in interfaceTextCorpus
- Returns:
- layer containing topological field annotations on
Token
objects fromTokensLayer
.
-
setConstituentParsingLayer
protected void setConstituentParsingLayer(ConstituentParsingLayerStored layer)
-
getConstituentParsingLayer
public ConstituentParsingLayerStored getConstituentParsingLayer()
Description copied from interface:TextCorpus
Gets constituent parsing layer of this TextCorpus.- Specified by:
getConstituentParsingLayer
in interfaceTextCorpus
- Returns:
- layer containing constituent parsing annotations on
Token
objects fromTokensLayer
.
-
setDependencyParsingLayer
protected void setDependencyParsingLayer(DependencyParsingLayerStored layer)
-
getDependencyParsingLayer
public DependencyParsingLayerStored getDependencyParsingLayer()
Description copied from interface:TextCorpus
Gets dependency parsing layer of this TextCorpus.- Specified by:
getDependencyParsingLayer
in interfaceTextCorpus
- Returns:
- layer containing dependency parsing annotations on
Token
objects fromTokensLayer
.
-
setMorphologyLayer
protected void setMorphologyLayer(MorphologyLayerStored layer)
-
getMorphologyLayer
public MorphologyLayerStored getMorphologyLayer()
Description copied from interface:TextCorpus
Gets morphology layer of this TextCorpus.- Specified by:
getMorphologyLayer
in interfaceTextCorpus
- Returns:
- layer containing morphological analysis annotations on
Token
objects fromTokensLayer
.
-
setNamedEntitiesLayer
protected void setNamedEntitiesLayer(NamedEntitiesLayerStored layer)
-
getNamedEntitiesLayer
public NamedEntitiesLayerStored getNamedEntitiesLayer()
Description copied from interface:TextCorpus
Gets named entities layer of this TextCorpus.- Specified by:
getNamedEntitiesLayer
in interfaceTextCorpus
- Returns:
- layer containing named entity annotations on
Token
objects fromTokensLayer
.
-
setChunksLayer
protected void setChunksLayer(ChunksLayerStored layer)
-
getChunksLayer
public ChunksLayerStored getChunksLayer()
Description copied from interface:TextCorpus
Gets chunks layer of this TextCorpus.- Specified by:
getChunksLayer
in interfaceTextCorpus
- Returns:
- layer containing chunk annotations on
Token
objects fromTokensLayer
.
-
setReferencesLayer
protected void setReferencesLayer(ReferencesLayerStored layer)
-
getReferencesLayer
public ReferencesLayerStored getReferencesLayer()
Description copied from interface:TextCorpus
Gets references layer of this TextCorpus.- Specified by:
getReferencesLayer
in interfaceTextCorpus
- Returns:
- layer containing reference/coreference annotations on
Token
objects fromTokensLayer
.
-
setRelationsLayer
protected void setRelationsLayer(RelationsLayerStored layer)
-
getRelationsLayer
public RelationsLayerStored getRelationsLayer()
- Specified by:
getRelationsLayer
in interfaceTextCorpus
-
setMatchesLayer
protected void setMatchesLayer(MatchesLayerStored layer)
-
getMatchesLayer
public MatchesLayerStored getMatchesLayer()
Description copied from interface:TextCorpus
Gets matches layer of this TextCorpus.- Specified by:
getMatchesLayer
in interfaceTextCorpus
- Returns:
- layer matches annotations on
Token
objects fromTokensLayer
.
-
setWordSplittingLayer
protected void setWordSplittingLayer(WordSplittingLayerStored layer)
-
getWordSplittingLayer
public WordSplittingLayerStored getWordSplittingLayer()
Description copied from interface:TextCorpus
Gets word splitting layer of this TextCorpus.- Specified by:
getWordSplittingLayer
in interfaceTextCorpus
- Returns:
- layer split annotations (e.g. hyphenation) on
Token
objects fromTokensLayer
.
-
setPhoneticsLayer
protected void setPhoneticsLayer(PhoneticsLayerStored layer)
-
getPhoneticsLayer
public PhoneticsLayerStored getPhoneticsLayer()
Description copied from interface:TextCorpus
Gets phonetics layer of this TextCorpus.- Specified by:
getPhoneticsLayer
in interfaceTextCorpus
- Returns:
- layer containing phonetic transcriptions of
Token
objects fromTokensLayer
.
-
setGeoLayer
protected void setGeoLayer(GeoLayerStored layer)
-
getGeoLayer
public GeoLayerStored getGeoLayer()
Description copied from interface:TextCorpus
Gets geo layer of this TextCorpus.- Specified by:
getGeoLayer
in interfaceTextCorpus
- Returns:
- layer containing geographical location annotations on
Token
objects fromTokensLayer
.
-
setSynonymyLayer
protected void setSynonymyLayer(SynonymyLayerStored layer)
-
getSynonymyLayer
public SynonymyLayerStored getSynonymyLayer()
Description copied from interface:TextCorpus
Gets synonymy layer of this TextCorpus.- Specified by:
getSynonymyLayer
in interfaceTextCorpus
- Returns:
- layer containing synonyms of
Lemma
objects fromLemmasLayer
.
-
setAntonymyLayer
protected void setAntonymyLayer(AntonymyLayerStored layer)
-
getAntonymyLayer
public AntonymyLayerStored getAntonymyLayer()
Description copied from interface:TextCorpus
Gets antonymy layer of this TextCorpus.- Specified by:
getAntonymyLayer
in interfaceTextCorpus
- Returns:
- layer containing antonyms of
Lemma
objects fromLemmasLayer
.
-
setHyponymyLayer
protected void setHyponymyLayer(HyponymyLayerStored layer)
-
getHyponymyLayer
public HyponymyLayerStored getHyponymyLayer()
Description copied from interface:TextCorpus
Gets hyponymy layer of this TextCorpus.- Specified by:
getHyponymyLayer
in interfaceTextCorpus
- Returns:
- layer containing hyponyms of
Lemma
objects fromLemmasLayer
.
-
setHyperonymyLayer
protected void setHyperonymyLayer(HyperonymyLayerStored layer)
-
getHyperonymyLayer
public HyperonymyLayerStored getHyperonymyLayer()
Description copied from interface:TextCorpus
Gets hyperonymy layer of this TextCorpus.- Specified by:
getHyperonymyLayer
in interfaceTextCorpus
- Returns:
- layer containing hyperonyms of
Lemma
objects fromLemmasLayer
.
-
setTextStructureLayer
protected void setTextStructureLayer(TextStructureLayerStored layer)
-
getTextStructureLayer
public TextStructureLayerStored getTextStructureLayer()
Description copied from interface:TextCorpus
Gets text structure layer of this TextCorpus.- Specified by:
getTextStructureLayer
in interfaceTextCorpus
- Returns:
- layer containing original text structure (such as paragraphs,
lines, pages, etc.), anchored on
Token
objects fromTokensLayer
.
-
setOrthographyLayer
protected void setOrthographyLayer(OrthographyLayerStored layer)
-
getOrthographyLayer
public OrthographyLayerStored getOrthographyLayer()
Description copied from interface:TextCorpus
Gets orthography layer of this TextCorpus.- Specified by:
getOrthographyLayer
in interfaceTextCorpus
- Returns:
- layer containing correct orthographic spellings of misspelled
Token
objects fromTokensLayer
.
-
setDiscourseConnectivesLayer
protected void setDiscourseConnectivesLayer(DiscourseConnectivesLayerStored layer)
-
setTextSourceLayer
protected void setTextSourceLayer(TextSourceLayerStored layer)
-
getDiscourseConnectivesLayer
public DiscourseConnectivesLayerStored getDiscourseConnectivesLayer()
Description copied from interface:TextCorpus
Gets discourse connectives layer of this TextCorpus.- Specified by:
getDiscourseConnectivesLayer
in interfaceTextCorpus
- Returns:
- layer containing discourse connectives annotations on
Token
objects fromTokensLayer
.
-
setWordSensesLayer
protected void setWordSensesLayer(WordSensesLayerStored layer)
-
getWordSensesLayer
public WordSensesLayerStored getWordSensesLayer()
Description copied from interface:TextCorpus
Gets word senses layer of this TextCorpus.- Specified by:
getWordSensesLayer
in interfaceTextCorpus
- Returns:
- layer containing word sense annotations on
Token
objects fromTokensLayer
.
-
getTextSourceLayer
public TextSourceLayerStored getTextSourceLayer()
Description copied from interface:TextCorpus
Gets textSource layer of this TextSource.- Specified by:
getTextSourceLayer
in interfaceTextCorpus
- Returns:
- annotation layer containing text.
-
afterUnmarshal
protected void afterUnmarshal(Unmarshaller u, Object parent)
-
connectLayers
protected void connectLayers()
-
compose
public static TextCorpusStored compose(String lang, TextCorpusLayerStoredAbstract... layers)
Composes the layers into one document. Normally, you should not use this method, unless you want to manually compose document from the layer pieces.The method composes correctly only in case referencing between layers (IDs <- IDREFs) is correct- Parameters:
lang
-layers
-- Returns:
- text corpus data composed of the provided layers
-
-