class Zenlish::WClasses::DemonstrativeDeterminer

In grammar, a demonstrative is a determiner or a pronoun that points to a particular noun or to the noun it replaces (the antecedent).

Public Class Methods

new() click to toggle source
Calls superclass method
# File lib/zenlish/wclasses/demonstrative_determiner.rb, line 11
def initialize
  super()
  init_feature_defs
  init_paradigms
end

Public Instance Methods

invariable?() click to toggle source

@return [FalseClass] Indicates that demonstrative determiners inflects.

# File lib/zenlish/wclasses/demonstrative_determiner.rb, line 18
def invariable?
  false
end

Private Instance Methods

init_feature_defs() click to toggle source
# File lib/zenlish/wclasses/demonstrative_determiner.rb, line 24
def init_feature_defs
  # Create standard feature definitions for irregular verbs.
  feature_def_dsl do
    feature_def 'NUMBER' => enumeration(:singular, :plural)
    feature_def 'DISTANCE' => enumeration(:near, :far)
    feature_def 'PARADIGM' => [identifier, 'Demonstrative_det_paradigm'] # 2nd item is default value
  end
end
init_paradigms() click to toggle source
# File lib/zenlish/wclasses/demonstrative_determiner.rb, line 33
def init_paradigms
  builder = Inflect::InflectionTableBuilder.new
  table = builder.build('Demonstrative_det_paradigm') do
    feature_heading 'NUMBER'
    feature_heading 'DISTANCE'
    #     NUMBER             DISTANCE
    rule([equals(:singular), equals(:near)],  func('base_form'))
    rule([equals(:singular), equals(:far)],   literal('that'))
    rule([equals(:plural),   equals(:near)],  literal('these'))
    rule([equals(:plural),   equals(:far)],   literal('those'))
  end
  add_paradigm(table)
end