Class: Google::Apis::AiplatformV1beta1::NlpSaftLangIdResult

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ NlpSaftLangIdResult

Returns a new instance of NlpSaftLangIdResult.



36963
36964
36965
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 36963

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

Instance Attribute Details

#model_versionString

The version of the model used to create these annotations. Corresponds to the JSON property modelVersion

Returns:

  • (String)


36945
36946
36947
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 36945

def model_version
  @model_version
end

#predictionsArray<Google::Apis::AiplatformV1beta1::NlpSaftLanguageSpan>

This field stores the n-best list of possible BCP 47 language code strings for a given input sorted in descending order according to each code's respective probability. Corresponds to the JSON property predictions



36952
36953
36954
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 36952

def predictions
  @predictions
end

#span_predictionsArray<Google::Apis::AiplatformV1beta1::NlpSaftLanguageSpanSequence>

This field stores language predictions of subspans of the input, when available. Each LanguageSpanSequence is a sequence of LanguageSpans. A particular sequence of LanguageSpans has an associated probability, and need not necessarily cover the entire input. If no language could be predicted for any span, then this field may be empty. Corresponds to the JSON property spanPredictions



36961
36962
36963
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 36961

def span_predictions
  @span_predictions
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



36968
36969
36970
36971
36972
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 36968

def update!(**args)
  @model_version = args[:model_version] if args.key?(:model_version)
  @predictions = args[:predictions] if args.key?(:predictions)
  @span_predictions = args[:span_predictions] if args.key?(:span_predictions)
end