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.
674 675 676 |
# File 'lib/google/cloud/language/annotation.rb', line 674 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.
735 736 737 |
# File 'lib/google/cloud/language/annotation.rb', line 735 def artwork select(&:artwork?) end |
#events ⇒ Array<Entity>
Returns the entities for which Google::Cloud::Language::Annotation::Entity#type is :EVENT.
726 727 728 |
# File 'lib/google/cloud/language/annotation.rb', line 726 def events select(&:event?) end |
#goods ⇒ Array<Entity>
Returns the entities for which Google::Cloud::Language::Annotation::Entity#type is :CONSUMER_GOOD.
744 745 746 |
# File 'lib/google/cloud/language/annotation.rb', line 744 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.
707 708 709 |
# File 'lib/google/cloud/language/annotation.rb', line 707 def locations select(&:location?) end |
#organizations ⇒ Array<Entity>
Returns the entities for which Google::Cloud::Language::Annotation::Entity#type is :ORGANIZATION.
717 718 719 |
# File 'lib/google/cloud/language/annotation.rb', line 717 def organizations select(&:organization?) end |
#other ⇒ Array<Entity>
Returns the entities for which Google::Cloud::Language::Annotation::Entity#type is :OTHER.
753 754 755 |
# File 'lib/google/cloud/language/annotation.rb', line 753 def other select(&:other?) end |
#people ⇒ Array<Entity>
Returns the entities for which Google::Cloud::Language::Annotation::Entity#type is :PERSON.
698 699 700 |
# File 'lib/google/cloud/language/annotation.rb', line 698 def people select(&:person?) end |
#unknown ⇒ Array<Entity>
Returns the entities for which Google::Cloud::Language::Annotation::Entity#type is :UNKNOWN.
689 690 691 |
# File 'lib/google/cloud/language/annotation.rb', line 689 def unknown select(&:unknown?) end |