public final class LanguageOptions

  1. Object
  2. LanguageOptions
Reusable options shared by language identification, translation, and Smart Reply operations.

Constructors

public LanguageOptions()

Methods

public LanguageOptions backend(LanguageBackend value)
public LanguageOptions minimumConfidence(float value)Sets the minimum language-identification confidence, clamped to 0..1.
public LanguageBackend getBackend()
public float getMinimumConfidence()

Inherited methods

Constructor details

LanguageOptions

public LanguageOptions()

Method details

backend

public LanguageOptions backend(LanguageBackend value)

Parameters

value LanguageBackend
backend selector; null restores automatic selection

Returns

this options object

minimumConfidence

public LanguageOptions minimumConfidence(float value)
Sets the minimum language-identification confidence, clamped to 0..1. NaN has no meaningful ordering and is rejected instead of being passed to a platform language identifier.

Parameters

value float
requested threshold

Returns

this options object

Throws

IllegalArgumentException
if value is NaN

getBackend

public LanguageBackend getBackend()

Returns

selected backend, never null

getMinimumConfidence

public float getMinimumConfidence()

Returns

language-identification threshold in the range 0..1