class WordNet::DB

Represents the WordNet database, and provides some basic interaction.

Attributes

cached[RW]
path[RW]

To use your own WordNet installation (rather than the one bundled with rwordnet: Returns the path to the WordNet installation currently in use. Defaults to the bundled version of WordNet.

Public Class Methods

open(path, &block) click to toggle source

Open a wordnet database. You shouldn't have to call this directly; it's handled by the autocaching implemented in lemma.rb.

`path` should be a string containing the absolute path to the root of a WordNet installation.

# File lib/rwordnet/db.rb, line 20
def open(path, &block)
  File.open(File.join(self.path, path), "r", &block)
end