exwordnet v0.1.4 ExWordNet.Lemma View Source

Provides abstraction over a single word in the WordNet lexicon, which can be used to look up a set of synsets.

Struct members:

  • :word: The word this lemma represents.
  • :part_of_speech: The part of speech (noun, verb, adjective) of this lemma.
  • :synset_offsets: The offset, in bytes, at which the synsets contained in this lemma are stored in WordNet's internal database.
  • :id: A unique integer id that references this lemma. Used internally within WordNet's database.
  • :pointer_symbols: An array of valid pointer symbols for this lemma.
  • :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.

Link to this section Summary

Functions

Find a lemma for a given word and part of speech

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

Returns a list of synsets for this lemma

Link to this section Types

Link to this type

t() View Source
t() :: %ExWordNet.Lemma{
  id: integer(),
  part_of_speech: String.t(),
  pointer_symbols: [String.t()],
  synset_offsets: [integer()],
  tagsense_count: integer(),
  word: String.t()
}

Link to this section Functions

Link to this function

find(word, part_of_speech) View Source
find(String.t(), ExWordNet.Constants.part_of_speech()) ::
  {:ok, ExWordNet.Lemma.t()} | {:error, any()}

Find a lemma for a given word and part of speech.

Finds all lemmas for this word across all known parts of speech.

Returns a list of synsets for this lemma.

Each synset represents a different sense, or meaning, of the word.