---
title: MLSequence
framework: coreml
role: symbol
role_heading: Class
path: coreml/mlsequence
---

# MLSequence

A machine learning collection type that stores a series of strings or integers.

## Declaration

```swift
class MLSequence
```

## Overview

Overview A sequence stores a series of integers or strings of any length as the underlying type of an MLFeatureValue. Some classifier models — typically natural language models, such as an NLTagger — produce an MLSequence feature value from their output features.

## Topics

### Creating a sequence

- [init(strings:)](coreml/mlsequence/init(strings:).md)
- [init(int64s:)](coreml/mlsequence/init(int64s:).md)
- [init(empty:)](coreml/mlsequence/init(empty:).md)

### Identifying the sequence’s element type

- [type](coreml/mlsequence/type.md)

### Retrieving the Sequence’s Values

- [stringValues](coreml/mlsequence/stringvalues.md)
- [int64Values](coreml/mlsequence/int64values.md)

### Initializers

- [init(coder:)](coreml/mlsequence/init(coder:).md)
- [init(int64Array:)](coreml/mlsequence/init(int64array:).md)
- [init(stringArray:)](coreml/mlsequence/init(stringarray:).md)

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSCoding](foundation/nscoding.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [NSSecureCoding](foundation/nssecurecoding.md)

## See Also

### Supporting types

- [MLFeatureType](coreml/mlfeaturetype.md)
- [MLShapedArray](coreml/mlshapedarray.md)
- [MLShapedArrayProtocol](coreml/mlshapedarrayprotocol.md)
- [MLMultiArray](coreml/mlmultiarray.md)
