Skip to main content
skill CX Codex

natural-language — Claude Code skill: on-device text analysis

A skill for on-device text work: tokenization, language detection, part-of-speech tags, entities, sentiment and translation in Apple apps.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add dpearson2699/swift-ios-skills --skill natural-language -a claude-code
Open on GitHub

What natural-language does

The skill covers two Apple frameworks. NaturalLanguage brings NLTokenizer, NLTagger and NLEmbedding for analysis that runs on device, while Translation brings TranslationSession and LanguageAvailability for moving text between languages. Reach for it once the text is already in your app and needs tagging or translating.

Inside are recipes for each job: splitting text into words, sentences and paragraphs, detecting the dominant language with confidence scores, tagging parts of speech, pulling out personal names, places and organizations, scoring sentiment from -1.0 to +1.0, and building word and sentence embeddings. There is also a common-mistakes section and a review checklist.

The scope is drawn tightly. OCR belongs to vision-framework, speech-to-text to speech-recognition, UI strings and locale formatting to ios-localization, generative summaries to apple-on-device-ai. NLTokenizer and NLTagger are not thread-safe, so keep each instance on one thread or queue. NaturalLanguage needs no special entitlements; Translation splits by version — the system translation UI is iOS 17.4+ and macOS 14.4+, while TranslationSession, .translationTask(), LanguageAvailability and batch translation need iOS 18+ and macOS 15+. Direct TranslationSession(installedSource:target:) skips the UI, but only when both languages are already installed on the device.

What it helps with

  • split a block of text into words, sentences and paragraphs
  • detect the language of a short string with a confidence score
  • pull names, places and organizations out of a review
  • score the sentiment of a paragraph as a number
  • find words close in meaning through embeddings

Example prompts for the agent

  • Add language detection to the input field using NLLanguageRecognizer
  • I need sentiment for user reviews — do it with NLTagger and .sentimentScore
  • Wire up in-app translation on iOS 18 through TranslationSession

How to install natural-language

1Skills CLI (Vercel)

npx skills add dpearson2699/swift-ios-skills --skill natural-language -a claude-code

2Manually: put the files in place

~/.claude/skills/natural-language/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/natural-language/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about natural-language

How do I install natural-language in Claude?

Run npx skills add dpearson2699/swift-ios-skills --skill natural-language -a claude-code. The skill lands at ~/.claude/skills/natural-language/SKILL.md.

What does natural-language do?

It gives the agent recipes for on-device text analysis: tokenization, language identification, part-of-speech tags, named entities, sentiment and embeddings. It also covers translation through the Translation framework.

Which iOS versions support translation?

The system translation UI starts at iOS 17.4 and macOS 14.4, while TranslationSession, .translationTask() and batch translation require iOS 18 and macOS 15.

Similar skills

Everything for Mobile →

From the same set86

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor