module

Cadmium::WordNet

API to grant full access to the Stanford WordNet project allowing you to find words, definitions (gloss), hypernyms, hyponyms, antonyms, etc.

Constants

ADJECTIVE_POINTERS = {";r" => "Domain of synset - REGION", "!" => "Antonym", "\\" => "Pertainym (pertains to noun)", "<" => "Participle of verb", "&" => "Similar to", "=" => "Attribute", ";c" => "Domain of synset - TOPIC"}

Valid pointer symbols for adjectives

ADVERB_POINTERS = {";r" => "Domain of synset - REGION", "!" => "Antonym", ";u" => "Domain of synset - USAGE", "\\" => "Derived from adjective", ";c" => "Domain of synset - TOPIC"}

Valid pointer symbols for adverbs

NOUN_POINTERS = {"-c" => "Member of this domain - TOPIC", "+" => "Derivationally related form", "%p" => "Part meronym", "~i" => "Instance Hyponym", "@" => "Hypernym", ";r" => "Domain of synset - REGION", "!" => "Antonym", "#p" => "Part holonym", "%s" => "Substance meronym", ";u" => "Domain of synset - USAGE", "-r" => "Member of this domain - REGION", "#s" => "Substance holonym", "=" => "Attribute", "-u" => "Member of this domain - USAGE", ";c" => "Domain of synset - TOPIC", "%m" => "Member meronym", "~" => "Hyponym", "@i" => "Instance Hypernym", "#m" => "Member holonym"}

Valid pointer synbols for nouns

VERB_POINTERS = {"+" => "Derivationally related form", "@" => "Hypernym", ";r" => "Domain of synset - REGION", "!" => "Antonym", ";u" => "Domain of synset - USAGE", "$" => "Verb Group", ";c" => "Domain of synset - TOPIC", ">" => "Cause", "~" => "Hyponym", "*" => "Entailment"}

Valid pointer symbols for verbs

Class methods

get(offset : Int32, pos : Symbol | String)

Create a Synset by offset and pos

Source
lookup(word : String, pos : Symbol | String)

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
lookup(word : String)

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

Source
morphy(form : String, pos : String | Symbol)

Get the root of a form with a specific pos

Source
morphy(form : String)

Get the root of a form

Source

Nested types