Sha256: cd610a5d906bb0c378de73f822d9fb21bb8193cf75d2c4713dbc429cef73566a

Contents?: true

Size: 1.31 KB

Versions: 2

Compression:

Stored size: 1.31 KB

Contents

require 'rley'
require_relative '../feature/feature_struct_def_bearer'

module Zenlish
  module WClasses
    # Also known as: part of speech, syntactic category or word category.
    # A word class represents a group of word which have similar functions.
    # Word classes are divided into:
    # - Lexical words (?? same as content words??) such as nouns, verbs, adjectives,
    #   adverbs. Content words carry the meaning of a sentence for the chosen discourse
    #   universe.
    #
    # - Function words (?? same as structure words??) such as pronouns, determiners,
    #   modal verbs, auxiliary verbs. Structure words helpt to structure a sentence.
    #   They working is independent of the chosen discourse universe.
    #   conjunctions and prepositions
    class WordClass < Rley::Syntax::Terminal
      include Feature::FeatureStructDefBearer
      # @return [Hash] pair of the kind: String => InflectionTable
      attr_reader :paradigms

      def initialize
        super(self.class.name.split('::').last)
        init_struct_def(nil, {})
        @paradigms = {}
      end

      # Indicates whether all words from the word class have a single (uninflected)
      # form.
      def invariable?
        raise NotImplementedError, "Missing implementation for #{self.class}."
      end
    end # class
  end # module
end # module

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
zenlish-0.2.01 lib/zenlish/wclasses/word_class.rb
zenlish-0.2.00 lib/zenlish/wclasses/word_class.rb