You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stanbol.apache.org by Melanie Reiplinger <me...@dfki.de> on 2012/09/27 14:15:43 UTC

enhancer parameter outputContentPart

|Hi all,

could someone please briefly clarify what the outputContentPart 
parameter for the enhancer does?

About 'content parts', it says on 
http://stanbol.apache.org/docs/trunk/components/enhancer/contentitem.html:
Content parts are used to represent the original content as well as 
transformations of the original content (typically created by 
pre-processing enhancement engines 
<http://stanbol.apache.org/docs/trunk/components/enhancer/engines/list.html> 
such as the Metaxa engine 
<http://stanbol.apache.org/docs/trunk/components/enhancer/engines/metaxaengine.html>). 
|etcetc
|
In the REST doku, it says:
outputContentPart=[uri/'*']|: This parameter allows to explicitly 
include content parts with a specific URI in the response. Currently 
this only supports ContentParts that are stored as RDF graphs.

Does this mean I'll specify the URI of a content item already present on 
the contenthub? And what is the use of that ?

Thanks,
Melanie

Re: enhancer parameter outputContentPart

Posted by Rupert Westenthaler <ru...@gmail.com>.
Hi Melanie

from http://stanbol.apache.org/docs/trunk/components/enhancer/contentitem.html

There are two types of content parts:

2. Content parts that are registered under a predefined URI. [..] This
is used to
   share intermediate enhancement results between enhancement engines.
   An example would be tokens, sentences, POS tags and chunks that are
   extracted by some NLP engine.

An example of such a content part are the ExecutionMetadata.

from: http://stanbol.apache.org/docs/trunk/components/enhancer/executionmetadata.html

When the EnhancementJobManager starts the Enhancement of a ContentItem
it needs to check if the ContentItem already contains ExecutionMetadata in the
ContentPart with the URI

    "http://stanbol.apache.org/ontology/enhancer/executionmetadata#ChainExecution".


If this is the case it needs to initialize itself based on the
pre-existing information.
If no ExecutionMetadata are present, a new EnhancementProcess needs to be
created based on the parsed Chain. Differences between this two cases are
explained in the following two sub sections.


So one example usage of the "outputContentPart" would be to explicitly
include the ExectionMetadata within the response of the Stanbol Enhancer.

For this you need to add the parameter

    outputContentPart=http://stanbol.apache.org/ontology/enhancer/executionmetadata#ChainExecution

to the request of the StanbolEnhancer.

If you want to include the plain text version of the parsed content in
the response you
need to use

    outputContent=text/plain

as the URI of the text plain content part is dynamically generated based on the
MD5 of the plain text content and can therefore not be known in advance.

best
Rupert

On Thu, Sep 27, 2012 at 2:15 PM, Melanie Reiplinger
<me...@dfki.de> wrote:
> |Hi all,
>
> could someone please briefly clarify what the outputContentPart parameter
> for the enhancer does?
>
> About 'content parts', it says on
> http://stanbol.apache.org/docs/trunk/components/enhancer/contentitem.html:
> Content parts are used to represent the original content as well as
> transformations of the original content (typically created by pre-processing
> enhancement engines
> <http://stanbol.apache.org/docs/trunk/components/enhancer/engines/list.html>
> such as the Metaxa engine
> <http://stanbol.apache.org/docs/trunk/components/enhancer/engines/metaxaengine.html>).
> |etcetc
> |
> In the REST doku, it says:
> outputContentPart=[uri/'*']|: This parameter allows to explicitly include
> content parts with a specific URI in the response. Currently this only
> supports ContentParts that are stored as RDF graphs.
>
> Does this mean I'll specify the URI of a content item already present on the
> contenthub? And what is the use of that ?
>
> Thanks,
> Melanie



-- 
| Rupert Westenthaler             rupert.westenthaler@gmail.com
| Bodenlehenstraße 11                             ++43-699-11108907
| A-5500 Bischofshofen