natural-language

Analyze and translate natural language text in iOS/macOS apps using Apple frameworks.

Updated May 10, 2026
One-click install
npx skills add https://github.com/FelixRauch/medat-figuren --skill natural-language-felixrauch
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: natural-language
Source: https://github.com/FelixRauch/medat-figuren/tree/main/.agents/skills/natural-language
Command: npx skills add https://github.com/FelixRauch/medat-figuren --skill natural-language-felixrauch

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

It solves the need to analyze and understand natural language text and translate it accurately for iOS/macOS/visionOS apps without building custom NLP pipelines.

Core Features & Use Cases

  • Tokenization & linguistic analysis: identify word, sentence, and paragraph boundaries and enumerate tokens with attributes for numeric or emoji detection.
  • Language identification and tagging: detect dominant language and perform part-of-speech tagging, named entity recognition, and lemmatization with NLTagger and related schemes.
  • Semantic signals & translation: compute sentiment scores and word/sentence embeddings with NLEmbedding, then translate text using the Translation framework with optional built-in UI or programmatic sessions.

Quick Start

Use the natural-language skill to detect the dominant language, extract named entities, and translate the same text into Spanish for display in your SwiftUI interface.

Frequently Asked Questions about natural-language

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

FAQPage Schema
How do I perform named entity recognition and sentiment analysis in an iOS app?

You can perform named entity recognition and sentiment analysis on-device using Apple's NaturalLanguage framework, specifically NLTagger for entity tagging and NLEmbedding for computing sentiment scores.

What's the best way to translate text natively on macOS and iOS without third-party APIs?

Text translation can be handled natively using Apple's Translation framework, which provides TranslationSession and LanguageAvailability to translate text while safely managing optional assets.

Can I detect the dominant language and tokenize text locally on-device?

Yes, on-device language detection and tokenization are supported via NLLanguageRecognizer to identify the dominant language and NLTokenizer to enumerate word, sentence, and paragraph boundaries.

How do I compute semantic similarity between text strings in Swift?

Semantic similarity is computed by generating word and sentence embeddings with NLEmbedding, allowing you to mathematically compare and extract semantic signals from natural language text.

Does the Apple Translation framework require an internet connection for language identification?

Language identification is performed on-device with NLLanguageRecognizer, but the Translation framework requires checking LanguageAvailability and safely handling optional assets for translation tasks.

Are there limitations when using NLEmbedding for multilingual search query enrichment?

NLEmbedding requires safe handling of optional assets and thread usage, meaning you must manage asset availability and concurrency safely when enriching multilingual search queries.