dir=auto First-Strong Heuristic
Explicit bounded heuristic for ASCII Latin L and Hebrew/Arabic strong letters; skips numbers/punctuation/marks, reports unsupported strong-script evidence rather than pretending full Unicode bidi.
Description
dir=auto First-Strong Heuristic: return bounded first strong direction, full unicode bidi algorithm applied.
Automatic text direction depends on characters that contribute a strong writing direction. A small heuristic covers less than the full Unicode bidirectional algorithm.
This tool returns bounded first strong direction, full unicode bidi algorithm applied. Use the stated units and model convention when interpreting these fields.
When to use this tool
Use this tool when the supplied inputs match the specific operation described above and you need a repeatable result under its stated convention.
- Check the supported input and output contract against an existing calculation or observation.
- Use the complete example to confirm units, selector spelling and result interpretation.
How to use the tool and how it works
- Enter every field in the input table using the stated units and the exact supported selector spelling where applicable.
- Run the tool. Correct input errors before interpreting an output.
- Read the result fields below; use accompanying flags and the stated sign, boundary or model convention when interpreting a number.
Scan characters until an ASCII letter or supported letter range is encountered. Return ltr for ASCII letters, rtl for Hebrew/Arabic-range letters, unsupported for other first letters, or none when no letter is found.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| text | Text. | Text |
| Output field | Interpretation |
|---|---|
| result | Object containing the following named result fields. |
| result.boundedFirstStrongDirection | Bounded first strong direction; use the stated units and sign convention. |
| result.fullUnicodeBidiAlgorithmApplied | Always false; only the described first-letter heuristic is applied. |
{
"input": {
"text": "123 \u05e9\u05dc\u05d5\u05dd"
},
"output": {
"result": {
"boundedFirstStrongDirection": "rtl",
"fullUnicodeBidiAlgorithmApplied": false
}
}
} Limitations and assumptions
- Digits and punctuation do not decide this heuristic. fullUnicodeBidiAlgorithmApplied remains false.
- Every declared field is required and unexpected fields are rejected. Numeric inputs must be finite; input errors are distinct from a valid false result or an explicitly qualified output.
- Extremely large inputs and nonfinite or excessively large outputs are rejected. List positions reported by the tool use zero-based indices unless stated otherwise.
Alternative or Complementary methods
Check the underlying observations, units and conventions independently before using the result in a larger workflow. The tools listed below address nearby tasks; compare their inputs and scope before substituting one for this operation.
References
Similar or alternative tools
- audio preload metadata none auto values
Audio preload is a hint about how much media data to prepare before playback.
- b i vs strong em semantic split lookup
HTML offers different semantics for attention, alternate voice, importance and stress emphasis.