Analyzers

Analyzer Contract

The contract is the data structure that will be common between Guardlight and an Analyzer.

Terminology

Score — The score is a value between -1 and 1 and describes how well the analysis fit the theme that is being analyzed for. -1 means it does not match the theme, and 1 means it matches the theme perfect. The more perfect a theme match is, the more bad the content is for consumption.

Input Contract

Property
Description

jobId

ID of job.

analysisId

Referencing the analysis ID.

content

The content that needs to be analyzed.

inputs

Key|Value list of defined inputs

Output Contract

Property
Description

jobId

ID of job — from input.

analysisId

Referencing the analysis ID — from input.

score

The total score for the analysis.

type

How the analysis results will be structured. [detailed]

content

The results of the analysis. Adhering to [Type]

description

A description of the analysis. Can be static or a summary.

Output Type

  • detailed — A detailed list of strings. Each list item have detailed analysis results. The details can be shown in the UI.

Detailed

Property
Description

score

The score per list item

content

The analysis result content per item

Environment Variables provided by Guardlight

Variable
Description

GL_NATS_URL

The URL to the NATS server

Last updated