public final class LanguageOptions
- Object
- LanguageOptions
Reusable options shared by language identification, translation, and
Smart Reply operations.
Constructors
public LanguageOptions() |
Methods
Inherited methods
Constructor details
LanguageOptions
public LanguageOptions()Method details
backend
public LanguageOptions backend(LanguageBackend value)Parameters
valueLanguageBackend- backend selector;
nullrestores 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
valuefloat- requested threshold
Returns
this options object
Throws
IllegalArgumentException- if
valueis NaN
getBackend
public LanguageBackend getBackend()Returns
selected backend, never
nullgetMinimumConfidence
public float getMinimumConfidence()Returns
language-identification threshold in the range 0..1