Class: RelatedWord::Formatter::SemanticFormatter

Inherits:
BaseFormatter show all
Defined in:
lib/related_word/formatter/semantic_formatter.rb

Instance Attribute Summary

Attributes inherited from BaseFormatter

#resp

Instance Method Summary collapse

Methods inherited from BaseFormatter

#initialize

Constructor Details

This class inherits a constructor from RelatedWord::Formatter::BaseFormatter

Instance Method Details

#formatObject



4
5
6
7
8
# File 'lib/related_word/formatter/semantic_formatter.rb', line 4

def format
  resp.map do |el|
    { word: el['v'], score: el['mi_norm'] }
  end
end