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.

Parameters
  • 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.

Parameters

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.

Returns

a boolean value.

void set_max_skip_size(const int64_t max_skip_size)

Method to set max_skip_size attribute.

Parameters

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.

Returns

an integer value.

void set_ngram_size(const int64_t ngram_size)

Method to set ngram_size attribute.

Parameters

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

int64_t get_ngram_size() const

Method to get ngram_size attribute.

Returns

an integer value.