Class: Google::Cloud::Vision::Annotation::Web::Entity
- Inherits:
 - 
      Object
      
        
- Object
 - Google::Cloud::Vision::Annotation::Web::Entity
 
 
- Defined in:
 - lib/google/cloud/vision/annotation/web.rb
 
Overview
Entity
Entity deduced from similar images on the Internet.
Instance Method Summary collapse
- 
  
    
      #description  ⇒ String 
    
    
  
  
  
  
  
  
  
  
  
    
Canonical description of the entity, in English.
 - 
  
    
      #entity_id  ⇒ String 
    
    
  
  
  
  
  
  
  
  
  
    
Opaque entity ID.
 - 
  
    
      #score  ⇒ Float 
    
    
  
  
  
  
  
  
  
  
  
    
Overall relevancy score for the entity.
 - 
  
    
      #to_a  ⇒ Array 
    
    
  
  
  
  
  
  
  
  
  
    
Returns the object's property values as an array.
 - 
  
    
      #to_h  ⇒ Hash 
    
    
  
  
  
  
  
  
  
  
  
    
Converts object to a hash.
 
Instance Method Details
#description ⇒ String
Canonical description of the entity, in English.
      204 205 206  | 
    
      # File 'lib/google/cloud/vision/annotation/web.rb', line 204 def description @grpc.description end  | 
  
#entity_id ⇒ String
Opaque entity ID.
      185 186 187  | 
    
      # File 'lib/google/cloud/vision/annotation/web.rb', line 185 def entity_id @grpc.entity_id end  | 
  
#score ⇒ Float
Overall relevancy score for the entity. Not normalized and not comparable across different image queries.
      195 196 197  | 
    
      # File 'lib/google/cloud/vision/annotation/web.rb', line 195 def score @grpc.score end  | 
  
#to_a ⇒ Array
Returns the object's property values as an array.
      213 214 215  | 
    
      # File 'lib/google/cloud/vision/annotation/web.rb', line 213 def to_a [entity_id, score, description] end  | 
  
#to_h ⇒ Hash
Converts object to a hash. All keys will be symbolized.
      222 223 224  | 
    
      # File 'lib/google/cloud/vision/annotation/web.rb', line 222 def to_h { entity_id: entity_id, score: score, description: description } end  |