Class: AlchemyApi::ConceptTagging
- Inherits:
-
Base
- Object
- MonsterMash::Base
- Base
- AlchemyApi::ConceptTagging
- Defined in:
- lib/alchemy_api/concept_tagging.rb
Class Method Summary (collapse)
Methods inherited from Base
check_json_for_errors_and_raise!, get_json
Class Method Details
+ (Object) get_concepts_handler(response)
52 53 54 55 56 57 58 |
# File 'lib/alchemy_api/concept_tagging.rb', line 52 def self.get_concepts_handler(response) json = get_json(response) concepts = json['concepts'].map do |c| Concept.new(c['text'], c['relevance'].to_f) end ConceptTaggingResult.new(concepts, json['language'], json['url'], json['text']) end |