This project has retired. For details please refer to its Attic page.
Apache Stanbol - Weighted Chain

Weighted Chain

The WeightedChain takes a list of EnhancementEngine names as input and uses the "org.apache.stanbol.enhancer.engine.order" metadata of the configured Engines to calculate an ExecutionPlan.

This chain is designed for easy configuration - just a list of the engine names - but has limited possibilities to control the execution order.

Configuration

The property "stanbol.enhancer.chain.weighted.chain" is used to provide the list of engine names. Both arrays and collections are supported as values.

In addition it is possible to define engines as optional. This allows to specify that the enhancement process should not fail if an engine is not active or fails while processing a content item.

The syntax to define an Engine as optional is as follows (Both variants make the execution of the engine with the name optional.):

<name>;optional
<name>;optional=true

Configuration dialog for the WeightedCahin

Calculation of the ExecutionPlan

It is important to note that the ordering of the list has no influence on the ExecutionPlan because the order of execution of the configured EnhancementEngines is calculated only by using the value of the "org.apache.stanbol.enhancer.engine.order" property provided by the EnhancementEngine:

The WeightedCahin follows exactly the same algorithm as the WeightedJobManager used to decide the execution order of all active EnhancementEngines. However the WeightedChain will only consider configured chains and ignore others.

The following image shows the ExecutionPlan as calculated based on the above configuration.

ExecutionPlan for the keyword chain

If some of the Enhancement Engines are not available this will be visualized as follows. If you parse content by using the RESTful interface similar information will be available via the the Execution Metadata included in the metadata of the enhanced content item.

Optional Engine is inactive

This shows that the optional engine 'metaxa' is currently not available. The chain can be still used however the functionality provided by this optional engine will not be available. In this case only requests for plain text files could be processed.

The next figure shows a situation where a required engine is not active. Requests to this chain will fail until all required engines are active.

Required Engine is inactive