Class: Zenlish::WClasses::WordClass

Inherits:
Rley::Syntax::Terminal
  • Object
show all
Includes:
Feature::FeatureStructDefBearer
Defined in:
lib/zenlish/wclasses/word_class.rb

Overview

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Feature::FeatureStructDefBearer

#[], #boolean, #enumeration, #feature_def, #feature_def_dsl, #identifier, #init_struct_def, #struct

Constructor Details

#initializeWordClass

Returns a new instance of WordClass.



22
23
24
25
26
# File 'lib/zenlish/wclasses/word_class.rb', line 22

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

Instance Attribute Details

#paradigmsHash (readonly)

Returns pair of the kind: String => InflectionTable.

Returns:

  • (Hash)

    pair of the kind: String => InflectionTable



20
21
22
# File 'lib/zenlish/wclasses/word_class.rb', line 20

def paradigms
  @paradigms
end

Instance Method Details

#extensionModule, NilClass

Returns:

  • (Module, NilClass)


36
37
38
# File 'lib/zenlish/wclasses/word_class.rb', line 36

def extension
  nil
end

#invariable?FalseClass, TrueClass

Indicates whether all words from the word class have a single (uninflected) form.

Returns:

  • (FalseClass, TrueClass)

    true iff the words in the class are invariable.



31
32
33
# File 'lib/zenlish/wclasses/word_class.rb', line 31

def invariable?
  return true
end