tensorflow:: عملیات:: StringNGrams

#include <string_ops.h>

ngram ها را از داده های رشته ای ناهموار ایجاد می کند.

خلاصه

این تابع یک تانسور ناهموار با ۱ بُعد ناهموار که فقط شامل رشته‌ها است را می‌پذیرد و یک تانسور ناهموار با ۱ بُعد ناهموار که شامل ngramهایی از آن رشته است و در امتداد داخلی‌ترین محور به هم متصل شده‌اند، خروجی می‌دهد.

استدلال‌ها:

  • دامنه: یک شیء دامنه
  • data: The values tensor of the ragged string tensor to make ngrams out of. Must be a 1D string tensor.
  • data_splits: The splits tensor of the ragged string tensor to make ngrams out of.
  • separator: The string to append between elements of the token. Use "" for no separator.
  • ngram_widths: اندازه ngramهایی که باید ایجاد شوند.
  • left_pad: The string to use to pad the left side of the ngram sequence. Only used if pad_width != 0.
  • right_pad: The string to use to pad the right side of the ngram sequence. Only used if pad_width != 0.
  • pad_width: تعداد عناصر padding که باید به هر طرف هر دنباله اضافه شوند. توجه داشته باشید که padding صرف نظر از این مقدار، هرگز بیشتر از 'ngram_widths'-1 نخواهد بود. اگر pad_width=-1 ، آنگاه max(ngram_widths)-1 عنصر اضافه کنید.

بازده:

  • Output ngrams: The values tensor of the output ngrams ragged tensor.
  • Output ngrams_splits: The splits tensor of the output ngrams ragged tensor.

سازنده‌ها و مخرب‌ها

StringNGrams (const :: tensorflow::Scope & scope, :: tensorflow::Input data, :: tensorflow::Input data_splits, StringPiece separator, const gtl::ArraySlice< int > & ngram_widths, StringPiece left_pad, StringPiece right_pad, int64 pad_width, bool preserve_short_sequences)

ویژگی‌های عمومی

ngrams
ngrams_splits
operation

ویژگی‌های عمومی

انگرام‌ها

::tensorflow::Output ngrams

ngrams_splits

::tensorflow::Output ngrams_splits

عملیات

Operation operation

کارکردهای عمومی

StringNGram ها

 StringNGrams(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input data,
  ::tensorflow::Input data_splits,
  StringPiece separator,
  const gtl::ArraySlice< int > & ngram_widths,
  StringPiece left_pad,
  StringPiece right_pad,
  int64 pad_width,
  bool preserve_short_sequences
)