Advertisement
jbozhich

English Exceptions MorphRules

Oct 17th, 2017
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.08 KB | None | 0 0
  1. read lexc bozhich_engxceptions.lexc
  2. define Lexicon;
  3.  
  4. define Exceptions [[{be} "+Aux" "+3P" .x. {is}] |
  5. [{be} "+Aux" "+PresPart" .x. {being}] |
  6. [{be} "+Aux" "+Past" "+3P"+ "+Sg" .x. {was}] |
  7. [{be} "+Aux" "+Past" "+3P" "+Pl" .x. {were}] |
  8. [{be} "+Aux" "+PastPart" .x. {been}]] ,,
  9.  
  10. [[{do} "+Aux" "+3P" "+Sg" .x. {does}] |
  11. [{do} "+Aux" "+3P" "+Pl" .x. {do}] |
  12. [{do} "+Aux" "+Past" .x. {did}] |
  13. [{do} "+Aux" "+PastPart" .x. {done}]] ,,
  14.  
  15. [[{have} "+Aux" "+3P" "+Sg" .x. {has}] |
  16. [{have} "+Aux" "+3P" "+Pl" .x. {have}] |
  17. [{have} "+Aux" "+Past" .x. {had}] |
  18. [{had} "+Aux" "+PastPart" .x. {had}]] ,,
  19.  
  20. [[{become} "+V" "+Past" .x. {became}] |
  21. [{become} "+V" "+PastPart" .x. {become}]] ,,
  22.  
  23. [[{bet} "+V" "+Past" .x. {bet}] |
  24. [{bet} "+V" "+PastPart" .x. {bet}]] ,,
  25.  
  26. [[{catch} "+V" "+Past" .x. {caught}] |
  27. [{catch} "+V" "+PastPart" .x. {caught}]] ,,
  28.  
  29. [[{choose} "+V" "+Past" .x. {chose}] |
  30. [{choose} "+V" "PastPart" .x. {chosen}]] ,,
  31.  
  32. [[{come} "+V" "+Past" .x. {came}] |
  33. [{come} "+V" "+PastPart" .x. {come}]] ,,
  34.  
  35. [[{eat} "+V" "+Past" .x. {ate}] |
  36. [{eat} "+V" "+PastPart" .x. {eaten}]];
  37.  
  38.  
  39. define ConsonantDoubling g -> g g || _ "^" [{ing}|{ed}] ,,
  40. m -> m m || _ "^" [{ing}] ,,
  41. n -> n n || _ "^" [{ing}] ,,
  42. p -> p p || _ "^" [{ing}|{ed}] ,,
  43. t -> t t || _ "^" [{ing}];
  44. #(swim/swimming), (spin/spinning), (chip/chipped/chipping), (bet/betting)
  45.  
  46. define EDeletion e -> 0 || _ "^" [{ing}|{ed}] ;
  47.  
  48. define EInsertion [..] -> e || [s|z|x|{ch}|{sh}] _ "^" s ;
  49.  
  50. define YReplacement y -> i e || _ "^" s ,,
  51. y -> i || _ "^" e d ;
  52.  
  53. define KInsertion [..] -> k || c _ "^" [{ed}|{ing}];
  54.  
  55.  
  56. define Cleanup "^" -> 0;
  57.  
  58.  
  59. define Grammar Lexicon .o.
  60. ConsonantDoubling .o.
  61. EDeletion .o.
  62. EInsertion .o.
  63. YReplacement .o.
  64. KInsertion .o.
  65. Cleanup;
  66.  
  67. regex Grammar;
  68. regex Exceptions .P. Grammar;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement