Sha256: 3a339784f4c0aad12cfade95d688363da979dd0d967fbd3b36ec07ebe236a2cc
Contents?: true
Size: 1.76 KB
Versions: 1
Compression:
Stored size: 1.76 KB
Contents
#!/usr/bin/env ruby #encoding: utf-8 require 'loggability' require 'sequel' # This is a Ruby interface to the WordNet® lexical database. It uses the WordNet-SQL # project's databases instead of reading from the canonical flatfiles for speed and # easy modification. module WordNet extend Loggability # Loggability API -- Set up a logger for WordNet classes log_as :wordnet # Release version VERSION = '1.0.1' # VCS revision REVISION = %q$Revision: $ # Abort if not >=2.2.0 abort "This version of WordNet requires Ruby 2.2.0 or greater." unless RUBY_VERSION >= '2.2.0' ### Lexicon exception - something has gone wrong in the internals of the ### lexicon. class LexiconError < StandardError ; end ### Lookup error - the object being looked up either doesn't exist or is ### malformed class LookupError < StandardError ; end require 'wordnet/constants' include WordNet::Constants ### Get the WordNet version. ### @return [String] the library's version def self::version_string( include_buildnum=false ) vstring = "%s %s" % [ self.name, VERSION ] vstring << " (build %s)" % [ REVISION[/: ([[:xdigit:]]+)/, 1] || '0' ] if include_buildnum return vstring end require 'wordnet/lexicon' require 'wordnet/model' require 'wordnet/sense' require 'wordnet/synset' require 'wordnet/semanticlink' require 'wordnet/lexicallink' require 'wordnet/word' require 'wordnet/morph' require 'wordnet/sumoterm' # # Backward-compatibility stuff # # :section: Backward-compatibility # Backward-compatibility constant Noun = :n # Backward-compatibility constant Verb = :v # Backward-compatibility constant Adjective = :a # Backward-compatibility constant Adverb = :r # Backward-compatibility constant Other = :s end # module WordNet
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
wordnet-1.0.1 | lib/wordnet.rb |