Sha256: 9b68f1975d2f9660c40a5d2fa58d0d6c89a5bbcb913fb68e9c1d0571857ac078

Contents?: true

Size: 905 Bytes

Versions: 6

Compression:

Stored size: 905 Bytes

Contents

require_relative 'word_class'

module Zenlish
  module WClasses
    # A noun denotes classes and categories of things in the unverse of discourse.
    # Nouns denote people, animals, inanimate things, places, events, qualities
    # and states.
    class Noun < WordClass
      def initialize
        super()
        init_feature_defs
      end

      # Nouns inflect according to number, possessive. Therefore they are
      # variable.
      def invariable?
        false
      end

      private

      def init_feature_defs
        # Create standard feature definitions for nouns.
        feature_def_dsl {
          feature_def 'NUMBER' => enumeration(:singular, :plural)
          feature_def 'COUNTABILITY' => enumeration(:count, :non_count)
          feature_def 'PARADIGM' => [identifier, 'Common_form'] # 2nd item is default value
        }
      end
    end # class
  end # module
end # module

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
zenlish-0.2.05 lib/zenlish/wclasses/noun.rb
zenlish-0.2.04 lib/zenlish/wclasses/noun.rb
zenlish-0.2.03 lib/zenlish/wclasses/noun.rb
zenlish-0.2.02 lib/zenlish/wclasses/noun.rb
zenlish-0.2.01 lib/zenlish/wclasses/noun.rb
zenlish-0.2.00 lib/zenlish/wclasses/noun.rb