class

Cadmium::WordNet::Lemma

Inherits Reference / Object

Constants

POS_SHORTHAND = {:v => :verb, :n => :noun, :a => :adj, :r => :adv}
SPACE = " "

Constructors

new(lexicon_line : String, id : Int32)

Create a lemma from a line in an lexicon file. You should not be creating Lemmas by hand; instead, use the WordNet::Lemma.find and WordNet::Lemma.find_all methods to find the Lemma for a word.

Source

Class methods

find(word, pos)

Find a lemma for a given word and pos. Valid parts of speech are: "adj", "adv", "noun", "verb". Additionally, you can use the shorthand forms of each of these ("a", "r", "n", "v")/

Source
find_all(word : String)

Find all lemmas for this word across all known parts of speech

Source

Instance methods

id

A unique integer id that references this lemma. Used internally within WordNet's database.

Source
pointer_symbols

An array of valid pointer symbols for this lemma. The list of all valid pointer symbols is defined in pointers.cr.

Source
pos

The part of speech (noun, verb, adjective) of this lemma. One of "n", "v", "a" (adjective), or "r" (adverb)

Source
synset_offsets

The offset, in bytes, at which the synsets contained in this lemma are stored in WordNet's internal database.

Source
synsets

Return a list of synsets for this Lemma. Each synset represents a different sense, or meaning, of the word.

Source
tagsense_count

The number of times the sense is tagged in various semantic concordance texts. A tagsense_count of 0 indicates that the sense has not been semantically tagged.

Source
to_s(io)

Returns a compact string representation of this lemma, e.g. "fall, v" for the verb form of the word "fall".

Source
word

The word this lemma represents

Source