Paste your own text into the box, or load a plain-text file. Everything runs in your browser — nothing is uploaded.

    Pick a sample or paste something, then press Draw.

    Reading it

    Labels
    Tokens are printed under the rail, upright where there is room and turned on their side where there is not. Phrases and lines are always sideways and truncated. Past roughly 210 tokens the labels are dropped as unreadable — hovering a band still tells you what it found.
    The bands
    One band per maximal repeated passage. Hover a band to read the passage it found, how long it is and how far apart the two copies are. Overlapping bands darken, so the dark regions are material repeating at several scales at once.
    Choice of token
    A melody hands you its alphabet; a poem does not, so the unit is yours to pick. The four levels are a scale hierarchy — syllables make words, words make phrases, phrases make lines — and each one is a coarser view of the same text. Syllables catch meter and repeated sound-shapes that cross word boundaries. Words catch refrain and formula. Phrases catch the recurring unit of composition, wherever in the line it happens to sit. Lines catch verbatim refrain and repeated stanzas. Running the same text at several levels and comparing is usually more informative than any single view.
    Phrases are induced, not given
    Words and lines are handed to you by the text: whitespace and line breaks. Phrases are not. Here a phrase is any run of two to eight words that occurs more than once anywhere in the text, and the word stream is then chopped left to right, taking the longest such run available at each point and falling back to a single word where none applies. Nothing is anchored to the start or the end of a line — an opening like when the and a closing formula count equally, which is the point.

    Two consequences worth holding on to. The segmentation is a decision, so a different rule — most frequent first rather than longest first — would chop the same poem differently and change the counts. And because the chopping is greedy, the same wording can occasionally be split two ways in two places, which loses a match that a reader would see. Treat phrase-level numbers as one defensible reading of the text rather than a measurement of it.
    Separation slope
    Fit to the survival function of the gaps between repeats: how the number of repeats falls off as the distance between the copies grows. A slope near zero means repetition is spread across all distances; a steep slope means it is mostly local. The fractal dimension shown next to it is the absolute value of that slope, and is omitted when the slope cannot be fitted. It is a description, not a power-law test — R² tells you how much to trust the line, and a few hundred repeats is rarely enough to claim a power law.
    Strongest periodicity
    The lag at which two tokens are likeliest to be identical, against the rate you would get by chance from the same vocabulary. In stanzaic verse this usually lands on the line length or a multiple of it.
    Shuffled control
    The same tokens in random order, averaged over 30 runs. This keeps every word frequency intact, so whatever gap opens between the real text and the shuffle comes from sequence order alone. Texts with a very small alphabet — a four-note melody, say — shuffle to about the same number of repeats, which means the structure is visible but not statistically measurable. A text can also come out below its shuffle, which usually means its repeats arrive in consecutive runs rather than scattered across the whole; a run of four identical lines yields fewer distinct pairs than four identical lines spread far apart. That is strong order, not the absence of it, and the count alone will not tell you so.

    At phrase level the control is close to meaningless, and it is worth knowing why. The phrases were defined by looking for repetition in the first place, so the repetition has already been spent on building the alphabet; shuffling those tokens will usually produce about as many matches as the real order does. Read the phrase level for what it shows you — which phrases recur and where — and take the statistical comparison from the word or syllable level, where the tokens were fixed before anything was counted.

    Arc diagrams are Martin Wattenberg's, from Arc Diagrams: Visualizing Structure in Strings (IEEE InfoVis 2002, hint.fm/papers/arc-diagrams.pdf) and his Shape of Song. Everything here runs in your browser; nothing you paste is uploaded anywhere. Syllable splitting is crude orthographic vowel-nucleus division, not a phonological analysis.