Salt
3.4.2
A powerful, tagset-independent and theory-neutral meta model and API for storing, manipulating, and representing nearly all types of linguistic data .
|
Inherits org.corpus_tools.salt.core.SRelation< S extends SNode, T extends SNode >, org.corpus_tools.salt.common.STextOverlappingRelation< SSpan, SToken >, org.corpus_tools.salt.common.STimeOverlappingRelation< SSpan, SToken >, and org.corpus_tools.salt.common.SDocumentGraphObject.
Inherited by org.corpus_tools.salt.common.impl.SSpanningRelationImpl.
Additional Inherited Members | |
Public Member Functions inherited from org.corpus_tools.salt.core.SRelation< S extends SNode, T extends SNode > | |
Set< SLayer > | getLayers () |
Returns all layers containing this relation. More... | |
Public Member Functions inherited from org.corpus_tools.salt.graph.Relation< S extends Node, T extends Node > | |
Relation< S, T > | getDelegate () |
Returns the delegate object. More... | |
S | getSource () |
Returns the source node of this relation object. More... | |
void | setSource (S source) |
Returns the source node of this relation object. More... | |
T | getTarget () |
Returns the target node of this relation object. More... | |
void | setTarget (T target) |
Sets the target node of this relation object. More... | |
Graph | getGraph () |
Returns the container graph of this relation. More... | |
void | setGraph (Graph graph) |
Sets the container graph of this relation. More... | |
void | addLayer (Layer layer) |
Adds this relation to the passed layer. More... | |
void | removeLayer (Layer layer) |
Removes this relation from the passed layer. More... | |
Public Member Functions inherited from org.corpus_tools.salt.graph.IdentifiableElement | |
String | getId () |
Returns the id of this object, which is the value of the contained Identifier object. More... | |
void | setId (String id) |
Creates a new Identifier object and sets its value to the passed id. More... | |
Identifier | getIdentifier () |
Returns the Identifier label for this object. More... | |
void | setIdentifier (Identifier identifier) |
Sets the Identifier label for this object. More... | |
Public Member Functions inherited from org.corpus_tools.salt.graph.LabelableElement | |
Collection< Label > | getLabels () |
Returns all labels being contained by this object. More... | |
void | addLabel (Label label) |
Adds the given Label object to the list of labels. More... | |
Label | getLabel (String namespace, String name) |
Returns a label having the passed namespace and name, if such a label is contained by this object. More... | |
Label | getLabel (String qName) |
Returns a label having the passed qualified name. More... | |
void | removeLabel (String qName) |
Removes the label having the passed qName. More... | |
void | removeLabel (String namespace, String name) |
Removes a Label object from the list of labels of this object. More... | |
void | removeAll () |
Removes all Label objects. | |
Set< Label > | getLabelsByNamespace (String namespace) |
Returns a set containing all Label objects having the given namespace. More... | |
boolean | containsLabel (String qName) |
Checks if this object has a Label object in its list having the given qualified name. More... | |
Integer | sizeLabels () |
returns the number of Label objects contained by this object. More... | |
Public Member Functions inherited from org.corpus_tools.salt.core.SAnnotationContainer | |
SAnnotation | createAnnotation (String namespace, String name, Object value) |
Creates and returns an annotation having the passed namespace, name and value. More... | |
public< A extends SAnnotation > Set< A > | createAnnotations (String annotationString) |
This method parses the given annotation String and adds an SAnnotation object for each annotation being contained in that string to the given SAnnotationContainer object. More... | |
public< A extends SAnnotation > Set< A > | getAnnotations () |
Returns all annotations contained by this object. More... | |
void | addAnnotation (SAnnotation annotation) |
Adds the passed annotation to this container. More... | |
SAnnotation | getAnnotation (String qName) |
Returns an annotation having the passed qualified name, if this container contains such an annotation. More... | |
SAnnotation | getAnnotation (String namespace, String name) |
Returns an annotation having the passed qualified name, if this container contains such an annotation. More... | |
Iterator< SAnnotation > | iterator_SAnnotation () |
Returns an iterator to iterate over the SAnnotation objects contained by this container. More... | |
SMetaAnnotation | createMetaAnnotation (String namespace, String name, Object value) |
Creates and returns a meta annotation having the passed namespace, name and value. More... | |
public< A extends SMetaAnnotation > Set< A > | createMetaAnnotations (String metaAnnotationString) |
This method parses the given meta annotation String and adds an SMetaAnnotation object for each meta annotation being contained in that string to the given SAnnotationContainer object. More... | |
public< A extends SMetaAnnotation > Set< A > | getMetaAnnotations () |
Returns all meta annotations contained by this object. More... | |
void | addMetaAnnotation (SMetaAnnotation metaAnnotation) |
Adds the passed meta annotation to this container. More... | |
SMetaAnnotation | getMetaAnnotation (String qName) |
Returns a meta annotation having the passed qualified name, if this container contains such a meta annotation. More... | |
Iterator< SMetaAnnotation > | iterator_SMetaAnnotation () |
Returns an iterator to iterate over the SMetaAnnotation objects contained by this container. More... | |
SProcessingAnnotation | createProcessingAnnotation (String namespace, String name, Object value) |
Creates and returns a processing-annotation having the passed namespace, name and value. More... | |
public< A extends SProcessingAnnotation > Set< A > | createProcessingAnnotations (String annotationString) |
This method parses the given processing-annotation String and adds an SProcessingAnnotation object for each processing-annotation being contained in that string to the given SAnnotationContainer object. More... | |
public< A extends SProcessingAnnotation > Set< A > | getProcessingAnnotations () |
Returns all processing-annotations contained by this object. More... | |
void | addProcessingAnnotation (SProcessingAnnotation processingAnnotation) |
Adds the passed processing-annotation to this container. More... | |
SProcessingAnnotation | getProcessingAnnotation (String qName) |
Returns a processing-annotation having the passed qualified name, if this container contains such a processing-annotation. More... | |
Iterator< SProcessingAnnotation > | iterator_SProcessingAnnotation () |
Returns an iterator to iterate over the SProcessingAnnotation objects contained by this container. More... | |
SFeature | createFeature (String namespace, String name, Object value) |
Creates and returns an feature having the passed namespace, name and value. More... | |
public< A extends SFeature > Set< A > | createFeatures (String featureString) |
This method parses the given feature String and adds an SFeature object for each feature being contained in that string to the given SAnnotationContainer object. More... | |
public< A extends SFeature > Set< A > | getFeatures () |
Returns all features contained by this object. More... | |
void | addFeature (SFeature feature) |
Adds the passed feature to this container. More... | |
SFeature | getFeature (String qName) |
Returns an feature having the passed qualified name, if this container contains such an feature. More... | |
SFeature | getFeature (String namespace, String name) |
Returns an feature having the passed qualified name, if this container contains such an feature. More... | |
Iterator< SFeature > | iterator_SFeature () |
Returns an iterator to iterate over the SFeature objects contained by this container. More... | |
Public Member Functions inherited from org.corpus_tools.salt.core.SNamedElement | |
String | getName () |
Returns the name of this element. More... | |
void | setName (String name) |
Sets the name of the element. More... | |
Public Member Functions inherited from org.corpus_tools.salt.core.STypedElement | |
String | getType () |
Returns the type of this element. More... | |
void | setType (String name) |
Sets the type of this element. More... | |
Public Member Functions inherited from org.corpus_tools.salt.core.SPathElement | |
URI | getPath () |
Returns the id of this object as a URI path If no Id exists, null is returned. More... | |
Public Member Functions inherited from org.corpus_tools.salt.common.SDocumentGraphObject | |
SDocumentGraph | getGraph () |
Returns the document structure object which contains this element. More... | |
A span is used to group a couple of tokens together to give them exactly the same annotation or to connect them as a bunch with a 3rd node at once. A span therefore has the semantic of an ordered set. In a graph-based world, we need to model such an ordered set as nodes and edges. Therefore Salt provides the node type SSpan and the relation type SSpanningRelation. A SSpan object represents the span itself and for instance could be annotated or linked with other nodes. To mark a token as being part of the set, a SSpanningRelation object connects each token with the span. A SSpanningRelation always has a span as source and a token as target.
Imagine a piece of a primary text like 'New York' and two tokens t1 (representing 'New') and t2 (representing 'York'). For annotating them as an entity, you can create a span s1 and connect t1 with s1 via one SSpanningRelation r1 and t2 with s1 via a second SSpanningRelation r2. Since a SSpan is just a node, it can be further annotated for instance with an annotation 'entity= city'.
Spans can even be very helpful to annotate bigger parts of the primary text, for instance to annotate several tokens as phrases, sentences or foreign language parts etc. . Also a SSpanningRelation can carry further annotations, but this is rather unusual since such an edge has no own linguistic semantics and is just a technical mechanism to model ordered sets in a graph.