Class SkipGram

Inheritance Relationships

Base Type

  • public mindspore::ops::BaseOperator

Class Documentation

class SkipGram : public mindspore::ops::BaseOperator

SkipGram defined the SkipGram operator prototype.

Public Functions

inline SkipGram()

Constructor.

void Init(const bool include_all_grams, const int64_t max_skip_size, const int64_t ngram_size)

Method to init the op’s attributes.

参数
  • include_all_grams[in] Define a boolean value to indicate whether to include ngram with size lower than ngram_size.

  • max_skip_size[in] Define the maximum number of word to skip.

  • ngram_size[in] Define the the number of word each output item.

void set_include_all_grams(const bool include_all_grams)

Method to set include_all_grams attribute.

参数

include_all_grams[in] Define a boolean value to indicate whether to include ngram with size lower than ngram_size.

bool get_include_all_grams() const

Method to get include_all_grams attribute.

返回

a boolean value.

void set_max_skip_size(const int64_t max_skip_size)

Method to set max_skip_size attribute.

参数

max_skip_size[in] Define the maximum number of word to skip.

int64_t get_max_skip_size() const

Method to get max_skip_size attribute.

返回

an integer value.

void set_ngram_size(const int64_t ngram_size)

Method to set ngram_size attribute.

参数

ngram_size[in] Define the the number of word each output item.

int64_t get_ngram_size() const

Method to get ngram_size attribute.

返回

an integer value.