Description
Draw supplied plain caption text and inclusive positive millisecond durations, then delegate characters/second and words/minute. Characters are JavaScript code points with explicit whitespace inclusion/exclusion; words are nonempty whitespace-separated tokens, not linguistic segmentation. Compare only caller-supplied limits, without claiming readability or stripping markup.
A parser corpus pairs literal input spellings or structured documents with observable parser results or explicitly constructed expectations. Successful parsing, semantic validity, and exact round-trip preservation are separate properties, so test records retain the relevant evidence.
Draw supplied plain caption text and inclusive positive millisecond durations, then delegate characters/second and words/minute. Characters are JavaScript code points with explicit whitespace inclusion/exclusion; words are nonempty whitespace-separated tokens, not linguistic segmentation. Compare only caller-supplied limits, without claiming readability or stripping markup.
When to use this tool
Use this generator to create reproducible subtitle timing practice set cases from the supplied model or bank. Inspect the returned evidence before using cases in a test or exercise.
How to use the tool and how it works
- Supply captions, minimumMilliseconds, maximumMilliseconds, characterMode, characterLimit, wordLimit, count in the field shapes below. Set seed when you need an explicit replay.
- Run the tool and correct any input error. For generated controls, distinguish a successful fixture containing an invalid case from failure to generate the fixture.
- Read cases. Use the conventions below and keep answer-bearing fields separate when presenting an exercise.
Draw supplied captions and inclusive integer durations in milliseconds. Count characters as Unicode code points with the chosen whitespace policy and words by nonempty whitespace splitting. Delegate characters per second and words per minute, then compare strictly with caller limits.1
Delegated operations used for this result: subtitle characters per second; subtitle reading speed. Their calculation or parsing conventions apply to the corresponding result fields.2, 3
| Input field | Meaning and units | Accepted input |
|---|---|---|
| captions | Captions | Required. Array of Text; maximum UTF-16 length 2048.; minimum items 1; maximum items 64. |
| minimumMilliseconds | Minimum Milliseconds | Required. Safe integer; minimum 1; maximum 9007199254740991. |
| maximumMilliseconds | Maximum Milliseconds | Required. Safe integer; minimum 1; maximum 9007199254740991. |
| characterMode | Character Mode | Required. Text; one of "include-whitespace", "exclude-whitespace". |
| characterLimit | Character Limit | Required. Finite number; minimum 0. |
| wordLimit | Word Limit | Required. Finite number; minimum 0. |
| count | Requested count; the mechanics explain whether one draw expands into several returned records. | Required. Safe integer; minimum 1; maximum 64. |
| seed | Optional numeric seed; takes precedence over context randomness. Without either, use the fixed tool.io default seed. | Optional. Safe integer. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| cases | Cases | Required. Array of Object; no unknown keys.; minimum items 1; maximum items 64. |
| cases[].captionIndex | Caption Index | Required. Safe integer; minimum 0; maximum 63. |
| cases[].text | Text | Required. Text; maximum UTF-16 length 2048. |
| cases[].durationMilliseconds | Duration Milliseconds | Required. Safe integer; minimum 1; maximum 9007199254740991. |
| cases[].durationSeconds | Duration Seconds | Required. Finite number; strictly above 0. |
| cases[].characterCount | Character Count | Required. Safe integer; minimum 0; maximum 2048. |
| cases[].wordCount | Word Count | Required. Safe integer; minimum 0; maximum 2048. |
| cases[].charactersPerSecond | Characters Per Second | Required. Finite number; minimum 0. |
| cases[].wordsPerMinute | Words Per Minute | Required. Finite number; minimum 0. |
| cases[].exceedsCharacterLimit | Exceeds Character Limit | Required. Boolean. |
| cases[].exceedsWordLimit | Exceeds Word Limit | Required. Boolean. |
| randomness | Replay metadata: source is seed or context; seed is the normalized 32-bit seed or null for a context source. | Required. Object; no unknown keys. |
| randomness.seed | Optional numeric replay seed; normalization and precedence are explained below. | Required. Safe integer. or Null. |
| randomness.source | Source | Required. Text; one of "context", "seed". |
An explicit safe-integer seed takes precedence over injected context randomness and is normalized to an unsigned 32-bit integer. With no seed and no context source, replay uses the fixed tool.io default seed. A context source must return finite values from zero inclusive to one exclusive; its advancing state must be retained separately. randomness records the source and normalized seed, or null for context. These generators are not cryptographic random sources.
{
"input": {
"captions": [
"Hello world!",
"Hi 😀"
],
"minimumMilliseconds": 1000,
"maximumMilliseconds": 3000,
"characterMode": "include-whitespace",
"characterLimit": 4,
"wordLimit": 60,
"count": 3,
"seed": 42
},
"output": {
"cases": [
{
"captionIndex": 1,
"text": "Hi 😀",
"durationMilliseconds": 1897,
"durationSeconds": 1.897,
"characterCount": 4,
"wordCount": 2,
"charactersPerSecond": 2.1085925144965736,
"wordsPerMinute": 63.257775434897205,
"exceedsCharacterLimit": false,
"exceedsWordLimit": true
},
{
"captionIndex": 1,
"text": "Hi 😀",
"durationMilliseconds": 2340,
"durationSeconds": 2.34,
"characterCount": 4,
"wordCount": 2,
"charactersPerSecond": 1.7094017094017095,
"wordsPerMinute": 51.282051282051285,
"exceedsCharacterLimit": false,
"exceedsWordLimit": false
},
{
"captionIndex": 0,
"text": "Hello world!",
"durationMilliseconds": 2053,
"durationSeconds": 2.053,
"characterCount": 12,
"wordCount": 2,
"charactersPerSecond": 5.845104724792986,
"wordsPerMinute": 58.45104724792986,
"exceedsCharacterLimit": true,
"exceedsWordLimit": false
}
],
"randomness": {
"seed": 42,
"source": "seed"
}
}
} Limitations and assumptions
- Caption markup is not removed and whitespace-based words are not linguistic segmentation. Rate thresholds are caller settings rather than a guarantee of readability or subtitle-standard compliance.
- A replay requires the same complete input and implementation. Randomized construction does not guarantee uniform coverage of every feasible output; finite samples can repeat unless a distinct-selection rule is explicitly stated.
- The field tables state structural bounds; cross-field constraints and bounded search or output budgets also apply. Unknown keys are rejected where the object contract disallows them. Input errors are distinct from null fields and deliberate invalid controls in a successful output.
Alternative or Complementary methods
For a supplied example, inspect the returned construction or delegated check directly. To evaluate a consumer, also test cases chosen for its own boundaries; a generated finite corpus does not establish exhaustive coverage.
References
Similar or alternative tools
- Random Text Encoding Detection Practice Cards Generator
Encode supplied well-formed messages with selected existing UTF-8 base32/base64/Ascii85 or five-character HTML-entity encoders and sample practice cards; accepted labels include every source/encoding pair in that supplied bank yielding the same display, not universal encoding detection, and no-replacement applies to pairs rather than distinct prompts.
- Random Linear Congruence Practice Set Generator
Generate bounded linear congruences with exact delegated residue/period keys and enumerate every solution class modulo the supplied generated modulus.