efxtools.filtering
Class ScopeBlackboard

java.lang.Object
  extended by efxtools.filtering.ScopeBlackboard

public class ScopeBlackboard
extends java.lang.Object

This class serves as a blackboard for each Scope that is derived from AScopedQuery, which in turn represents an information need. For the architectural model of a blackboard system, see for instance the according Wikipedia article on blackboard systems.

Conceptually, the scope blackboard can be used to determine the portions of text a given annotation type or features shall be extracted from. These portions of text are defined by a scope, which contains the text units of a certain type (called degree of filtering) that are possibly relevant with respect to an annotation type or feature. Correspondingly, the mapping from annotation types and features to scopes depends on the current query, which contains information about the scopes to be distinguished and the relations between them. The scope blackboard provides functionality for defining and creating scopes, for determining the scope for an analysis engine as well as for filtering previously created scopes based on the results of an analysis engine. The most important methods are implemented by a child class of IScopeHandler.

Here is a simple example of what is conceptually stored in the scope blackboard. Assume that a query

is given, where "Paragraph" and "Sentence" are scope types, while "X" and "Y" are information types to be extracted. Then the blackboard contains the following mappings: Here, three scopes are distinguished. Additionally, the scope "Paragraph1" knows that "Sentence1" is its descendant scope, while "Sentence1" knows that "Paragraph1" is its root scope. For more information on scopes, see Scope.

The scope blackboard is automatically accessed by each FilteringAnalysisEngine in order to generate and filter scopes. Implicitly, the following three types of analysis engines are distinguished: Mixtures of these cases may occur in exceptional cases, but anyway: An application developer does not need to worry about these types of analysis engines, because the differentiation is done fully automatically. An application developer only needs to use the globally accessable method createScopeBlackboard(AScopedQuery, AnalysisEngineDescription) in order to update the query the scopes are based on as well as the aggregate analysis engine that shall be used. This method must be called for each new query and each new aggregate analysis engine to ensure correct usage.

The scope blackboard can measure performance values for the filtering framework using a FilteringProfile. However, this profiler must explicitly be set via the parameter FilteringProfile. Otherwise, no performance values are measured. Also, the filtering framework can be deactivated via the parameter PerformFiltering. In this case, no scopes are used. Each primitive analysis engine simply processes the whole text.

Notice that the blackboard architecture was chosen in order to avoid making changes to the current Apache UIMA framework. In case the concept of scopes would be viewed as worth being a permanent part of UIMA, future versions might integrate it within the common analysis structure (CAS) of UIMA. In particular, this is supposed to have very positive effects on the efficiency of the scope management.

Author:
Author of EfXTools

Field Summary
static FilteringProfile FilteringProfile
          This parameter can be set to a FilteringProfile in order to let the scope blackboard measure performance values for the filtering framework.
static boolean PerformFiltering
          This parameter can be used to set whether or not to perform filtering.
static IScopeHandler scopeHandler
          Handles all non-trivial operations on scopes, such as filterings, unions, or intersections.
 
Constructor Summary
ScopeBlackboard()
           
 
Method Summary
static void createScopeBlackboard(AScopedQuery query, org.apache.uima.analysis_engine.AnalysisEngineDescription aggregateAEDesc)
          Creates the scope blackboard based on the given query and the given aggregate analysis engine description.
static java.lang.String ToString()
          Returns the relevant blackboard data as a string.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PerformFiltering

public static boolean PerformFiltering
This parameter can be used to set whether or not to perform filtering. If filtering is deactivated, then each primitive analysis engine simply processes the whole text. If filtering is activated, then each primitive analysis engine processes only portions of text that are possibly relevant currently.

By default, filtering is activated. Additionally, filtering is automatically activated if the method createScopeBlackboard(AScopedQuery, AnalysisEngineDescription) is called.


FilteringProfile

public static FilteringProfile FilteringProfile
This parameter can be set to a FilteringProfile in order to let the scope blackboard measure performance values for the filtering framework. By default, this parameter is null. If it is set to null, no performance values are measured.


scopeHandler

public static IScopeHandler scopeHandler
Handles all non-trivial operations on scopes, such as filterings, unions, or intersections.

Constructor Detail

ScopeBlackboard

public ScopeBlackboard()
Method Detail

createScopeBlackboard

public static void createScopeBlackboard(AScopedQuery query,
                                         org.apache.uima.analysis_engine.AnalysisEngineDescription aggregateAEDesc)
Creates the scope blackboard based on the given query and the given aggregate analysis engine description. The query defines the root scope and the descendant scopes of each scope of the blackboard. Also, it contains the mapping from the annotation types and features of an information need to the types of the scopes to extract information from. The aggregate analysis engine description is needed in order to determine, which scopes refers to output annotation types and features requested in the query that are dependent on the annotation types produced by an analysis engine that requests its scope.

This method is the only method that has to be called from an application. It must be called once for each new query.

Parameters:
query - The query
aggregateAEDesc - The aggregate analysis engine description

ToString

public static java.lang.String ToString()
Returns the relevant blackboard data as a string.

Returns:
The blackboard data as a string