Method: WordNet::Synset.linktype_table
- Defined in:
- lib/wordnet/synset.rb
.linktype_table ⇒ Object
Return the table of link types, keyed by linkid
330 331 332 333 334 335 336 337 338 339 340 |
# File 'lib/wordnet/synset.rb', line 330 def self::linktype_table @linktype_table ||= self.db[:linktypes].inject({}) do |hash,row| hash[ row[:linkid] ] = { id: row[:linkid], typename: row[:link], type: row[:link].gsub( /\s+/, '_' ).to_sym, recurses: row[:recurses] && row[:recurses] != 0, } hash end end |