Class: Google::Cloud::Language::V2::EntityMention
- Inherits:
-
Object
- Object
- Google::Cloud::Language::V2::EntityMention
- Extended by:
- Protobuf::MessageExts::ClassMethods
- Includes:
- Protobuf::MessageExts
- Defined in:
- proto_docs/google/cloud/language/v2/language_service.rb
Overview
Represents a mention for an entity in the text. Currently, proper noun mentions are supported.
Defined Under Namespace
Modules: Type
Instance Attribute Summary collapse
-
#probability ⇒ ::Float
Probability score associated with the entity.
-
#sentiment ⇒ ::Google::Cloud::Language::V2::Sentiment
For calls to [AnalyzeEntitySentiment][] or if [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v2.AnnotateTextRequest.Features.extract_entity_sentiment] is set to true, this field will contain the sentiment expressed for this mention of the entity in the provided document.
-
#text ⇒ ::Google::Cloud::Language::V2::TextSpan
The mention text.
-
#type ⇒ ::Google::Cloud::Language::V2::EntityMention::Type
The type of the entity mention.
Instance Attribute Details
#probability ⇒ ::Float
Returns Probability score associated with the entity.
The score shows the probability of the entity mention being the entity type. The score is in (0, 1] range.
233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 |
# File 'proto_docs/google/cloud/language/v2/language_service.rb', line 233 class EntityMention include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The supported types of mentions. module Type # Unknown TYPE_UNKNOWN = 0 # Proper name PROPER = 1 # Common noun (or noun compound) COMMON = 2 end end |
#sentiment ⇒ ::Google::Cloud::Language::V2::Sentiment
Returns For calls to [AnalyzeEntitySentiment][] or if [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v2.AnnotateTextRequest.Features.extract_entity_sentiment] is set to true, this field will contain the sentiment expressed for this mention of the entity in the provided document.
233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 |
# File 'proto_docs/google/cloud/language/v2/language_service.rb', line 233 class EntityMention include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The supported types of mentions. module Type # Unknown TYPE_UNKNOWN = 0 # Proper name PROPER = 1 # Common noun (or noun compound) COMMON = 2 end end |
#text ⇒ ::Google::Cloud::Language::V2::TextSpan
Returns The mention text.
233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 |
# File 'proto_docs/google/cloud/language/v2/language_service.rb', line 233 class EntityMention include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The supported types of mentions. module Type # Unknown TYPE_UNKNOWN = 0 # Proper name PROPER = 1 # Common noun (or noun compound) COMMON = 2 end end |
#type ⇒ ::Google::Cloud::Language::V2::EntityMention::Type
Returns The type of the entity mention.
233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 |
# File 'proto_docs/google/cloud/language/v2/language_service.rb', line 233 class EntityMention include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The supported types of mentions. module Type # Unknown TYPE_UNKNOWN = 0 # Proper name PROPER = 1 # Common noun (or noun compound) COMMON = 2 end end |