Content and offsets belonging to a previous performed check, which must be replaced by the replacement. The offsets of the matches are only valid to the unchanged document content, which was originally sent using checkGlobal and can be identified by its check id. The matches are ordered by the offsets in the original document. The matches can be non-continuously. Usually it is a good idea to iterate from the last match to the first match performing the replacement operation. The content of a match could differ from the original document. Usually it is the readable version of what you submitted. For example, entities can be resolved.

interface MatchWithReplacement {
    content: string;
    externalContentMatches?: ExternalContentMatch[];
    extractedRange?: [number, number];
    locations?: MatchLocation[];
    range: [number, number];
    replacement: string;
}

Hierarchy (view full)

  • Match
    • MatchWithReplacement

Properties

content: string
externalContentMatches?: ExternalContentMatch[]

Available since the 2022.05 server.

extractedRange?: [number, number]

Available since the 5.0 server.

locations?: MatchLocation[]

Available since the 5.2.1 server.

range: [number, number]

A range are two numbers: A start offset and an end offset.

replacement: string