Sha256: ab4d81097b712f9a3545229b831bb8bf4253bc1be9cd04593b27fca2cb896c15

Contents?: true

Size: 391 Bytes

Versions: 1

Compression:

Stored size: 391 Bytes

Contents

# frozen_string_literal: true

module WordnetJapan
  class Word < Database
    self.table_name = 'word'

    enum :pos, {
      noun:      'n', # NOTE 名詞
      verb:      'v', # NOTE 動詞
      adjective: 'a', # NOTE 形容詞
      adverb:    'r'  # NOTE 副詞
    }

    has_many :senses, foreign_key: :wordid, primary_key: :wordid
    has_many :synsets, through: :senses
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
wordnet_japan-0.1.0 lib/wordnet_japan/word.rb