Class: WordNet::Word

Inherits:
Object
  • Object
show all
Includes:
Constants
Defined in:
lib/wordnet/word.rb

Overview

WordNet word model class

Constant Summary

Constants included from Constants

Constants::DEFAULT_DB_OPTIONS, Constants::DELIM, Constants::DELIM_RE, Constants::DOMAIN_TYPES, Constants::DomainSymbols, Constants::HOLONYM_SYMBOLS, Constants::HOLONYM_TYPES, Constants::HYPERNYM_SYMBOLS, Constants::HYPERNYM_TYPES, Constants::HYPONYM_SYMBOLS, Constants::HYPONYM_TYPES, Constants::LEXFILES, Constants::MEMBER_SYMBOLS, Constants::MEMBER_TYPES, Constants::MERONYM_SYMBOLS, Constants::MERONYM_TYPES, Constants::POINTER_SUBTYPES, Constants::POINTER_SYMBOLS, Constants::POINTER_TYPES, Constants::SUB_DELIM, Constants::SUB_DELIM_RE, Constants::SYNTACTIC_CATEGORIES, Constants::SYNTACTIC_SYMBOLS, Constants::VERB_SENTS

Instance Method Summary collapse

Instance Method Details

#adjective_satellitesObject

Return a dataset for all of the Word’s Synsets that are adjective satellites.



130
131
132
# File 'lib/wordnet/word.rb', line 130

def adjective_satellites
	return synsets_dataset.adjective_satellites
end

#adjectivesObject

Return a dataset for all of the Word’s Synsets that are adjectives.



118
119
120
# File 'lib/wordnet/word.rb', line 118

def adjectives
	return synsets_dataset.adjectives
end

#adverbsObject

Return a dataset for all of the Word’s Synsets that are adverbs.



124
125
126
# File 'lib/wordnet/word.rb', line 124

def adverbs
	return synsets_dataset.adverbs
end

#by_lemmaObject

Return a dataset for words matching the given lemma.



92
# File 'lib/wordnet/word.rb', line 92

def_dataset_method( :by_lemma ) {|lemma| filter( lemma: lemma ) }

#morphsObject

The WordNet::Morphs related to the word



80
81
82
83
# File 'lib/wordnet/word.rb', line 80

many_to_many :morphs,
:join_table => :morphmaps,
:left_key => :wordid,
:right_key => :morphid

#nounsObject

Return a dataset for all of the Word’s Synsets that are nouns.



106
107
108
# File 'lib/wordnet/word.rb', line 106

def nouns
	return synsets_dataset.nouns
end

#sensesObject

The WordNet::Sense objects that relate the word with its Synsets



67
68
69
# File 'lib/wordnet/word.rb', line 67

one_to_many :senses,
:key => :wordid,
:primary_key => :wordid

#synsetsObject

The WordNet::Synsets related to the word via its senses



73
74
75
76
# File 'lib/wordnet/word.rb', line 73

many_to_many :synsets,
:join_table => :senses,
:left_key => :wordid,
:right_key => :synsetid

#to_sObject

Return the stringified word; alias for #lemma.



100
101
102
# File 'lib/wordnet/word.rb', line 100

def to_s
	return self.lemma
end

#verbsObject

Return a dataset for all of the Word’s Synsets that are verbs.



112
113
114
# File 'lib/wordnet/word.rb', line 112

def verbs
	return synsets_dataset.verbs
end