Method: WordNet::Synset#search

Defined in:
lib/wordnet/synset.rb

#search(type, synset) ⇒ Object

Search for the specified synset in the semantic links of the given type of the receiver, returning the depth it was found at if it’s found, or nil if it wasn’t found.



672
673
674
675
# File 'lib/wordnet/synset.rb', line 672

def search( type, synset )
  found, depth = self.traverse( type ).with_depth.find {|ss,depth| synset == ss }
  return depth
end