Package com.codename1.ai.language


package com.codename1.ai.language

Vendor-neutral on-device language identification, translation, and smart reply.

Android uses feature-scoped ML Kit components. On iOS, automatic language identification uses Apple's Natural Language framework. An application opts into each iOS ML Kit component with LanguageBackends.mlKitLanguageIdentification(), LanguageBackends.mlKitTranslation(), or LanguageBackends.mlKitSmartReply(). Each entry point and optional selector is scanned independently, so using one feature does not bundle the others. Translation model payloads are installed lazily by ML Kit. Other targets expose the same API with an explicit unsupported fallback.

  • Class
    Description
    Identifies a native language-service implementation.
    Selects native backends for language identification, translation, and Smart Reply.
    One ranked BCP-47 language candidate returned by LanguageIdentifier.identify(String, LanguageOptions).
    Identifies possible languages entirely on device.
    Reusable owner of a native language-identification backend.
    Reusable options shared by language identification, translation, and Smart Reply operations.
    Produces short reply suggestions for a chronological conversation without uploading its messages.
    Reusable owner of a native Smart Reply backend.
    One message supplied to the on-device smart-reply model.
    Translates text on device with lazily installed language-pair models.
    Reusable owner of a native translation backend.