Sentence Structure Lab
Build a sentence diagram by choosing word classes and contiguous phrase or clause ranges yourself. The diagram displays the nesting you entered, while gap lists expose words without a word-class tag or phrase range. Crossed ranges are rejected because they cannot form a clear hierarchy. The page does not parse language, verify grammar or claim a correct answer.
Key features
- Manual word-class choices for each whitespace-delimited token
- Editable phrase and clause spans with grammatical-role labels
- Crossing-range rejection and explicit missing-tag or uncovered-token lists
- Nested SVG diagram with a keyboard-readable annotation table
- Original text and UTF-16 token offsets preserved in exports
- Versioned JSON round-trip plus formula-safe token TSV
How to use
- Load the example or replace the source sentence. Replacing the source deliberately starts fresh tags and spans.
- Choose a word-class label for each token, including Other when your teaching scheme does not fit a preset label.
- Select a first and last token, phrase or clause, role and a short label. Add or edit the range; contained ranges form a hierarchy.
- Read the diagram and annotation table, then inspect untagged and outside-phrase words. Revise your manual choices as needed.
- Download editable JSON, a standalone SVG diagram or token TSV. Reimport only the versioned JSON to continue editing.
Use cases
- Prepare a classroom phrase-boundary exercise without revealing an automatic answer
- Compare two manually annotated readings of one sentence
- Identify which words a learner forgot to tag
- Attach exact token positions to an annotated example
Frequently asked questions
Does the tool analyze or grade grammar automatically?
No. Every word-class, phrase, clause and role label is chosen by you. The page checks only structural consistency, such as valid token positions and non-crossing spans. A structurally valid diagram can still be linguistically wrong.
How are words split?
Runs of non-whitespace characters become tokens. Spacing and punctuation stay in the source text; punctuation attached to a word stays in that token. Edit the source with whitespace if you want a different token boundary, then retag it.
Why is my span rejected?
A span must include one or more complete consecutive tokens. Two ranges may be separate or one may fully contain the other. Crossing ranges and two annotations with exactly the same range are rejected to keep one unambiguous display hierarchy.
What do the gap lists mean?
Untagged lists tokens still marked Untagged. Outside phrase lists tokens that belong to no phrase range; a clause alone does not clear that warning. These are editing prompts, not automatic grammar errors.
Can I change the sentence after annotating it?
Yes, but Replace sentence intentionally resets all word-class labels and spans because token positions may have changed. Download JSON first if you need to keep the previous analysis.
What do the exports contain?
JSON is the only editable import format and preserves exact source spacing, tags and spans. SVG is a standalone diagram with shortened visual labels and full title text; TSV lists token surfaces, UTF-16 offsets, tags and containing spans. Neither is a grammar certification.
Privacy
The sentence and annotations remain in this browser tab. There is no automatic save or remote collection. Download JSON before leaving if you need to continue later.
Comments & questions