Abbreviations
Abbreviations are treated as exceptions to the sentence splitting rules. For example, if the two abbreviations "Dr." and "Mr." are added to the language rules, the text "Dr. Jekyll and Mr. Hyde" will be treated as a single sentence instead of splitting it after each period.
The /api/v1/Abbreviations endpoint allows adding (POST method) and removing (DELETE method) abbreviation rules temporarily.
These changes are only stored in the memory of the API service and are discarded once the service is restarted (e.g. via IIS reset). They do not apply to the ALS.
URL | Method | Description |
/api/v1/Abbreviations | POST | Adds abbreviation rules for sentence splitting to the API service. |
/api/v1/Abbreviations | DELETE | Removes abbreviation rules for sentence splitting from the API service. |
Example 1: Add abbreviation
This example adds the abbreviation "test." to the language rules of the service. After this rule is added, a text like "This is a test. This is another test." will be treated like a single sentence.
POSThttp://localhost/across/textpreprocessing/api/v1/Abbreviations
{ "abbreviationText": "test.", "languageId": "1033" }