Blazon Text Tokenizer to Structured Fields Parser
Parse a restricted English blazon: one standard field tincture and up to 16 comma-delimited count/name/tincture charge clauses. Supports counts 1–6, lions/eagles/roundels and single chief/fess/pale/bend/bordure. Case-insensitive roles with original lexical tokens; rejects unsupported divisions, modifiers, arrangements, furs/proper and recursive syntax rather than silently returning a partial parse. Not a grant-legality decision.
Description
A blazon is a conventional verbal description of arms, while a restricted parser recognizes only an explicitly supported subset.
A blazon is a conventional verbal description of arms, while a restricted parser recognizes only an explicitly supported subset.1
Keeping the supported grammar visible prevents partial recognition from being mistaken for complete interpretation.
When to use Blazon Text Tokenizer to Structured Fields Parser
Use this tool to calculate or review the supplied observations under the stated rules. Establish the source tradition, viewing frame, coordinate units and independently annotated features.
How to use Blazon Text Tokenizer to Structured Fields Parser and understand its results
- Establish the source tradition, viewing frame, coordinate units and independently annotated features.
- Enter blazonText, using the field meanings and rules below, then run the tool.
- Read result.tokens, result.firstToken, result.fieldTincture, result.chargeCounts, result.chargeNames, result.chargeTinctures, using the output meanings and calculation rules below.
- Correct any reported input issue and run again. Before using a successful result, check the stated units, signs, reference scope and observation coverage.
| Input field | Meaning | Value type | Requirement |
|---|---|---|---|
| blazonText | Blazon text | string | Required |
Enter at most 8192 UTF-16 units. Trim the text, remove one terminal full stop, retain original-case whitespace tokens after replacing commas with spaces, and parse lowercased comma-separated clauses. The first clause must be exactly one of or, argent, gules, azure, sable, vert or purpure. Accept at most sixteen following charge clauses, each exactly count, charge name and tincture. Counts are a, an, one through six; names are lion/lions, eagle/eagles, roundel/roundels, chief, fess, pale, bend or bordure. The latter five have no supported plural. Count must agree with singular/plural form. Return original-case tokens plus normalized field and parallel charge lists. Field-only text is valid; any unsupported clause rejects the entire input.
parseSupportedClauses(text)→{tokens,firstToken,fieldTincture,chargeCounts,chargeNames,chargeTinctures} Use the matching field units and the exact boundary, ordering and reference rules above.
| Output field | Meaning | Value type |
|---|---|---|
| result | Calculated observation or reference | object |
| result.tokens | tokens | list |
| result.firstToken | first Token | string |
| result.fieldTincture | field Tincture | string |
| result.chargeCounts | charge Counts | list |
| result.chargeNames | charge Names | list |
| result.chargeTinctures | charge Tinctures | list |
{
"input": {
"blazonText": "Or, a lion gules."
},
"output": {
"result": {
"tokens": [
"Or",
"a",
"lion",
"gules"
],
"firstToken": "Or",
"fieldTincture": "or",
"chargeCounts": [
1
],
"chargeNames": [
"lion"
],
"chargeTinctures": [
"gules"
]
}
}
} Limitations and assumptions
This is a restricted English grammar. It does not accept partitions, poses, furs, most charges or general blazon syntax, and does not validate heraldic semantics, entitlement or render the arms.
Missing required fields, unknown fields, wrong types and violated rules return input issues. Numeric values and outputs must be finite. Extremely large composite outputs are rejected.
Alternative or Complementary methods
For a related step, use Structured Fields to Blazon Sentence Serializer: A blazon orders a field description and charge descriptions according to an adopted convention. For a complementary comparison, use Field First Tincture Position Checker: A field-first check compares an annotated field-tincture position with the start of a token sequence.
References
Similar or alternative tools
- Structured Fields to Blazon Sentence Serializer
A blazon orders a field description and charge descriptions according to an adopted convention.
- Field First Tincture Position Checker
A field-first check compares an annotated field-tincture position with the start of a token sequence.