exwordnet v0.2.0 ExWordNet.Synset View Source

Provides abstraction over a synset (or group of synonymous words) in WordNet.

Synsets are related to each other by various (and numerous!) relationships, including Hypernym (x is a hypernym of y <=> x is a parent of y) and Hyponym (x is a child of y)

Struct members:

  • :part_of_speech: A shorthand representation of the part of speech this synset represents.
  • :word_counts: The list of words (and their frequencies within the WordNet graph) for this Synset.
  • :gloss: A string representation of this synset's gloss. "Gloss" is a human-readable description of this concept, often with example usage.

Link to this section Summary

Functions

Creates an ExWordNet.Synset struct by reading from the data file specified by part_of_speech, at offset bytes into the file

Gets a list of words included in this synset

Link to this section Types

Link to this type

t() View Source
t() :: %ExWordNet.Synset{
  gloss: String.t(),
  part_of_speech: ExWordNet.Constants.PartsOfSpeech.atom_part_of_speech(),
  word_counts: %{required(String.t()) => integer()}
}

Link to this section Functions

Creates an ExWordNet.Synset struct by reading from the data file specified by part_of_speech, at offset bytes into the file.

This is how the WordNet database is organized. You shouldn't be calling this function directly; instead, use ExWordNet.Lemma.synsets/1

Gets a list of words included in this synset.