Custom annotations can be added to Watson Explorer Engine indexed documents using the IBM Content Analytics Annotation converter.
Custom annotations can be downloaded from the IBM website, or created created by using the Unstructured Information Management Architecture (UIMA) framework or IBM® Watson Explorer Content Analytics Studio. Content Analytics Studio is a separately installable component that is provided with IBM Watson Explorer Advanced Edition. The following procedure describes how to add and configure the converter for custom annotations:
<metadata>
<facets>
<facet>
<path>
<keyword></keyword>
</path>
</facet>
</facets>
</metadata>
You can use this content to create whatever <content> nodes are appropriate for your collection. To add a custom converter:
For example, if you want to create contents from the annotations that use the calculated path value as the content name, and the keyword node content as the content value, use the following XSL:
<xsl:template match="/">
<vce>
<xsl:for-each select="//document">
<document>
<xsl:for-each select="./content">
<xsl:text disable-output-escaping="yes"><![CDATA[<content name="]]></xsl:text>
<xsl:value-of select="@name"/>
<xsl:text disable-output-escaping="yes"><![CDATA[">]]></xsl:text>
<xsl:value-of select="."/>
<xsl:text disable-output-escaping="yes"><![CDATA[</content>]]></xsl:text>
</xsl:for-each>
<xsl:for-each select="./Metadata/Facets/Facet">
<!-- combine value of Path nodes to form content name -->
<xsl:text disable-output-escaping="yes"><![CDATA[<content name="]]></xsl:text>
<xsl:value-of select="./Path[1]" />/
<xsl:value-of select="./Path[2]" />/
<xsl:value-of select="./Path[3]" />
<xsl:text disable-output-escaping="yes">"></xsl:text>
<!-- select value of Keyword node as content value -->
<xsl:value-of select="./Keyword" />
<xsl:text disable-output-escaping="yes"><![CDATA[</content>]]></xsl:text>
</xsl:for-each>
</document>
</xsl:for-each>
</vce>
</xsl:template>
In most cases, the XSL listed above will be valid for your application.