Class: Google::Apis::CommentanalyzerV1alpha1::SpanScore
- Inherits:
-
Object
- Object
- Google::Apis::CommentanalyzerV1alpha1::SpanScore
- Defined in:
- generated/google/apis/commentanalyzer_v1alpha1/classes.rb,
generated/google/apis/commentanalyzer_v1alpha1/representations.rb,
generated/google/apis/commentanalyzer_v1alpha1/representations.rb
Overview
This is a single score for a given span of text.
Instance Attribute Summary collapse
-
#begin ⇒ Fixnum
"begin" and "end" describe the span of the original text that the attribute score applies to.
-
#end ⇒ Fixnum
Corresponds to the JSON property
end
. -
#score ⇒ Google::Apis::CommentanalyzerV1alpha1::Score
Analysis scores are described by a value and a ScoreType.
Instance Method Summary collapse
-
#initialize(**args) ⇒ SpanScore
constructor
A new instance of SpanScore.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Google::Apis::Core::JsonObjectSupport
Methods included from Google::Apis::Core::Hashable
Constructor Details
#initialize(**args) ⇒ SpanScore
Returns a new instance of SpanScore.
330 331 332 |
# File 'generated/google/apis/commentanalyzer_v1alpha1/classes.rb', line 330 def initialize(**args) update!(**args) end |
Instance Attribute Details
#begin ⇒ Fixnum
"begin" and "end" describe the span of the original text that the attribute
score applies to. The values are the UTF-16 codepoint range. "end" is
exclusive. For example, with the text "Hi there", the begin/end pair (0,2)
describes the text "Hi".
If "begin" and "end" are unset, the score applies to the full text.
Corresponds to the JSON property begin
318 319 320 |
# File 'generated/google/apis/commentanalyzer_v1alpha1/classes.rb', line 318 def begin @begin end |
#end ⇒ Fixnum
Corresponds to the JSON property end
323 324 325 |
# File 'generated/google/apis/commentanalyzer_v1alpha1/classes.rb', line 323 def end @end end |
#score ⇒ Google::Apis::CommentanalyzerV1alpha1::Score
Analysis scores are described by a value and a ScoreType.
Corresponds to the JSON property score
328 329 330 |
# File 'generated/google/apis/commentanalyzer_v1alpha1/classes.rb', line 328 def score @score end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
335 336 337 338 339 |
# File 'generated/google/apis/commentanalyzer_v1alpha1/classes.rb', line 335 def update!(**args) @begin = args[:begin] if args.key?(:begin) @end = args[:end] if args.key?(:end) @score = args[:score] if args.key?(:score) end |