text.case_fold_utf8
Applies case folding to every UTF-8 string in the input.
text.case_fold_utf8(
input, name=None
)
Used in the notebooks
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)>
Args |
input
|
A Tensor or RaggedTensor of UTF-8 encoded strings.
|
name
|
The name for this op (optional).
|
Returns |
A Tensor or RaggedTensor of type string, with case-folded contents.
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-12-20 UTC.
[null,null,["Last updated 2024-12-20 UTC."],[],[]]