lib/wordnet/semanticlink.rb in wordnet-1.1.1 vs lib/wordnet/semanticlink.rb in wordnet-1.2.0

- old
+ new

@@ -1,7 +1,6 @@ # -*- ruby -*- -#encoding: utf-8 require 'wordnet' unless defined?( WordNet ) require 'wordnet/constants' require 'wordnet/model' @@ -10,14 +9,22 @@ include WordNet::Constants set_primary_key [:synset1id, :synset2id, :linkid] + ## + # :method: linkid + # The ID of this semlink + + ## + # The "origin" WordNet::Synset associated with this SemanticLink many_to_one :origin, class: 'WordNet::Synset', key: :synset1id, primary_key: :synsetid + ## + # The "target" WordNet::Synset associated with this SemanticLink one_to_one :target, class: 'WordNet::Synset', key: :synsetid, primary_key: :synset2id, eager: :words