natural-language

Analyze on-device text for language, entities, sentiment, and translation using Apple frameworks.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Apple on-device NLP enables apps to analyze and transform text securely without cloud routing, including tokenization, tagging, NER, sentiment, embeddings, and translation.

Core Features & Use Cases

  • Tokenization with NLTokenizer to split text into words and sentences.
  • Language identification with NLLanguageRecognizer to detect language and origin.
  • Part-of-Speech Tagging and Named Entity Recognition with NLTagger for structured interpretation.
  • Sentiment analysis and text embeddings to gauge tone and semantic similarity.
  • Translation via the Translation framework for programmatic or UI-driven translation within apps.
  • Use Case: Add language-aware features to notes, chat, or content editors by highlighting entities and translating selections.

Quick Start

Analyze a sample text to identify language, entities, sentiment, and translations for selected segments.

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 natural language processing in an iOS app?

On-device natural language processing is achieved using Apple's NaturalLanguage framework to tokenize text, identify languages, tag parts of speech, recognize named entities, and analyze sentiment securely without cloud routing.

Can I add real-time translation to my macOS app without sending data to a server?

Real-time translation can be added programmatically or via UI using Apple's Translation framework, enabling app-based text translation that preserves user privacy by processing entirely on-device.

What's the best way to extract named entities and part-of-speech tags from text in Swift?

The best way to extract named entities and part-of-speech tags is using NLTagger within the NaturalLanguage framework, which provides structured linguistic interpretation for text analysis on iOS and macOS.

Does on-device sentiment analysis require an internet connection to evaluate text tone?

On-device sentiment analysis does not require an internet connection, as the NaturalLanguage framework evaluates text tone and calculates semantic embeddings locally to preserve user privacy.

Do I need iOS 26 and Swift 6.3 to use the NaturalLanguage framework for text embeddings?

Yes, targeting iOS 26+ and Swift 6.3 is required to utilize the full NaturalLanguage and Translation frameworks, including advanced features like text embeddings and programmatic translation.

Why use on-device language identification instead of cloud-based text analysis?

On-device language identification via NLLanguageRecognizer detects text origin locally, ensuring privacy-preserving analysis without cloud routing, making it ideal for secure iOS and macOS applications.