Inhalt
The available Swagger UI for the Congree REST API is located in the following URL: http:///congree/swagger
...
| mmmapi/api/AuthoringMemory/v1/Search | Searches for sentence in Authoring Memory |
This endpoint requires a JSON object as parameter:
Codeblock | ||
---|---|---|
| ||
{
"Xml": "string",
"RuleSetName": "string"
} |
Property | Description |
---|---|
Xml | A well-formed XML string. |
RuleSetName | The name of the rule set the string is assigned to. |
The request returns a JSON object providing the information detailed below.
Codeblock | ||
---|---|---|
| ||
{
"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
}
]
}
]
}
]
} |
Property | Description |
---|---|
ResultXml | The string that was searched for annotated with processing instructions (PI) providing a markup to identify indiviual portions of the text. |
Sentences | An array of all sentences that were found |
Id | Id - identifier of original sentence. It refers to corresponding PI in ResultXml |
ContextId | Identifier of paragraph. It refers to the corresponding PI in ResultXml. |
SearchResults | An array of search results for a specific sentence. |
SearchMode | The search method that was applied to get this result. Possible values are "Similar", "Concordance", "Word", "Approximate". |
Similarity | The computed similarity between two sentences. This value is calculated if SearchMode is Similar. |
Class | Congree class |
DisplayContent | Contains 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. |
ApplyContent | The content that Congree proposes to insert into the editor. |
Evaluation | The Data Grooming state. Possible values are "Approved", "Discarded", "Unknown". |
Attributes | An array of attributes associated with found sentence, |
Name | The name of ther attribute |
Values | An array of values assigned to the attribute |
Penalties | An array of penalties imposed for mismatching the original proposal. |
PenaltyType | The type of penalty. Supported types are: DifferentText, DifferentInlineElements, DifferentPunctuation, DifferentSpecialCharacters, DifferentClass, SwitchedWords, DifferentCase, DifferentSpaces, DifferentNumbers. |
Value | The value deducted from the similarity after the fine is imposed |
Authoring Memory: Attributes
...
| /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.
...