Directionality
Analyze directionality
Resolve the RTL/LTR structure of one string (text) or a whole record at once (fields, a map of name → string). Returns the base direction, whether the text mixes directions, the dominant language and script, and two run lists: runs exactly as the Unicode Bidirectional Algorithm resolves them, and display_runs that keep every left-to-right unit (a price, a range, a date, a model number) whole.
Quota. Deterministic, no model. Does not consume the character quota; counts toward the rate limit only.
Limits. Send exactly one of text or fields. Up to 100 fields and 20,000 characters in total. Idempotent: the same input always gives the same output.
post/v1/analyze
Request
- Base URL: https://hc.itsbaba.com
- URL: https://hc.itsbaba.com/v1/analyze
- Auth: HTTP bearer
Request body
Example request
{
"text": "שלום world",
"fields": {
"title": "מסמך Q3 ready",
"subtitle": "Read the summary"
},
"base": "auto"
}Response
Directionality analysis
Example response
{
"analysis": {
"dir": "rtl",
"mixed": true,
"lang": "he",
"script": "Hebr",
"runs": [
{
"text": "שלום ",
"dir": "rtl",
"script": "Hebr",
"lang": "he",
"end": 5
}
],
"display_runs": [
{
"text": "שלום ",
"dir": "rtl",
"script": "Hebr",
"lang": "he",
"end": 5
}
]
}
}Changes
No recorded changes to this operation across all 1 revision of this API.