Description
Count transitions in supplied Unicode script annotations after explicit ignored-label removal; does not infer scripts from text.
Text positions can be measured in UTF-16 code units, Unicode code points, grapheme clusters, or modeled display columns. These coordinates are not interchangeable. Invisible markers and delimiter policies can also affect interpretation even when a string looks unchanged, so the chosen representation needs to stay explicit.
Count transitions in supplied Unicode script annotations after explicit ignored-label removal; does not infer scripts from text.
When to use this tool
Use Unicode Script Transition Count when you need the stated marker, coordinate, delimiter, or normalization operation under an explicit text representation.
How to use the tool and how it works
- Enter scriptLabels, ignoredLabels. Keep parallel arrays aligned. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read transitions, retainedLabels. Use the output convention below.
Remove supplied scriptLabels occurring in ignoredLabels, then count adjacent changes in the retained list and return retainedLabels.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| scriptLabels | Script Labels | Required. Array of text; maximum UTF-16 length 8192; maximum items 256. |
| ignoredLabels | Ignored Labels | Required. Array of text; maximum UTF-16 length 8192; maximum items 256. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| transitions | Transitions | Required. Safe integer. |
| retainedLabels | Retained Labels | Required. Array of text; maximum UTF-16 length 8192; maximum items 256. |
{
"input": {
"scriptLabels": [
"Latin",
"Common",
"Greek",
"Greek",
"Latin"
],
"ignoredLabels": [
"Common"
]
},
"output": {
"transitions": 2,
"retainedLabels": [
"Latin",
"Greek",
"Greek",
"Latin"
]
}
} Limitations and assumptions
- Filtering can make labels formerly separated by ignored entries adjacent. Labels are supplied, not derived from text or verified against Unicode script properties.
- The field tables state structural bounds; the mechanics also specify cross-field constraints. Malformed inputs and unsupported domains cause errors. A successful false flag, empty branch value, or zero placeholder has the meaning stated above and is distinct from an input error.
Alternative or Complementary methods
Choose the coordinate system required by the consumer. Use a full parser, renderer, or segmentation method when a local marker or delimiter rule cannot determine the complete text behavior.
References
Similar or alternative tools
- Markdown Hardbreak Trailing Spaces Count
Count trailing ASCII spaces on a line without CR or LF and set hardBreak when there are at least two.
- Quote Depth Transition Sign
Return delta=after-before and direction as the sign of that difference, requiring nonnegative integer depths.