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.
Types
interface LanguageBackend | Identifies a native language-service implementation. |
class LanguageBackends | Selects native backends for language identification, translation, and Smart Reply. |
class LanguageCandidate | One ranked BCP-47 language candidate returned by LanguageIdentifier.identify(String, LanguageOptions). |
class LanguageIdentifier | Identifies possible languages entirely on device. |
class LanguageOptions | Reusable options shared by language identification, translation, and Smart Reply operations. |
class SmartReply | Produces short reply suggestions for a chronological conversation without uploading its messages. |
class SmartReplyMessage | One message supplied to the on-device smart-reply model. |
class Translator | Translates text on device with lazily installed language-pair models. |