The tutorial shows how to use the page, and From the catalog to Typotron how to bring languages in from the catalog. This page explains the scientific context of Typotron, what it's used for, and how it builds on and extends earlier software.
Optimality Theory (OT; Prince and Smolensky 1993/2004) and Harmonic Grammar (HG; Smolensky and Legendre 2006, Pater 2009, 2016) are frameworks for analysis of individual languages and for the generation of predictions about the shape of cross-linguistic typology. In OT, a ranking of constraints determines the form of an individual language, any ranking of the posited constraints is predicted to be a possible language. In an OT-like version of HG, constraint ranks are replaced by positive weights, and the typology comes from the space of constraint weightings. See Kager (1999) and McCarthy (2008) for introductions to OT, here we will be assuming some familiarity with it, as well as HG.
Software that finds rankings and computes typologies came early in OT: OTSoft (Hayes, Tesar & Zuraw 2026; version 2.1 by 2003) and the OT routines of Praat (Boersma, Weenink & Shchupak 2026). OTSoft's default ranking algorithm is Recursive Constraint Demotion (RCD; Tesar & Smolensky 1998, 2000), which its manual calls the batch version of classical Constraint Demotion (Hayes 2021: 11); it calculates whether one set of candidates ("winners") can be made jointly optimal across tableaux. OTSoft also generates a typology of predicted possible languages by examining which sets of winners can be jointly optimal. OT-Help (Becker, Pater & Potts 2007; version 2.0, Staubs et al. 2010) added the same calculations for HG, keeping RCD for rankings and adding a linear-programming solver for weightings, using the translation of Potts et al. (2010). SoftStress (Lee & Pater 2024; Lee, Pater & Prickett 2026) added the ability to deal with hidden structure in finding a set of weights for an individual language, building on Tesar (2004). Typotron builds on this earlier work. Gordon (2002) and Martínez-Paricio & Kager (2015) show what automated typology calculation does for stress; their constraint sets are built into Typotron, alongside the Tesar & Smolensky sets studied by Lee et al. (2026).
1Why the weights are exact
In Harmonic Grammar each constraint has a weight, and a candidate's harmony is the negated weighted sum of its violations. In an OT-like version of HG, where the winner is the candidate with the highest harmony (Potts et al. 2010), a weighting problem has one inequality per winner–loser pair, requiring the winner's harmony to exceed the loser's by at least 1, and asks for the weights with the smallest total, as OT-Help does. That is a problem of a standard kind, a linear program: a list of inequalities in non-negative unknowns, the weights, and a sum of them, their total, to be made as small as possible. Potts et al. (2010) give the translation, and OT-Help hands the list to a linear-programming solver. OT-Help's default also keeps every weight at 1 or more; Typotron's default lets a weight be 0, with a weights ≥ 1 option that matches OT-Help.
OT-Help's solver works in floating point, so a margin that should be exactly 1 can come out just under it, and a consistent set of winners would then be reported inconsistent. Its guide (Becker & Pater 2007) says it is "theoretically possible" that the solver "could misclassify sets of winners as infeasible, due to floating point errors, for example, but we have yet to see an example of such an error". Typotron closes off the possibility.
Typotron runs the standard method for linear programs, the simplex algorithm, over exact fractions: a weight of 3/2 is 3/2, not 1.5. When weights exist, it returns the ones with the smallest total and checks them against every comparison. When none exist, it returns a proof, called a certificate, of the kind the OT-Help guide writes out by hand for its kata/pika example. There the two winners require w(Iamb) > w(Trochee) and w(Trochee) > w(Iamb) + w(*Stress/Hi); adding the two lines leaves 0 > w(*Stress/Hi), which no non-negative weight satisfies. In general the certificate is a non-negative multiplier for each comparison, not all zero. Multiply each comparison by its multiplier and add them up. In the sum every weight has a coefficient of zero or less while the required margins add to a positive number, so no non-negative weights can satisfy every comparison at once. (Under the weights ≥ 1 option the margins are first reduced by what the bound itself supplies.) The solver re-checks that sum in exact arithmetic before returning the certificate, and the page checks it again before showing it.
2Inconsistency in OT
Under ranking a comparison is a row of W, L and e (Prince 2002b), W where a constraint prefers the winner, L the loser, e neither. Recursive Constraint Demotion (RCD; Tesar & Smolensky 1998, 2000) puts every constraint with no L in any remaining row into the next stratum, drops every row in which one of them has a W, and repeats. When rows remain but no constraint can be placed, no ranking exists; OT-Help shows the remaining rows in red.
Prince (2002a) turns the stalled rows into a proof, by fusion. Fusion goes column by column: L if any row has L, else W if any has W, else e. Rows have no ranking exactly when some subset fuses to a row with an L and no W. If the fusion has no W, every constraint that is not indifferent throughout those rows has an L in some row. Take any ranking and the highest-ranked such constraint: in the row where it has its L, every higher constraint is e, so that constraint decides the row, against the winner. Typotron prunes the stalled rows to a subset whose fusion still has no W (greedily, so not always the smallest), prints them with their fusion, and recomputes the fusion in the browser before showing it. A row that is e throughout, a winner tied with a loser, counts as unresolved too, since the winner must be strictly better. Typotron does not run the Fusional Reduction algorithm of Brasoveanu & Prince (2011), which reduces a set of ranking arguments to its simplest form; OTSoft offers it as an option for its ranking arguments (Hayes 2021: 15). Typotron's pruned fusion is a proof that no ranking exists, not a simplest statement of the rankings that do.
3The catalog
The Word Stress Catalog on AccStack gives each language with a stated stress rule one stress string per word shape, written as Typotron writes its winners: 1 0 for a two-syllable word stressed on the first syllable, 0 1 0 for a three-syllable word stressed on the second, 1 0 2 0 for primary stress on the first syllable and secondary on the third. These are overt forms. Under hidden structure a winner is such a string, not a footing; a string like 0 1 0 may be realised by more than one footing, and the solver looks for a footing of each word that the grammar makes optimal. On the catalog page you tick languages into one of three lists, A, B and C, kept in your browser and shared by the two pages, which must both be open at accstack.org. A link carries up to 200 languages into Typotron; a larger list travels as a file.
Use this set puts the list in the Built-in stress tab of the Problem pane, where clicking a card loads its strings as the pattern and solves. Run on this list computes the typology of the chosen constraint set once and marks each ticked language covered or not, either exactly (strings equal, secondary stress included) or on primary stress alone. The typology table's catalog column lists the catalog languages whose strings agree with each row. A match means the strings agree on the word shapes both have, at least two of them, comparing primary stress and only the secondary stresses the catalog codes. It does not say that the constraint set gives an analysis of the rest of the language: longer words, secondary stress the catalog does not code, exceptions.
4Why in the browser
Typotron is a web page with nothing to install. It runs, inside your browser through WebAssembly, the same Python package that installs with pip and runs from the command line. The page also draws the representations: metrical grids for the constraint set of Gordon (2002), feet and the layered feet of Martínez-Paricio & Kager (2015) as arcs under the syllables, beside every candidate, in the verdict cards and in the typology table. The solver downloads once, about 10 MB, and your browser keeps a copy. The site also runs the same package on a server. When the server answers, the page sends the problem there and nothing is stored; when it does not, the copy in your browser solves it. When you drag a header or slide a weight, the page evaluates the tableau itself, whichever engine is in use, and answers at once. The dialog How this verdict was computed says whether the verdict was pre-computed when the site was built or computed now, names the engine, and prints the command line that reproduces it. The package and the command line also run serial versions of OT and HG, which OT-Help 2.0 added (Mullin et al. 2010); the page runs only the parallel theories and refuses a serial file with a message saying so.
The share button copies a link carrying the constraint set, the inputs, the language or typed pattern, the winner convention, and the OT / HG switch. (The winner convention says whether the chosen footing must beat only the candidates with other stress patterns or every other candidate; the tutorial calls these overt and strict.) A short problem file pasted into the page travels in the link too. Opening the link in another browser loads and solves the same problem. Because the page and the command line run the same package, a verdict reported in a paper can be given with the command that reproduces it.
5Changing rankings and weights by hand
Choosing winners by clicking comes from OT-Help, whose guide (Becker & Pater 2007) says "you can click on a loser to make it into a winner. This will refresh the page, passing the new language to the HG solver." Typotron keeps this. Click a candidate and it becomes the intended winner for its input; the problem re-loads as a typed pattern and is solved again under both theories.
Two further controls change the grammar and leave the target, the set of intended winners, alone. Drag a constraint header, or move it with the arrow keys, to re-rank. The columns re-order, the ☞ and the fatal-violation marks move, and the Verdict pane (the right-hand pane, where the answers live) redraws the ranking with a note naming the tableaux where the target is no longer generated. In the HG view each header has a weight slider, and the harmonies follow. Both respond at once, and a button restores the solved grammar. This shows what a ranking or a weighting rests on: move one constraint, and the note names the tableaux that lose the target.
6Comparative views
The comparative tableau is Prince's (2002b): one row per winner–loser pair, with W, L or e under each constraint. OT-Help offers it as a view, in two forms. Under weights the cells are differences in violation counts and the last column the weighted total. Its guide (Becker & Pater 2007) calls that view "useful, for instance, for easily spotting harmonically bounded candidates" and "for spotting sets of winner-loser pairs with identical vectors of differences in violation scores". Under ranking the cells are W, L and blank, and rows that "could not be used to make a ranking argument are shown in red".
Typotron's comparative view follows OT-Help. Under a ranking the cell that decides each row is outlined; under weights the cells are signed differences with the weighted sum at the end. A note under it gives the strata that constraint demotion finds from that tableau alone. The Verdict pane sets the OT card beside the HG card with a line saying whether the pattern is HG-only, as OT-Help's typology does when it passes each HG language to RCD.
7Ranking conditions, ranking volumes and weight shares
Three columns of the typology table describe the grammars of a language rather than one grammar. The ranking conditions column lists the pairwise rankings that every ranking generating the language obeys: Iamb ≫ Trochee; *StressHi says that Iamb outranks Trochee in all of them and that *StressHi may rank anywhere. A pair A ≫ B is required exactly when the language's comparison rows together with the ranking argument for B over A (W under B, L under A, e elsewhere) have no ranking under RCD (section 2); Typotron finds all the pairs with one RCD run per constraint, holding that constraint back, and then drops every pair the others imply (when A ≫ B and B ≫ C are required, A ≫ C is not listed, and the two are written as the chain A ≫ B ≫ C). The cell's tooltip and the exports also give the ranking RCD found, its strata from the top down, which is one ranking that works, not the conditions. With hidden structure the conditions are computed on the rows of the structures the table lists.
The rankings column is the language's ranking volume, the r-volume of Riggle (2010): the number of the n! total rankings of the n constraints under which the language's winners are optimal in every tableau, printed as the count and as its share of n!. Bane & Riggle (2008) found this count to be a correlate of how often a quantity-insensitive stress system occurs across languages. Typotron counts it exactly with the typology when count rankings is ticked, by a dynamic programme over the sets of constraints already ranked, free up to 20 constraints. Beyond that cap the value is an estimate from random rankings, marked ≈ with its 95 % interval, the number of samples and the seed; a number without ≈ is exact. The r-volume is defined without hidden structure. Here, under overt semantics a ranking counts when some structure of each winning form is optimal, under strict semantics when the listed structure is, so the counts of the rows need not add up to n! and the tooltip also gives the union over all structures of the same forms. Rankings that tie two forms in some tableau generate no language, so the counts can sum to less than n! (the no language chip).
The weight share column is the analogue for weighted grammars: the fraction of weight space in which the language's winners are optimal. Optimality is scale-free (multiplying every weight by the same number changes nothing), so a language's region is a cone, and any scale-free measure of cones will do; two are natural. The share here is the fraction of the simplex of non-negative weights summing to 1, on which the shares of a typology add up to exactly 1. Sampling weights uniformly in a box measures the other: the fraction of the cube the cone cuts out, the same for every box size, but a different number for the same language (with two constraints the region w1 ≤ 3 w2 is 3/4 of the simplex and 5/6 of the cube), so box-sampled numbers compare only with box-sampled numbers. With weights ≥ 1 (OT-Help's default) there is no scale-free share, since the region is an unbounded polyhedron whose fraction of any box depends on the box; the page then still shows the share of the simplex of weights ≥ 0 and says so in the column's tooltip and in the verdict line. A share is exact when it is computed as the volume of a rational polytope (extreme rays by double description, the volume by a recursion over the faces, integer determinants throughout), within a budget of 50,000 faces per language; past the budget it is a Monte-Carlo estimate marked ≈ with its 95 % interval, the number of samples and the seed, never a bare number. The intervals hold per language, not simultaneously, so about one row in twenty misses, and a language whose share is below about 3 in the number of samples gets no hit and reads < 0.02 %: it is still generated. Section 11 of the tutorial works through the numbers of the OT-Help example by hand.
8What is new
The Venn diagram of Lee, Pater & Prickett (2026, Figure 4) is drawn live. Pick two to four constraint sets. The page solves every language of the paper's StressTyp2 sample (61 languages; Goedemans, Heinz & van der Hulst 2015) in the chosen quantity class, QI or QS, under each set, and writes the codes into the regions as the figure does. A click on a region lists its members. A preset sets up the paper's own computation, and a study in the repository reproduces its Figure 4 exactly under HG.
Every no comes with a proof. Under ranking, OT-Help lists in red every row RCD could not use; Typotron prunes them to a few whose fusion has no W and prints that fusion. Under weighting, where OT-Help reports only that no weighting exists, the no comes with the multipliers of section 1. Both proofs are re-checked before they are shown, and every number in a verdict is an exact rational.
SoftStress (Lee & Pater 2024; Lee et al. 2026) searches over hidden structure when it looks for weights, essentially adapting Tesar (2004) to HG, as well as OT: when one stress pattern can be realised by several footings, it looks for a footing of each word that some weighting makes optimal. Typotron runs that search under ranking as well as under weighting, in exact arithmetic and with a proof on every no. Under either theory a language's verdict is computed directly, never by computing the whole typology and looking the pattern up, which Lee, Pater & Prickett note was the only route in OT-Help. The link to the catalog in section 3 is also new: each typology row names the catalog languages it matches, and each ticked language is marked covered or not. The tutorial covers the rest of what the page does, among it the all-lengths check of a row's ranking or weighting (its section 11) and the JavaScript engine for a browser with WebAssembly switched off.
9References
- Bane, Max & Jason Riggle (2008). Three correlates of the typological frequency of quantity-insensitive stress systems. In Jason Eisner & Jeffrey Heinz (eds.) Proceedings of the Tenth Meeting of ACL Special Interest Group on Computational Morphology and Phonology. Columbus, Ohio: Association for Computational Linguistics. 29–38. https://aclanthology.org/W08-0706/ (also Rutgers Optimality Archive, ROA-966.)
- Becker, Michael & Joe Pater (2007). OT-Help user guide. Amherst, Mass.: University of Massachusetts Amherst. https://people.umass.edu/othelp/OTHelp.pdf (the guide is undated; the PDF was made on 1 October 2007, the day OT-Help 1.0 was released).
- Becker, Michael, Joe Pater & Christopher Potts (2007). OT-Help 1.2. Software package. Amherst, Mass.: University of Massachusetts Amherst. https://people.umass.edu/othelp/ (OT-Help 1.0 was released on 1 October 2007; the page gives this citation for the 1.x series.)
- Boersma, Paul, David Weenink & Anastasia Shchupak (2026). Praat: doing phonetics by computer [computer program]. Version 7.0.02. https://praat.org (OT-Help's guide cites the 2007 version.)
- Brasoveanu, Adrian & Alan Prince (2011). Ranking and necessity: the Fusional Reduction Algorithm. Natural Language & Linguistic Theory 29(1). 3–70. https://doi.org/10.1007/s11049-010-9103-3
- Goedemans, Rob, Jeffrey Heinz & Harry van der Hulst (2015). StressTyp2, version 1. Web download archive. http://st2.ullet.net/
- Gordon, Matthew (2002). A factorial typology of quantity-insensitive stress. Natural Language & Linguistic Theory 20(3). 491–552. https://doi.org/10.1023/A:1015810531699
- Hayes, Bruce, Bruce Tesar & Kie Zuraw (2026). OTSoft 2.5. Software package. https://brucehayes.org/otsoft/ (also http://www.linguistics.ucla.edu/people/hayes/otsoft/).
- Hayes, Bruce (2021). OTSoft: constraint ranking software, version 2.5 (manual, updated 7 April 2021). Los Angeles: UCLA. https://brucehayes.org/otsoft/OTSoftManual_2.5_April_2021.pdf
- Kager, René (1999). Optimality Theory. Cambridge: Cambridge University Press. (Cambridge Textbooks in Linguistics.) https://doi.org/10.1017/CBO9780511812408
- Lee, Seung Suk & Joe Pater (2024). SoftStress. Software package. https://github.com/seungsuklee/SoftStress
- Lee, Seung Suk, Joe Pater & Brandon Prickett (2026). Representing and learning stress with MaxEnt grammar. Ms, University of Massachusetts Amherst (draft of 27 May 2026). https://drive.google.com/file/d/1TByBZSkC4XwNa45IAL2VCjYZux-FXmFM/view?usp=sharing
- Martínez-Paricio, Violeta & René Kager (2015). The binary-to-ternary rhythmic continuum in stress typology: layered feet and non-intervention constraints. Phonology 32(3). 459–504. https://doi.org/10.1017/S0952675715000287
- McCarthy, John J. (2008). Doing Optimality Theory: applying theory to data. Malden, Mass.: Blackwell. https://doi.org/10.1002/9781444301182
- Mullin, Kevin, Brian W. Smith, Joe Pater & John J. McCarthy (2010). OT-Help 2.0 user guide. Amherst, Mass.: University of Massachusetts Amherst. https://people.umass.edu/othelp/OTHelp2man.pdf (PDF dated 4 August 2010.)
- Pater, Joe (2009). Weighted constraints in generative linguistics. Cognitive Science 33(6). 999–1035. https://doi.org/10.1111/j.1551-6709.2009.01047.x (author copy: http://people.umass.edu/pater/pater-cogsci-2009.pdf)
- Pater, Joe (2016). Universal grammar with weighted constraints. In John J. McCarthy & Joe Pater (eds.) Harmonic Grammar and Harmonic Serialism. Sheffield: Equinox. 1–46. https://doi.org/10.3138/9781781793817-002 (author copy: https://drive.google.com/open?id=0BzcIp6QV9VxlNGNKM3loUmtoQkE)
- Potts, Christopher, Joe Pater, Karen Jesney, Rajesh Bhatt & Michael Becker (2010). Harmonic Grammar with linear programming: from linear systems to linguistic typology. Phonology 27(1). 77–117. https://doi.org/10.1017/S0952675710000047
- Prince, Alan (2002a). Entailed ranking arguments. Ms, Rutgers University. Rutgers Optimality Archive, ROA-500. https://roa.rutgers.edu/article/view/510.html (PDF: https://roa.rutgers.edu/files/500-0202/500-0202-PRINCE-0-1.PDF)
- Prince, Alan (2002b). Arguing optimality. Ms, Rutgers University. Rutgers Optimality Archive, ROA-562. https://roa.rutgers.edu/article/view/572.html (PDF: https://roa.rutgers.edu/files/562-1102/562-1102-PRINCE-0-0.PDF)
- Riggle, Jason (2010). Sampling rankings. Ms, University of Chicago. Rutgers Optimality Archive, ROA-1075. https://roa.rutgers.edu/article/view/1105.html (PDF: https://roa.rutgers.edu/files/1075-0510/1075-RIGGLE-0-0.PDF)
- Prince, Alan & Paul Smolensky (1993). Optimality Theory: constraint interaction in generative grammar. Ms, Rutgers University & University of Colorado, Boulder (Technical Report RuCCS-TR-2 / CU-CS-696-93). Rutgers Optimality Archive, ROA-537 (ROA version, August 2002). https://roa.rutgers.edu/article/view/547.html. Published 2004 as Optimality Theory: constraint interaction in generative grammar. Malden, Mass.: Blackwell. https://doi.org/10.1002/9780470759400
- Smolensky, Paul & Géraldine Legendre (2006). The harmonic mind: from neural computation to Optimality-Theoretic grammar. 2 vols. Vol. 1: Cognitive architecture; vol. 2: Linguistic and philosophical implications. Cambridge, Mass.: MIT Press. ISBN 9780262195263 (vol. 1), 9780262195270 (vol. 2). https://books.google.com/books?vid=ISBN9780262195263
- Staubs, Robert, Michael Becker, Christopher Potts, Patrick Pratt, John J. McCarthy & Joe Pater (2010). OT-Help 2.0. Software package. Amherst, Mass.: University of Massachusetts Amherst. https://people.umass.edu/othelp/
- Tesar, Bruce (2004). Using inconsistency detection to overcome structural ambiguity in language learning. Linguistic Inquiry 35(2). 219–253. https://doi.org/10.1162/002438904323019057
- Tesar, Bruce & Paul Smolensky (1998). Learnability in Optimality Theory. Linguistic Inquiry 29(2). 229–268. https://doi.org/10.1162/002438998553734
- Tesar, Bruce & Paul Smolensky (2000). Learnability in Optimality Theory. Cambridge, Mass.: MIT Press. https://doi.org/10.7551/mitpress/4159.001.0001
Back to Typotron. The tutorial walks through every control, and From the catalog to Typotron through the hand-off from the catalog. The OT-Help quotations are from its user guide (Becker & Pater 2007), people.umass.edu/othelp/OTHelp.pdf.