Result structure
The result answers three questions: which values were calculated, which issues were found and which replacement or edit can be proposed for each occurrence.
An enabled metric is always evaluated, but output depends on its kind: measurements appear once; suggestion rules appear only when they find matches.
result.measurements[]Measurements
Calculated numeric values. Each result.measurements entry is identified by metric_id; value is interpreted together with unit and implementation_version.
Metrics and rules →result.suggestions[]Suggestion rules
Issues grouped by rule. Each item explains the issue and groups every concrete appearance in occurrences.
Metrics and rules →Structure of a suggestion and its edits
A suggestion describes the issue type; each occurrence identifies where it appears and whether arText has a concrete replacement or edit.
suggestions[].metric_idStable rule identifier. Its definition is available from GET /v1/metrics.suggestions[].summaryExplanation of the issue found in this report.suggestions[].recommendations[]General review guidance; it is not necessarily a literal replacement.suggestions[].examplesWorked examples illustrating the recommendation, as plain text with meaningful line breaks. They belong to the rule: they never quote the analysed text and do not vary between reports. null when the rule has no examples.occurrences[].textFragment detected by the metric.occurrences[].start / endRange in the original text measured in Unicode code points; start is inclusive and end exclusive.occurrences[].replacementPreferred textual replacement when available. null means the rule provides no direct replacement.occurrences[].alternatives[]Other reviewed replacements, excluding replacement. The array can be empty.occurrences[].edits[]Safe changes normalized as {start, end, text}. Empty text deletes the range and start equal to end inserts text.An occurrence remains a valid issue when replacement is null and edits is empty. In that case the explanation should be presented and the revision left to the user; the integration must not fabricate a change.
200 · Completed
{
"error": null,
"external_id": "document-123",
"position_in_queue": null,
"report_id": "rep_7f12a4c8",
"result": {
"genre": {
"domain": {
"name": "Plain language",
"slug": "plain-language"
},
"text_type": {
"name": "Legal-administrative text addressed to citizens",
"slug": "legal-administrative-text-addressed-to-citizens"
}
},
"language": "en",
"measurements": [
{
"implementation_version": "1.0",
"metric_id": "word-count",
"unit": "words",
"value": 12
}
],
"offset_unit": "unicode_code_points",
"schema_version": "1.0",
"suggestions": [
{
"category": "lexical",
"explanation": null,
"id": "sug_1",
"implementation_version": "1.0",
"metric_id": "redundant-expressions",
"metric_title": "Removal of redundant expressions",
"occurrences": [
{
"alternatives": [],
"edits": [
{
"end": 19,
"start": 0,
"text": ""
}
],
"end": 19,
"id": "occ_1",
"paragraph_index": 0,
"replacement": null,
"sentence_index": 0,
"start": 0,
"text": "at the present time"
}
],
"recommendations": [
"Remove the expression when the context allows it."
],
"severity": "warning",
"summary": "Consider expressing this fragment more directly."
}
]
},
"status": "completed"
}