Module: WordNet::Constants

Included in:
WordNet, LexicalLink, Lexicon, Morph, SemanticLink, Sense, SumoTerm, Synset, Word
Defined in:
lib/wordnet/constants.rb

Overview

This is a module containing constants used in the WordNet interface for Ruby. They are contained in a module to facilitate their easy inclusion in other namespaces. All constants in this module are also contained in the WordNet namespace itself.

Constant Summary collapse

DEFAULT_DB_OPTIONS =

The default database options

{}
SYNTACTIC_CATEGORIES =

Synset syntactic-category names -> indicators

{
  noun: "n",
  verb: "v",
  adjective: "a",
  adverb: "r",
  other: "s",
}
SYNTACTIC_SYMBOLS =

Syntactic-category indicators -> names

SYNTACTIC_CATEGORIES.invert
POINTER_TYPES =

Synset pointer typenames -> indicators

{
  antonym: '!',
  hypernym: '@',
  entailment: '*',
  hyponym: '~',
  meronym: '%',
  holonym: '#',
  cause: '>',
  verb_group: '$',
  similar_to: '&',
  participle: '<',
  pertainym: '\\',
  attribute: '=',
  derived_from: '\\',
  see_also: '^',
  derivation: '+',
  domain: ';',
  member: '-',
}
POINTER_SYMBOLS =

Synset pointer indicator -> typename

POINTER_TYPES.invert
HYPERNYM_TYPES =

Hypernym synset pointer types

{
  nil             => '@', # Install non-subtype methods, too
  instance: '@i',
}
HYPERNYM_SYMBOLS =

Hypernym indicator -> type map

HYPERNYM_TYPES.invert
HYPONYM_TYPES =

Hyponym synset pointer types

{
  nil             => '~', # Install non-subtype methods, too
  instance: '~i',
}
HYPONYM_SYMBOLS =

Hyponym indicator -> type map

HYPONYM_TYPES.invert
MERONYM_TYPES =

Meronym synset pointer types

{
  member: '%m',
  stuff: '%s',
  portion: '%o',
  component: '%p',
  feature: '%f',
  phase: '%a',
  place: '%l',
}
MERONYM_SYMBOLS =

Meronym indicator -> type map

MERONYM_TYPES.invert
HOLONYM_TYPES =

Holonym synset pointer types

{
  member: '#m',
  stuff: '#s',
  portion: '#o',
  component: '#p',
  feature: '#f',
  phase: '#a',
  place: '#l',
}
HOLONYM_SYMBOLS =

Holonym indicator -> type map

HOLONYM_TYPES.invert
DOMAIN_TYPES =

Domain synset pointer types

{
  category: ';c',
  region: ';r',
  usage: ';u',
}
DomainSymbols =

Domain indicator -> type map

DOMAIN_TYPES.invert
MEMBER_TYPES =

Member synset pointer types

{
  category: '-c',
  region: '-r',
  usage: '-u',
}
MEMBER_SYMBOLS =

Member indicator -> type map

MEMBER_TYPES.invert
POINTER_SUBTYPES =

Map of primary types to maps of their subtypes

{
  hyponym: HYPONYM_TYPES,
  hypernym: HYPERNYM_TYPES,
  meronym: MERONYM_TYPES,
  holonym: HOLONYM_TYPES,
  member: MEMBER_TYPES,
  domain: DOMAIN_TYPES,
}
DELIM =

Record-part delimiter

'||'
DELIM_RE =
Regexp.new( Regexp::quote(DELIM) )
SUB_DELIM =

Record-subpart delimiter

'|'
SUB_DELIM_RE =
Regexp.new( Regexp::quote(SUB_DELIM) )
LEXFILES =

Lexicographer file index – from lexnames(5WN)

[
  "adj.all",
  "adj.pert",
  "adv.all",
  "noun.Tops",
  "noun.act",
  "noun.animal",
  "noun.artifact",
  "noun.attribute",
  "noun.body",
  "noun.cognition",
  "noun.communication",
  "noun.event",
  "noun.feeling",
  "noun.food",
  "noun.group",
  "noun.location",
  "noun.motive",
  "noun.object",
  "noun.person",
  "noun.phenomenon",
  "noun.plant",
  "noun.possession",
  "noun.process",
  "noun.quantity",
  "noun.relation",
  "noun.shape",
  "noun.state",
  "noun.substance",
  "noun.time",
  "verb.body",
  "verb.change",
  "verb.cognition",
  "verb.communication",
  "verb.competition",
  "verb.consumption",
  "verb.contact",
  "verb.creation",
  "verb.emotion",
  "verb.motion",
  "verb.perception",
  "verb.possession",
  "verb.social",
  "verb.stative",
  "verb.weather",
  "adj.ppl"
]
VERB_SENTS =

Verb sentences (?) – used in building verb frames.

[
  "",
  "Something ----s",
  "Somebody ----s",
  "It is ----ing",
  "Something is ----ing PP",
  "Something ----s something Adjective/Noun",
  "Something ----s Adjective/Noun",
  "Somebody ----s Adjective",
  "Somebody ----s something",
  "Somebody ----s somebody",
  "Something ----s somebody",
  "Something ----s something",
  "Something ----s to somebody",
  "Somebody ----s on something",
  "Somebody ----s somebody something",
  "Somebody ----s something to somebody",
  "Somebody ----s something from somebody",
  "Somebody ----s somebody with something",
  "Somebody ----s somebody of something",
  "Somebody ----s something on somebody",
  "Somebody ----s somebody PP",
  "Somebody ----s something PP",
  "Somebody ----s PP",
  "Somebody's (body part) ----s",
  "Somebody ----s somebody to INFINITIVE",
  "Somebody ----s somebody INFINITIVE",
  "Somebody ----s that CLAUSE",
  "Somebody ----s to somebody",
  "Somebody ----s to INFINITIVE",
  "Somebody ----s whether INFINITIVE",
  "Somebody ----s somebody into V-ing something",
  "Somebody ----s something with something",
  "Somebody ----s INFINITIVE",
  "Somebody ----s VERB-ing",
  "It ----s that CLAUSE",
  "Something ----s INFINITIVE"
]