<!--
{
  "availability" : [
    "iOS: 12.0.0 -",
    "iPadOS: 12.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.14.0 -",
    "tvOS: 12.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 5.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "NaturalLanguage",
  "identifier" : "/documentation/NaturalLanguage/NLLanguageRecognizer/processString(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Natural Language"
    ],
    "preciseIdentifier" : "c:objc(cs)NLLanguageRecognizer(im)processString:"
  },
  "title" : "processString(_:)"
}
-->

# processString(_:)

Analyzes the piece of text to determine its dominant language.

```
func processString(_ string: String)
```

## Discussion

Use this method to process the provided text and to update the [`dominantLanguage`](/documentation/NaturalLanguage/NLLanguageRecognizer/dominantLanguage) result and `languageHypotheses(withMaximum:)` probabilities.

---

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)