Class: Google::Apis::LanguageV1beta2::XpsStringStatsUnigramStats

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

Overview

The statistics of a unigram.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ XpsStringStatsUnigramStats

Returns a new instance of XpsStringStatsUnigramStats.



3742
3743
3744
# File 'lib/google/apis/language_v1beta2/classes.rb', line 3742

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

Instance Attribute Details

#countFixnum

The number of occurrences of this unigram in the series. Corresponds to the JSON property count

Returns:

  • (Fixnum)


3735
3736
3737
# File 'lib/google/apis/language_v1beta2/classes.rb', line 3735

def count
  @count
end

#valueString

The unigram. Corresponds to the JSON property value

Returns:

  • (String)


3740
3741
3742
# File 'lib/google/apis/language_v1beta2/classes.rb', line 3740

def value
  @value
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3747
3748
3749
3750
# File 'lib/google/apis/language_v1beta2/classes.rb', line 3747

def update!(**args)
  @count = args[:count] if args.key?(:count)
  @value = args[:value] if args.key?(:value)
end