Google Cloud Talent Solution V4 Client - Class SpellingCorrection (1.0.5)

Reference documentation and code samples for the Google Cloud Talent Solution V4 Client class SpellingCorrection.

Spell check result.

Generated from protobuf message google.cloud.talent.v4.SpellingCorrection

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ corrected bool

Indicates if the query was corrected by the spell checker.

↳ corrected_text string

Correction output consisting of the corrected keyword string.

↳ corrected_html string

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".

getCorrected

Indicates if the query was corrected by the spell checker.

Returns
TypeDescription
bool

setCorrected

Indicates if the query was corrected by the spell checker.

Parameter
NameDescription
var bool
Returns
TypeDescription
$this

getCorrectedText

Correction output consisting of the corrected keyword string.

Returns
TypeDescription
string

setCorrectedText

Correction output consisting of the corrected keyword string.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getCorrectedHtml

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".

Returns
TypeDescription
string

setCorrectedHtml

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".

Parameter
NameDescription
var string
Returns
TypeDescription
$this