This tool permits to submit a short text and see how it is split. The API returns very detailed information so that it is easier to understand which breaking rules and exception rules were invoked. This tool aids with debugging or building SRX configurations.
URL
(POST) /api/settings/srx/tools/split
PARAMETERS
The BODY must include a JSON object with these properties:
locale | The language of the text, such as “en”, “de” etc. | string, Mandatory |
independentRulesId | The language independent SRX rule. If you set to null, then no language independent rules will be loaded (not recommended). | int, Optional |
languageRulesId | The language specific SRX rule. It must match the locale of the text. Use settings/srx/find to find configurations. If you set to null, then no language specific rules will be loaded (not recommended). | int, Optional |
RESULTS
The JSON result shows the SRX configuration properties:
{ "id": 6501, "loc": "de", "name": "WP-665", "desc": "Fixes the splitting" }
If no such configuration exists, the system returns an empty object:
{}
The properties are:
id | The SRX configuration ID | int |
loc | The locale of the configuration or null for language independent rules. | string? |
name | The name of the rule or null if it is the default rule for the language. | string? |
desc | An optional description | string |
Example: The language independent default rule has no locale nor name:
{ "id": 6501, "loc": null, "name": null, "desc": null }