Writing Gregg Shorthand with METAFONT and LATEX
Total Page:16
File Type:pdf, Size:1020Kb
Writing Gregg Shorthand with METAFONT and LATEX Stanislav Jan Sarmanˇ Computing Centre Clausthal University of Technology Erzstr. 51 38678 Clausthal Germany Sarman (at) rz dot tu-clausthal dot de http://www3.rz.tu-clausthal.de/~rzsjs/steno/Gregg.php Abstract We present an online system, which converts English text into Gregg shorthand, a phonetic pen writing system used in the U.S. and Ireland. Shorthand is defined [2] as a method of writing de- two forms± of signs exist for§ s and th¨: the right (s) , rived from the spelling system and the script of a (th) and the left (S) , (Th) , respectively. particular language. In order to approximate the Blended consonant signs: speed of speech: (ld) (nd) (rd) (tm) (tn) (td)(dd) • The graphic redundancy of written characters dn¹ º and ligatures derived from longhand letters is reduced. can be thought of as built-in ligatures. Vowel signs: • Silent letters are ignored, and complex ortho- for sound(s) as in graphic rules are simplified. The spelling only ¢ [a] at, art, ate serves as a reference system of what is largely / phonetic writing. [e]/[i] x pit, pet, peat (o) pot, port , pour • Abbreviations are utilized. à À ¿ Gregg shorthand was first published in 1888. In (u) tuck, took , tomb the following three sections we want to show how its Elementary diphthong (triphone) signs: inventor J. R. Gregg has applied the above general for soundsJ as in principles in the creation of his shorthand system [ai] high $ and how the current system version, the centennial [aee] O client ( edition [7], can be implemented in METAFONT [5]. [iie] create When writing shorthand the curvilinear motion 1 Simplified writing of a pen in the slope of longhand traces ellipse or 1.1 The alphabet of Gregg Shorthand oval-based curves. We shape these elementary short- METAFONT 1 hand signs in as continuous curvature Signs of consonant phonemes written forward: splines with zero curvature at the end points. (k) (g) (r) (l) (n) (m) (t) (d) (th)(Th) XBamfª)±¨ Half-consonants h, w, prefixes and/ suffixes are realized as markers, e.g. a dot over [i] such as Signs of consonant phonemes written downward: H in \he"; means preceding h; another dot under (p) (b) (f) (v) (sh) (ch) (jh) (s)(S) ª I (along) the sign (t) such as in denotes the 2Å W§ suffix -ing in \heating". The signs of voiced consonant phonemes are larger 1.2 Metaform versions of their unvoiced opposites. As the \mini- mal pairs"2 of words with phonemes s vs. z, th vs. Gregg shorthand is an alphabetic system | written dh and sh vs. zh are very rare, there are only the words are combined together from elementary signs unvoiced versions of these signs. On the other hand by joining, so that in general the Gregg shorthand glyphs have the following metaform: 1 Phonemes are denoted in typewriter type, their signs f (fp,gCf,sg) j [+j-][fp,gV f,sg] g+ are parenthesized or bracketed. where V are circular vowels, C denotes (blended) 2 such as face vs. phase, sooth vs. soothe, mesher vs. mea- sure, pronunciations of which differ only in one place consonants and vowels u and o, optional p and s 458 TUGboat, Volume 29 (2008), No. 3 | Proceedings of the 2008 Annual Meeting Writing Gregg Shorthand with METAFONT and LATEX stand for markers of semiconsonants, prefixes or suf- κ1 κ1 κ κ fixes. In more detail: 0 0 V ::= a j e j i j ai j aee j iie (r) (k) (r)(k) C ::= b j d j dd ... o j u (2) p ::= h j w j ... over j under ... Figure 1: An example of a G continuous s ::= ing j ly j ... CC joining Examples: metaform H 1.3.2 Joinings with circular signs he -[h,i,] I heating -[h,i,](,t,ing) q The signs of consonants can be classified into seven need (n)-[i](d) r categories. Looped vowels before or after a conso- needed (n)-[i](dd) s nant are written within the curves or combined with needing (n)-[i](,d,ing) straight consonants as right curves, so that the fol- The metaform corresponds directly to the META- lowing VC, CV prototype joinings can occur: FONT Xfª 2 program code, e.g.: (n)-[i](,d,ing) $ I(,n,); V(-1,,i,); C(,d,ing); £0 i.e. the shorthand glyph of this particular character VC is initiated with (n), then the signs of right vowel Yh¬¢ 3 CV -[i] and the sign of consonant d with suffix ing are appended. Observe the realization of diphthongs as VC or CV joinings, too: 1.3 Joining for soundsL as in We distinguish between joinings where circular signs -[a](u) | howÁ are involved and joinings without them. (o)+[i] 1 toy 7 -[i](u) few 1.3.1 CC Joinings All VC or CV joinings are done in such a man- Examples of CC joinings ordered by their connec- ner that both components have identical tangents (0) (2) tivity grade G {G follow: and curvature equal to zero at the connection point. - ~ U (2) continuous: (d)(n), (u)(n), (t)(S) As an example of G connecting of a consonant (with turning point!) ¢sign with a vowel signX consider prepending£ the sign 2 a = of -[a] before (k) as in : tangent continuous: + à = Ä(f)(l), + = (p)(r), + = (u)(p), 0 −1=r −α B Å F α r + = (g)(v) 0 0 X Ì r curvature continuous: + = (r)(k) (k) -[a] -[a](k) The first two types of joinings are handled by META- (2) FONT means; G(2) continuous connecting can be Figure 2: An example of a G continuous done only in special cases using Hermite interpo- VC joining lation for B´eziersplines, as follows. t Here the spline approximation of (k) is such If two endpoints zi, unit tangents di, didi = 1 that the curvature equals zero at the end points; and curvatures κi, i = 1; 2 are given, the control + − this is the case with other consonants, too. The points z0 = z0 + δ0d0, z1 = z1 − δ1d1 have to be determined from the following system of nonlinear spline approximation of right circle with radius r equations [3]: for the sign -[a] consists of 8 segments such that the curvature κ = 0 at the top point and κ ≈ −1=r (d × d )δ = (a × d ) − 3= κ δ2 (1) 0 1 0 1 2 1 1 at the other points. Let α be the angle of the tangent 3 2 (d0 × d1)δ1 = (d0 × a) − =2κ0δ0 (2) in the zeroth point of (k). Placing the -[a] circle at (a = z1 − z0). the point with distance r from the zeroth point of If the tangents are parallel, i.e. (d0×d1) = 0 and (k) and rotating it by the angle of −α a curvature the curvatures κi have opposite signs, the equations continuous joining is obtained. (1){(2) are trivially solvable, so that G(2) joining is For a G(2) continuous spline approximation of possible (here after some kerning): the unit circle with curvature κ= 0 in one point we TUGboat, Volume 29 (2008), No. 3 | Proceedings of the 2008 Annual Meeting 459 Stanislav Jan Sarmanˇ use the traditional B´ezierspline circle segment ap- 2 Phonetic writing th proximation for the segments 1{7 (see the 7 seg- Gregg shorthand uses its own orthography, which 1 ment on the left) z( =2) = 1, so that δ0 = δ1 = must be acquired by the shorthand learner and in 4 4 =3 tan(θ=4) and κi = −(1 − sin (θ=4)). Using this a system such as ours, the pronunciation of a word th value as left point curvature of the 8 segment (see has to be known. We use the Unisyn multi-accent on the right) and demanding κ1 = 0, the Hermite lexicon4 with about 118,000 entries [4] comprising interpolation with the equations (1){(2) for the un- British and American spelling variants. The fields knowns δ0 und δ1 can be solved for segments with of lexicon entries are: spelling, optional identifier, ◦ θ < 60 . part-of-speech, pronunciation, enriched orthography, and frequency. Examples are: κ = 0 + −1 owed;;VBD/VBN; { * ouw }> d >;{owe}>ed>;2588 z0 z1 z1 live;1;VB/VBP; { l * i v } ;{live};72417 live;2;JJ; { l * ae v } ;{live};72417} κ1 ≈ −1 a z1 z0 Homonyma cases such as \live" above, in which κ0 ≈ −1 − the pronunciation helps to identify word meaning z1 are much more rarer than the cases in which the a + use of pronunciation yields homophones resulting in z0 shorthand homographs. Consider the very frequent θ θ right, rite, wright, write: { r * ai t } with short- z0 κ0 ≈ −1 hand glyph (r)+[ai](t) or the heterophones read;1;VB/NN/NNP/VBP; { r * ii d };{read};94567 Figure 3: 7th and 8th segment (θ = 45◦) of our unit read;2;VBN/VBD; { r * e d };{read};94567 right circle spline approximation both written as (r)+[e|i](d). Thus phonetic writing may speed up the shorthand recording, but For CVC joinings 7×7 cases are possible in the newly-created homographs complicate the deci- all | many of them can be transformed by reflection phering of written notes. and rotation into one another. All these joinings can The pronunciation of a word has to be trans- be made G(2) continuous. It must be decided before formed to the above defined metaform, e.g.: writing a right consonant, whether the loop is to be needed: { n * ii d }.> I7 d >) (n)-[i](dd) written as a left or¯ as a rightl loop, compare: needing: { n * ii d }.> i ng >) (n)-[i](,d,ing) team (t)+[i](m) vs.