Class: Google::Apis::DatalabelingV1beta1::GoogleCloudDatalabelingV1beta1Annotation

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/datalabeling_v1beta1/classes.rb,
generated/google/apis/datalabeling_v1beta1/representations.rb,
generated/google/apis/datalabeling_v1beta1/representations.rb

Overview

Annotation for Example. Each example may have one or more annotations. For example in image classification problem, each image might have one or more labels. We call labels binded with this image an Annotation.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDatalabelingV1beta1Annotation

Returns a new instance of GoogleCloudDatalabelingV1beta1Annotation.



933
934
935
# File 'generated/google/apis/datalabeling_v1beta1/classes.rb', line 933

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#annotation_metadataGoogle::Apis::DatalabelingV1beta1::GoogleCloudDatalabelingV1beta1AnnotationMetadata

Additional information associated with the annotation. Corresponds to the JSON property annotationMetadata



909
910
911
# File 'generated/google/apis/datalabeling_v1beta1/classes.rb', line 909

def 
  @annotation_metadata
end

#annotation_sentimentString

Output only. Sentiment for this annotation. Corresponds to the JSON property annotationSentiment

Returns:

  • (String)


914
915
916
# File 'generated/google/apis/datalabeling_v1beta1/classes.rb', line 914

def annotation_sentiment
  @annotation_sentiment
end

#annotation_sourceString

Output only. The source of the annotation. Corresponds to the JSON property annotationSource

Returns:

  • (String)


919
920
921
# File 'generated/google/apis/datalabeling_v1beta1/classes.rb', line 919

def annotation_source
  @annotation_source
end

#annotation_valueGoogle::Apis::DatalabelingV1beta1::GoogleCloudDatalabelingV1beta1AnnotationValue

Annotation value for an example. Corresponds to the JSON property annotationValue



924
925
926
# File 'generated/google/apis/datalabeling_v1beta1/classes.rb', line 924

def annotation_value
  @annotation_value
end

#nameString

Output only. Unique name of this annotation, format is: projects/project_id/ datasets/dataset_id/annotatedDatasets/annotated_dataset/examples/ example_id/annotations/annotation_id Corresponds to the JSON property name

Returns:

  • (String)


931
932
933
# File 'generated/google/apis/datalabeling_v1beta1/classes.rb', line 931

def name
  @name
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



938
939
940
941
942
943
944
# File 'generated/google/apis/datalabeling_v1beta1/classes.rb', line 938

def update!(**args)
  @annotation_metadata = args[:annotation_metadata] if args.key?(:annotation_metadata)
  @annotation_sentiment = args[:annotation_sentiment] if args.key?(:annotation_sentiment)
  @annotation_source = args[:annotation_source] if args.key?(:annotation_source)
  @annotation_value = args[:annotation_value] if args.key?(:annotation_value)
  @name = args[:name] if args.key?(:name)
end