home *** CD-ROM | disk | FTP | other *** search
/ Garbo / Garbo.cdr / mac / science / macpckim.sit / English / ENGLISH.RUL < prev    next >
Text File  |  1990-05-01  |  10KB  |  302 lines

  1. ; ENGLISH.RUL  16-Apr-90
  2.  
  3. ; Rules file for the English description.
  4. ; To load this file, enter the command LOAD RULES ENGLISH.
  5.  
  6. ; This description of English is based on the article "A two-level
  7. ; morphological analysis of English," by Lauri Karttunen and
  8. ; K. Wittenburg, Texas Linguistic Forum 22:217-228 (1983).
  9. ; See appendix A for an exposition of the rules in this file.
  10.  
  11. ; ' = apostrophe
  12. ; - = hyphen
  13. ; ` = stress
  14. ; + = morpheme break
  15.  
  16. ALPHABET
  17.   a b c d e f g h i j k l m n o p q r s t u v w x y z ' - ` +
  18. NULL 0
  19. ANY  @
  20. BOUNDARY #
  21. SUBSET C    b c d f g h j k l m n p q r s t v w x y z    ; consonants
  22. SUBSET Csib s x z       ; sibilants
  23. SUBSET Cpal c g         ; soft palatals
  24. SUBSET V    a e i o u   ; vowels
  25. SUBSET Vbk  a o u       ; back vowels
  26.  
  27. RULE "1 Consonant defaults"  1 22
  28.     b c d f g h j k l m n p q r s t v w x y z @
  29.     b c d f g h j k l m n p q r s t v w x y z @
  30. 1:  1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
  31.  
  32. ; ` and + default to 0
  33. ; - defaults to either - or 0
  34. RULE "2 Vowels and other defaults"  1 11
  35.     a e i o u ' - - ` + @
  36.     a e i o u ' - 0 0 0 @
  37. 1:  1 1 1 1 1 1 1 1 1 1 1
  38.  
  39.  
  40. ; Epenthesis
  41. ; LR: fox+0s  kiss+0s  church+0s  spy+0s
  42. ; SR: fox0es  kiss0es  church0es  spi0e
  43.  
  44. RULE "3 Epenthesis, 0:e => [Csib|ch|sh|y:i] +:0___s [+:0|#]" 7 9
  45.    c h s Csib y + # 0 @
  46.    c h s Csib i 0 # e @
  47. 1: 2 1 4 3    3 1 1 0 1
  48. 2: 2 3 3 3    3 1 1 0 1
  49. 3: 2 1 3 3    3 5 1 0 1
  50. 4: 2 3 3 3    3 5 1 0 1
  51. 5: 2 1 2 2    2 1 1 6 1
  52. 6. 0 0 7 0    0 0 0 0 0
  53. 7. 0 0 0 0    0 1 1 0 0
  54.  
  55. RULE "4 Epenthesis,  0:0 /<= [Csib|ch|sh|y:i] +:0___s [+:0|#]"  6 8
  56.    c h s Csib y + # @
  57.    c h s Csib i 0 # @
  58. 1: 2 1 4 3    3 1 1 1
  59. 2: 2 3 3 3    3 1 1 1
  60. 3: 2 1 3 3    3 5 1 1
  61. 4: 2 3 3 3    3 5 1 1
  62. 5: 2 1 6 3    3 1 1 1
  63. 6: 2 3 4 3    3 0 0 1
  64.  
  65.  
  66. ; y:i-spelling
  67. ; LR: spy+s  happy+ly  spot0+y+ness
  68. ; SR: spies  happi0ly  spott0i0ness
  69.  
  70. RULE "5 y:i-spelling, y:i <= :C__+:0 ~[i|']"  4 7
  71.     @  y  y  +  i  '  @
  72.     C  i  @  0  i  '  @
  73. 1:  2  1  1  1  1  1  1
  74. 2:  2  1  3  2  1  1  1
  75. 3:  2  1  1  4  1  1  1
  76. 4:  0  0  0  0  1  1  0
  77.  
  78. RULE "6 y:i-spelling, y:i => :C__+:0 ~[i|']"  4 6
  79.     @  y  +  i  '  @
  80.     C  i  0  i  '  @
  81. 1:  2  0  1  1  1  1
  82. 2:  2  3  2  1  1  1
  83. 3.  0  0  4  0  0  0
  84. 4.  2  1  1  0  0  1
  85.  
  86.  
  87. ; s-deletion
  88. ; LR: cat+s+'s  fox+s+'s
  89. ; SR: cat0s0'0  foxes0'0
  90.  
  91. RULE "7 s-deletion, s:0 <=> +:0 (0:e) s +:0 '___"  5 6
  92.     +  0  s  '  s  @
  93.     0  e  @  '  0  @
  94. 1:  2  1  1  1  0  1
  95. 2:  2  2  3  1  0  1
  96. 3:  4  1  1  1  0  1
  97. 4:  2  1  3  5  0  1
  98. 5:  2  1  0  1  1  1
  99.  
  100.  
  101. ; Elision
  102. ; LR: `move+ed `move+ing `move+able `be+ing
  103. ; SR: 0mov0+ed 0mov00ing 0mov00able 0be0ing
  104.  
  105. ; LR: `trace+ed `trace+ing `trace+able
  106. ; SR: 0trac00ed 0trac00ing 0trace0able
  107.  
  108. ; except in Cpal___+:0 Vbk
  109. RULE "8 Elision, e:0 <= VCC*___+:0 V" 8 8
  110.    C Cpal e e + V Vbk @
  111.    C Cpal 0 @ 0 V Vbk @
  112. 1: 1 1    1 2 1 2 2   1
  113. 2: 3 6    1 2 1 2 2   1
  114. 3: 3 6    1 4 1 2 2   1
  115. 4: 1 1    1 2 5 2 2   1
  116. 5: 1 1    1 0 1 0 0   1
  117. 6: 1 1    1 7 1 2 2   1
  118. 7: 1 1    1 2 8 2 2   1
  119. 8: 1 1    1 0 1 0 1   1
  120.  
  121. ; elision prohibited after Cpal and before back vowel
  122. RULE "9 e:0 /<= VC*Cpal___+:0 Vbk" 5 7
  123.     V C Cpal e + Vbk @
  124.     V C Cpal 0 0 Vbk @
  125. 1:  2 1 1    1 1 2   1
  126. 2:  2 2 3    1 1 2   1
  127. 3:  2 1 1    4 1 2   1
  128. 4:  2 1 1    1 5 2   1
  129. 5:  2 1 1    1 1 0   1
  130.  
  131. ; LR: a`gree+ed a`gree+ing a`gree+able `hoe+ed `hoe+ing `dye+ed `dye+ing
  132. ; SR: a0gre00ed a0gree0ing a0gree0able 0ho00ed 0hoe0ing 0dy00ed 0dye0ing
  133. ;
  134. ; BUT compare these:
  135. ; LR: `argue+ing `argue+able
  136. ; SR: 0argu00ing 0argu00able
  137.  
  138. RULE "10 e:0 <= C[V|y]___+:0 e" 5 8
  139.    C V y e e + ` @
  140.    C V y 0 @ 0 0 @
  141. 1: 2 1 1 1 1 1 1 1
  142. 2: 2 3 3 1 3 1 2 1
  143. 3: 2 1 1 1 4 1 3 1
  144. 4: 2 1 1 1 1 5 4 1
  145. 5: 2 1 1 1 0 1 5 1
  146.  
  147. RULE "11 e:0 <= Cu___+:0 V" 5 7
  148.    C u e e + V @
  149.    C u 0 @ 0 V @
  150. 1: 2 1 1 1 1 1 1
  151. 2: 2 3 1 1 1 1 1
  152. 3: 2 1 1 4 1 1 1
  153. 4: 2 1 1 1 5 1 1
  154. 5: 2 0 1 0 1 0 1
  155.  
  156. ; clean-up rule for three <= Elision rules above plus i:y-spelling below
  157. RULE
  158. "12 Elision, e:0 => VCC*___+:0 V, C[V|y]___+:0 e, Cu___+:0 V, i:y___+:0 i" 12 10
  159.      C  e  +  i  y  V  e  u  `  @
  160.      C  0  0  y  y  V  e  u  0  @
  161.  1:  6  0  1  10 6  2  2  2  1  1
  162.  2:  3  0  1  10 3  2  2  2  2  1
  163.  3:  3  4  1  10 3  7  7  10 3  1
  164.  4.  0  0  5  0  0  0  0  0  4  0
  165.  5.  0  0  0  0  0  1  1  1  5  0
  166.  6:  6  0  1  10 7  7  7  10 6  1
  167.  7:  3  8  1  10 1  2  2  2  7  1
  168.  8.  0  0  9  0  0  0  0  0  8  0
  169.  9.  0  0  0  0  0  0  1  0  9  0
  170. 10:  6  11 1  10 6  1  1  1  10 1
  171. 11.  0  0  12 0  0  0  0  0  11 0
  172. 12.  0  0  0  0  0  1  1  1  12 0
  173.  
  174.  
  175. ; i:y-spelling
  176. ; LR: tie+ed  tie+ing
  177. ; SR: ti00ed  ty00ing
  178.  
  179. ; e:@ instead of e:0 to force Elision to apply
  180. RULE "13 i:y-spelling, i:y <= ___ e: +:0 i"  4 5
  181.     i  e  +  i  @
  182.     y  @  0  i  @
  183. 1:  1  1  1  2  1
  184. 2:  1  3  1  2  1
  185. 3:  1  1  4  2  1
  186. 4:  1  1  1  0  1
  187.  
  188. RULE "14 i:y-spelling, i:y => ___ e:0 +:0 i"  4 5
  189.     i  e  +  i    @
  190.     y  0  0  i  @
  191. 1:  2  1  1  1    1
  192. 2.  0  3  0  0    0
  193. 3.  0  0  4  0    0
  194. 4.  0  0  0  1    0
  195.  
  196.  
  197. ; Gemination
  198. ; LR: re`fer0+ed `travel+ed `sleep+ing `slip0+ing `spot0+y
  199. ; SR: re0ferr0ed 0travel0ed 0sleep0ing 0slipp0ing 0spott0y
  200.  
  201. ; {C} = {b,d,f,g,l,m,n,p,r,s,t}
  202. RULE "15 Gemination, 0:{C} => `:0 C* V {C}___[V|y:]"  16 27
  203.     `  V  y  b  d  f  g  l  m  n  p  r  s  t  0  0  0  0  0  0  0  0  0 0 0 + @
  204.     0  V  @  b  d  f  g  l  m  n  p  r  s  t  b  d  f  g  l  m  n  p  r s t 0 @
  205.  1: 2  1  1  1  1  1  1  1  1  1  1  1  1  1  0  0  0  0  0  0  0  0  0 0 0 1 1
  206.  2: 2  5  1  2  2  2  2  2  2  2  2  2  2  2  0  0  0  0  0  0  0  0  0 0 0 1 2
  207.  3. 0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0 0 0 4 0
  208.  4. 0  1  1  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0 0 0 0 0
  209.  5: 2  1  1  6  7  8  9  10 11 12 13 14 15 16 0  0  0  0  0  0  0  0  0 0 0 1 1
  210.  6: 2  5  1  1  1  1  1  1  1  1  1  1  1  1  3  0  0  0  0  0  0  0  0 0 0 1 1
  211.  7: 2  5  1  1  1  1  1  1  1  1  1  1  1  1  0  3  0  0  0  0  0  0  0 0 0 1 1
  212.  8: 2  5  1  1  1  1  1  1  1  1  1  1  1  1  0  0  3  0  0  0  0  0  0 0 0 1 1
  213.  9: 2  5  1  1  1  1  1  1  1  1  1  1  1  1  0  0  0  3  0  0  0  0  0 0 0 1 1
  214. 10: 2  5  1  1  1  1  1  1  1  1  1  1  1  1  0  0  0  0  3  0  0  0  0 0 0 1 1
  215. 11: 2  5  1  1  1  1  1  1  1  1  1  1  1  1  0  0  0  0  0  3  0  0  0 0 0 1 1
  216. 12: 2  5  1  1  1  1  1  1  1  1  1  1  1  1  0  0  0  0  0  0  3  0  0 0 0 1 1
  217. 13: 2  5  1  1  1  1  1  1  1  1  1  1  1  1  0  0  0  0  0  0  0  3  0 0 0 1 1
  218. 14: 2  5  1  1  1  1  1  1  1  1  1  1  1  1  0  0  0  0  0  0  0  0  3 0 0 1 1
  219. 15: 2  5  1  1  1  1  1  1  1  1  1  1  1  1  0  0  0  0  0  0  0  0  0 3 0 1 1
  220. 16: 2  5  1  1  1  1  1  1  1  1  1  1  1  1  0  0  0  0  0  0  0  0  0 0 3 1 1
  221.  
  222. ; {C} = {b,d,f,g,l,m,n,p,r,s,t}
  223. RULE "16 Gemination, 0:0 /<= `:0 C* V {C}___+:0 [V|y:]"  5 16
  224.     `  V  y  b  d  f  g  l  m  n  p  r  s  t  +  @
  225.     0  V  @  b  d  f  g  l  m  n  p  r  s  t  0  @
  226. 1:  2  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1
  227. 2:  2  4  2  2  2  2  2  2  2  2  2  2  2  2  1  2
  228. 3:  2  0  0  1  1  1  1  1  1  1  1  1  1  1  1  1
  229. 4:  2  1  1  5  5  5  5  5  5  5  5  5  5  5  1  1
  230. 5:  2  1  1  1  1  1  1  1  1  1  1  1  1  1  3  1
  231.  
  232.  
  233. END
  234.  
  235. ; The following rules do epenthesis and gemination by setting up
  236. ; correspondences between lexical + (morpheme boundary) and surface
  237. ; e, b, d, g, etc. They run faster than the rules above, which do
  238. ; genuine insertion of characters from a lexical 0 (NULL).
  239. ; To run these rules, substitute them for the corresponding rules
  240. ; above; also, +:0 column headers in other rules should be
  241. ; changed to +:@.
  242. ; Also note that these rules also do not use the #:# header.
  243.  
  244. RULE "3 Epenthesis, +:e => [Csib|ch|sh|y:i]___s[#|+:] "  6 8
  245.     c  h  s  Csib  y  +  +  @
  246.     c  h  s  Csib  i  e  @  @
  247. 1:  2  1  4  3     3  0  1  1
  248. 2:  2  3  3  3     3  0  1  1
  249. 3:  2  1  3  3     3  5  1  1
  250. 4:  2  3  3  3     3  5  1  1
  251. 5.  0  0  6  0     0  0  0  0
  252. 6:  0  0  0  0     0  0  1  0
  253.  
  254. RULE "4 Epenthesis, +:e <= [Csib|ch|sh|y:i]___s[#|+:]"  6 8
  255.     c  h  s  Csib  y  +  +  @
  256.     c  h  s  Csib  i  e  @  @
  257. 1:  2  1  4  3     3  1  1  1
  258. 2:  2  3  3  3     3  1  1  1
  259. 3:  2  1  3  3     3  1  5  1
  260. 4:  2  3  3  3     3  1  5  1
  261. 5:  2  1  6  3     3  1  1  1
  262. 6.  2  3  4  3     3  1  0  1
  263.  
  264. RULE "7 s-deletion, s:0 <=> +: s+: '___"  5 5
  265.     +  s  '  s  @
  266.     @  @  '  0  @
  267. 1:  2  1  1  0  1
  268. 2:  2  3  1  0  1
  269. 3:  4  1  1  0  1
  270. 4:  2  3  5  0  1
  271. 5:  2  0  1  1  1
  272.  
  273. ; {C} = {b,d,f,g,l,m,n,p,r,s,t}
  274. RULE "15 Gemination, +:{C} => `:0 C* V {C}___[V|y:]"  15 26
  275.     `  V  y  b  d  f  g  l  m  n  p  r  s  t  +  +  +  +  +  +  +  +  +  +  +  @
  276.     0  V  @  b  d  f  g  l  m  n  p  r  s  t  b  d  f  g  l  m  n  p  r  s  t  @
  277.  1: 2  1  1  1  1  1  1  1  1  1  1  1  1  1  0  0  0  0  0  0  0  0  0  0  0  1
  278.  2: 2  4  1  2  2  2  2  2  2  2  2  2  2  2  0  0  0  0  0  0  0  0  0  0  0  2
  279.  3. 0  1  1  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0
  280.  4: 2  1  1  5  6  7  8  9  10 11 12 13 14 15 0  0  0  0  0  0  0  0  0  0  0  1
  281.  5: 2  1  1  1  1  1  1  1  1  1  1  1  1  1  3  0  0  0  0  0  0  0  0  0  0  1
  282.  6: 2  1  1  1  1  1  1  1  1  1  1  1  1  1  0  3  0  0  0  0  0  0  0  0  0  1
  283.  7: 2  1  1  1  1  1  1  1  1  1  1  1  1  1  0  0  3  0  0  0  0  0  0  0  0  1
  284.  8: 2  1  1  1  1  1  1  1  1  1  1  1  1  1  0  0  0  3  0  0  0  0  0  0  0  1
  285.  9: 2  1  1  1  1  1  1  1  1  1  1  1  1  1  0  0  0  0  3  0  0  0  0  0  0  1
  286. 10: 2  1  1  1  1  1  1  1  1  1  1  1  1  1  0  0  0  0  0  3  0  0  0  0  0  1
  287. 11: 2  1  1  1  1  1  1  1  1  1  1  1  1  1  0  0  0  0  0  0  3  0  0  0  0  1
  288. 12: 2  1  1  1  1  1  1  1  1  1  1  1  1  1  0  0  0  0  0  0  0  3  0  0  0  1
  289. 13: 2  1  1  1  1  1  1  1  1  1  1  1  1  1  0  0  0  0  0  0  0  0  3  0  0  1
  290. 14: 2  1  1  1  1  1  1  1  1  1  1  1  1  1  0  0  0  0  0  0  0  0  0  3  0  1
  291. 15: 2  1  1  1  1  1  1  1  1  1  1  1  1  1  0  0  0  0  0  0  0  0  0  0  3  1
  292.  
  293. ; {C} = {b,d,f,g,l,m,n,p,r,s,t}
  294. RULE "16 Gemination, +:{C} <= `:0 C* V {C}___[V|y:]"  5 16
  295.     `  V  y  b  d  f  g  l  m  n  p  r  s  t  +  @
  296.     0  V  @  b  d  f  g  l  m  n  p  r  s  t  0  @
  297. 1:  2  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1
  298. 2:  2  4  2  2  2  2  2  2  2  2  2  2  2  2  1  2
  299. 3:  2  0  0  1  1  1  1  1  1  1  1  1  1  1  1  1
  300. 4:  2  1  1  5  5  5  5  5  5  5  5  5  5  5  1  1
  301. 5:  2  1  1  1  1  1  1  1  1  1  1  1  1  1  3  1
  302.