<!--
{
  "availability" : [

  ],
  "documentType" : "symbol",
  "framework" : "NaturalLanguage",
  "identifier" : "/documentation/NaturalLanguage",
  "metadataVersion" : "0.1.0",
  "role" : "Framework",
  "symbol" : {
    "kind" : "Framework",
    "modules" : [
      "Natural Language"
    ],
    "preciseIdentifier" : "NaturalLanguage"
  },
  "title" : "Natural Language"
}
-->

# Natural Language

Analyze natural language text and deduce its language-specific metadata.

## Overview

The Natural Language framework provides a variety of natural language processing (NLP) functionality with support for many different languages and scripts. Use this framework to segment natural language text into paragraphs, sentences, or words, and tag information about those segments, such as part of speech, lexical class, lemma, script, and language.

![Diagram showing the types of analysis that the Natural Language framework can perform.](images/com.apple.naturallanguage/media-3597579@2x.png)

Use this framework to perform tasks like:

- *Language identification*, automatically detecting the language of a piece of text.
- *Tokenization*, breaking up a piece of text into linguistic units or tokens.
- *Parts-of-speech tagging*, marking up individual words with their part of speech.
- *Lemmatization*, deducing a word’s stem based on its morphological analysis.
- *Named entity recognition*, identifying tokens as names of people, places, or organizations.

You can also use this framework with Create ML to train and deploy custom natural language models. For more information, see <doc://com.apple.documentation/documentation/CreateML/creating-a-text-classifier-model> and <doc:creating-a-word-tagger-model>.

## Topics

### Tokenization

[Tokenizing natural language text](/documentation/NaturalLanguage/tokenizing-natural-language-text)

Enumerate the words in a string.

[`NLTokenizer`](/documentation/NaturalLanguage/NLTokenizer)

A tokenizer that segments natural language text into semantic units.

### Language identification

[Identifying the language in text](/documentation/NaturalLanguage/identifying-the-language-in-text)

Detect the language in a piece of text by using a language recognizer.

[`NLLanguageRecognizer`](/documentation/NaturalLanguage/NLLanguageRecognizer)

The language of a body of text.

[`NLLanguage`](/documentation/NaturalLanguage/NLLanguage)

The languages that the Natural Language framework supports.

### Linguistic tags

[Identifying parts of speech](/documentation/NaturalLanguage/identifying-parts-of-speech)

Classify nouns, verbs, adjectives, and other parts of speech in a string.

[Identifying people, places, and organizations](/documentation/NaturalLanguage/identifying-people-places-and-organizations)

Use a linguistic tagger to perform named entity recognition on a string.

[`NLTagger`](/documentation/NaturalLanguage/NLTagger)

A tagger that analyzes natural language text.

### Text embedding

[Finding similarities between pieces of text](/documentation/NaturalLanguage/finding-similarities-between-pieces-of-text)

Calculate the semantic distance between words or sentences.

[`NLEmbedding`](/documentation/NaturalLanguage/NLEmbedding)

A map of strings to vectors, which locates neighboring, similar strings.

### Contextual embedding

[`NLContextualEmbedding`](/documentation/NaturalLanguage/NLContextualEmbedding)

A model that computes sequences of embedding vectors for natural language utterances.

[`NLContextualEmbeddingKey`](/documentation/NaturalLanguage/NLContextualEmbeddingKey)

This class defines properties that you can filter or search for contextual embeddings.

[`NLScript`](/documentation/NaturalLanguage/NLScript)

The writing scripts that the Natural Language framework supports.

### Natural language models

  <doc://com.apple.documentation/documentation/CreateML/creating-a-text-classifier-model>

  <doc://com.apple.documentation/documentation/CreateML/creating-a-word-tagger-model>

[`NLModel`](/documentation/NaturalLanguage/NLModel)

A custom model trained to classify or tag natural language text.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)