lib/zenlish/wclasses/regular_verb.rb in zenlish-0.2.01 vs lib/zenlish/wclasses/regular_verb.rb in zenlish-0.2.02
- old
+ new
@@ -1,10 +1,9 @@
require_relative 'lexical_verb'
module Zenlish
module WClasses
- # TODO: document 'touch'
class RegularVerb < LexicalVerb
def initialize
super
@paradigms = {}
init_paradigms
@@ -22,11 +21,12 @@
# PERSON NUMBER TIME base_form
rule([not_equal(:third), dont_care, equals(:present), dont_care], col('base_form'))
rule([equals(:third), equals(:singular), equals(:present), matches(/[^aeiouy]y$/)], sub(col('base_form'), /y$/, 'ies'))
rule([equals(:third), equals(:singular), equals(:present), matches(/(?:[osxz]|ch|sh)$/)], concat(col('base_form'), 'es'))
rule([equals(:third), equals(:singular), equals(:present), dont_care], concat(col('base_form'), 's'))
- rule([dont_care, dont_care, equals(:progressive), matches(/e$/)], sub(col('base_form'), /e$/, 'ing'))
- rule([dont_care, dont_care, equals(:progressive), dont_care], concat(col('base_form'), 'ing'))
+ rule([dont_care, dont_care, equals(:progressive), matches(/ie$/)], sub(col('base_form'), /ie$/, 'ying'))
+ rule([dont_care, dont_care, equals(:progressive), matches(/[^e]e$/)], sub(col('base_form'), /e$/, 'ing'))
+ rule([dont_care, dont_care, equals(:progressive), dont_care], concat(col('base_form'), 'ing'))
rule([dont_care, dont_care, in?(:past_simple, :past_participle), matches(/e$/)], concat(col('base_form'), 'd'))
rule([dont_care, dont_care, in?(:past_simple, :past_participle), matches(/[^aeiouy]y$/)], sub(col('base_form'), /y$/, 'ied'))
rule([dont_care, dont_care, in?(:past_simple, :past_participle), dont_care], concat(col('base_form'), 'ed'))
end
add_paradigm(table)
\ No newline at end of file