mindspore/docs/api/api_python/dataset_text/mindspore.dataset.text.Pyth...

13 lines
497 B
ReStructuredText
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

mindspore.dataset.text.PythonTokenizer
======================================
.. py:class:: mindspore.dataset.text.PythonTokenizer(tokenizer)
使用用户自定义的分词器对输入字符串进行分词。
参数:
- **tokenizer** (Callable) - Python可调用对象要求接收一个string参数作为输入并返回一个包含多个string的列表作为返回值。
异常:
- **TypeError** - 参数 `tokenizer` 不是一个可调用的Python对象。