You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stanbol.apache.org by "Rupert Westenthaler (JIRA)" <ji...@apache.org> on 2014/05/11 00:07:23 UTC
[jira] [Created] (STANBOL-1336) Enhancement Properties 2.0 API
Rupert Westenthaler created STANBOL-1336:
--------------------------------------------
Summary: Enhancement Properties 2.0 API
Key: STANBOL-1336
URL: https://issues.apache.org/jira/browse/STANBOL-1336
Project: Stanbol
Issue Type: New Feature
Components: Enhancer
Affects Versions: 2.0.0
Reporter: Rupert Westenthaler
Assignee: Rupert Westenthaler
With Stanbol 2.0 several changes to EnhancementProperties introduced by STANBOL-488 will be introduced:
h2. Enhancement Engine API change
With version 2.0 EnhancementProperties will be parsed as additional parameter to the computeEnhancement(..) method.
{code}
@Override
public final void computeEnhancements(ContentItem ci,
Map<String,Object> enhancemntProps) throws EngineException {
[..]
}
{code}
TODO: check if they should also be parsed to the canEnhance method.
h2. Request Scope Enhancement Properties
Request Scope Enhancement Properties will no longer use a ContentPart but instead be directly added to the `em:ChainExecution` and `em:EngineExecution` nodes of the Execution Metadata.
The EnhancementJob API will also provide means to add enhancement properties. The following listing shows a possible API for adding execution scoped properties to an EnhancementJob.
{code}
@Reference
EnhancementJobFactory ejf;
@Reference
EnhancementJobManager ejm;
ContentSource content; //the parsed content
Chain chain; //the requested enhancement chain
ejm.enhance(ejf.create()
.source(content)
.chain(chain)
.setProperty("enhancer.minConfidence",0.75)
.setProperty("linking","enhancer.maxSuggestions",10)
.build());
{code}
TODO: further definitions
--
This message was sent by Atlassian JIRA
(v6.2#6252)