Class: RelatedWord::Formatter::SemanticFormatter
- Inherits:
-
BaseFormatter
- Object
- BaseFormatter
- RelatedWord::Formatter::SemanticFormatter
- Defined in:
- lib/related_word/formatter/semantic_formatter.rb
Instance Attribute Summary
Attributes inherited from BaseFormatter
Instance Method Summary collapse
Methods inherited from BaseFormatter
Constructor Details
This class inherits a constructor from RelatedWord::Formatter::BaseFormatter
Instance Method Details
#format ⇒ Object
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 |