Sha256: 02f7d98bad342362b7c4ad9aed88e19b1b63aef3fe3c53a35b5488276b7252e1
Contents?: true
Size: 778 Bytes
Versions: 4
Compression:
Stored size: 778 Bytes
Contents
#!/usr/bin/ruby require 'wordnet' unless defined?( WordNet ) require 'wordnet/synset' unless defined?( WordNet::Synset ) require 'wordnet/model' # WordNet lexical link (pointer) model class class WordNet::LexicalLink < WordNet::Model( :lexlinks ) include WordNet::Constants set_primary_key [:word1id, :synset1id, :word2id, :synset2id, :linkid] many_to_one :origin, :class => :"WordNet::Sense", :key => :synset1id, :primary_key => :synsetid one_to_many :target, :class => :"WordNet::Synset", :key => :synsetid, :primary_key => :synset2id ###### public ###### ### Return the type of link this is as a Symbol. def type return WordNet::Synset.linktype_table[ self.linkid ][ :type ] end end # class WordNet::SemanticLink
Version data entries
4 entries across 4 versions & 1 rubygems