Sha256: a253b27833b2ac34e84b5c0b1c12d8c13a7a2f66eb40dd4e38ba06b99cbae6b9
Contents?: true
Size: 903 Bytes
Versions: 1
Compression:
Stored size: 903 Bytes
Contents
# -*- ruby -*- #encoding: utf-8 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] ## # The WordNet::Sense the link is pointing *from*. many_to_one :origin, :class => :"WordNet::Sense", :key => :synset1id, :primary_key => :synsetid ## # The WordNet::Synset the link is pointing *to*. 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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
wordnet-1.0.1 | lib/wordnet/lexicallink.rb |