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 .
|
Provides some methods for an easier access to objects being contained by a given SDocumentGraph object. More...
Classes | |
enum | TRAVERSION_TYPE |
types of traversions, used by the several methods, used as id for traversion More... | |
Static Public Member Functions | |
static boolean | isContinuousByText (SDocumentGraph documentGraph, List<? extends SNode > subSNodList, List<? extends SNode > fullSNodList) |
{@inheritDoc SDocumentGraph::isContinuousByText(List)} First sorts the given lists, than searches first occurance of first node in subSNodList in fullSNodList. More... | |
static boolean | isContinuousByText (SDocumentGraph documentGraph, List< SNode > subSNodList) |
{@inheritDoc SDocumentGraph::isContinuousByText(List)} | |
static void | sortSTokenByText (SDocumentGraph documentGraph) |
{@inheritDoc SDocumentGraph::sortSTokenByText()} | |
static List< SToken > | getSortedSTokenByText (SDocumentGraph documentGraph, List< SToken > sTokens2sort) |
{@inheritDoc SDocumentGraph::getSortedTokenByText(List)} | |
static List< SToken > | getSortedSTokenByText (SDocumentGraph documentGraph) |
{@inheritDoc SDocumentGraph::getSortedTokenByText()} | |
static List< DataSourceSequence > | getOverlappedDataSourceSequence (SDocumentGraph documentGraph, SNode sNode, SALT_TYPE... relationTypes) |
{@inheritDoc SDocumentGraph::getOverlappedDSSequences(SNode, List)} | |
static List< DataSourceSequence > | getOverlappedDataSourceSequence (SDocumentGraph documentGraph, List< SNode > nodes, SALT_TYPE... relationTypes) |
{@inheritDoc SDocumentGraph::getOverlappedDSSequences(SNode, List)} | |
static List< SToken > | getOverlappedSTokens (SDocumentGraph documentGraph, SNode overlappingNode, SALT_TYPE... relationTypes) |
This method searches for every SToken which is (transitively) overlapped by the given SNode by SRelation types which have one of the types given in the overlappingRelationTypes list. More... | |
static List< SNode > | getRootsByRelation (SDocumentGraph documentGraph, SALT_TYPE... saltTypes) |
Returns all SNode objects which are roots for the given types of SRelation. More... | |
static Multimap< String, SNode > | getRootsByRelationType (SDocumentGraph documentGraph, SALT_TYPE sType) |
Returns all nodes, which are roots for the given relation-class respects to the given SType of the traversed relation. More... | |
static Multimap< String, SNode > | getRootsByRelationType (SDocumentGraph documentGraph, Class<? extends SRelation > clazz) |
{@inheritDoc SDocumentGraph::getRootsByRelationType(SALT_TYPE)} More... | |
Provides some methods for an easier access to objects being contained by a given SDocumentGraph object.
enum org::corpus_tools::salt::util::internal::DataSourceAccessor::TRAVERSION_TYPE |
types of traversions, used by the several methods, used as id for traversion
Enumerator | OVERLAPPED_DS_SEQUENCES | OVERLAPPED_STOKEN |
---|
|
static |
This method searches for every SToken which is (transitively) overlapped by the given SNode by SRelation types which have one of the types given in the overlappingRelationTypes list.
overlappingNode | the node for which the overlapped SToken objects are searched |
overlappingRelationTypes | the list of SALT_TYPEs which are used for traversion. If, for example, all SToken are searched which are overlapped by a SStructure, the SALT_TYPE.SDOMINANCE_RELATION and SALT_TYPE.SPANNING_RELATION should be contained in this parameter. |
|
static |
Returns all SNode objects which are roots for the given types of SRelation.
Means, that all SNodes will be returned as roots, which have no incoming relations of the given type.
For instance imagine the following structure and assume that the passed SALT_TYPEs are SALT_TYPE#SDOMINANCE_RELATION and SALT_TYPE#SSPANNING_RELATION:
struct1 // || span1 || span2 / \ || | tok1 tok2 tok3 tok4
the nodes:
struct1 and span2 are returned, even if a pointing relation connects struct1 and span2.
saltTypes | a set of types for which nodes have to be computed. |
|
static |
{@inheritDoc SDocumentGraph::getRootsByRelationType(SALT_TYPE)}
for each relation R of type class for each foregoing relation P (incoming relation of R'source) check whether P is a parent of R (true, if they have the same class and the same type) if R has no parents store R corresponding to it's type in returned table
|
static |
Returns all nodes, which are roots for the given relation-class respects to the given SType of the traversed relation.
The following example shows the different to the method getRootsBySRelation(): Imagine the following graphFor example: node1 ->t1 node2, node2 ->t2-> node3. Also imagine, that -> is a relation of same class with sType=t1 respectivly sType=t2 The returned roots will be node1 and node 2, because of node1 is the root of a subgraph for relation.sType=t1 and node2 is the root of the subgraph for relation.sType=t2. Whereas the returned nodes of getRootsBySRelation() is only node1.
clazz | class of Relation to be traversed for searching roots |
|
static |
{@inheritDoc SDocumentGraph::isContinuousByText(List)} First sorts the given lists, than searches first occurance of first node in subSNodList in fullSNodList.
Starting from this index, the method compares each element in subSNodList to element i in fullSNodList. If one is not equal the method returns false.