Class: CognitiveVision::ImageFeature::Description
- Inherits:
-
Object
- Object
- CognitiveVision::ImageFeature::Description
- Defined in:
- lib/cognitive_vision/image_feature/description.rb
Instance Method Summary collapse
Instance Method Details
#key ⇒ Object
4 5 6 |
# File 'lib/cognitive_vision/image_feature/description.rb', line 4 def key 'description' end |
#parse(response) ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/cognitive_vision/image_feature/description.rb', line 8 def parse(response) description_response = response[key] = description_response['captions'].map do || CognitiveVision::DescriptionCaption.new(text: ['text'], confidence: ['confidence']) end CognitiveVision::Description.new(tags: description_response['tags'], captions: ) end |