natural-language

Process and translate on-device natural language text in Swift 6.3 / iOS 26+ contexts.

Updated Apr 30, 2026
One-click install
npx skills add https://github.com/onymchat/onym-ios --skill natural-language-onymchat
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: natural-language
Source: https://github.com/onymchat/onym-ios/tree/main/.claude/skills/natural-language
Command: npx skills add https://github.com/onymchat/onym-ios --skill natural-language-onymchat

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This on-device workflow enables apps to tokenize, tag, identify language, analyze sentiment, recognize named entities, perform part-of-speech tagging, and generate word/sentence embeddings, while also translating text without relying on remote services.

Core Features & Use Cases

  • Tokenization with NLTokenizer to segment text into words, sentences, or paragraphs.
  • Language identification with NLLanguageRecognizer to detect dominant languages.
  • Named Entity Recognition and Part-of-Speech tagging with NLTagger for structured text analysis.
  • Sentiment analysis and embedding features via NLEmbedding for contextual insights.
  • Translation capabilities using the Translation framework for in-app multilingual support.

Quick Start

Import NaturalLanguage and Translation, then start analyzing text with NLTokenizer/NLTagger and translate with Translation.

Frequently Asked Questions about natural-language

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I perform on-device sentiment analysis and named entity recognition in Swift?

On-device sentiment analysis and named entity recognition use the NaturalLanguage framework with NLTagger and NLEmbedding. You can analyze text directly on iOS 17.4+ or macOS 14.4+ without relying on remote services.

Can I translate text within my iOS app without calling a remote API?

Yes, in-app text translation without remote services is possible using the Translation framework. You can translate text directly on-device in Swift 6.3 and iOS 26+ contexts for multilingual support.

Does NLTagger require specific iOS versions for contextual embeddings and language identification?

NLTagger and NLLanguageRecognizer for language identification require iOS 17.4+ or macOS 14.4+. Generating contextual embeddings with NLEmbedding may require downloading additional on-device assets.

What are the limitations of using NLTokenizer and NLTagger for text tokenization?

A key limitation of NLTokenizer and NLTagger is that they are not thread-safe. When segmenting text into words or sentences, you must manage concurrency carefully to avoid issues in your Swift application.

How do I segment text into sentences and identify the dominant language using NaturalLanguage?

To segment text and identify the dominant language, use NLTokenizer for word or sentence boundaries and NLLanguageRecognizer for detection. Both are part of the NaturalLanguage framework for on-device analysis.

What is the best way to generate word embeddings locally for text analysis?

The best way to generate word and sentence embeddings locally is using NLEmbedding within the NaturalLanguage framework. It provides contextual insights on-device, though additional assets may be required.