Tokenize, tag, and analyze natural language text using Apple's NaturalLanguage framework and translate between languages with the Translation framework. Use when adding language identification, sentiment analysis, named entity recognition, part-of-speech tagging, text embeddings, or in-app translation to iOS/macOS/visionOS apps.
84%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Passed
No findings from the security scan
Analyze natural language text for tokenization, part-of-speech tagging, named entity recognition, sentiment analysis, language identification, and embeddings using NaturalLanguage. Translate text with Translation. Targets Swift 6.4 / iOS 26+.
NaturalLanguage: On-device text analysis (NLTokenizer, NLTagger, NLLanguageRecognizer, NLEmbedding, NLModel). Requires no special entitlements.Translation: In-app UI and programmatic language translation (TranslationSession, LanguageAvailability).vision-framework; route audio speech-to-text to speech-recognition; route generative LLM features to apple-on-device-ai; route static localization to ios-localization.| Capability | Primary Class | Key Output |
|---|---|---|
| Tokenization | NLTokenizer | Substrings segmented by word, sentence, or paragraph |
| Language ID | NLLanguageRecognizer | NLLanguage (e.g. .english, .vietnamese) with confidence |
| Part of Speech | NLTagger (.lexicalClass) | NLTag (.noun, .verb, .adjective, .pronoun) |
| Named Entities | NLTagger (.nameType) | Personal names, place names, organization names |
| Sentiment | NLTagger (.sentimentScore) | Continuous score between -1.0 and +1.0 |
| Semantic Distance | NLEmbedding | Cosine distance and neighbor queries for words/sentences |
| System Translation | .translationPresentation() | Native system modal translation sheet |
| Batch Translation | TranslationSession | Async batch translated strings |
[!IMPORTANT]
NLTokenizerandNLTaggerare not thread-safe. Do not share instances across concurrent tasks or queues. Create instances on demand or isolate them within a serial actor.NLEmbeddinginstances are read-only and thread-safe once loaded into memory.
.translationPresentation(isPresented:text:): iOS 17.4+, macOS 14.4+, visionOS 1.1+TranslationSession, .translationTask(), and LanguageAvailability: iOS 18.0+, macOS 15.0+, visionOS 2.0+TranslationSession(installedSource:target:) requires the target language packs to be already installed on device.NLModel, read Custom NLModel Classifiers.NLTokenizer or NLTagger across concurrent threads or Tasks without isolation.NLEmbedding or checking similarity without unwrapping optionals.TranslationSession offline when language packs are not installed on device.NLTokenizer and NLTagger used from a single thread or isolated in an actorTranslationSession (iOS 18+) vs presentation sheet (iOS 17.4+)LanguageAvailability.status() before programmatic translation@MainActor to background tasksNLEmbedding.wordEmbedding(for:) checked for nil availability in the target language.omitWhitespace and .omitPunctuation where appropriatethienqo/ios-skills
6bf8b62
Canonical home
since May 23, 2026
Also appears in
on Oct 29, 2026
since May 22, 2026
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.