Keras provides different preprocessing layers to deal with different modalities of data. This guide provids a comprehensive introduction. Our example involves preprocessing labels at the character level. This means that if there are two labels, e.g. \"cat\" and \"dog\", then our character vocabulary should be {a, c, d, g, o, t} (without any special tokens). We use the StringLookup layer for this purpose.