2022-02-24 15:57:18 +08:00
|
|
|
mindspore.dataset.text.SentencePieceModel
|
|
|
|
|
==========================================
|
|
|
|
|
|
2022-02-28 14:19:59 +08:00
|
|
|
.. py:class:: mindspore.dataset.text.SentencePieceModel
|
2022-02-24 15:57:18 +08:00
|
|
|
|
2022-03-03 18:05:27 +08:00
|
|
|
SentencePiece分词方法的枚举类。
|
2022-02-24 15:57:18 +08:00
|
|
|
|
2022-02-26 11:08:21 +08:00
|
|
|
可选的枚举值包括: `SentencePieceModel.UNIGRAM` 、 `SentencePieceModel.BPE` 、 `SentencePieceModel.CHAR` 和 `SentencePieceModel.WORD` 。
|
2022-02-24 15:57:18 +08:00
|
|
|
|
|
|
|
|
- **SentencePieceModel.UNIGRAM** - Unigram语言模型意味着句子中的下一个单词被假定为独立于模型生成的前一个单词。
|
2022-03-31 11:10:18 +08:00
|
|
|
- **SentencePieceModel.BPE** - 指字节对编码算法,它取代了最频繁的句子对中的字节数,其中包含一个未使用的字节。
|
2022-02-24 15:57:18 +08:00
|
|
|
- **SentencePieceModel.CHAR** - 引用基于字符的SentencePiece模型类型。
|
|
|
|
|
- **SentencePieceModel.WORD** - 引用基于单词的SentencePiece模型类型。
|
2022-02-17 15:00:08 +08:00
|
|
|
|