← ClaudeAtlas

natural-languagelisted

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.
dpearson2699/swift-ios-skills · ★ 730 · AI & Automation · score 80
Install: claude install-skill dpearson2699/swift-ios-skills
# NaturalLanguage + Translation Analyze natural language text for tokenization, part-of-speech tagging, named entity recognition, sentiment analysis, language identification, and word/sentence embeddings. Translate text between languages with the Translation framework. Targets Swift 6.3 / iOS 26+. > This skill covers two related frameworks: **NaturalLanguage** (`NLTokenizer`, `NLTagger`, `NLEmbedding`) for on-device text analysis, and **Translation** (`TranslationSession`, `LanguageAvailability`) for language translation. ## Contents - [Setup](#setup) - [Tokenization](#tokenization) - [Language Identification](#language-identification) - [Part-of-Speech Tagging](#part-of-speech-tagging) - [Named Entity Recognition](#named-entity-recognition) - [Sentiment Analysis](#sentiment-analysis) - [Text Embeddings](#text-embeddings) - [Translation](#translation) - [Common Mistakes](#common-mistakes) - [Review Checklist](#review-checklist) - [References](#references) ## Setup Import `NaturalLanguage` for text analysis and `Translation` for language translation. No special entitlements or capabilities are required for NaturalLanguage. Translation requires iOS 17.4+ / macOS 14.4+. ```swift import NaturalLanguage import Translation ``` NaturalLanguage classes (`NLTokenizer`, `NLTagger`) are **not thread-safe**. Use each instance from one thread or dispatch queue at a time. ## Tokenization Segment text into words, sentences, or paragraphs with `NLTokenizer`. ```swift import Natura