Linguistic

POST

/congree/api/Linguistic/v1/Check?ruleSet={rulesetName}

Checks the document

The request should be included in the body in the following form:

Request body
{
  "Xml": "string",
  "Options": {
    "IncludeValidTerms": true,
    "IncludeReporting": true,
    "IncludeContextMapping": true,
    "ExtractTermCandidates": true
  }
}

Important:

“string” has some restrictions. It must be valid XML. It cannot just be any string.

Options

Option nameDescription
IncludeValidTerms
Include valid terms from Style Guide in the result
IncludeReporting
Include Language Check Report in the result
IncludeContextMapping

Split input XML into contexts and map linguistic errors to the contexts. This option are enabled if IncludeReporting is true

ExtractTermCandidates
Extract terminology candidates from input XML and include them in the result

The response structure corresponds to LinguisticCheckResult3 class, see Congree Bulk Check Service documentation, see Type definitions - IBulkCheckService - Linguistic-related types.

Response
{
  "ResultXml": "string",
  "Errors": [
    {
      "Id": "string",
      "ContextId": 0,
      "Type": "Abbreviation",
      "Descriptions": [
        {
          "Code": "string",
          "Description": {
            "Header": "string",
            "Instruction": "string",
            "Explanation": "string"
          },
          "Explanation": [
            {
              "Type": "Text",
              "Text": "string"
            }
          ],
          "ExplanationRewrite": [
            {
              "Type": "Text",
              "Text": "string"
            }
          ]
        }
      ],
      "Proposals": [
        {
          "Text": "string",
          "AdditionalInfo": "string",
          "BaseTermForm": "string",
          "ConceptId": 0
        }
      ]
    }
  ],
  "TermCandidates": [
    {
      "Id": "string",
      "Text": "string",
      "Context": "string",
      "IsExist": true
    }
  ],
  "Reporting": {
    "TotalCheckedWords": 0,
    "ReleaseLevel": 0,
    "RelativeReleaseLevel": 0,
    "SafeReleaseLevel": 0,
    "SafeReleaseLevelTitle": "string",
    "AcceptableReleaseLevel": 0,
    "AcceptableReleaseLevelTitle": "string",
    "UnsafeReleaseLevel": 0,
    "UnsafeReleaseLevelTitle": "string",
    "ReportingByTypes": [
      {
        "Type": "Abbreviation",
        "ErrorCount": 0,
        "Severity": 0,
        "RelativeSeverity": 0
      }
    ]
  },
  "FailedParagraphsInfo": {
    "FailedParagraphsAmount": 0
  }
}


Here comes an example to describe "String" in more detail:

<ul><li><?cngr-ctx-b 6?>Wie verständlich einzelne Passagen <?cngr-lc-b 13?>waren<?cngr-lc-e 13?><?cngr-ctx-e 6?></li><li>

Please note that in  the example, Processing Instructions are used to mark ranges:

Processing InstructionExplanation


ctx = context (a paragraph ID)


lc = Language Check (a highlight/error ID)


e = end of the range


b = beginning of the range

Please find the additional response content explained below.

Errors

  • Id: highlight/error ID to find the correct range of a Congree notification)
  • ContextId: ContextId corresponds to a “ … ” region. These PIs are emitted when IncludeContextMapping is true or both IncludeReporting is true and RuleSet has reporting configuration set.
  • Type: Spelling, Grammar, Style, Terminology, Abbreviation or Valid terms
  • Descriptions:
    • Code: identifier for a specific Congree notification
    • Description:
      • Header: short summary to identify the notification
      • Instruction: short text telling the author what to correct
      • Explanation: short text telling the author why to correct
  • Explanation: negative example
    • Type: can be Text or Explanation
    • Text
  • ExplanationRewrite: positive example
    • Type: can be Text or Explanation
    • Text

Important:

Sample texts are split into parts. Parts with Type = ‘Text’ are plain text and should be passed through; Parts with Type = ‘Explanation’ contain text to be highlighted. To get the final result, one should concatenate texts of parts, highlighting (in any way) appropriate parts.

Proposals

  • Text: any string which should be applied by authors as their correction of some problem
  • AdditionalInfo: (Warnung) legacy property, has to be null
  • BaseTermForm: String required for "Valid term" messages and also for Terminology Research to find a term
  • ConceptId: If the proposal is a term, this is the concept ID of said term to be used if necessary.

TermCandidates

  • Id: Id of corresponding “…” region
  • Text: the candidates as displayed to the author
  • Context: the sentence(s) in which a term candidate has been found
  • IsExist: information if this term has already been proposed by someone else in the past

Reporting

  • TotalCheckedWord: counter for the amount of checked words
  • ReleaseLevel: value which shows the quality of checked text
  • RelativeReleaseLevel: ReleaseLevel value, scaled as if quality levels (unsafe/acceptable/safe) were of equal length of 40. Returned values are in range [0…80) U {120}. 120 is returned only when ReleaseLevel = 100.
  • SafeReleaseLevel: value when the shown release level is good
  • SafeReleaseLevelTitle: name of the good release level
  • AcceptableReleaseLevel: value when the shown release level is ok
  • AcceptableReleaseLevelTitle: name of the ok release level
  • UnsafeReleaseLevel: value when the shown release level is bad
  • UnsafeReleaseLevelTitle: name of the bad release level
  • ReportingByTypes: contains total counts and calculated severities of Language Check error types.
    • Type
    • ErrorCount
    • Severity
    • RelativeSeverity
  • FailedParagraphsInfo
    • FailedParagraphsAmount: provides information on how many paragraphs were skipped due to errors


POST

/congree/api/Linguistic/v1/StartCheckTask?ruleSet={rulesetName}

Checks the document in asynchronous mode

The request is the same as for /congree/api/Linguistic/v1/Check?ruleSet=rulesetName but the result is a task id.

In order to get the task status and results, use methods described in Tasks. The result is the same as for /congree/api/Linguistic/v1/Check

Response
{
  "Id": "00000000-0000-0000-0000-000000000000"
}


Response example
{
  "Id": "514290f4-fc30-48e3-99b8-0973011bd2e5"
}

GET

/congree/api/Linguistic/v1/LanguagesGets available languages

Linguistic: StyleGuide

POST

/api/Linguistic/StyleGuide/v1/Templates/{culture}

Create a new style guide

GET

/api/Linguistic/StyleGuide/v1/Templates/{culture}Get all style guides for the specified culture

PUT

/api/Linguistic/StyleGuide/v1/Templates/{culture}Edit a style guide

DELETE

/api/Linguistic/StyleGuide/v1/Templates/{culture}Delete style guides

StyleGuide can be specified as follows:

  • Id (integer, optional): Id of style guide
  • Name (string, optional): Name
  • RulesConfiguration (integer, optional): Id of rules configuration
  • SynonymsConfiguration (integer, optional): Id of synonyms configuration
  • UserLexiconConfiguration (integer, optional): Id of user lexicon configuration
  • TerminologyConfiguration (integer, optional): Id of terminology configuration

Linguistic: StyleGuide Configurations

POST

/api/Linguistic/StyleGuide/v1/Configurations/{culture}/{type}

Creates some configuration of the specified culture and type

GET

/api/Linguistic/StyleGuide/v1/Configurations/{culture}/{type}Gets some configuration of the specified culture and type

PUT

/api/Linguistic/StyleGuide/v1/Configurations/{culture}/{type}Edit configurations

DELETE

/api/Linguistic/StyleGuide/v1/Configurations/{culture}/{type}Delete configurations

Attributes for Configurations:

  • Id (integer, optional): Id of existing configuration
  • Name (string, optional): Configuration name

Parameters:

  • culture (string)
  • type (string): Rules, UserLexicon, Synonyms, Terminology
  • request

The request should be included in the body in the following form:

{
  "Id": 0,
  "Name": "string",
  "Copy": true
}

Linguistic: StyleGuide Rules

GET

/api/Linguistic/StyleGuide/v1/Configurations/{culture}/Rules/{configurationId}Gets language check rules for specific language and configuration

PUT

/api/Linguistic/StyleGuide/v1/Configurations/{culture}/Rules/{configurationId}Edit rules configuration

Linguistic: StyleGuide Synonyms

POST

/api/Linguistic/StyleGuide/v1/Configurations/{culture}/Synonyms/{configurationId}

Adds new synonyms

GET

/api/Linguistic/StyleGuide/v1/Configurations/{culture}/Synonyms/{configurationId}Get synonyms

PUT

/api/Linguistic/StyleGuide/v1/Configurations/{culture}/Synonyms/{configurationId}Edit synonyms

DELETE

/api/Linguistic/StyleGuide/v1/Configurations/{culture}/Synonyms/{configurationId}Delete synonyms

Linguistic: StyleGuide Terminology

POST

/api/Linguistic/StyleGuide/v1/Configurations/{culture}/Terminology/{configurationId}/TermCandidateFilters

Adds new term candidate filters

GET

/api/Linguistic/StyleGuide/v1/Configurations/{culture}/Terminology/{configurationId}/TermCandidateFiltersGets term candidate filters

PUT

/api/Linguistic/StyleGuide/v1/Configurations/{culture}/Terminology/{configurationId}/TermCandidateFiltersEdit term candidate filter

DELETE

/api/Linguistic/StyleGuide/v1/Configurations/{culture}/Terminology/{configurationId}/TermCandidateFiltersDelete term candidate filter

GET

/api/Linguistic/StyleGuide/v1/Configurations/{culture}/Terminology/{configurationId}/VariantsRecognitionGets terminology variants recognition rules for the specified language and configuration

PUT

/api/Linguistic/StyleGuide/v1/Configurations/{culture}/Terminology/{configurationId}/VariantsRecognitionEdit terminology variants recognition rules configuration

Linguistic: StyleGuide User Lexicon

POST

/api/Linguistic/StyleGuide/v1/Configurations/{culture}/UserLexicon/{configurationId}/Nouns

Adds new term candidate filters

GET

/api/Linguistic/StyleGuide/v1/Configurations/{culture}/UserLexicon/{configurationId}/NounsGets term candidate filters

PUT

/api/Linguistic/StyleGuide/v1/Configurations/{culture}/UserLexicon/{configurationId}/NounsEdit term candidate filter

DELETE

/api/Linguistic/StyleGuide/v1/Configurations/{culture}/UserLexicon/{configurationId}/NounsDelete term candidate filter

POST

/api/Linguistic/StyleGuide/v1/Configurations/{culture}/UserLexicon/{configurationId}/AbbreviationsAdds new abbreviations

GET

/api/Linguistic/StyleGuide/v1/Configurations/{culture}/UserLexicon/{configurationId}/AbbreviationsGets all abbreviations

PUT

/api/Linguistic/StyleGuide/v1/Configurations/{culture}/UserLexicon/{configurationId}/AbbreviationsEdit abbreviation

DELETE

/api/Linguistic/StyleGuide/v1/Configurations/{culture}/UserLexicon/{configurationId}/AbbreviationsDeletes abbreviations by Id

POST

/api/Linguistic/StyleGuide/v1/Configurations/{culture}/UserLexicon/{configurationId}/IncorrectSpellingsAdds new Incorrect Spellings

GET

/api/Linguistic/StyleGuide/v1/Configurations/{culture}/UserLexicon/{configurationId}/IncorrectSpellingsGet all Incorrect Spellings

PUT

/api/Linguistic/StyleGuide/v1/Configurations/{culture}/UserLexicon/{configurationId}/IncorrectSpellingsEdit Incorrect Spellings

DELETE

/api/Linguistic/StyleGuide/v1/Configurations/{culture}/UserLexicon/{configurationId}/IncorrectSpellingsDeletes an Incorrect Spelling by Id

POST

/api/Linguistic/StyleGuide/v1/Configurations/{culture}/UserLexicon/{configurationId}/MeasuringUnitsAdds new Measuring Units

GET

/api/Linguistic/StyleGuide/v1/Configurations/{culture}/UserLexicon/{configurationId}/MeasuringUnitsGet all Measuring Units

PUT

/api/Linguistic/StyleGuide/v1/Configurations/{culture}/UserLexicon/{configurationId}/MeasuringUnitsEdit Measuring Units

DELETE

/api/Linguistic/StyleGuide/v1/Configurations/{culture}/UserLexicon/{configurationId}/MeasuringUnitsDeletes a Measuring Unit by Id

GET

/api/Linguistic/StyleGuide/v1/Configurations/{culture}/UserLexicon/{configurationId}/SystemLexiconValidationValidates content in the system UserLexicon

Linguistic: StyleGuide User Lexicon Word forms

GET

/api/Linguistic/StyleGuide/v1/Configurations/{culture}/UserLexicon/{configurationId}/Nouns/{entryId}/FormsGet all word forms for the specified Noun entry

PUT

/api/Linguistic/StyleGuide/v1/Configurations/{culture}/UserLexicon/{configurationId}/Nouns/{entryId}/FormsStore word forms for the specified Noun entry

DELETE

/api/Linguistic/StyleGuide/v1/Configurations/{culture}/UserLexicon/{configurationId}/Nouns/{entryId}/FormsClear configured word forms for the specified Noun entry

GET

/api/Linguistic/StyleGuide/v1/Configurations/{culture}/UserLexicon/{configurationId}/Abbreviations/{entryId}/FormsGet all word forms for the specified Abbreviation entry

PUT

/api/Linguistic/StyleGuide/v1/Configurations/{culture}/UserLexicon/{configurationId}/Abbreviations/{entryId}/FormsStore word forms for the specified Abbreviation entry

DELETE

/api/Linguistic/StyleGuide/v1/Configurations/{culture}/UserLexicon/{configurationId}/Abbreviations/{entryId}/FormsClear configured word forms for the specified Abbreviation entry

GET

/api/Linguistic/StyleGuide/v1/Configurations/{culture}/UserLexicon/{configurationId}/MeasuringUnits/{entryId}/FormsGet all word forms for the specified Measuring unit entry

PUT

/api/Linguistic/StyleGuide/v1/Configurations/{culture}/UserLexicon/{configurationId}/MeasuringUnits/{entryId}/FormsStore word forms for the specified Measuring unit entry

DELETE

/api/Linguistic/StyleGuide/v1/Configurations/{culture}/UserLexicon/{configurationId}/MeasuringUnits/{entryId}/FormsClear configured word forms for the specified Measuring unit entry

GET

/api/Linguistic/StyleGuide/v1/Configurations/{culture}/UserLexicon/{configurationId}/IncorrectSpellings/{entryId}/FormsGet all word forms for the specified Incorrect spelling entry

PUT

/api/Linguistic/StyleGuide/v1/Configurations/{culture}/UserLexicon/{configurationId}/IncorrectSpellings/{entryId}/FormsStore word forms for the specified Incorrect spelling entry

DELETE

/api/Linguistic/StyleGuide/v1/Configurations/{culture}/UserLexicon/{configurationId}/IncorrectSpellings/{entryId}/FormsClear configured word forms for the specified Incorrect spelling entry