Overview

Analysis request JSON defines the sequence of text processing operations to apply to your data. You can build requests of varying complexity, ranging from simple query-based document search, through clustering of documents or labels, to generating a time series of 2d document maps.

The following chapters introduce the general concepts required to understand Lingo4G analysis requests: stages, references and components. Further chapters show how to build typical requests for document selection, clustering or time series analysis.

We recommend using the JSON Sandbox app to edit, execute and view the results of your requests. To call Lingo4G analysis from your applications, post the same analysis request JSONs to Lingo4G REST API.

Lingo4G analysis request is a JSON object with the following top-level properties:

{
  "variables": {},
  "components": {},
  "stages": {},
  "output": {
    "stages": [],
    "request": true,
    "progress": true
  },
  "useCache": true
}
  
variables

(optional) Definitions of primitive-valued variables you can reference from other parts of the request.

components

(optional) Reusable configuration fragments, such as search queries or field name lists, you can reference from other parts of the request.

stages

(optional) The text operations to perform as part of the request. Each entry in the map defines one operation, called an analysis stage. Every stage produces a result, such as a list of documents or labels, that can can serve as input for another stage or as the output of the request.

output

(optional) Configuration of the request output, including the list of stage results to output, whether to echo the analysis request and whether to output stage processing times.

use​Cache

(optional) If false, bypasses any existing caches of partial results, causing the complete analysis to be re-run. Can be useful for benchmarking request performance without the impact of partially cached results.

Since all properties of the analysis JSON are optional, the simplest correct analysis request is an empty object:

{ }

The above request is a no-op, it does not perform any processing. For requests that do perform processing, move on to the analysis stages chapter.