Skip to content


[ ]

SequenceField Objects#

class SequenceField(Field[DataArray])

A SequenceField represents a sequence of things. This class just adds a method onto Field: sequence_length. It exists so that SequenceLabelField, IndexField and other similar Fields can have a single type to require, with a consistent API, whether they are pointing to words in a TextField, items in a ListField, or something else.


 | def sequence_length(self) -> int

How many elements are there in this sequence?


 | def empty_field(self) -> "SequenceField"