lib/zenlish/wclasses/verb.rb in zenlish-0.2.00 vs lib/zenlish/wclasses/verb.rb in zenlish-0.2.01
- old
+ new
@@ -1,17 +1,34 @@
require_relative 'word_class'
+require_relative '../inflect/inflection_table_builder'
module Zenlish
module WClasses
# Abstract class. In traditional grammar, the verb is often defined
# notionally as a 'doing' word (i.e. a word that describes the action
# in a clause).
class Verb < WordClass
+ def initialize
+ super()
+ init_feature_defs
+ end
# As all verbs inflect, or change form, to reflect changes in tense,
# person, number, and voice, they are, by definition, variable.
def invariable?
false
end
+
+ private
+
+ def init_feature_defs
+ # Create standard feature definitions for lexical verbs.
+ feature_def_dsl {
+ feature_def 'NUMBER' => enumeration(:singular, :plural)
+ feature_def 'PERSON' => enumeration(:first, :second, :third)
+ feature_def 'TIME' => enumeration(:present, :progressive, :past_simple, :past_participle)
+ feature_def 'PARADIGM' => [identifier, 'Regular_inflection'] # 2nd item is default value
+ }
+ end
end # class
end # module
end # module
\ No newline at end of file