Have a question? Connect with the community at the TensorFlow Forum Visit Forum

text.case_fold_utf8

Applies case folding to every UTF-8 string in the input.

Used in the notebooks

Used in the tutorials

The input is a Tensor or RaggedTensor of any shape, and the resulting output has the same shape as the input. Note that NFKC normalization is implicitly applied to the strings.

Examples:

# input: <string>[num_strings]
case_fold_utf8(['The   Quick-Brown',
                'CAT jumped over',
                'the lazy dog  !!  '])
# output: <string>[num_strings]
<tf.Tensor: shape=(3,), dtype=string, numpy=
  array([b'the   quick-brown', b'cat jumped over', b'the lazy dog  !!  '],
        dtype=object)>

input A Tensor or RaggedTensor of UTF-8 encoded strings.
name The name for this op (optional).

A Tensor or RaggedTensor of type string, with case-folded contents.