natural-language

Tokenize, tag, and translate natural language text in Swift apps.

Updated May 6, 2026
One-click install
npx skills add https://github.com/Roy-wonji/claude-config --skill natural-language-roy-wonji
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: natural-language
Source: https://github.com/Roy-wonji/claude-config/tree/main/skills/swift-ios-skills/skills/natural-language
Command: npx skills add https://github.com/Roy-wonji/claude-config --skill natural-language-roy-wonji

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you analyze natural language strings for linguistic features and translate them across languages in Swift apps.

Core Features & Use Cases

  • Tokenization & linguistic analysis: Segment text into words, sentences, or paragraphs and tag tokens using NaturalLanguage (NLTokenizer, NLTagger).
  • Language identification & semantics: Detect dominant language, run part-of-speech tagging, perform named entity recognition, compute sentiment, and measure semantic similarity with embeddings (NLEmbedding, NLLanguageRecognizer).
  • On-device translation: Translate interactively or programmatically with Translation (TranslationSession, LanguageAvailability), including batch translation and SwiftUI presentation/task integration.

Quick Start

Use the natural-language skill to translate the sentence "Hello, how are you?" into Spanish for your iOS app using the Translation framework APIs.

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 translation in a SwiftUI iOS app?

Perform on-device translation in a SwiftUI iOS app using the Translation framework's TranslationSession and LanguageAvailability APIs. This approach supports interactive or programmatic text translation, including batch processing and direct SwiftUI task integration.

How do I extract named entities and calculate sentiment from natural language text in Swift?

Extract named entities and calculate sentiment from natural language text in Swift using the NaturalLanguage framework. You apply NLTagger for named entity recognition and sentiment scoring, processing strings directly to identify linguistic features.

Can I measure semantic similarity between texts using embeddings on macOS and visionOS?

Yes, you can measure semantic similarity between texts using embeddings on macOS and visionOS. The NaturalLanguage framework provides NLEmbedding to compute semantic similarity, allowing you to analyze and compare natural language strings directly on-device.

What is the best way to tokenize and tag natural language text in iOS?

The best way to tokenize and tag natural language text in iOS is using the NaturalLanguage framework. You apply NLTokenizer to segment text into words, sentences, or paragraphs, and use NLTagger for part-of-speech tagging.

Does the NaturalLanguage framework require availability checks for translation sessions?

Yes, the NaturalLanguage framework requires optional availability checks when managing translation sessions. You must use LanguageAvailability to verify support and maintain careful thread-safety when handling TranslationSession in your app.