Class: Google::Apis::JobsV4::SpellingCorrection

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

Overview

Spell check result.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ SpellingCorrection

Returns a new instance of SpellingCorrection.



2436
2437
2438
# File 'lib/google/apis/jobs_v4/classes.rb', line 2436

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

Instance Attribute Details

#correctedBoolean Also known as: corrected?

Indicates if the query was corrected by the spell checker. Corresponds to the JSON property corrected

Returns:

  • (Boolean)


2419
2420
2421
# File 'lib/google/apis/jobs_v4/classes.rb', line 2419

def corrected
  @corrected
end

#corrected_htmlString

Corrected output with html tags to highlight the corrected words. Corrected words are called out with the "..." html tags. For example, the user input query is "software enginear", where the second word, "enginear," is incorrect. It should be "engineer". When spelling correction is enabled, this value is " software engineer". Corresponds to the JSON property correctedHtml

Returns:

  • (String)


2429
2430
2431
# File 'lib/google/apis/jobs_v4/classes.rb', line 2429

def corrected_html
  @corrected_html
end

#corrected_textString

Correction output consisting of the corrected keyword string. Corresponds to the JSON property correctedText

Returns:

  • (String)


2434
2435
2436
# File 'lib/google/apis/jobs_v4/classes.rb', line 2434

def corrected_text
  @corrected_text
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2441
2442
2443
2444
2445
# File 'lib/google/apis/jobs_v4/classes.rb', line 2441

def update!(**args)
  @corrected = args[:corrected] if args.key?(:corrected)
  @corrected_html = args[:corrected_html] if args.key?(:corrected_html)
  @corrected_text = args[:corrected_text] if args.key?(:corrected_text)
end