mindspore.dataset.text.CaseFold
- class mindspore.dataset.text.CaseFold[source]
Apply case fold operation on UTF-8 string tensor, which is aggressive that can convert more characters into lower case than
str.lower
. For supported normalization forms, please refer to ICU_Normalizer2 .Note
CaseFold is not supported on Windows platform yet.
- Supported Platforms:
CPU
Examples
>>> import mindspore.dataset as ds >>> import mindspore.dataset.text as text >>> case_op = text.CaseFold() >>> text_file_list = ["/path/to/text_file_dataset_file"] >>> text_file_dataset = ds.TextFileDataset(dataset_files=text_file_list) >>> text_file_dataset = text_file_dataset.map(operations=case_op)
- Tutorial Examples: