---
title: "contains(_:)"
framework: naturallanguage
role: symbol
role_heading: Instance Method
path: "naturallanguage/nlembedding/contains(_:)"
---

# contains(_:)

Requests a Boolean value that indicates whether the term is in the vocabulary.

## Declaration

```swift
func contains(_ string: String) -> Bool
```

## Parameters

- `string`: The term to search for in the word embedding.

## Return Value

Return Value true if the term is in the word embedding’s vocabulary, otherwise false.

## See Also

### Inspecting the vocabulary of an embedding

- [dimension](naturallanguage/nlembedding/dimension.md)
- [vocabularySize](naturallanguage/nlembedding/vocabularysize.md)
- [language](naturallanguage/nlembedding/language.md)
- [vector(for:)](naturallanguage/nlembedding/vector(for:).md)
- [revision](naturallanguage/nlembedding/revision.md)
