efxtools.filtering
Interface IScopeHandler

All Known Implementing Classes:
EfXScopeHandler

public interface IScopeHandler

Interface of all scope handler classes. A scope handler implements the three most important operations with respect to the maintenance of scopes:

A reference implementation of this class is given in EfXScopeHandler.

Author:
Author of EfXTools

Method Summary
 Scope filter(org.apache.uima.jcas.JCas jcas, Scope scope, java.util.Set<org.apache.uima.analysis_engine.TypeOrFeature> outputTypes)
          Filters the text units (annotations) of the given scope in the given JCas object that are relevant with respect to the given output annotation types and features.
 Scope intersect(org.apache.uima.jcas.JCas jcas, Scope first, Scope second)
          Retains all text units (annotations) of the first given scope that intersect with one of the text units of the second given scope in the text of the given JCas object.
 Scope unify(org.apache.uima.jcas.JCas jcas, java.util.Set<Scope> scopes)
          Creates a unified scope from the given scopes, i.e., a scope that consists of all text spans of the given JCas object that belong to at least one of the single scopes.
 

Method Detail

filter

Scope filter(org.apache.uima.jcas.JCas jcas,
             Scope scope,
             java.util.Set<org.apache.uima.analysis_engine.TypeOrFeature> outputTypes)
Filters the text units (annotations) of the given scope in the given JCas object that are relevant with respect to the given output annotation types and features. Returns the remaining scope.

Parameters:
jcas - The JCas object
outputTypes - The output annotation types
scope - The scope

intersect

Scope intersect(org.apache.uima.jcas.JCas jcas,
                Scope first,
                Scope second)
Retains all text units (annotations) of the first given scope that intersect with one of the text units of the second given scope in the text of the given JCas object. This method is called in order to determine which parts of the first scope are relevant knowing the extent of the second scope, which is either the root scope or a descendant scope of the first scope.

Parameters:
jcas - The JCas object
first - The first scope
second - The second scope
Returns:
The part of the first scope that intersects with the second scope

unify

Scope unify(org.apache.uima.jcas.JCas jcas,
            java.util.Set<Scope> scopes)
Creates a unified scope from the given scopes, i.e., a scope that consists of all text spans of the given JCas object that belong to at least one of the single scopes. This method is called in order to determine one single scope that defines the relevant portion of text and thus shall be processed by a particular analysis engine.

Parameters:
jcas - The JCas object
scopes - The scopes
Returns:
The unified scope