You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stanbol.apache.org by bu...@apache.org on 2013/01/30 14:42:06 UTC
svn commit: r848591 - in /websites/staging/stanbol/trunk/content: ./
docs/trunk/components/enhancer/engines/customnermodelengine.html
docs/trunk/components/enhancer/engines/list.html
docs/trunk/components/enhancer/engines/opennlpcustomner.html
Author: buildbot
Date: Wed Jan 30 13:42:06 2013
New Revision: 848591
Log:
Staging update by buildbot for stanbol
Removed:
websites/staging/stanbol/trunk/content/docs/trunk/components/enhancer/engines/customnermodelengine.html
Modified:
websites/staging/stanbol/trunk/content/ (props changed)
websites/staging/stanbol/trunk/content/docs/trunk/components/enhancer/engines/list.html
websites/staging/stanbol/trunk/content/docs/trunk/components/enhancer/engines/opennlpcustomner.html
Propchange: websites/staging/stanbol/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Wed Jan 30 13:42:06 2013
@@ -1 +1 @@
-1440404
+1440412
Modified: websites/staging/stanbol/trunk/content/docs/trunk/components/enhancer/engines/list.html
==============================================================================
--- websites/staging/stanbol/trunk/content/docs/trunk/components/enhancer/engines/list.html (original)
+++ websites/staging/stanbol/trunk/content/docs/trunk/components/enhancer/engines/list.html Wed Jan 30 13:42:06 2013
@@ -206,7 +206,7 @@
</ul>
</li>
<li>
-<p><strong><a href="customnermodelengine.html">Custom NER Model Extraction Enhancement Engine</a>:</strong> </p>
+<p><strong><a href="opennlpcustomner">OpenNLP Custom NER Model Engine</a>:</strong> </p>
<ul>
<li>NLP processing using OpenNLP NER</li>
<li>uses custom NameFinder models (user configured)</li>
Modified: websites/staging/stanbol/trunk/content/docs/trunk/components/enhancer/engines/opennlpcustomner.html
==============================================================================
--- websites/staging/stanbol/trunk/content/docs/trunk/components/enhancer/engines/opennlpcustomner.html (original)
+++ websites/staging/stanbol/trunk/content/docs/trunk/components/enhancer/engines/opennlpcustomner.html Wed Jan 30 13:42:06 2013
@@ -20,7 +20,7 @@
-->
<link href="/css/stanbol.css" rel="stylesheet" type="text/css">
- <title>Apache Stanbol - </title>
+ <title>Apache Stanbol - The OpenNLP Custom NER Model Extraction Engine</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="icon" type="image/png" href="/images/stanbol-logo/stanbol-favicon.png"/>
<script type="text/javascript">
@@ -86,8 +86,51 @@
<div class="breadcrumbs">
<ul> <li><a href="/">Home</a></li> <li class="item"><a href="/docs/">Docs</a></li> <li class="item"><a href="/docs/trunk/">Trunk</a></li> <li class="item"><a href="/docs/trunk/components/">Components</a></li> <li class="item"><a href="/docs/trunk/components/enhancer/">Enhancer</a></li> <li class="item"><a href="/docs/trunk/components/enhancer/engines/">Engines</a></li> </ul>
</div>
- <h1 class="title"></h1>
-
+ <h1 class="title">The OpenNLP Custom NER Model Extraction Engine</h1>
+ <p>This engine allows the configuration of custom <a href="http://opennlp.apache.org">Apache OpenNLP</a> NameFinder models for NER of plain text content. </p>
+<h2 id="example-result">Example Result</h2>
+<p>This engine adds <a href="../enhancementstructure.html#fisetextannotation">fise:TextAnnotation</a> for the processed plain text to the metadata of the content item. The following code listing shows an DNA type Named Entity detected based on a OpenNLP NameFinder model trained based on the <a href="http://www.nactem.ac.uk/tsujii/GENIA/ERtask/report.html">BioNLP2004</a> dataset:</p>
+<div class="codehilite"><pre><span class="p">{</span>
+ <span class="s">"@subject"</span><span class="p">:</span> <span class="s">"urn:enhancement-0e31eb01-23c5-82b5-1372-5c5606c09960"</span><span class="p">,</span>
+ <span class="s">"@type"</span><span class="p">:</span> <span class="p">[</span>
+ <span class="s">"Enhancement"</span><span class="p">,</span>
+ <span class="s">"TextAnnotation"</span>
+ <span class="p">],</span>
+ <span class="s">"confidence"</span><span class="p">:</span> <span class="mf">0.40148407</span><span class="p">,</span>
+ <span class="s">"creator"</span><span class="p">:</span> <span class="s">"org.apache.stanbol.enhancer.engines.opennlp.impl.CustomNERModelEnhancementEngine"</span><span class="p">,</span>
+ <span class="s">"start"</span><span class="p">:</span> <span class="mi">228</span><span class="p">,</span>
+ <span class="s">"end"</span><span class="p">:</span> <span class="mi">242</span><span class="p">,</span>
+ <span class="s">"extracted-from"</span><span class="p">:</span> <span class="s">"urn:content-item-sha1-84a30aeeb073be543f7c54266e232aae572efac0"</span><span class="p">,</span>
+ <span class="s">"selected-text"</span><span class="p">:</span> <span class="p">{</span>
+ <span class="s">"@language"</span><span class="p">:</span> <span class="s">"en"</span><span class="p">,</span>
+ <span class="s">"@literal"</span><span class="p">:</span> <span class="s">"HIV-2 enhancer"</span>
+ <span class="p">},</span>
+ <span class="s">"selection-context"</span><span class="p">:</span> <span class="p">{</span>
+ <span class="s">"@language"</span><span class="p">:</span> <span class="s">"en"</span><span class="p">,</span>
+ <span class="s">"@literal"</span><span class="p">:</span> <span class="s">"activation of the HIV-2 enhancer in monocytes and T cells"</span>
+ <span class="p">},</span>
+ <span class="s">"type"</span><span class="p">:</span> <span class="s">"http://www.bootstrep.eu/ontology/GRO#DNA"</span>
+<span class="p">},</span>
+</pre></div>
+
+
+<h2 id="configuration">Configuration</h2>
+<p>The usage of this Engine requires to create a service configuration. Configurations require at least a single NameFinderModel name to be configured.</p>
+<h3 id="parameters">Parameters</h3>
+<ul>
+<li><strong>Name Finder Models</strong> <em>(stanbol.engines.opennlp-ner.nameFinderModels)</em>: The list if custom NameFinderModels used by this engine. The Engine supports Arrays, Vectors and comma separated string for. Values are the file names of the NameFinderModel files. Configured files are loaded by using the DataFileProvider service. That means that files copied into the 'datafile' folder (by default located at '{stanbol-working-dir}/stanbol/datafiles').</li>
+<li><strong>Named Entity to 'dc:type' Mappings</strong> <em>(stanbol.engines.opennlp-ner.typeMappings)</em>: This configuration uses the syntax {named-entity-type} > {uri}": {named-entity-type} matches to the string "name" used for the named entity type in the OpenNLP NameFinder model. {uri} MUST BE a valid URI and is used as dc:type value for fise:TextAnnotations created by the engine for extracted Named Entities. NOTE: that TextAnnotations for unmapped Named Entity Types will have no dc:type information.</li>
+</ul>
+<p>The following figure provides a visual representation of an engine configuration configured for all NamedEntity types supported by the <a href="http://www.nactem.ac.uk/tsujii/GENIA/ERtask/report.html">BioNLP2004</a> dataset.</p>
+<p><img alt="'CustomNerModelEngine Configuration'" src="customnermodelengineconfig.png" title="This figure shows the configuration screen as presented by the Apache Felix WebConsole when creating an Component Configuration for the Custom NER Model Engine" /></p>
+<p>The same configuration can be also provided as OSGI configuration file with the name 'org.apache.stanbol.enhancer.engines.opennlp.impl.CustomNERModelEnhancementEngine-ehealthner.config' and the contents:</p>
+<div class="codehilite"><pre>stanbol.enhancer.engine.name="ehealth-ner"
+stanbol.engines.opennlp-ner.nameFinderModels=["bionlp2004-DNA-en.bin","bionlp2004-protein-en.bin","bionlp2004-cell_type-en.bin","bionlp2004-cell_line-en.bin","bionlp2004-RNA-en.bin"]
+stanbol.engines.opennlp-ner.typeMappings=["DNA\ >\ http://www.bootstrep.eu/ontology/GRO#DNA","RNA\ >\ http://www.bootstrep.eu/ontology/GRO#RNA","protein\ >\ http://www.bootstrep.eu/ontology/GRO#Protein","cell_type\ >\ http://purl.bioontology.org/ontology/CL","cell_line\ >\ http://purl.bioontology.org/ontology/MCCL"]
+</pre></div>
+
+
+<p>NOTE: that the '.config' format requires spaces to be escaped with '\'</p>
</div>
<div id="footer">