Browse Source

!9991 Modify interface information

From: @shenwei41
Reviewed-by: @heleiwang,@liucunwei
Signed-off-by: @liucunwei
tags/v1.1.0
mindspore-ci-bot Gitee 5 years ago
parent
commit
e6a6b7a7f7
4 changed files with 11 additions and 5 deletions
  1. +4
    -3
      mindspore/ccsrc/minddata/dataset/include/text.h
  2. +1
    -1
      mindspore/ccsrc/minddata/dataset/include/vision.h
  3. +3
    -1
      mindspore/ccsrc/minddata/dataset/include/vision_lite.h
  4. +3
    -0
      mindspore/dataset/text/transforms.py

+ 4
- 3
mindspore/ccsrc/minddata/dataset/include/text.h View File

@@ -127,14 +127,15 @@ std::shared_ptr<CaseFoldOperation> CaseFold();
#endif

/// \brief Tokenize Chinese string into words based on dictionary.
/// \notes The integrity of the HMMSEgment algorithm and MPSegment algorithm files must be confirmed.
/// \param[in] hmm_path Dictionary file is used by HMMSegment algorithm. The dictionary can be obtained on the
/// official website of cppjieba.
/// \param[in] mp_path Dictionary file is used by MPSegment algorithm. The dictionary can be obtained on the
/// official website of cppjieba.
/// \param[in] mode Valid values can be any of [JiebaMode.MP, JiebaMode.HMM, JiebaMode.MIX](default=JiebaMode.MIX).
/// - JiebaMode.MP, tokenize with MPSegment algorithm.
/// - JiebaMode.HMM, tokenize with Hiddel Markov Model Segment algorithm.
/// - JiebaMode.MIX, tokenize with a mix of MPSegment and HMMSegment algorithm.
/// - JiebaMode.kMP, tokenize with MPSegment algorithm.
/// - JiebaMode.kHMM, tokenize with Hiddel Markov Model Segment algorithm.
/// - JiebaMode.kMIX, tokenize with a mix of MPSegment and HMMSegment algorithm.
/// \param[in] with_offsets If or not output offsets of tokens (default=false).
/// \return Shared pointer to the current TensorOperation.
std::shared_ptr<JiebaTokenizerOperation> JiebaTokenizer(const std::string &hmm_path, const std::string &mp_path,


+ 1
- 1
mindspore/ccsrc/minddata/dataset/include/vision.h View File

@@ -385,7 +385,7 @@ std::shared_ptr<RandomResizedCropWithBBoxOperation> RandomResizedCropWithBBox(

/// \brief Function to create a RandomRotation TensorOp
/// \notes Rotates the image according to parameters
/// \param[in] degrees A float vector of size 2, representing the starting and ending degree
/// \param[in] degrees A float vector of size, representing the starting and ending degree
/// \param[in] resample An enum for the mode of interpolation
/// \param[in] expand A boolean representing whether the image is expanded after rotation
/// \param[in] center A float vector of size 2, representing the x and y center of rotation.


+ 3
- 1
mindspore/ccsrc/minddata/dataset/include/vision_lite.h View File

@@ -68,7 +68,9 @@ std::shared_ptr<CenterCropOperation> CenterCrop(std::vector<int32_t> size);
/// \brief Function to create a Crop TensorOp
/// \notes Crop an image based on location and crop size
/// \param[in] coordinates Starting location of crop. Must be a vector of two values, in the form of {x_coor, y_coor}
/// \param[in] size Size of the cropped area. Must be a vector of two values, in the form of {height, width}
/// \param[in] size Size of the cropped area.
/// If size is a single value, a square crop of size (size, size) is returned.
/// If size has 2 values, it should be (height, width).
/// \return Shared pointer to the current TensorOp
std::shared_ptr<CropOperation> Crop(std::vector<int32_t> coordinates, std::vector<int32_t> size);



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

@@ -159,6 +159,9 @@ class JiebaTokenizer(cde.JiebaTokenizerOp):
"""
Tokenize Chinese string into words based on dictionary.

Note:
The integrity of the HMMSEgment algorithm and MPSegment algorithm files must be confirmed.

Args:
hmm_path (str): Dictionary file is used by HMMSegment algorithm.
The dictionary can be obtained on the official website of cppjieba.


Loading…
Cancel
Save