Class LanguageOptions

java.lang.Object
com.codename1.ai.language.LanguageOptions

public final class LanguageOptions extends Object
Reusable options shared by language identification, translation, and Smart Reply operations.
  • Constructor Details

    • LanguageOptions

      public LanguageOptions()
  • Method Details

    • backend

      public LanguageOptions backend(LanguageBackend value)
      Parameters:
      value - 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 - 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