Zum Ende der Metadaten springen
Zum Anfang der Metadaten

Sie zeigen eine alte Version dieser Seite an. Zeigen Sie die aktuelle Version an.

Unterschiede anzeigen Seitenhistorie anzeigen

Version 1 Aktuelle »

AuthoringMemory

POST

/congree/api/AuthoringMemory/v1/ImportXml?lang={CultureName}

HTTP request used to add content to the Congree Sentence Database

The culture name in the format languagecode2-country/regioncode2languagecode2 is a lowercase two-letter code derived from ISO 639-1. country/regioncode2 is derived from ISO 3166 and usually consists of two uppercase letters, or a BCP-47 language tag.

 E.g. /congree/api/AuthoringMemory/v1/ImportXml?lang=de-DE

The content type should be multipart/form-data and it should contain file XML.

Response
{
  "DetectedParagraphsCount": 0,
  "DetectedSentencesCount": 0,
  "AddedSentencesCount": 0,
  "FailedParagraphsCount": 0
}

Requirements

The content has to be well-formed XML with resolved entity references.

Maximum size: 10 MB

Authoring Memory: Search

POST

/api/AuthoringMemory/v1/SearchSearches for sentence in Authoring Memory

This endpoint requires a JSON object as parameter:

{
  "Xml": "string",
  "RuleSetName": "string"
}
PropertyDescription
XmlA well-formed XML string.
RuleSetNameThe name of the rule set the string is assigned to.

The request returns a JSON object providing the information detailed below.

{
  "ResultXml": "string",
  "Sentences": [
    {
      "Id": 0,
      "ContextId": 0,
      "DisplayContent": "string",
      "SearchResults": [
        {
          "SearchMode": "Similar",
          "Similarity": 0,
          "Class": "string",
          "DisplayContent": "string",
          "ApplyContent": "string",
          "Evaluation": "Approved",
          "Attributes": [
            {
              "Name": "string",
              "Values": [
                "string"
              ]
            }
          ],
          "Penalties": [
            {
              "PenaltyType": "DifferentText",
              "Value": 0
            }
          ]
        }
      ]
    }
  ]
}


PropertyDescription
ResultXmlThe string that was searched for annotated with processing instructions (PI) providing a markup to identify indiviual portions of the text.
SentencesAn array of all sentences that were found
IdId - identifier of original sentence. It refers to corresponding PI in ResultXml
ContextIdIdentifier of paragraph. It refers to the corresponding PI in ResultXml.
SearchResultsAn array of search results for a specific sentence.
SearchModeThe search method that was applied to get this result. Possible values are "Similar", "Concordance", "Word", "Approximate".
SimilarityThe computed similarity between two sentences. This value is calculated if SearchMode is Similar.
ClassCongree class
DisplayContentContains the content of the found sentence. It can also contains the additional Processing Instructions which Congree adds to mark the difference between the original and the found sentences, where
<?cngr-dif-b TypeOfDifference?> - indicates the beginning of the range where the difference in the content begins
<?cngr-dif-e TypeOfDifference?> - indicates the end of the range where the difference in content ends
<?cngr-dif-r TypeOfDifference?> - indicates that the content was removed at this location
Each Processing Instruction contains as a PIContent an integer value that indicates the type of difference (TypeOfDifference).
The the type of difference can take the following values:
2 - Authoring Memory content contains more characters than checked content.
3 - Checked content contains more characters than the Authoring Memory.
4 - Indicates that Auto-Adjustment was applied at this point.
5 - Indicates that "placeholder" was detected. Congree recognizes tag as placeholder when it is defined as "Ignore content" in the paragraph recognition Treatments.
How "placeholder" works:
E.g. Let's assume <u> is a placeholder.
If an original sentence is: This is a test <u>certain content that should not be considered when searching</u>.
And found result is This </u> is not a test.
Then the resulting sentence will be This <u>certain content that should not be considered when searching</u> is not a test.
ApplyContentThe content that Congree proposes to insert into the editor.
EvaluationThe Data Grooming state. Possible values are "Approved", "Discarded", "Unknown".
AttributesAn array  of attributes associated with found sentence,
Name The name of ther attribute
ValuesAn array of values assigned to the attribute
PenaltiesAn array of penalties imposed for mismatching the original proposal.
PenaltyTypeThe type of penalty. Supported types are: DifferentText, DifferentInlineElements, DifferentPunctuation, DifferentSpecialCharacters, DifferentClass, SwitchedWords, DifferentCase, DifferentSpaces, DifferentNumbers.
ValueThe value deducted from the similarity after the fine is imposed

Authoring Memory: Attributes

POST

/api/AuthoringMemory/v1/Attributes

Adds new attributes with values

GET

/api/AuthoringMemory/v1/Attributes Returns available attributes

DELETED

/api/AuthoringMemory/v1/Attributes Deleted available attributes

Attributes can be specified by:

  • Type (string, optional): Type = ['Text', 'Picklist'],
  • Name (string, optional): Name
  • Values (Array[string], optional): Available values

Authoring Memory: Sentences

POST

/api/AuthoringMemory/v1/Sentences/{sentenceId}/AttributesAdds new attibutes or values to the sentence

GET

/api/AuthoringMemory/v1/Sentences/{sentenceId}/AttributesGets attributes for certain sentence

DELETE

/api/AuthoringMemory/v1/Sentences/{sentenceId}/AttributesDeletes attributes or values of the sentence

GET

/congree/api/AuthoringMemory/v1/SentencesGet sentences based on the provided filter

DELETE

/congree/api/AuthoringMemory/v1/SentencesCleans up Authoring Memory sentences
DELETE

/congree/api/AuthoringMemory/v2/Sentences

Deletes sentences from Authoring Memory

The body of the request should contain the options you can find in the table below in the following form:

Response
{
  "ClearImportedSentences" : true,
  "ClearDataGroomingSentences": true
}


Option nameDescription
ClearImportedSentences
Deletes imported (via API /congree/api/AuthoringMemory/v1/ImportXml) sentences
ClearDataGroomingSentences
Deletes all sentences from Congree Data Grooming and also related sentences from the Authoring Memory

In order to get the task status and results, use the methods described in Tasks. The result is an empty object.

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


Renponse example
{
  "Id": "514290f4-fc30-48e3-99b8-0973011bd2e5"
}
  • Keine Stichwörter