Home About Getting Started API Documentation

How To: Annotate Content

Tagging Service vs S4

Since Ontotext's S4 service also provides APIs for concept extraction, a small clarification is needed. The API exposed through Tag is meant for on-premise usage, while S4 is designed to be used in a SaaS setting to tag documents with Ontotext's publishing pipeline.

Introduction

This section describes how to annotate documents with the Ontotext Tagging Service.

Annotating a document is the process of adding a set of meta data about words or phrases to an unstructured text.

A mention is a piece of text with attached meta data features, which is usually (but not necessarily) associated with a concept. Mentions always have:

For example, annotating the text "Hello London" will yield a mention similar to the one below. It has a startOffset and endOffset, and is associated with the concept http://ontology.ontotext.com/resource/London.

Annotation request

Annotation requests go to http://tag.ontotext.com/ces-en/extract. There are two ways to invoke annotation:

A security token header is needed to authorize the request:

It's also advisable to specify Accept header with the desired output mime type. The default will usually be application/vnd.ontotext.ces+json. For more details, see output formats.

Supported input formats

Supported output formats

If Accept header is not specified, the simple mentions JSON format is returned (application/vnd.ontotext.ces+json).

Typical mention features

Mention features can vary a lot depending on the subsystem that generates the mention. However, most mentions have:

Mentions can have other features that are database and type dependent. For example, locations can also have a featClass, featCode, countryCode, etc., which provide more information about the concept.

Examples

Posting plain text

Request:

Response:

Posting and receiving generic document

Request:

Response:

© 2015-2016 Ontotext AD | DSP Platform | Publishing Solutions