module Cadmium::WordNet
Overview
API to grant full access to the Stanford WordNet project allowing you to find words, definitions (gloss), hypernyms, hyponyms, antonyms, etc.
Defined in:
cadmium/wordnet.crcadmium/wordnet/db.cr
cadmium/wordnet/lemma.cr
cadmium/wordnet/pointer.cr
cadmium/wordnet/pointers.cr
cadmium/wordnet/synset.cr
Constant Summary
-
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 Method Summary
-
.get(offset : Int32, pos : Symbol | String)
Create a
Synset
by offset and pos -
.lookup(word : String, pos : Symbol | String)
Find a lemma for a given word and pos.
-
.lookup(word : String)
Find all lemmas for this word across all known parts of speech
-
.morphy(form : String, pos : String | Symbol)
Get the root of a form with a specific pos
-
.morphy(form : String)
Get the root of a form
Class Method Detail
def self.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)