Sha256: 199156a32dfc1c81750eeb6de9cfb5488552c43bb795c493d7372691d1748749

Contents?: true

Size: 773 Bytes

Versions: 12

Compression:

Stored size: 773 Bytes

Contents

module Zenlish
  module Lex
    # A word in the abstract sense; an individual, distinct item of a lexicon
    # that belongs to a word class and of which a number of actual word forms
    # may exist. For instance, the word forms: 'hide', 'hides', 'hid', 'hidden'
    # relate to the lexeme for verb 'hide'. Also called 'dictionary word'.
    class Lexeme
      # @return Zenlish::WClasses::WordClass
      attr_reader :wclass

      def initialize(aWordClass, anEntry)
        @wclass = aWordClass
        @entry = anEntry.object_id
        anEntry.add_lexeme(self)
      end

      # @return Zenlish::Lex::LexicalEntry
      def entry
        ObjectSpace._id2ref(@entry)
      end

      def lemma
        entry.lemma
      end
    end # class
  end # module
end # module

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
zenlish-0.1.25 lib/zenlish/lex/lexeme.rb
zenlish-0.1.24 lib/zenlish/lex/lexeme.rb
zenlish-0.1.23 lib/zenlish/lex/lexeme.rb
zenlish-0.1.22 lib/zenlish/lex/lexeme.rb
zenlish-0.1.21 lib/zenlish/lex/lexeme.rb
zenlish-0.1.20 lib/zenlish/lex/lexeme.rb
zenlish-0.1.19 lib/zenlish/lex/lexeme.rb
zenlish-0.1.18 lib/zenlish/lex/lexeme.rb
zenlish-0.1.17 lib/zenlish/lex/lexeme.rb
zenlish-0.1.16 lib/zenlish/lex/lexeme.rb
zenlish-0.1.15 lib/zenlish/lex/lexeme.rb
zenlish-0.1.14 lib/zenlish/lex/lexeme.rb