Class: Google::Apis::AiplatformV1beta1::NlpSaftLanguageSpan

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) ⇒ NlpSaftLanguageSpan

Returns a new instance of NlpSaftLanguageSpan.



31926
31927
31928
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 31926

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

Instance Attribute Details

#endFixnum

Corresponds to the JSON property end

Returns:

  • (Fixnum)


31900
31901
31902
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 31900

def end
  @end
end

#language_codeString

A BCP 47 language code for this span. Corresponds to the JSON property languageCode

Returns:

  • (String)


31905
31906
31907
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 31905

def language_code
  @language_code
end

#localesGoogle::Apis::AiplatformV1beta1::NlpSaftLangIdLocalesResult

Optional field containing any information that was predicted about the specific locale(s) of the span. Corresponds to the JSON property locales



31911
31912
31913
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 31911

def locales
  @locales
end

#probabilityFloat

A probability associated with this prediction. Corresponds to the JSON property probability

Returns:

  • (Float)


31916
31917
31918
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 31916

def probability
  @probability
end

#startFixnum

Start and end byte offsets, inclusive, within the given input string. A value of -1 implies that this field is not set. Both fields must either be set with a nonnegative value or both are unset. If both are unset then this LanguageSpan applies to the entire input. Corresponds to the JSON property start

Returns:

  • (Fixnum)


31924
31925
31926
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 31924

def start
  @start
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



31931
31932
31933
31934
31935
31936
31937
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 31931

def update!(**args)
  @end = args[:end] if args.key?(:end)
  @language_code = args[:language_code] if args.key?(:language_code)
  @locales = args[:locales] if args.key?(:locales)
  @probability = args[:probability] if args.key?(:probability)
  @start = args[:start] if args.key?(:start)
end