Class: Google::Cloud::Language::Annotation::Entities
- Inherits:
- 
      Array
      
        - Object
- Array
- Google::Cloud::Language::Annotation::Entities
 
- Defined in:
- lib/google/cloud/language/annotation.rb
Overview
The entities returned by entity analysis.
Instance Attribute Summary collapse
- 
  
    
      #language  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    The language of the document (if not specified, the language is automatically detected). 
Instance Method Summary collapse
- 
  
    
      #artwork  ⇒ Array<Entity> 
    
    
  
  
  
  
  
  
  
  
  
    Returns the entities for which Google::Cloud::Language::Annotation::Entity#type is :WORK_OF_ART.
- 
  
    
      #events  ⇒ Array<Entity> 
    
    
  
  
  
  
  
  
  
  
  
    Returns the entities for which Google::Cloud::Language::Annotation::Entity#type is :EVENT.
- 
  
    
      #goods  ⇒ Array<Entity> 
    
    
  
  
  
  
  
  
  
  
  
    Returns the entities for which Google::Cloud::Language::Annotation::Entity#type is :CONSUMER_GOOD.
- 
  
    
      #locations  ⇒ Array<Entity> 
    
    
      (also: #places)
    
  
  
  
  
  
  
  
  
  
    Returns the entities for which Google::Cloud::Language::Annotation::Entity#type is :LOCATION.
- 
  
    
      #organizations  ⇒ Array<Entity> 
    
    
  
  
  
  
  
  
  
  
  
    Returns the entities for which Google::Cloud::Language::Annotation::Entity#type is :ORGANIZATION.
- 
  
    
      #other  ⇒ Array<Entity> 
    
    
  
  
  
  
  
  
  
  
  
    Returns the entities for which Google::Cloud::Language::Annotation::Entity#type is :OTHER.
- 
  
    
      #people  ⇒ Array<Entity> 
    
    
  
  
  
  
  
  
  
  
  
    Returns the entities for which Google::Cloud::Language::Annotation::Entity#type is :PERSON.
- 
  
    
      #unknown  ⇒ Array<Entity> 
    
    
  
  
  
  
  
  
  
  
  
    Returns the entities for which Google::Cloud::Language::Annotation::Entity#type is :UNKNOWN.
Instance Attribute Details
#language ⇒ String
The language of the document (if not specified, the language is automatically detected). Both ISO and BCP-47 language codes are supported.
| 333 334 335 | # File 'lib/google/cloud/language/annotation.rb', line 333 def language @language end | 
Instance Method Details
#artwork ⇒ Array<Entity>
Returns the entities for which Google::Cloud::Language::Annotation::Entity#type is :WORK_OF_ART.
| 394 395 396 | # File 'lib/google/cloud/language/annotation.rb', line 394 def artwork select(&:artwork?) end | 
#events ⇒ Array<Entity>
Returns the entities for which Google::Cloud::Language::Annotation::Entity#type is :EVENT.
| 385 386 387 | # File 'lib/google/cloud/language/annotation.rb', line 385 def events select(&:event?) end | 
#goods ⇒ Array<Entity>
Returns the entities for which Google::Cloud::Language::Annotation::Entity#type is :CONSUMER_GOOD.
| 403 404 405 | # File 'lib/google/cloud/language/annotation.rb', line 403 def goods select(&:good?) end | 
#locations ⇒ Array<Entity> Also known as: places
Returns the entities for which Google::Cloud::Language::Annotation::Entity#type is :LOCATION.
| 366 367 368 | # File 'lib/google/cloud/language/annotation.rb', line 366 def locations select(&:location?) end | 
#organizations ⇒ Array<Entity>
Returns the entities for which Google::Cloud::Language::Annotation::Entity#type is :ORGANIZATION.
| 376 377 378 | # File 'lib/google/cloud/language/annotation.rb', line 376 def organizations select(&:organization?) end | 
#other ⇒ Array<Entity>
Returns the entities for which Google::Cloud::Language::Annotation::Entity#type is :OTHER.
| 412 413 414 | # File 'lib/google/cloud/language/annotation.rb', line 412 def other select(&:other?) end | 
#people ⇒ Array<Entity>
Returns the entities for which Google::Cloud::Language::Annotation::Entity#type is :PERSON.
| 357 358 359 | # File 'lib/google/cloud/language/annotation.rb', line 357 def people select(&:person?) end | 
#unknown ⇒ Array<Entity>
Returns the entities for which Google::Cloud::Language::Annotation::Entity#type is :UNKNOWN.
| 348 349 350 | # File 'lib/google/cloud/language/annotation.rb', line 348 def unknown select(&:unknown?) end |