Introduction
This guide describes steps that are required to use the accentuator, a service for accentuating texts in Slovenian language.
Please contact us to obtain credentials (username & password) for testing purposes.
Accentuation
To accentuate texts, an API user may send a POST request to demo-accentuator.true-bar.si.
The text must be provided inside request's body as a JSON object:
{"text": "Danes je lep sončen dan."}
The response contains accentuated text:
{"accentuatedText": "dánes je lép sónčen dán."}
If you wish to manually accentuate a word in the given string, your accent will not be overwritten.
Letters with accents may be used for manual accentuation.
Alternatively, double slash (//) may be used instead of the accute accent, double backslash (\\) instead of the grave accent, or caret (^) instead of the circumflex. These characters must be written in front of the accentuated vowel.
For example: ^okno or ôkno p\\es or pès m//orje or mórje
Configuration
The accentuator has two settings – normal and fast.
If you need accentuated text in a short time (recommended for real time use), use the fast version.
This option returns accentuated text faster, but it is slightly less accurate.
This is the default setting, therefore no additional objects are needed in the POST request.
The normal version needs more time, but is also more accurate, as it analyses the sentence structure and each word (recommended if there is no time limit).
To use the normal version, add a "fast" : "false"
field to the JSON object.
{"text": "Danes je lep sončen dan.","fast": "false"}