Browse Source

modify file bug

tags/v1.2.0-rc1
shenwei41 4 years ago
parent
commit
aa85eee076
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      mindspore/dataset/text/transforms.py

+ 3
- 2
mindspore/dataset/text/transforms.py View File

@@ -199,14 +199,15 @@ class JiebaTokenizer(TextTensorOperation):
Add user defined word to JiebaTokenizer's dictionary. Add user defined word to JiebaTokenizer's dictionary.


Args: Args:
user_dict (Union[str, dict]): Dictionary to be added, file path or Python dictionary,
user_dict (Union[str, dict]): One of the two loading methods is file path(str) loading
(according to the Jieba dictionary format) and the other is Python dictionary(dict) loading,
Python Dict format: {word1:freq1, word2:freq2,...}. Python Dict format: {word1:freq1, word2:freq2,...}.
Jieba dictionary format : word(required), freq(optional), such as: Jieba dictionary format : word(required), freq(optional), such as:


.. code-block:: .. code-block::


word1 freq1 word1 freq1
word2
word2 None
word3 freq3 word3 freq3


Examples: Examples:


Loading…
Cancel
Save